mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
* wip * focusing on js files * rest of the js files * round up the last bits focusing on hbs * address test failures * Update transit-key-test.js * Update ui/app/services/csp-event.js Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com> * Update options.js * build error push --------- Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Route from '@ember/routing/route';
|
|
import { service } from '@ember/service';
|
|
import { withConfig } from 'pki/decorators/check-issuers';
|
|
import { hash } from 'rsvp';
|
|
import { PKI_DEFAULT_EMPTY_STATE_MSG } from 'pki/routes/overview';
|
|
|
|
@withConfig()
|
|
export default class ConfigurationIndexRoute extends Route {
|
|
@service store;
|
|
|
|
async fetchMountConfig(backend) {
|
|
const mountConfig = await this.store.query('secret-engine', { path: backend });
|
|
if (mountConfig) {
|
|
return mountConfig[0];
|
|
}
|
|
}
|
|
|
|
model() {
|
|
const { acme, cluster, urls, crl, engine } = this.modelFor('configuration');
|
|
return hash({
|
|
hasConfig: this.pkiMountHasConfig,
|
|
engine,
|
|
acme,
|
|
cluster,
|
|
urls,
|
|
crl,
|
|
mountConfig: this.fetchMountConfig(engine.id),
|
|
issuerModel: this.store.createRecord('pki/issuer'),
|
|
});
|
|
}
|
|
|
|
setupController(controller, resolvedModel) {
|
|
super.setupController(controller, resolvedModel);
|
|
|
|
controller.notConfiguredMessage = PKI_DEFAULT_EMPTY_STATE_MSG;
|
|
}
|
|
}
|