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.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
*/