X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Futilities%2Fns-instances-action%2FNSInstancesActionComponent.ts;h=1582bc4af25541f403e2dab8fd67217cff55de73;hb=refs%2Fchanges%2F14%2F14414%2F3;hp=ea7fa616cf1f789e35d4077e6f5e795542328457;hpb=0a34dfa32165036b380ec6ac493469b34007df0a;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 ea7fa61..1582bc4 100644 --- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts +++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts @@ -18,7 +18,6 @@ /** * @file NS InstancesAction Component */ -import { isNullOrUndefined } from 'util'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector } from '@angular/core'; import { Router } from '@angular/router'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; @@ -27,6 +26,7 @@ import { NotifierService } from 'angular-notifier'; import { ERRORDATA, MODALCLOSERESPONSEDATA } from 'CommonModel'; import { DeleteComponent } from 'DeleteComponent'; import { environment } from 'environment'; +import { HealingComponent } from 'HealingComponent'; import { NSDDetails } from 'NSDModel'; import { NSDInstanceData } from 'NSInstanceModel'; import { NSPrimitiveComponent } from 'NSPrimitiveComponent'; @@ -34,7 +34,7 @@ import { NsUpdateComponent } from 'NsUpdateComponent'; import { RestService } from 'RestService'; import { forkJoin, Observable } from 'rxjs'; import { ScalingComponent } from 'ScalingComponent'; -import { SharedService } from 'SharedService'; +import { SharedService, isNullOrUndefined } from 'SharedService'; import { ShowInfoComponent } from 'ShowInfoComponent'; import { StartStopRebuildComponent } from 'StartStopRebuildComponent'; import { VerticalScalingComponent } from 'VerticalScalingComponent'; @@ -170,7 +170,7 @@ export class NSInstancesActionComponent { } }).catch((): void => { // Catch Navigation Error - }); + }); } /** History of operations for an Instanace @public */ @@ -285,7 +285,7 @@ export class NSInstancesActionComponent { } }).catch((): void => { // Catch Navigation Error - }); + }); } /** To open VM Migration in NS Instances */ @@ -301,7 +301,7 @@ export class NSInstancesActionComponent { } }).catch((): void => { // Catch Navigation Error - }); + }); } /** To open the Ns Update pop-up */ @@ -317,7 +317,7 @@ export class NSInstancesActionComponent { } }).catch((): void => { // Catch Navigation Error - }); + }); } /** To open the Start, Stop & Rebuild pop-up */ @@ -341,7 +341,7 @@ export class NSInstancesActionComponent { } }).catch((): void => { // Catch Navigation Error - }); + }); } /** To open the vertical Scaling pop-up */ @@ -357,7 +357,23 @@ export class NSInstancesActionComponent { } }).catch((): void => { // Catch Navigation Error - }); + }); + } + + /** Open the Healing pop-up @public */ + public openHealing(): void { + // eslint-disable-next-line security/detect-non-literal-fs-filename + const modalRef: NgbModalRef = this.modalService.open(HealingComponent, { backdrop: 'static' }); + modalRef.componentInstance.params = { + id: this.instanceID + }; + modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => { + if (result) { + this.sharedService.callData(); + } + }).catch((): void => { + // Catch Navigation Error + }); } /**