mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 03:58:01 +00:00
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:
@@ -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('backends', { path: '/' });
|
||||||
this.route('backend', { path: '/:backend' }, function () {
|
this.route('backend', { path: '/:backend' }, function () {
|
||||||
this.mount('kmip');
|
this.mount('kmip');
|
||||||
|
if (config.environment !== 'production') {
|
||||||
|
this.mount('pki');
|
||||||
|
}
|
||||||
this.route('index', { path: '/' });
|
this.route('index', { path: '/' });
|
||||||
this.route('configuration');
|
this.route('configuration');
|
||||||
// because globs / params can't be empty,
|
// because globs / params can't be empty,
|
||||||
|
|||||||
29
ui/lib/pki/addon/engine.js
Normal file
29
ui/lib/pki/addon/engine.js
Normal file
@@ -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);
|
||||||
5
ui/lib/pki/addon/routes.js
Normal file
5
ui/lib/pki/addon/routes.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import buildRoutes from 'ember-engines/routes';
|
||||||
|
|
||||||
|
export default buildRoutes(function () {
|
||||||
|
this.route('overview');
|
||||||
|
});
|
||||||
3
ui/lib/pki/addon/routes/overview.js
Normal file
3
ui/lib/pki/addon/routes/overview.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import Route from '@ember/routing/route';
|
||||||
|
|
||||||
|
export default class OverviewRoute extends Route {}
|
||||||
1
ui/lib/pki/addon/templates/application.hbs
Normal file
1
ui/lib/pki/addon/templates/application.hbs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{outlet}}
|
||||||
1
ui/lib/pki/addon/templates/overview.hbs
Normal file
1
ui/lib/pki/addon/templates/overview.hbs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Overview WIP
|
||||||
1
ui/lib/pki/app/routes/overview.js
Normal file
1
ui/lib/pki/app/routes/overview.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export { default } from 'pki/routes/overview';
|
||||||
1
ui/lib/pki/app/templates/overview.js
Normal file
1
ui/lib/pki/app/templates/overview.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export { default } from 'pki/templates/overview';
|
||||||
11
ui/lib/pki/config/environment.js
Normal file
11
ui/lib/pki/config/environment.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/* eslint-env node */
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = function (environment) {
|
||||||
|
let ENV = {
|
||||||
|
modulePrefix: 'pki',
|
||||||
|
environment,
|
||||||
|
};
|
||||||
|
|
||||||
|
return ENV;
|
||||||
|
};
|
||||||
12
ui/lib/pki/index.js
Normal file
12
ui/lib/pki/index.js
Normal file
@@ -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;
|
||||||
|
},
|
||||||
|
});
|
||||||
16
ui/lib/pki/package.json
Normal file
16
ui/lib/pki/package.json
Normal file
@@ -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/css",
|
||||||
"lib/kmip",
|
"lib/kmip",
|
||||||
"lib/open-api-explorer",
|
"lib/open-api-explorer",
|
||||||
|
"lib/pki",
|
||||||
"lib/replication",
|
"lib/replication",
|
||||||
"lib/service-worker-authenticated-download"
|
"lib/service-worker-authenticated-download"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user