PKI Redesign: setup Ember Engine (#16925)
* setup PKI Ember engine * clean up SecretListHeader and add documentation. * move secret-list-header to addon folder * move options-for-backend helper * fix all for SecretListHeader to work * use secretListHeaderTab by moving to adodn. * add overview empty state * clean up * remove secret-list-header and secret-list-header-tab changes to move to another pr * more cleanup * update syntax with newer guides * good idea jordan
This commit is contained in:
parent
b93d6e44e0
commit
bfccb2155f
|
@ -48,6 +48,24 @@ export default class App extends Application {
|
|||
},
|
||||
},
|
||||
},
|
||||
pki: {
|
||||
dependencies: {
|
||||
services: [
|
||||
'auth',
|
||||
'flash-messages',
|
||||
'namespace',
|
||||
'path-help',
|
||||
'router',
|
||||
'store',
|
||||
'version',
|
||||
'wizard',
|
||||
'secret-mount-path',
|
||||
],
|
||||
externalRoutes: {
|
||||
secrets: 'vault.cluster.secrets.backends',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -114,6 +114,9 @@ Router.map(function () {
|
|||
this.route('backends', { path: '/' });
|
||||
this.route('backend', { path: '/:backend' }, function () {
|
||||
this.mount('kmip');
|
||||
if (config.environment !== 'production') {
|
||||
this.mount('pki');
|
||||
}
|
||||
this.route('index', { path: '/' });
|
||||
this.route('configuration');
|
||||
// because globs / params can't be empty,
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
import Engine from '@ember/engine';
|
||||
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import Resolver from 'ember-resolver';
|
||||
|
||||
import config from './config/environment';
|
||||
|
||||
const { modulePrefix } = config;
|
||||
|
||||
export default class PkiEngine extends Engine {
|
||||
modulePrefix = modulePrefix;
|
||||
Resolver = Resolver;
|
||||
dependencies = {
|
||||
services: [
|
||||
'auth',
|
||||
'flash-messages',
|
||||
'namespace',
|
||||
'path-help',
|
||||
'router',
|
||||
'store',
|
||||
'version',
|
||||
'wizard',
|
||||
'secret-mount-path',
|
||||
],
|
||||
externalRoutes: ['secrets'],
|
||||
};
|
||||
}
|
||||
|
||||
loadInitializers(PkiEngine, modulePrefix);
|
|
@ -0,0 +1,5 @@
|
|||
import buildRoutes from 'ember-engines/routes';
|
||||
|
||||
export default buildRoutes(function () {
|
||||
this.route('overview');
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OverviewRoute extends Route {}
|
|
@ -0,0 +1 @@
|
|||
{{outlet}}
|
|
@ -0,0 +1 @@
|
|||
Overview WIP
|
|
@ -0,0 +1 @@
|
|||
export { default } from 'pki/routes/overview';
|
|
@ -0,0 +1 @@
|
|||
export { default } from 'pki/templates/overview';
|
|
@ -0,0 +1,11 @@
|
|||
/* eslint-env node */
|
||||
'use strict';
|
||||
|
||||
module.exports = function (environment) {
|
||||
let ENV = {
|
||||
modulePrefix: 'pki',
|
||||
environment,
|
||||
};
|
||||
|
||||
return ENV;
|
||||
};
|
|
@ -0,0 +1,12 @@
|
|||
/* eslint-disable node/no-extraneous-require */
|
||||
const { buildEngine } = require('ember-engines/lib/engine-addon');
|
||||
|
||||
module.exports = buildEngine({
|
||||
name: 'pki',
|
||||
lazyLoading: {
|
||||
enabled: false,
|
||||
},
|
||||
isDevelopingAddon() {
|
||||
return true;
|
||||
},
|
||||
});
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "pki",
|
||||
"keywords": [
|
||||
"ember-addon",
|
||||
"ember-engine"
|
||||
],
|
||||
"dependencies": {
|
||||
"ember-cli-htmlbars": "*",
|
||||
"ember-cli-babel": "*"
|
||||
},
|
||||
"ember-addon": {
|
||||
"paths": [
|
||||
"../core"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -213,6 +213,7 @@
|
|||
"lib/css",
|
||||
"lib/kmip",
|
||||
"lib/open-api-explorer",
|
||||
"lib/pki",
|
||||
"lib/replication",
|
||||
"lib/service-worker-authenticated-download"
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue