diff --git a/ui/app/components/mount-backend-form.js b/ui/app/components/mount-backend-form.js index 6427bd509..fbfb6c6a0 100644 --- a/ui/app/components/mount-backend-form.js +++ b/ui/app/components/mount-backend-form.js @@ -115,9 +115,10 @@ export default Component.extend({ // err will display via model state return; } - this.get('flashMessages').success( - `Successfully mounted ${type} ${this.get('mountType')} method at ${path}.` - ); + + let mountType = this.get('mountType'); + mountType = mountType === 'secret' ? `${mountType}s engine` : `${mountType} method`; + this.get('flashMessages').success(`Successfully mounted the ${type} ${mountType} at ${path}.`); if (this.get('mountType') === 'secret') { yield this.get('onMountSuccess')(type, path); return; diff --git a/ui/app/controllers/vault/cluster/secrets/backends.js b/ui/app/controllers/vault/cluster/secrets/backends.js index 98cea196f..97345c62f 100644 --- a/ui/app/controllers/vault/cluster/secrets/backends.js +++ b/ui/app/controllers/vault/cluster/secrets/backends.js @@ -1,6 +1,7 @@ import { filterBy } from '@ember/object/computed'; import { computed } from '@ember/object'; import Controller from '@ember/controller'; +import { task } from 'ember-concurrency'; import { supportedSecretBackends } from 'vault/helpers/supported-secret-backends'; const LINKED_BACKENDS = supportedSecretBackends(); @@ -25,4 +26,16 @@ export default Controller.extend({ .sortBy('id'); } ), + + disableEngine: task(function*(engine) { + const { engineType, path } = engine; + try { + yield engine.destroyRecord(); + this.get('flashMessages').success(`The ${engineType} secrets engine at ${path} has been disabled.`); + } catch (err) { + this.get('flashMessages').danger( + `There was an error disabling the ${engineType} secrets engine at ${path}: ${err.errors.join(' ')}.` + ); + } + }).drop(), }); diff --git a/ui/app/templates/vault/cluster/access/methods.hbs b/ui/app/templates/vault/cluster/access/methods.hbs index b073ef852..624bebd78 100644 --- a/ui/app/templates/vault/cluster/access/methods.hbs +++ b/ui/app/templates/vault/cluster/access/methods.hbs @@ -63,7 +63,7 @@ confirmButtonClasses="button is-primary" buttonClasses="link is-destroy" onConfirmAction=(perform disableMethod method) - confirmMessage=(concat "Are you sure you want to disable auth via " method.id "?") + confirmMessage=(concat "Are you sure you want to disable the " method.id " auth method at " method.path "?") showConfirm=(get this (concat "shouldDelete-" method.id)) class=(if (get this (concat "shouldDelete-" method.id)) "message is-block is-warning is-outline") containerClasses="message-body is-block" diff --git a/ui/app/templates/vault/cluster/secrets/backends.hbs b/ui/app/templates/vault/cluster/secrets/backends.hbs index 9dc7ae1e4..7dd95621e 100644 --- a/ui/app/templates/vault/cluster/secrets/backends.hbs +++ b/ui/app/templates/vault/cluster/secrets/backends.hbs @@ -59,6 +59,23 @@ View Configuration {{/link-to}} + {{#unless (eq backend.type "cubbyhole")}} +