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:
Jordan Reimer
2023-02-09 09:18:02 -07:00
committed by GitHub
parent dd9a3e05ae
commit 959ff1736c
21 changed files with 252 additions and 99 deletions

View File

@@ -1,7 +1,17 @@
import FetchConfigRoute from './fetch-config';
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { withConfig } from '../decorators/fetch-config';
@withConfig()
export default class KubernetesConfigureRoute extends Route {
@service store;
@service secretMountPath;
export default class KubernetesConfigureRoute extends FetchConfigRoute {
model() {
// in case of any error other than 404 we want to display that to the user
if (this.configError) {
throw this.configError;
}
return {
backend: this.modelFor('application'),
config: this.configModel,