summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/view-models')
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view-model.ts7
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view.html10
2 files changed, 9 insertions, 8 deletions
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 @@
<span class="lifecycle-state-text" data-tests-id="formlifecyclestate">{{getStatus()}}</span>
</div>
- <div class="archive-state-label" ng-if="component.archived">
+ <div class="archive-state-label" ng-if="component.isArchived">
<div class="sprite-new archive-label" ></div>
</div>
@@ -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'}}</button>
@@ -77,7 +77,7 @@
</button>
- <button ng-if="!isCreateMode() && component.archived"
+ <button ng-if="!isCreateMode() && component.isArchived"
data-ng-class="{'disabled' :!isDesigner() || !component.isLatestVersion()}"
ng-click="restoreComponent()"
class="tlv-btn blue"
@@ -86,14 +86,14 @@
<button ng-if="!isViewMode() && isCreateMode()" data-ng-disabled="!isValidForm || isDisableMode() || isLoading || unsavedChanges" ng-click="create()" class="tlv-btn outline green" data-tests-id="create/save">Create</button>
- <span data-ng-if="isDesigner() && !isCreateMode() && component.lifecycleState === 'NOT_CERTIFIED_CHECKOUT' && !component.archived" sdc-smart-tooltip=""
+ <span data-ng-if="isDesigner() && !isCreateMode() && component.lifecycleState === 'NOT_CERTIFIED_CHECKOUT' && !component.isArchived" sdc-smart-tooltip=""
data-ng-class="{'disabled' : !isValidForm || isDisableMode() || isViewMode() || unsavedChanges}" ng-click="changeLifecycleState('deleteVersion')"
class="sprite-new delete-btn" data-tests-id="delete_version" sdc-smart-tooltip="Delete" prevent-double-click>Delete</span>
<span data-ng-click = "archiveComponent()"
ng-model-options="{ debounce: 300 }"
data-ng-class="{'disabled' : !component.isLatestVersion()}"
- data-ng-if = "isDesigner() && component.lifecycleState !== 'NOT_CERTIFIED_CHECKOUT' && !isCreateMode() && !component.archived"
+ data-ng-if = "isDesigner() && component.lifecycleState !== 'NOT_CERTIFIED_CHECKOUT' && !isCreateMode() && !component.isArchived"
data-tests-id="archive-component-button"
class="sprite-new archive-btn" sdc-smart-tooltip="Archive" prevent-double-click>Archive</span>