diff --git a/addons/core/addon/decorators/notify.js b/addons/core/addon/decorators/notify.js index 21c5b7f47..5d34d4b48 100644 --- a/addons/core/addon/decorators/notify.js +++ b/addons/core/addon/decorators/notify.js @@ -12,7 +12,7 @@ export function notifySuccess(notification) { const method = desc.value; desc.value = async function () { const owner = getOwner(this); - const notifyService = owner.lookup('service:notify'); + const notifyService = owner.lookup('service:flashMessages'); const intlService = owner.lookup('service:intl'); const candidateKey = typeof notification === 'function' @@ -25,7 +25,10 @@ export function notifySuccess(notification) { // : candidateKey; const text = intlService.t(candidateKey); const value = await method.apply(this, arguments); - notifyService.success(text); + notifyService.success(text, { + noticationType: 'success', + dismiss: (flash) => flash.destroyMessage(), + }); return value; }; }; @@ -49,7 +52,7 @@ export function notifyError(notification, options = { catch: false }) { const method = desc.value; desc.value = async function () { const owner = getOwner(this); - const notifyService = owner.lookup('service:notify'); + const notifyService = owner.lookup('service:flashMessages'); const intlService = owner.lookup('service:intl'); try { @@ -64,7 +67,11 @@ export function notifyError(notification, options = { catch: false }) { ? intlService.t(candidateKey) : candidateKey; - notifyService.error(text, { closeAfter: null }); + notifyService.danger(text, { + noticationType: 'error', + sticky: true, + dismiss: (flash) => flash.destroyMessage(), + }); if (options.catch) { // squelch the error diff --git a/ui/admin/app/controllers/application.js b/ui/admin/app/controllers/application.js index 0eb5226e0..b1df3cae3 100644 --- a/ui/admin/app/controllers/application.js +++ b/ui/admin/app/controllers/application.js @@ -1,13 +1,9 @@ import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; -import config from '../config/environment'; export default class ApplicationController extends Controller { // =services @service session; - - // =attributes - - notifyTimeout = config.notifyTimeout; + @service flashMessages; } diff --git a/ui/admin/app/routes/account/change-password.js b/ui/admin/app/routes/account/change-password.js index f947fa6f4..c207c1be2 100644 --- a/ui/admin/app/routes/account/change-password.js +++ b/ui/admin/app/routes/account/change-password.js @@ -11,7 +11,7 @@ export default class AccountChangePasswordRoute extends Route { @service session; @service intl; - @service notify; + @service router; // =methods diff --git a/ui/admin/app/routes/scopes/scope/auth-methods.js b/ui/admin/app/routes/scopes/scope/auth-methods.js index 627647680..8bb452476 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods.js @@ -10,7 +10,7 @@ export default class ScopesScopeAuthMethodsRoute extends Route { // =services @service intl; - @service notify; + @service session; @service can; @service resourceFilterStore; diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js index 7e92b3e83..ed0ebd622 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js @@ -9,7 +9,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route // =services @service intl; - @service notify; + @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js index c1a1ba32f..561cb6d8d 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js @@ -8,7 +8,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRout // =services @service intl; - @service notify; + @service router; // =actions diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js index 5c74f951b..ce203d7da 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups.js @@ -9,7 +9,7 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends // =services @service intl; - @service notify; + @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/authenticate/method.js b/ui/admin/app/routes/scopes/scope/authenticate/method.js index d09ef3688..9b7ede0ae 100644 --- a/ui/admin/app/routes/scopes/scope/authenticate/method.js +++ b/ui/admin/app/routes/scopes/scope/authenticate/method.js @@ -9,7 +9,7 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route { // =services @service session; - @service notify; + @service intl; @service windowManager; @service router; diff --git a/ui/admin/app/routes/scopes/scope/groups.js b/ui/admin/app/routes/scopes/scope/groups.js index bc08a0424..300b75f8a 100644 --- a/ui/admin/app/routes/scopes/scope/groups.js +++ b/ui/admin/app/routes/scopes/scope/groups.js @@ -9,7 +9,7 @@ export default class ScopesScopeGroupsRoute extends Route { // =services @service intl; - @service notify; + @service session; @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/groups/group/add-members.js b/ui/admin/app/routes/scopes/scope/groups/group/add-members.js index 66df5a849..a9f859ca1 100644 --- a/ui/admin/app/routes/scopes/scope/groups/group/add-members.js +++ b/ui/admin/app/routes/scopes/scope/groups/group/add-members.js @@ -10,7 +10,7 @@ export default class ScopesScopeGroupsGroupAddMembersRoute extends Route { // =services @service intl; - @service notify; + @service router; @service store; @service resourceFilterStore; diff --git a/ui/admin/app/routes/scopes/scope/groups/group/members.js b/ui/admin/app/routes/scopes/scope/groups/group/members.js index b15451bd9..69f056ac8 100644 --- a/ui/admin/app/routes/scopes/scope/groups/group/members.js +++ b/ui/admin/app/routes/scopes/scope/groups/group/members.js @@ -10,7 +10,7 @@ export default class ScopesScopeGroupsGroupMembersRoute extends Route { // =services @service intl; - @service notify; + @service resourceFilterStore; // =methods diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs.js b/ui/admin/app/routes/scopes/scope/host-catalogs.js index ad8b881d1..2e31e57bc 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs.js @@ -9,7 +9,7 @@ export default class ScopesScopeHostCatalogsRoute extends Route { // =services @service intl; - @service notify; + @service session; @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js index dc6fdccea..72431e28a 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js @@ -9,7 +9,7 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsRoute extends Rou // =services @service intl; - @service notify; + @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js index 6ade00f97..65d68d8d3 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js @@ -9,7 +9,7 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetAddHostsRo // =services @service intl; - @service notify; + @service router; // =methods diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js index 99aa7fe2e..7a4d78492 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js @@ -8,7 +8,7 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetCreateAndA // =services @service intl; - @service notify; + @service router; // =methods diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js index 24f6f1e3b..c116a51a6 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js @@ -10,7 +10,6 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetHostsRoute // =services @service intl; - @service notify; // =methods diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js index 39f6ff271..7eb1168ff 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js @@ -9,7 +9,7 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsRoute extends Route // =services @service intl; - @service notify; + @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/roles.js b/ui/admin/app/routes/scopes/scope/roles.js index 7c263848b..ccbca8c5a 100644 --- a/ui/admin/app/routes/scopes/scope/roles.js +++ b/ui/admin/app/routes/scopes/scope/roles.js @@ -9,7 +9,7 @@ export default class ScopesScopeRolesRoute extends Route { // =services @service intl; - @service notify; + @service session; @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js b/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js index f900f0c33..324d94d2e 100644 --- a/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js +++ b/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js @@ -10,7 +10,7 @@ export default class ScopesScopeRolesRoleAddPrincipalsRoute extends Route { // =services @service intl; - @service notify; + @service router; @service store; @service resourceFilterStore; diff --git a/ui/admin/app/routes/scopes/scope/roles/role/grants.js b/ui/admin/app/routes/scopes/scope/roles/role/grants.js index 4a71f62d2..b2cbc11cb 100644 --- a/ui/admin/app/routes/scopes/scope/roles/role/grants.js +++ b/ui/admin/app/routes/scopes/scope/roles/role/grants.js @@ -8,7 +8,6 @@ export default class ScopesScopeRolesRoleGrantsRoute extends Route { // =services @service intl; - @service notify; // =actions diff --git a/ui/admin/app/routes/scopes/scope/roles/role/principals.js b/ui/admin/app/routes/scopes/scope/roles/role/principals.js index 737d50518..25b9cbb64 100644 --- a/ui/admin/app/routes/scopes/scope/roles/role/principals.js +++ b/ui/admin/app/routes/scopes/scope/roles/role/principals.js @@ -8,7 +8,7 @@ import { notifySuccess, notifyError } from 'core/decorators/notify'; export default class ScopesScopeRolesRolePrincipalsRoute extends Route { // =services @service intl; - @service notify; + @service resourceFilterStore; // =methods diff --git a/ui/admin/app/routes/scopes/scope/sessions.js b/ui/admin/app/routes/scopes/scope/sessions.js index 749b26de6..d536fab4f 100644 --- a/ui/admin/app/routes/scopes/scope/sessions.js +++ b/ui/admin/app/routes/scopes/scope/sessions.js @@ -14,7 +14,7 @@ export default class ScopesScopeSessionsRoute extends Route { // =services @service intl; - @service notify; + @service session; @service resourceFilterStore; @service router; diff --git a/ui/admin/app/routes/scopes/scope/targets.js b/ui/admin/app/routes/scopes/scope/targets.js index cbdbce41a..c21246f33 100644 --- a/ui/admin/app/routes/scopes/scope/targets.js +++ b/ui/admin/app/routes/scopes/scope/targets.js @@ -9,7 +9,7 @@ export default class ScopesScopeTargetsRoute extends Route { // =services @service intl; - @service notify; + @service session; @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/targets/target/add-brokered-credential-sources.js b/ui/admin/app/routes/scopes/scope/targets/target/add-brokered-credential-sources.js index 14077c279..653af477e 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target/add-brokered-credential-sources.js +++ b/ui/admin/app/routes/scopes/scope/targets/target/add-brokered-credential-sources.js @@ -9,7 +9,7 @@ export default class ScopesScopeTargetsTargetAddBrokeredCredentialSourcesRoute e // =services @service intl; - @service notify; + @service router; // =methods diff --git a/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js b/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js index e6ac82e32..685d1cdb7 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js +++ b/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js @@ -9,7 +9,7 @@ export default class ScopesScopeTargetsTargetAddHostSourcesRoute extends Route { // =services @service intl; - @service notify; + @service router; // =methods diff --git a/ui/admin/app/routes/scopes/scope/targets/target/host-sources.js b/ui/admin/app/routes/scopes/scope/targets/target/host-sources.js index 3f53af127..d27cdcdab 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target/host-sources.js +++ b/ui/admin/app/routes/scopes/scope/targets/target/host-sources.js @@ -10,7 +10,6 @@ export default class ScopesScopeTargetsTargetHostSourcesRoute extends Route { // =services @service intl; - @service notify; // =methods diff --git a/ui/admin/app/routes/scopes/scope/users.js b/ui/admin/app/routes/scopes/scope/users.js index 62d19af6d..4fcd37edf 100644 --- a/ui/admin/app/routes/scopes/scope/users.js +++ b/ui/admin/app/routes/scopes/scope/users.js @@ -9,7 +9,7 @@ export default class ScopesScopeUsersRoute extends Route { // =services @service intl; - @service notify; + @service session; @service can; @service router; diff --git a/ui/admin/app/routes/scopes/scope/users/user/accounts.js b/ui/admin/app/routes/scopes/scope/users/user/accounts.js index 468555aab..e5252aa3e 100644 --- a/ui/admin/app/routes/scopes/scope/users/user/accounts.js +++ b/ui/admin/app/routes/scopes/scope/users/user/accounts.js @@ -9,7 +9,6 @@ export default class ScopesScopeUsersUserAccountsRoute extends Route { // =services @service intl; - @service notify; // =methods diff --git a/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js b/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js index 5b0f2404c..579a86c6a 100644 --- a/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js +++ b/ui/admin/app/routes/scopes/scope/users/user/add-accounts.js @@ -9,7 +9,7 @@ export default class ScopesScopeUsersUserAddAccountsRoute extends Route { // =services @service intl; - @service notify; + @service router; // =methods diff --git a/ui/admin/app/templates/application.hbs b/ui/admin/app/templates/application.hbs index 0bb6628c4..381476b36 100644 --- a/ui/admin/app/templates/application.hbs +++ b/ui/admin/app/templates/application.hbs @@ -84,16 +84,26 @@ - - - {{message.text}} - - +{{#if this.flashMessages.queue}} +
+ {{#each this.flashMessages.queue as |flash|}} +
+ + {{flash.message}} + +
+ {{/each}} +
+{{/if}} {{#if confirmation.options.isAbandonConfirm}} diff --git a/ui/admin/config/environment.js b/ui/admin/config/environment.js index b58ae8e27..62557f988 100644 --- a/ui/admin/config/environment.js +++ b/ui/admin/config/environment.js @@ -51,7 +51,6 @@ module.exports = function (environment) { appName: APP_NAME, companyName: 'HashiCorp', - notifyTimeout: 4000, sessionPollingTimeoutSeconds: 300, oidcPollingTimeoutSeconds: 1, @@ -101,6 +100,10 @@ module.exports = function (environment) { directory: '../../addons/api/mirage', }, + flashMessageDefaults: { + timeout: 4000, + }, + featureFlags: featureEditions[EDITION], }; @@ -139,7 +142,8 @@ module.exports = function (environment) { ENV.APP.autoboot = false; // Notification timeout should be 0 for fast tests - ENV.notifyTimeout = 0; + ENV.flashMessageDefaults.timeout = 0; + ENV.enableConfirmService = false; // Enable tests for development features diff --git a/ui/admin/package.json b/ui/admin/package.json index d92220bdd..ec5a9a291 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -60,6 +60,7 @@ "ember-cli-code-coverage": "^1.0.3", "ember-cli-content-security-policy": "^2.0.3", "ember-cli-dependency-checker": "^3.2.0", + "ember-cli-flash": "^4.0.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sass": "^10.0.1", @@ -72,7 +73,6 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^1.0.0", "ember-modifier": "^2.1.2", - "ember-notify": "^6.0.1", "ember-page-title": "^7.0.0", "ember-pollster": "^0.0.1-beta.2", "ember-qunit": "^5.1.4", diff --git a/ui/admin/tests/helpers/flash-message.js b/ui/admin/tests/helpers/flash-message.js new file mode 100644 index 000000000..56646e876 --- /dev/null +++ b/ui/admin/tests/helpers/flash-message.js @@ -0,0 +1,3 @@ +import FlashObject from 'ember-cli-flash/flash/object'; + +FlashObject.reopen({ init() {} }); diff --git a/ui/admin/tests/test-helper.js b/ui/admin/tests/test-helper.js index f4950f34d..e976b1cab 100644 --- a/ui/admin/tests/test-helper.js +++ b/ui/admin/tests/test-helper.js @@ -4,6 +4,8 @@ import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; import { setup } from 'qunit-dom'; //import { start } from 'ember-qunit'; +import './helpers/flash-message'; + import start from 'ember-exam/test-support/start'; setApplication(Application.create(config.APP)); diff --git a/ui/desktop/app/controllers/application.js b/ui/desktop/app/controllers/application.js index 0eb5226e0..b1df3cae3 100644 --- a/ui/desktop/app/controllers/application.js +++ b/ui/desktop/app/controllers/application.js @@ -1,13 +1,9 @@ import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; -import config from '../config/environment'; export default class ApplicationController extends Controller { // =services @service session; - - // =attributes - - notifyTimeout = config.notifyTimeout; + @service flashMessages; } diff --git a/ui/desktop/app/routes/cluster-url.js b/ui/desktop/app/routes/cluster-url.js index 666ce91b3..a2c050e16 100644 --- a/ui/desktop/app/routes/cluster-url.js +++ b/ui/desktop/app/routes/cluster-url.js @@ -11,7 +11,7 @@ export default class ClusterUrlRoute extends Route { @service session; @service clusterUrl; @service intl; - @service notify; + @service flashMessages; @service router; // =attributes @@ -78,7 +78,11 @@ export default class ClusterUrlRoute extends Route { const errorMessage = this.intl.t( 'errors.cluster-url-verification-failed.description' ); - this.notify.error(errorMessage, { closeAfter: null }); + this.flashMessages.danger(errorMessage, { + noticationType: 'error', + sticky: true, + dismiss: (flash) => flash.destroyMessage(), + }); } } } diff --git a/ui/desktop/app/routes/scopes/scope/authenticate/method.js b/ui/desktop/app/routes/scopes/scope/authenticate/method.js index 02d8d90d8..77b9cdae5 100644 --- a/ui/desktop/app/routes/scopes/scope/authenticate/method.js +++ b/ui/desktop/app/routes/scopes/scope/authenticate/method.js @@ -9,7 +9,7 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route { // =services @service session; - @service notify; + @service ipc; @service intl; @service router; diff --git a/ui/desktop/app/routes/scopes/scope/projects/targets.js b/ui/desktop/app/routes/scopes/scope/projects/targets.js index d2c2747b7..b0d449e86 100644 --- a/ui/desktop/app/routes/scopes/scope/projects/targets.js +++ b/ui/desktop/app/routes/scopes/scope/projects/targets.js @@ -13,7 +13,7 @@ export default class ScopesScopeProjectsTargetsRoute extends Route { @service ipc; @service session; @service clusterUrl; - @service notify; + @service confirm; @service resourceFilterStore; @service router; diff --git a/ui/desktop/app/routes/scopes/scope/projects/targets/target/hosts.js b/ui/desktop/app/routes/scopes/scope/projects/targets/target/hosts.js index 4a40be0e6..5e6040532 100644 --- a/ui/desktop/app/routes/scopes/scope/projects/targets/target/hosts.js +++ b/ui/desktop/app/routes/scopes/scope/projects/targets/target/hosts.js @@ -8,7 +8,7 @@ export default class ScopesScopeProjectsTargetsTargetHostsRoute extends Route { @service ipc; @service session; @service clusterUrl; - @service notify; + @service confirm; // =methods diff --git a/ui/desktop/app/templates/application.hbs b/ui/desktop/app/templates/application.hbs index 6f208d1a8..838a6bfbd 100644 --- a/ui/desktop/app/templates/application.hbs +++ b/ui/desktop/app/templates/application.hbs @@ -90,16 +90,26 @@ - - - {{message.text}} - - +{{#if this.flashMessages.queue}} +
+ {{#each this.flashMessages.queue as |flash|}} +
+ + {{flash.message}} + +
+ {{/each}} +
+{{/if}} {{#if confirmation.options.isConnectError}} diff --git a/ui/desktop/config/environment.js b/ui/desktop/config/environment.js index 906218d47..c8fde022b 100644 --- a/ui/desktop/config/environment.js +++ b/ui/desktop/config/environment.js @@ -42,7 +42,6 @@ module.exports = function (environment) { appName: APP_NAME, - notifyTimeout: 4000, sessionPollingTimeoutSeconds: 300, oidcPollingTimeoutSeconds: 1, @@ -54,6 +53,10 @@ module.exports = function (environment) { }, }, + flashMessageDefaults: { + timeout: 4000, + }, + featureFlags: { search: false, filter: true, @@ -93,7 +96,7 @@ module.exports = function (environment) { ENV.APP.autoboot = false; // Notification timeout should be 0 for fast tests - ENV.notifyTimeout = 0; + ENV.flashMessageDefaults.timeout = 0; ENV.enableConfirmService = false; diff --git a/ui/desktop/package.json b/ui/desktop/package.json index ea3ca2032..46b9d55a0 100755 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -78,6 +78,7 @@ "ember-cli-babel": "^7.26.8", "ember-cli-code-coverage": "^1.0.3", "ember-cli-dependency-checker": "^3.2.0", + "ember-cli-flash": "^4.0.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sass": "^10.0.1", @@ -91,7 +92,6 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^1.0.0", "ember-modifier": "^2.1.2", - "ember-notify": "^6.0.1", "ember-page-title": "^7.0.0", "ember-pollster": "^0.0.1-beta.2", "ember-qunit": "^5.1.4", diff --git a/ui/desktop/tests/helpers/flash-message.js b/ui/desktop/tests/helpers/flash-message.js new file mode 100644 index 000000000..56646e876 --- /dev/null +++ b/ui/desktop/tests/helpers/flash-message.js @@ -0,0 +1,3 @@ +import FlashObject from 'ember-cli-flash/flash/object'; + +FlashObject.reopen({ init() {} }); diff --git a/ui/desktop/tests/test-helper.js b/ui/desktop/tests/test-helper.js index e2d6cc5a0..ed91cb375 100644 --- a/ui/desktop/tests/test-helper.js +++ b/ui/desktop/tests/test-helper.js @@ -4,6 +4,7 @@ import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; import { setup } from 'qunit-dom'; import { start } from 'ember-qunit'; +import './helpers/flash-message'; setApplication(Application.create(config.APP)); diff --git a/yarn.lock b/yarn.lock index 866653c44..c600b5144 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3869,7 +3869,7 @@ ember-cli-babel "^7.22.1" ember-compatibility-helpers "^1.1.1" -"@ember/render-modifiers@^1.0.2 || ^2.0.0", "@ember/render-modifiers@^2.0.4": +"@ember/render-modifiers@^1.0.2 || ^2.0.0", "@ember/render-modifiers@^2.0.2", "@ember/render-modifiers@^2.0.4": version "2.0.4" resolved "https://registry.yarnpkg.com/@ember/render-modifiers/-/render-modifiers-2.0.4.tgz#0ac7af647cb736076dbfcd54ca71e090cd329d71" integrity sha512-Zh/fo5VUmVzYHkHVvzWVjJ1RjFUxA2jH0zCp2+DQa80Bf3DUXauiEByxU22UkN4LFT55DBFttC0xCQSJG3WTsg== @@ -9742,9 +9742,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001157, caniuse-lite@^1.0.30001370: - version "1.0.30001370" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz#0a30d4f20d38b9e108cc5ae7cc62df9fe66cd5ba" - integrity sha512-3PDmaP56wz/qz7G508xzjx8C+MC2qEm4SYhSEzC9IBROo+dGXFWRuaXkWti0A9tuI00g+toiriVqxtWMgl350g== + version "1.0.30001382" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001382.tgz#4d37f0d0b6fffb826c8e5e1c0f4bf8ce592db949" + integrity sha512-2rtJwDmSZ716Pxm1wCtbPvHtbDWAreTPxXbkc5RkKglow3Ig/4GNGazDI9/BVnXbG/wnv6r3B5FEbkfg9OcTGg== capture-exit@^2.0.0: version "2.0.0" @@ -11839,7 +11839,7 @@ ember-auto-import@^1.11.3: walk-sync "^0.3.3" webpack "^4.43.0" -ember-auto-import@^2.4.2: +ember-auto-import@^2.4.1, ember-auto-import@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/ember-auto-import/-/ember-auto-import-2.4.2.tgz#d4d3bc6885a11cf124f606f5c37169bdf76e37ae" integrity sha512-REh+1aJWpTkvN42a/ga41OuRpUsSW7UQfPr2wPtYx56o/xoSNhVBXejy7yV9ObrkN7gogz6fs2xZwih5cOwpYg== @@ -12012,6 +12012,18 @@ ember-cli-dependency-checker@^3.2.0: resolve "^1.5.0" semver "^5.3.0" +ember-cli-flash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/ember-cli-flash/-/ember-cli-flash-4.0.0.tgz#e6886a9a76718c7740942eb812d3f5427f15760d" + integrity sha512-FEynX637xuFlmjMptAUBlww+GeYBcalnMYtDtzsBtLvnsBfU2Gd8xZVrCqQaqEAmHobxKLrYdTKu0YSY7ptIuQ== + dependencies: + "@ember/render-modifiers" "^2.0.2" + "@glimmer/component" "^1.1.2" + "@glimmer/tracking" "^1.1.2" + ember-auto-import "^2.4.1" + ember-cli-babel "^7.26.11" + ember-cli-htmlbars "^6.0.1" + ember-cli-get-component-path-option@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ember-cli-get-component-path-option/-/ember-cli-get-component-path-option-1.0.0.tgz#0d7b595559e2f9050abed804f1d8eff1b08bc771" @@ -12047,7 +12059,7 @@ ember-cli-htmlbars@^4.0.0, ember-cli-htmlbars@^4.2.1, ember-cli-htmlbars@^4.3.1: strip-bom "^4.0.0" walk-sync "^2.0.2" -ember-cli-htmlbars@^5.3.1, ember-cli-htmlbars@^5.3.2, ember-cli-htmlbars@^5.7.1: +ember-cli-htmlbars@^5.3.1, ember-cli-htmlbars@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-5.7.1.tgz#eb5b88c7d9083bc27665fb5447a9b7503b32ce4f" integrity sha512-9laCgL4tSy48orNoQgQKEHp93MaqAs9ZOl7or5q+8iyGGJHW6sVXIYrVv5/5O9HfV6Ts8/pW1rSoaeKyLUE+oA== @@ -12759,14 +12771,6 @@ ember-named-blocks-polyfill@^0.2.5: ember-cli-babel "^7.19.0" ember-cli-version-checker "^5.1.1" -ember-notify@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ember-notify/-/ember-notify-6.0.1.tgz#bc1c0c623488dbe984bb047d905cbc3d7c56cf8c" - integrity sha512-OzDsj6JpTqMIC0w7AB0umxWmzVX29VfRHTs3c6KZ6ew3D0cUMqI1OclJygXez/NKubPKZI3BSOgg1hohNOwqUQ== - dependencies: - ember-cli-babel "^7.23.1" - ember-cli-htmlbars "^5.3.2" - ember-page-title@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/ember-page-title/-/ember-page-title-7.0.0.tgz#11bebd4901d80757646c9006954a13e4fc187421" @@ -21700,9 +21704,9 @@ printf@^0.6.1: integrity sha512-is0ctgGdPJ5951KulgfzvHGwJtZ5ck8l042vRkV6jrkpBzTmb/lueTqguWHy2JfVA+RY6gFVlaZgUS0j7S/dsw== prismjs@^1.21.0, prismjs@^1.27.0, prismjs@~1.24.0: - version "1.28.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.28.0.tgz#0d8f561fa0f7cf6ebca901747828b149147044b6" - integrity sha512-8aaXdYvl1F7iC7Xm1spqSaY/OJBpYW3v+KJ+F17iYxvdc8sfjW194COK5wVhMZX45tGteiBQgdvD/nhxcRwylw== + version "1.29.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12" + integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q== private@^0.1.8: version "0.1.8" @@ -24979,9 +24983,9 @@ terser-webpack-plugin@^5.1.3: terser "^5.7.2" terser@^4.1.2, terser@^4.6.3, terser@^5.14.2, terser@^5.3.0, terser@^5.3.4, terser@^5.7.2: - version "5.14.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" - integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== + version "5.15.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.15.0.tgz#e16967894eeba6e1091509ec83f0c60e179f2425" + integrity sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0"