diff options
author | ikram <ikram@research.att.com> | 2020-08-12 16:31:06 -0400 |
---|---|---|
committer | Rachitha Ramappa <rachitha.ramappa@att.com> | 2020-08-28 17:37:52 +0530 |
commit | 43b7ae5f11c2ef00ef737d179dda894c51594f45 (patch) | |
tree | 9829441f892cb02f916270b9dfb495ecd5e957bb /vid-webpack-master/src/app/instantiationStatus | |
parent | 0864a22ae604219f87dfa9b4833026b85bb2af6e (diff) |
Other Pause and Resume Related Scenarios
Please see the user story for more details.
Issue-ID: VID-875
Signed-off-by: Rachitha Ramappa <rachitha.ramappa@att.com>
Change-Id: Ib2b9f62c6c0c5f0f8c162cc776dc128d39dbb37e
Diffstat (limited to 'vid-webpack-master/src/app/instantiationStatus')
-rw-r--r-- | vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts | 5 | ||||
-rw-r--r-- | vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts index e59c16a3a..cdbe890a5 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts @@ -115,6 +115,7 @@ export class InstantiationStatusComponentService { } navigateToNewViewEdit(item: InstantiationBase, mode: DrawingBoardModes): void { + console.log("Mode : ", mode); this._store.dispatch(updateDrawingBoardStatus(mode)); const viewEditUrlTree:UrlTree = this.getNewViewEditUrlTree(item, mode); this._router.navigateByUrl(viewEditUrlTree); @@ -180,6 +181,10 @@ export class InstantiationStatusComponentService { this.navigateToNewViewEdit(item, DrawingBoardModes.RETRY_EDIT); } + resume(item: ServiceInfoModel): void { + this.navigateToNewViewEdit(item, DrawingBoardModes.RESUME); + } + recreate(item: ServiceInfoModel): void { this.navigateToNewViewEdit(item, DrawingBoardModes.RECREATE); } diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts index 4dccb9e32..b5f54bcca 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts @@ -48,7 +48,15 @@ export class InstantiationStatusComponent implements OnInit { className: "fa-repeat", click: (item: ServiceInfoModel) => this.retryItem(item), enabled: () => true, - visible: (item: ServiceInfoModel) => item.isRetryEnabled, + visible: (item: ServiceInfoModel) => (item.isRetryEnabled && (item.jobStatus !== JobStatus.COMPLETED_AND_PAUSED)), + }, + { + name: "Resume", + dataTestId: "context-menu-retry", + className: "fa-repeat", + click: (item: ServiceInfoModel) => this.resumeItem(item), + enabled: () => true, + visible: (item: ServiceInfoModel) => item.jobStatus === JobStatus.COMPLETED_AND_PAUSED, }, { name: "Open", @@ -175,6 +183,12 @@ export class InstantiationStatusComponent implements OnInit { } } + resumeItem(item: ServiceInfoModel) : void { + if(item.isRetryEnabled && item.jobStatus === JobStatus.COMPLETED_AND_PAUSED){ + this._instantiationStatusComponentService.resume(item); + } + } + auditInfo(jobData : ServiceInfoModel): void { AuditInfoModalComponent.openModal.next(jobData); } |