X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Futilities%2Fns-instances-action%2FNSInstancesActionComponent.ts;fp=src%2Fapp%2Futilities%2Fns-instances-action%2FNSInstancesActionComponent.ts;h=1c3f1f293af926c65f8f7fbc06c497f4661e797f;hb=3d81a28cd6df38cb070c6a6afbbd1528a766f16e;hp=3735df7786730f8d6dc5dfea3353350b3aa25723;hpb=f633dbf8c1a5bab7a06b16512a06d4d535b7ea3a;p=osm%2FNG-UI.git diff --git a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts index 3735df7..1c3f1f2 100644 --- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts +++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts @@ -35,6 +35,7 @@ import { forkJoin, Observable } from 'rxjs'; import { ScalingComponent } from 'ScalingComponent'; import { SharedService } from 'SharedService'; import { ShowInfoComponent } from 'ShowInfoComponent'; +import { StartStopRebuildComponent } from 'StartStopRebuildComponent'; import { isNullOrUndefined } from 'util'; import { VmMigrationComponent } from 'VmMigrationComponent'; import { DF, VDU, VNFD } from 'VNFDModel'; @@ -284,6 +285,27 @@ export class NSInstancesActionComponent { }).catch(); } + /** To open the Start, Stop & Rebuild pop-up */ + public openStart(actionType: string): void { + const modalRef: NgbModalRef = this.modalService.open(StartStopRebuildComponent, { backdrop: 'static' }); + modalRef.componentInstance.params = { + id: this.instanceID + }; + if (actionType === 'start') { + modalRef.componentInstance.instanceTitle = this.translateService.instant('START'); + } else if (actionType === 'stop') { + modalRef.componentInstance.instanceTitle = this.translateService.instant('STOP'); + } else { + modalRef.componentInstance.instanceTitle = this.translateService.instant('REBUILD'); + } + modalRef.componentInstance.instanceType = actionType; + modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => { + if (result) { + this.sharedService.callData(); + } + }).catch(); + } + /** * Check any changes in the child component @public */