- Object.assign(event.data, { page: 'ns-instance' });
- this.dataService.changeMessage(event.data);
+ if (!isNullOrUndefined(event)) {
+ this.selectedRows = event;
+ if (this.selectedRows.selected.length !== 0) {
+ this.selectList = this.selectedRows.selected;
+ } else {
+ if (!isNullOrUndefined(event.data)) {
+ Object.assign(event.data, { page: 'ns-instance' });
+ this.dataService.changeMessage(event.data);
+ }
+ this.selectList.length = 0;
+ }
+ }
+ }
+
+ /** delete NS using modalservice @public */
+ public deleteNS(): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
+ const modalRef: NgbModalRef = this.modalService.open(DeleteComponent, { backdrop: 'static' });
+ modalRef.componentInstance.params = {
+ identifierList: this.selectList,
+ page: 'instantiateNS'
+ };
+ modalRef.result.then((result: MODALCLOSERESPONSEDATA) => {
+ if (result) {
+ this.sharedService.callData();
+ this.table.isAllSelected = false;
+ this.selectList.length = 0;
+ }
+ }).catch((): void => {
+ // Catch Navigation Error
+ });