From d6c8504a8ec747b9397c84f2d1f81ab656e8e4a2 Mon Sep 17 00:00:00 2001 From: Sara Weiss Date: Thu, 12 Dec 2019 13:45:32 +0200 Subject: Load template button in new template modal Issue-ID: VID-724 Signed-off-by: Sara Weiss Change-Id: I3a3d6a10b364b61f6a7631b47107b7c4de601aaf --- .../instantiationStatus/instantiationStatus.component.service.ts | 9 +++++---- .../instantiation.templates.modal.component.html | 6 +++--- .../instantiation.templates.modal.component.ts | 6 +++++- .../instantiation.templates.modal.service.ts | 2 ++ .../instantiation.templates.row.model.ts | 7 +++---- vid-webpack-master/src/app/shared/models/serviceBase.ts | 9 +++++++++ .../src/app/shared/server/serviceInfo/serviceInfo.model.ts | 5 ++--- 7 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 vid-webpack-master/src/app/shared/models/serviceBase.ts (limited to 'vid-webpack-master/src/app') 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( 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/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html index 19f641a56..86c46ab3b 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html @@ -50,8 +50,8 @@
@@ -148,7 +148,7 @@