mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-29 06:31:10 +01:00
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
33731d6f63
commit
e97371680c
@ -15,12 +15,12 @@ export default class App extends Application {
|
|||||||
engines = {
|
engines = {
|
||||||
openApiExplorer: {
|
openApiExplorer: {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
services: ['auth', 'namespace', 'router', 'version'],
|
services: ['auth', 'flash-messages', 'namespace', 'router', 'version'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
replication: {
|
replication: {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
services: ['auth', 'namespace', 'replication-mode', 'router', 'store', 'version'],
|
services: ['auth', 'flash-messages', 'namespace', 'replication-mode', 'router', 'store', 'version'],
|
||||||
externalRoutes: {
|
externalRoutes: {
|
||||||
replication: 'vault.cluster.replication.index',
|
replication: 'vault.cluster.replication.index',
|
||||||
},
|
},
|
||||||
@ -31,6 +31,7 @@ export default class App extends Application {
|
|||||||
services: [
|
services: [
|
||||||
'auth',
|
'auth',
|
||||||
'download',
|
'download',
|
||||||
|
'flash-messages',
|
||||||
'namespace',
|
'namespace',
|
||||||
'path-help',
|
'path-help',
|
||||||
'router',
|
'router',
|
||||||
@ -45,7 +46,7 @@ export default class App extends Application {
|
|||||||
},
|
},
|
||||||
kubernetes: {
|
kubernetes: {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
services: ['router', 'store', 'secret-mount-path'],
|
services: ['router', 'store', 'secret-mount-path', 'flash-messages'],
|
||||||
externalRoutes: {
|
externalRoutes: {
|
||||||
secrets: 'vault.cluster.secrets.backends',
|
secrets: 'vault.cluster.secrets.backends',
|
||||||
},
|
},
|
||||||
@ -56,6 +57,7 @@ export default class App extends Application {
|
|||||||
services: [
|
services: [
|
||||||
'auth',
|
'auth',
|
||||||
'download',
|
'download',
|
||||||
|
'flash-messages',
|
||||||
'namespace',
|
'namespace',
|
||||||
'path-help',
|
'path-help',
|
||||||
'router',
|
'router',
|
||||||
|
|||||||
13
ui/app/services/flash-messages.ts
Normal file
13
ui/app/services/flash-messages.ts
Normal file
@ -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": {
|
"dependencies": {
|
||||||
"ember-cli-htmlbars": "*",
|
"ember-cli-htmlbars": "*",
|
||||||
"ember-cli-flash": "*",
|
|
||||||
"ember-cli-babel": "*"
|
"ember-cli-babel": "*"
|
||||||
},
|
},
|
||||||
"ember-addon": {
|
"ember-addon": {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export default class KubernetesEngine extends Engine {
|
|||||||
modulePrefix = modulePrefix;
|
modulePrefix = modulePrefix;
|
||||||
Resolver = Resolver;
|
Resolver = Resolver;
|
||||||
dependencies = {
|
dependencies = {
|
||||||
services: ['router', 'store', 'secret-mount-path', 'flashMessages'],
|
services: ['router', 'store', 'secret-mount-path', 'flash-messages'],
|
||||||
externalRoutes: ['secrets'],
|
externalRoutes: ['secrets'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ember-cli-htmlbars": "*",
|
"ember-cli-htmlbars": "*",
|
||||||
"ember-cli-babel": "*",
|
"ember-cli-babel": "*",
|
||||||
"ember-cli-flash": "*",
|
|
||||||
"ember-concurrency": "*",
|
"ember-concurrency": "*",
|
||||||
"@ember/test-waiters": "*",
|
"@ember/test-waiters": "*",
|
||||||
"ember-inflector": "*"
|
"ember-inflector": "*"
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ember-cli-htmlbars": "*",
|
"ember-cli-htmlbars": "*",
|
||||||
"ember-cli-babel": "*",
|
"ember-cli-babel": "*",
|
||||||
"ember-cli-flash": "*",
|
|
||||||
"ember-auto-import": "*",
|
"ember-auto-import": "*",
|
||||||
"swagger-ui-dist": "*"
|
"swagger-ui-dist": "*"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { action } from '@ember/object';
|
|||||||
import { task } from 'ember-concurrency';
|
import { task } from 'ember-concurrency';
|
||||||
import { waitFor } from '@ember/test-waiters';
|
import { waitFor } from '@ember/test-waiters';
|
||||||
import errorMessage from 'vault/utils/error-message';
|
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 DownloadService from 'vault/services/download';
|
||||||
import PkiCertificateBaseModel from 'vault/models/pki/certificate/base';
|
import PkiCertificateBaseModel from 'vault/models/pki/certificate/base';
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { tracked } from '@glimmer/tracking';
|
|||||||
// TYPES
|
// TYPES
|
||||||
import Store from '@ember-data/store';
|
import Store from '@ember-data/store';
|
||||||
import Router from '@ember/routing/router';
|
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 PkiActionModel from 'vault/models/pki/action';
|
||||||
import { Breadcrumb } from 'vault/vault/app-types';
|
import { Breadcrumb } from 'vault/vault/app-types';
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { task } from 'ember-concurrency';
|
|||||||
import { waitFor } from '@ember/test-waiters';
|
import { waitFor } from '@ember/test-waiters';
|
||||||
import errorMessage from 'vault/utils/error-message';
|
import errorMessage from 'vault/utils/error-message';
|
||||||
import RouterService from '@ember/routing/router-service';
|
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';
|
import PkiIssuerModel from 'vault/models/pki/issuer';
|
||||||
|
|
||||||
interface Args {
|
interface Args {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
import { action } from '@ember/object';
|
import { action } from '@ember/object';
|
||||||
import Component from '@glimmer/component';
|
import Component from '@glimmer/component';
|
||||||
import RouterService from '@ember/routing/router-service';
|
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 { inject as service } from '@ember/service';
|
||||||
import errorMessage from 'vault/utils/error-message';
|
import errorMessage from 'vault/utils/error-message';
|
||||||
import PkiKeyModel from 'vault/models/pki/key';
|
import PkiKeyModel from 'vault/models/pki/key';
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
import { action } from '@ember/object';
|
import { action } from '@ember/object';
|
||||||
import RouterService from '@ember/routing/router-service';
|
import RouterService from '@ember/routing/router-service';
|
||||||
import Component from '@glimmer/component';
|
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 SecretMountPath from 'vault/services/secret-mount-path';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import errorMessage from 'vault/utils/error-message';
|
import errorMessage from 'vault/utils/error-message';
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { action } from '@ember/object';
|
|||||||
import { task } from 'ember-concurrency';
|
import { task } from 'ember-concurrency';
|
||||||
import { waitFor } from '@ember/test-waiters';
|
import { waitFor } from '@ember/test-waiters';
|
||||||
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
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 PkiActionModel from 'vault/models/pki/action';
|
||||||
import errorMessage from 'vault/utils/error-message';
|
import errorMessage from 'vault/utils/error-message';
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { tracked } from '@glimmer/tracking';
|
|||||||
import { task } from 'ember-concurrency';
|
import { task } from 'ember-concurrency';
|
||||||
import PkiActionModel from 'vault/models/pki/action';
|
import PkiActionModel from 'vault/models/pki/action';
|
||||||
import PkiUrlsModel from 'vault/models/pki/urls';
|
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 errorMessage from 'vault/utils/error-message';
|
||||||
import { parsedParameters } from 'vault/utils/parse-pki-cert-oids';
|
import { parsedParameters } from 'vault/utils/parse-pki-cert-oids';
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { action } from '@ember/object';
|
import { action } from '@ember/object';
|
||||||
import Component from '@glimmer/component';
|
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 { inject as service } from '@ember/service';
|
||||||
import { task } from 'ember-concurrency';
|
import { task } from 'ember-concurrency';
|
||||||
import { tracked } from '@glimmer/tracking';
|
import { tracked } from '@glimmer/tracking';
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import Router from '@ember/routing/router';
|
|||||||
import Store from '@ember-data/store';
|
import Store from '@ember-data/store';
|
||||||
import { tracked } from '@glimmer/tracking';
|
import { tracked } from '@glimmer/tracking';
|
||||||
import errorMessage from 'vault/utils/error-message';
|
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 DownloadService from 'vault/services/download';
|
||||||
import PkiCertificateGenerateModel from 'vault/models/pki/certificate/generate';
|
import PkiCertificateGenerateModel from 'vault/models/pki/certificate/generate';
|
||||||
import PkiCertificateSignModel from 'vault/models/pki/certificate/sign';
|
import PkiCertificateSignModel from 'vault/models/pki/certificate/sign';
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import Component from '@glimmer/component';
|
|||||||
import { tracked } from '@glimmer/tracking';
|
import { tracked } from '@glimmer/tracking';
|
||||||
import { task } from 'ember-concurrency';
|
import { task } from 'ember-concurrency';
|
||||||
import PkiCertificateSignIntermediate from 'vault/models/pki/certificate/sign-intermediate';
|
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';
|
import errorMessage from 'vault/utils/error-message';
|
||||||
|
|
||||||
interface Args {
|
interface Args {
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ember-cli-babel": "*",
|
"ember-cli-babel": "*",
|
||||||
"ember-cli-htmlbars": "*",
|
"ember-cli-htmlbars": "*",
|
||||||
"ember-cli-flash": "*",
|
|
||||||
"ember-cli-typescript": "*",
|
"ember-cli-typescript": "*",
|
||||||
"@types/ember": "latest",
|
"@types/ember": "latest",
|
||||||
"@types/ember-data": "latest",
|
"@types/ember-data": "latest",
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ember-cli-htmlbars": "*",
|
"ember-cli-htmlbars": "*",
|
||||||
"ember-cli-flash": "*",
|
|
||||||
"ember-cli-babel": "*"
|
"ember-cli-babel": "*"
|
||||||
},
|
},
|
||||||
"ember-addon": {
|
"ember-addon": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user