Feature 11038: Enhancement of Vertical Scale Feature and merge in update API
[osm/NG-UI.git] / src / app / utilities / ns-instances-action / NSInstancesActionComponent.ts
index ea7fa61..74f1518 100644 (file)
@@ -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,10 +34,9 @@ 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';
 import { VmMigrationComponent } from 'VmMigrationComponent';
 import { DF, VDU, VNFD } from 'VNFDModel';
 /**
@@ -163,14 +162,19 @@ export class NSInstancesActionComponent {
   public deleteNSInstance(forceAction: boolean): void {
     // eslint-disable-next-line security/detect-non-literal-fs-filename
     const modalRef: NgbModalRef = this.modalService.open(DeleteComponent, { backdrop: 'static' });
-    modalRef.componentInstance.params = { forceDeleteType: forceAction };
+    modalRef.componentInstance.params = {
+      forceDeleteType: forceAction,
+      name: this.value.name,
+      page: 'ns-instance',
+      id: this.instanceID
+    };
     modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
       if (result) {
         this.sharedService.callData();
       }
     }).catch((): void => {
       // Catch Navigation Error
-  });
+    });
   }
 
   /** History of operations for an Instanace @public */
@@ -285,7 +289,7 @@ export class NSInstancesActionComponent {
       }
     }).catch((): void => {
       // Catch Navigation Error
-  });
+    });
   }
 
   /** To open VM Migration in NS Instances */
@@ -301,7 +305,7 @@ export class NSInstancesActionComponent {
       }
     }).catch((): void => {
       // Catch Navigation Error
-  });
+    });
   }
 
   /** To open the Ns Update pop-up */
@@ -317,7 +321,7 @@ export class NSInstancesActionComponent {
       }
     }).catch((): void => {
       // Catch Navigation Error
-  });
+    });
   }
 
   /** To open the Start, Stop & Rebuild pop-up */
@@ -341,13 +345,13 @@ export class NSInstancesActionComponent {
       }
     }).catch((): void => {
       // Catch Navigation Error
-  });
+    });
   }
 
-  /** To open the vertical Scaling pop-up */
-  public openVerticalScaling(): void {
+  /** 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(VerticalScalingComponent, { backdrop: 'static' });
+    const modalRef: NgbModalRef = this.modalService.open(HealingComponent, { backdrop: 'static' });
     modalRef.componentInstance.params = {
       id: this.instanceID
     };
@@ -357,7 +361,7 @@ export class NSInstancesActionComponent {
       }
     }).catch((): void => {
       // Catch Navigation Error
-  });
+    });
   }
 
   /**