diff options
Diffstat (limited to 'vid-webpack-master/src/app')
8 files changed, 42 insertions, 5 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts b/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts index aebbdee5a..dd3b6766a 100644 --- a/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts +++ b/vid-webpack-master/src/app/drawingBoard/drawingBoard.routing.ts @@ -45,6 +45,15 @@ export const DrawingBoardRoutes: Route[] = [ canActivate: [DrawingBoardGuard] }, { + path: 'RESUME', + component: ServicePlanningComponent, + resolve: { + flags: FlagsResolve, + viewEditResolver: RetryResolver + }, + canActivate: [DrawingBoardGuard] + }, + { path: 'RETRY', component: ServicePlanningComponent, resolve: { diff --git a/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts b/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts index d486fb4fa..8b5058011 100644 --- a/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts +++ b/vid-webpack-master/src/app/drawingBoard/guards/servicePlanningGuard/drawingBoardGuard.ts @@ -12,7 +12,9 @@ export class DrawingBoardGuard implements CanActivate { constructor(private store: NgRedux<AppState>, private _http: HttpClient, private _router : Router) { } canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> { let url : string = `../../roles/service_permissions?subscriberId=${next.queryParams['subscriberId']}&serviceType=${next.queryParams['serviceType']}`; - const viewMode = state.url.includes(DrawingBoardModes.RETRY_EDIT)? DrawingBoardModes.RETRY: DrawingBoardModes.VIEW; + const viewMode = state.url.includes(DrawingBoardModes.RETRY_EDIT)? DrawingBoardModes.RETRY: + state.url.includes(DrawingBoardModes.RESUME)? DrawingBoardModes.RESUME: + DrawingBoardModes.VIEW; return this._http.get(url) .map((result : DrawingBoardPermissions) => { if(!result.isEditPermitted){ diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts index 4e8e31163..8cebb23e9 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts @@ -68,7 +68,7 @@ export class DrawingBoardHeaderService{ if (!_.isNil(this.errorMsgService.errorMsgObject) && mode !== DrawingBoardModes.RETRY_EDIT) return true; if(validationCounter > 0) return true; if(serviceInstance.action !== ServiceInstanceActions.None) return false; - if(mode === DrawingBoardModes.RETRY_EDIT) return false; + if(mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.RESUME) return false; return !serviceInstance.isDirty; } return true; @@ -80,6 +80,8 @@ export class DrawingBoardHeaderService{ return 'UPDATE'; case DrawingBoardModes.RETRY_EDIT: return 'REDEPLOY'; + case DrawingBoardModes.RESUME: + return 'RESUME'; default: return 'DEPLOY'; } } @@ -91,6 +93,8 @@ export class DrawingBoardHeaderService{ case DrawingBoardModes.RETRY_EDIT: case DrawingBoardModes.RETRY: return 'REDEPLOY'; + case DrawingBoardModes.RESUME: + return 'RESUME'; } } diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts index 78e2b629e..427c6915d 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board.modes.ts @@ -5,5 +5,6 @@ export enum DrawingBoardModes { EDIT = 'EDIT', OLD_VIEW_EDIT = 'OLD_VIEW_EDIT', CREATE = 'CREATE', - RECREATE = 'RECREATE' + RECREATE = 'RECREATE', + RESUME = 'RESUME' } 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); } diff --git a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.html b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.html index 3dff92cdc..086669091 100644 --- a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.html +++ b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.html @@ -52,6 +52,7 @@ <div class="row"> <div class="col-md-6 leftColumn"><span class="table-title">MSO status</span></div> + <!-- --> <div class="col-md-6 rightColumn"><span><a id="glossary_link" target="_blank" href="#" (click)="onNavigate()">Building Block (BB) glossary</a></span></div> </div> <table id="service-instantiation-audit-info-mso" class="table table-bordered"> diff --git a/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts b/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts index e029f48f9..e7eb55d89 100644 --- a/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts +++ b/vid-webpack-master/src/app/shared/models/serviceInstanceActions.ts @@ -25,7 +25,8 @@ export enum JobStatus { STOPPED = 'STOPPED', COMPLETED_WITH_ERRORS = 'COMPLETED_WITH_ERRORS', CREATING = 'CREATING', - PAUSE_UPON_COMPLETION = 'PAUSE_UPON_COMPLETION' + PAUSE_UPON_COMPLETION = 'PAUSE_UPON_COMPLETION', + COMPLETED_AND_PAUSED = 'COMPLETED_AND_PAUSED' } export enum PauseStatus { AFTER_COMPLETION = 'afterCompletion', |