mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-19 13:41:10 +02:00
* renames pki check-config decorator to check-issuers * reverts check-issuers decorator function name change
36 lines
896 B
JavaScript
36 lines
896 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Route from '@ember/routing/route';
|
|
import { inject as service } from '@ember/service';
|
|
import { withConfig } from 'pki/decorators/check-issuers';
|
|
import { hash } from 'rsvp';
|
|
|
|
@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.get('firstObject');
|
|
}
|
|
}
|
|
|
|
model() {
|
|
const { acme, cluster, urls, crl, engine } = this.modelFor('configuration');
|
|
return hash({
|
|
hasConfig: this.shouldPromptConfig,
|
|
engine,
|
|
acme,
|
|
cluster,
|
|
urls,
|
|
crl,
|
|
mountConfig: this.fetchMountConfig(engine.id),
|
|
issuerModel: this.store.createRecord('pki/issuer'),
|
|
});
|
|
}
|
|
}
|