Feature 10922: Start, Stop and Rebuild

	*Added NG-UI support for Start, Stop and Rebuild
	*In NS Instances page. Click "Start" or "Stop" or "Rebuild" in the actions menu.
        *Then a new pop-up page will be opened.
        *In the popup there will be fields containing membervnfIndex, vduid, count index mandatory fields to start, stop or rebuild VNF Instances
        *When the fields are selected then Click Apply button.
        *The pop-up window is closed and the page is directed to "History of operations" page

Change-Id: Idc0b6316af06b2190732beb198d1e74bcb8b23b0
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
index 92e462f..db3311a 100644
--- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
+++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
@@ -28,7 +28,26 @@
     <button type="button" class="btn btn-primary" (click)="deleteNSInstance(false)" placement="top" container="body" ngbTooltip="{{'DELETE' | translate}}">
         <i class="far fa-trash-alt icons"></i>
     </button>
-    <div class="btn-group" ngbDropdown display="dynamic" container="body">
+    <div class="btn-group" placement="bottom-right" ngbDropdown display="dynamic" container="body">
+        <button type="button" class="btn btn-primary" ngbDropdownToggle placement="top" container="body" [disabled]="operationalStatus === 'failed' || configStatus === 'failed'" ngbTooltip="{{'VIMACTION' | translate}}">
+            <i class="fas fa-desktop"></i>
+        </button>
+        <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu>
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openStart('start')" placement="left"
+                data-container="body" ngbTooltip="{{'START' | translate}}">
+                <i class="fas fa-toggle-on"></i> {{'START' | translate}}
+            </button>
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openStart('stop')" placement="left"
+                data-container="body" ngbTooltip="{{'STOP' | translate}}">
+                <i class="fas fa-toggle-off"></i> {{'STOP' | translate}}
+            </button>
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openStart('rebuild')" placement="left"
+                data-container="body" ngbTooltip="{{'REBUILD' | translate}}">
+                <i class="fas fa-arrows-alt"></i> {{'REBUILD' | translate}}
+            </button>
+        </div>
+    </div>
+    <div class="btn-group" placement="bottom-right" ngbDropdown display="dynamic" container="body">
         <button type="button" class="btn btn-primary dropdown-toggle action-button" ngbDropdownToggle>
             {{'ACTION' | translate}}
         </button>
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 { 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 @@
     }).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
    */