Re-add custom flash service so engines can extend cluster's template (#19963)
* Revert "UI: Remove custom service (#19925)" This reverts commit b04751d22437b06947a84148c499c4728602b5e1. * replace stickyInfo with options info * revert replacing custom stickyInfo * change flash message name to be consistent throughout application * make service imports consistent for k8 engine * replace stickyInfo with options info * Revert "change flash message name to be consistent throughout application" This reverts commit 17de49894de3976ed708fcf15f19f6f1eb1012a5. * add comment --------- Co-authored-by: Chelsea Shaw <cshaw@hashicorp.com>
This commit is contained in:
parent
a2f457e10c
commit
5a59d2cebb
|
@ -15,12 +15,12 @@ export default class App extends Application {
|
|||
engines = {
|
||||
openApiExplorer: {
|
||||
dependencies: {
|
||||
services: ['auth', 'namespace', 'router', 'version'],
|
||||
services: ['auth', 'flash-messages', 'namespace', 'router', 'version'],
|
||||
},
|
||||
},
|
||||
replication: {
|
||||
dependencies: {
|
||||
services: ['auth', 'namespace', 'replication-mode', 'router', 'store', 'version'],
|
||||
services: ['auth', 'flash-messages', 'namespace', 'replication-mode', 'router', 'store', 'version'],
|
||||
externalRoutes: {
|
||||
replication: 'vault.cluster.replication.index',
|
||||
},
|
||||
|
@ -31,6 +31,7 @@ export default class App extends Application {
|
|||
services: [
|
||||
'auth',
|
||||
'download',
|
||||
'flash-messages',
|
||||
'namespace',
|
||||
'path-help',
|
||||
'router',
|
||||
|
@ -45,7 +46,7 @@ export default class App extends Application {
|
|||
},
|
||||
kubernetes: {
|
||||
dependencies: {
|
||||
services: ['router', 'store', 'secret-mount-path'],
|
||||
services: ['router', 'store', 'secret-mount-path', 'flash-messages'],
|
||||
externalRoutes: {
|
||||
secrets: 'vault.cluster.secrets.backends',
|
||||
},
|
||||
|
@ -56,6 +57,7 @@ export default class App extends Application {
|
|||
services: [
|
||||
'auth',
|
||||
'download',
|
||||
'flash-messages',
|
||||
'namespace',
|
||||
'path-help',
|
||||
'router',
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
import FlashMessages from 'ember-cli-flash/services/flash-messages';
|
||||
|
||||
/*
|
||||
we extend the ember-cli-flash service here so each ember engine can
|
||||
import 'flash-messages' as a dependency giving it access to the
|
||||
<FlashMessage> template in the main app's cluster.hbs file
|
||||
*/
|
||||
export default class FlashMessageService extends FlashMessages {}
|
|
@ -6,7 +6,6 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"ember-cli-htmlbars": "*",
|
||||
"ember-cli-flash": "*",
|
||||
"ember-cli-babel": "*"
|
||||
},
|
||||
"ember-addon": {
|
||||
|
|
|
@ -16,7 +16,7 @@ export default class KubernetesEngine extends Engine {
|
|||
modulePrefix = modulePrefix;
|
||||
Resolver = Resolver;
|
||||
dependencies = {
|
||||
services: ['router', 'store', 'secret-mount-path', 'flashMessages'],
|
||||
services: ['router', 'store', 'secret-mount-path', 'flash-messages'],
|
||||
externalRoutes: ['secrets'],
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
"dependencies": {
|
||||
"ember-cli-htmlbars": "*",
|
||||
"ember-cli-babel": "*",
|
||||
"ember-cli-flash": "*",
|
||||
"ember-concurrency": "*",
|
||||
"@ember/test-waiters": "*",
|
||||
"ember-inflector": "*"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
"dependencies": {
|
||||
"ember-cli-htmlbars": "*",
|
||||
"ember-cli-babel": "*",
|
||||
"ember-cli-flash": "*",
|
||||
"ember-auto-import": "*",
|
||||
"swagger-ui-dist": "*"
|
||||
},
|
||||
|
|
|
@ -9,7 +9,7 @@ import { action } from '@ember/object';
|
|||
import { task } from 'ember-concurrency';
|
||||
import { waitFor } from '@ember/test-waiters';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import DownloadService from 'vault/services/download';
|
||||
import PkiCertificateBaseModel from 'vault/models/pki/certificate/base';
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { tracked } from '@glimmer/tracking';
|
|||
// TYPES
|
||||
import Store from '@ember-data/store';
|
||||
import Router from '@ember/routing/router';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import PkiActionModel from 'vault/models/pki/action';
|
||||
import { Breadcrumb } from 'vault/vault/app-types';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { task } from 'ember-concurrency';
|
|||
import { waitFor } from '@ember/test-waiters';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
import RouterService from '@ember/routing/router-service';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import PkiIssuerModel from 'vault/models/pki/issuer';
|
||||
|
||||
interface Args {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { action } from '@ember/object';
|
||||
import Component from '@glimmer/component';
|
||||
import RouterService from '@ember/routing/router-service';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import { inject as service } from '@ember/service';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
import PkiKeyModel from 'vault/models/pki/key';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { action } from '@ember/object';
|
||||
import RouterService from '@ember/routing/router-service';
|
||||
import Component from '@glimmer/component';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import SecretMountPath from 'vault/services/secret-mount-path';
|
||||
import { inject as service } from '@ember/service';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
|
|
|
@ -10,7 +10,7 @@ import { action } from '@ember/object';
|
|||
import { task } from 'ember-concurrency';
|
||||
import { waitFor } from '@ember/test-waiters';
|
||||
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import PkiActionModel from 'vault/models/pki/action';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { tracked } from '@glimmer/tracking';
|
|||
import { task } from 'ember-concurrency';
|
||||
import PkiActionModel from 'vault/models/pki/action';
|
||||
import PkiUrlsModel from 'vault/models/pki/urls';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
import { parsedParameters } from 'vault/utils/parse-pki-cert-oids';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { action } from '@ember/object';
|
||||
import Component from '@glimmer/component';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { task } from 'ember-concurrency';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
|
|
|
@ -11,7 +11,7 @@ import Router from '@ember/routing/router';
|
|||
import Store from '@ember-data/store';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import DownloadService from 'vault/services/download';
|
||||
import PkiCertificateGenerateModel from 'vault/models/pki/certificate/generate';
|
||||
import PkiCertificateSignModel from 'vault/models/pki/certificate/sign';
|
||||
|
|
|
@ -10,7 +10,7 @@ import Component from '@glimmer/component';
|
|||
import { tracked } from '@glimmer/tracking';
|
||||
import { task } from 'ember-concurrency';
|
||||
import PkiCertificateSignIntermediate from 'vault/models/pki/certificate/sign-intermediate';
|
||||
import FlashMessageService from 'ember-cli-flash/services/flash-messages';
|
||||
import FlashMessageService from 'vault/services/flash-messages';
|
||||
import errorMessage from 'vault/utils/error-message';
|
||||
|
||||
interface Args {
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
"dependencies": {
|
||||
"ember-cli-babel": "*",
|
||||
"ember-cli-htmlbars": "*",
|
||||
"ember-cli-flash": "*",
|
||||
"ember-cli-typescript": "*",
|
||||
"@types/ember": "latest",
|
||||
"@types/ember-data": "latest",
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"ember-cli-htmlbars": "*",
|
||||
"ember-cli-flash": "*",
|
||||
"ember-cli-babel": "*"
|
||||
},
|
||||
"ember-addon": {
|
||||
|
|
Loading…
Reference in New Issue