mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-11 01:06:06 +00:00
Kubernetes config state updates (#19074)
* hides roles toolbar actions when k8s is not configured * adds error page component to core addon * moves fetch-config to decorator * updates kubernetes prompt config logic * adds kubernetes error route * fixes tests * adds error handling for kubernetes roles list view * removes unneeded arg to withConfig decorator
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { withConfig } from 'kubernetes/decorators/fetch-config';
|
||||
import { hash } from 'rsvp';
|
||||
import FetchConfigRoute from './fetch-config';
|
||||
|
||||
export default class KubernetesOverviewRoute extends FetchConfigRoute {
|
||||
@withConfig()
|
||||
export default class KubernetesOverviewRoute extends Route {
|
||||
@service store;
|
||||
@service secretMountPath;
|
||||
|
||||
async model() {
|
||||
const backend = this.secretMountPath.get();
|
||||
return hash({
|
||||
config: this.configModel,
|
||||
promptConfig: this.promptConfig,
|
||||
backend: this.modelFor('application'),
|
||||
roles: this.store.query('kubernetes/role', { backend }).catch(() => []),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user