diff --git a/ui/app/models/sync/destination.js b/ui/app/models/sync/destination.js index 84d3e8b477..67660017be 100644 --- a/ui/app/models/sync/destination.js +++ b/ui/app/models/sync/destination.js @@ -20,6 +20,9 @@ const validations = { export default class SyncDestinationModel extends Model { @attr('string', { subText: 'Specifies the name for this destination.', editDisabled: true }) name; @attr type; + // only present if delete action has been initiated + @attr('string') purgeInitiatedAt; + @attr('string') purgeError; // findDestination returns static attributes for each destination type get icon() { diff --git a/ui/app/serializers/sync/destination.js b/ui/app/serializers/sync/destination.js index 122730b1cf..e20b1920c5 100644 --- a/ui/app/serializers/sync/destination.js +++ b/ui/app/serializers/sync/destination.js @@ -9,6 +9,8 @@ export default class SyncDestinationSerializer extends ApplicationSerializer { attrs = { name: { serialize: false }, type: { serialize: false }, + purgeInitiatedAt: { serialize: false }, + purgeError: { serialize: false }, }; serialize(snapshot) { diff --git a/ui/lib/kv/addon/components/page/secret/details.hbs b/ui/lib/kv/addon/components/page/secret/details.hbs index af0961bfe5..bac1604191 100644 --- a/ui/lib/kv/addon/components/page/secret/details.hbs +++ b/ui/lib/kv/addon/components/page/secret/details.hbs @@ -6,7 +6,7 @@ <:syncDetails> {{#if this.syncStatus}} - + This secret has been synced from Vault to {{pluralize this.syncStatus.length "destination"}}. Updates to this secret will automatically sync to its diff --git a/ui/lib/sync/addon/components/secrets/destination-header.hbs b/ui/lib/sync/addon/components/secrets/destination-header.hbs index 1a4b40ea66..3e914390ed 100644 --- a/ui/lib/sync/addon/components/secrets/destination-header.hbs +++ b/ui/lib/sync/addon/components/secrets/destination-header.hbs @@ -13,6 +13,35 @@ }} /> +{{#if @destination.purgeInitiatedAt}} + + {{#if @destination.purgeError}} + Deletion failed + + There was a problem with the delete purge initiated at + {{date-format @destination.purgeInitiatedAt "MMM dd, yyyy 'at' hh:mm:ss aaa"}}. + + + {{@destination.purgeError}} + + {{else}} + Deletion in progress + + Purge initiated on + {{date-format @destination.purgeInitiatedAt "MMM dd, yyyy 'at' hh:mm:ss aaa"}}. This process may take some time + depending on how many secrets must be un-synced from this destination. + + {{/if}} + +{{/if}} +