From a6fc7a9303edd6f11a4766701981d4ff30cc40ef Mon Sep 17 00:00:00 2001 From: aribeiro Date: Thu, 11 Nov 2021 15:31:07 +0000 Subject: Fix archive and restore actions Issue-ID: SDC-3784 Signed-off-by: aribeiro Change-Id: Ia2d556913834fb65570470ed1dd79095f7b0411d --- .../src/app/view-models/workspace/workspace-view-model.ts | 7 ++++--- catalog-ui/src/app/view-models/workspace/workspace-view.html | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'catalog-ui/src/app/view-models/workspace') diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts index c72a5a471c..dad7b13e2a 100644 --- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts @@ -282,7 +282,7 @@ export class WorkspaceViewModel { break; } } - this.$scope.component.archived = true; + this.$scope.component.isArchived = true; this.deleteArchiveCache(); this.Notification.success({ @@ -301,8 +301,9 @@ export class WorkspaceViewModel { message: this.$scope.component.name + ' ' + this.$filter('translate')("RESTORE_SUCCESS_MESSAGE_TEXT"), title: this.$filter('translate')("RESTORE_SUCCESS_MESSAGE_TITLE") }); + this.$scope.reload(this.$scope.component); }); - this.$scope.component.archived = false; + this.$scope.component.isArchived = false; this.deleteArchiveCache(); } @@ -637,7 +638,7 @@ export class WorkspaceViewModel { this.$scope.checkDisableButton = (button: any):boolean => { // Logic moved from html to component - if (this.$scope.isCreateMode() || button.disabled || this.$scope.disabledButtons || !this.$scope.isValidForm || this.$scope.unsavedChanges || this.$scope.component.archived){ + if (this.$scope.isCreateMode() || button.disabled || this.$scope.disabledButtons || !this.$scope.isValidForm || this.$scope.unsavedChanges || this.$scope.component.isArchived){ return true; } diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view.html b/catalog-ui/src/app/view-models/workspace/workspace-view.html index 79dde943dc..2d5b234fbf 100644 --- a/catalog-ui/src/app/view-models/workspace/workspace-view.html +++ b/catalog-ui/src/app/view-models/workspace/workspace-view.html @@ -44,7 +44,7 @@ {{getStatus()}} -
+
@@ -61,7 +61,7 @@ ng-disabled="hasNoDependencies" ng-click="openAutomatedUpgradeModal()" class="tlv-btn blue" - data-ng-class="{'disabled' : component.archived}" + data-ng-class="{'disabled' : component.isArchived}" data-tests-id="open-upgrade-vsp-popup" sdc-smart-tooltip="" prevent-double-click>{{component.isResource() ? 'Upgrade Services' : 'Update Services'}} @@ -77,7 +77,7 @@ - - Delete Archive -- cgit 1.2.3-korg