summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2019-08-27 16:01:01 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-09 07:01:36 +0000
commite1f7974f0badbd4440d5b7ea5f1b1cb2d4973818 (patch)
tree46be9cdc44cbb475527bc3c43df23d16f7579d29 /vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts
parente25b88b5a7a0f3bf63ca7160a441b53145484bcc (diff)
Adding feature: Replace vfmodule
Issue-ID: VID-603 Change-Id: I59068a0979d6fb733e4243c8f78921f396dc9d17 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Signed-off-by: Amichai Hemli <amichai.hemli@intl.att.com> Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts30
1 files changed, 29 insertions, 1 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts
index 51f90534b..7923313bf 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.component.ts
@@ -39,12 +39,16 @@ export class DrawingBoardHeader {
mode : DrawingBoardModes = DrawingBoardModes.CREATE;
serviceOrchStatus: string;
isDeleted: boolean = false;
+ isUpgrade: boolean = false;
isResume: boolean = false;
store : NgRedux<AppState>;
drawingBoardPermissions : DrawingBoardPermissions;
drawingBoardHeaderService : DrawingBoardHeaderService;
isServiceFailed: boolean;
serviceStatusMessage: string;
+ private readonly action: string;
+ private presentedAction: string;
+
constructor(private _contextMenuService: ContextMenuService, private dialogService: DialogService,
private _iframeService : IframeService,
private route: ActivatedRoute, private msoService: MsoService,
@@ -68,6 +72,11 @@ export class DrawingBoardHeader {
});
}
});
+ if (!_.isNil(this.store.getState().service.serviceInstance[this.serviceModelId].action)){
+ if (this.store.getState().service.serviceInstance[this.serviceModelId].action.includes("Upgrade")) {
+ this.isUpgrade = true;
+ }
+ }
}
@@ -114,6 +123,7 @@ export class DrawingBoardHeader {
this.serviceOrchStatus = serviceInstance.orchStatus || "";
this.isServiceFailed = serviceInstance.isFailed;
this.serviceStatusMessage = serviceInstance.statusMessage;
+ this.isUpgrade = serviceInstance.isUpgraded;
}
}
@@ -131,12 +141,25 @@ export class DrawingBoardHeader {
});
}
+
+
onDeleteUndoDeleteClick(){
this.cancelResume(this.serviceModelId);
this.isDeleted = !this.isDeleted;
this._drawingBoardHeaderService.deleteService(this.serviceModelId, this.isDeleted)
}
+ determineDataTestId() :string {
+ switch(true) {
+ case this.isResume:
+ return'resume-status-type-header';
+ case this.isDeleted:
+ return 'delete-status-type-header';
+ case this.isUpgrade:
+ return 'upgrade-status-type-header';
+ }
+ }
+
onResumeUndoResumeClick(){
this.cancelDelete(this.serviceModelId);
this.isResume = !this.isResume;
@@ -174,9 +197,14 @@ export class DrawingBoardHeader {
instanceFields.subscriberName = this.store.getState().service.subscribers.find(sub => sub.id === instanceFields.globalSubscriberId).name;
instanceFields.owningEntityName = this.extractOwningEntityNameAccordingtoId(instanceFields.owningEntityId);
}
- return _.omit(instanceFields,'optionalGroupMembersMap');
+ return _.omit(instanceFields,['optionalGroupMembersMap', 'upgradedVFMSonsCounter', 'isUpgraded', 'latestAvailableVersion']);
}
+ private getAction(): string {
+ if(!_.isNil(this.store.getState().service.serviceInstance[this.serviceModelId].action))
+ return this.store.getState().service.serviceInstance[this.serviceModelId].action.split('_').pop();
+ return;
+ }
public deployService(): void {
let instanceFields = this.extractServiceFields();