+ }).catch((): void => {
+ // Catch Navigation Error
+ });
+ }
+
+ /** To open VM Migration in NS Instances */
+ public openVmMigration(): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
+ const modalRef: NgbModalRef = this.modalService.open(VmMigrationComponent, { backdrop: 'static' });
+ modalRef.componentInstance.params = {
+ id: this.instanceID
+ };
+ modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
+ if (result) {
+ this.sharedService.callData();
+ }
+ }).catch((): void => {
+ // Catch Navigation Error
+ });
+ }
+
+ /** To open the Ns Update pop-up */
+ public openNsUpdate(): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
+ const modalRef: NgbModalRef = this.modalService.open(NsUpdateComponent, { backdrop: 'static' });
+ modalRef.componentInstance.params = {
+ id: this.instanceID
+ };
+ modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
+ if (result) {
+ this.sharedService.callData();
+ }
+ }).catch((): void => {
+ // Catch Navigation Error
+ });
+ }
+
+ /** To open the Start, Stop & Rebuild pop-up */
+ public openStart(actionType: string): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
+ 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((): void => {
+ // Catch Navigation Error
+ });
+ }
+
+ /** To open the vertical Scaling pop-up */
+ public openVerticalScaling(): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
+ const modalRef: NgbModalRef = this.modalService.open(VerticalScalingComponent, { backdrop: 'static' });
+ modalRef.componentInstance.params = {
+ id: this.instanceID
+ };
+ modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
+ if (result) {
+ this.sharedService.callData();
+ }
+ }).catch((): void => {
+ // Catch Navigation Error
+ });