diff options
Diffstat (limited to 'vid-webpack-master/src/app/instantiationStatus')
-rw-r--r-- | vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts | 9 | ||||
-rw-r--r-- | vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts | 4 |
2 files changed, 7 insertions, 6 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 4bfedd913..229beb443 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts @@ -13,6 +13,7 @@ import {Router, UrlTree} from "@angular/router"; import {of} from "rxjs"; import {MsoService} from "../shared/services/msoService/mso.service"; import {ServiceAction} from "../shared/models/serviceInstanceActions"; +import {InstantiationBase} from "../shared/models/serviceBase"; export let PENDING : string = "pending"; export let INPROGRESS : string = "in_progress"; @@ -112,21 +113,21 @@ export class InstantiationStatusComponentService { window.parent.location.assign('../../serviceModels.htm#/instantiate?' + query); } - navigateToNewViewEdit(item: ServiceInfoModel, mode: DrawingBoardModes): void{ + navigateToNewViewEdit(item: InstantiationBase, mode: DrawingBoardModes): void { this._store.dispatch(updateDrawingBoardStatus(mode)); const viewEditUrlTree:UrlTree = this.getNewViewEditUrlTree(item, mode); this._router.navigateByUrl(viewEditUrlTree); window.parent.location.assign(this.getViewEditUrl(viewEditUrlTree)); } - getNewViewEditUrlTree(item: ServiceInfoModel, mode: DrawingBoardModes): UrlTree { + getNewViewEditUrlTree(item: InstantiationBase, mode: DrawingBoardModes): UrlTree { return this._router.createUrlTree( ['/servicePlanning/' + mode], { queryParams: mode==DrawingBoardModes.RECREATE ? this.getRecreateQueryParams(item) : - this.getDefaultViewEditQueryParams(item) + this.getDefaultViewEditQueryParams(<ServiceInfoModel> item) }); } @@ -140,7 +141,7 @@ export class InstantiationStatusComponentService { }; } - private getRecreateQueryParams(item: ServiceInfoModel) { + private getRecreateQueryParams(item: InstantiationBase) { return { serviceModelId: item.serviceModelId, jobId: item.jobId diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts index 58227c9eb..4f84b7125 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts @@ -59,8 +59,8 @@ export class InstantiationStatusComponent implements OnInit { visible: () => true, }, { - name: "Recreate", - dataTestId: "context-menu-recreate", + name: "Create another one", + dataTestId: "context-menu-create-another-one", className: "fa-clone", click: (item: ServiceInfoModel) => this.instantiationStatusComponentService.recreate(item), enabled: (item: ServiceInfoModel) => this.instantiationStatusComponentService.isRecreateEnabled(item), |