X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Futilities%2Fvnf-packages-action%2FVNFPackagesActionComponent.ts;h=14b5ec0fa23cf3a18a1fb6e16079ef27957dc1e4;hb=0a34dfa32165036b380ec6ac493469b34007df0a;hp=cd0d2dc8a9c2a1b95d713ecc5c7bfcaa0be01959;hpb=40cc37ef2bbc4aac5debc9dea0baeb6dbd87a2d7;p=osm%2FNG-UI.git diff --git a/src/app/utilities/vnf-packages-action/VNFPackagesActionComponent.ts b/src/app/utilities/vnf-packages-action/VNFPackagesActionComponent.ts index cd0d2dc..14b5ec0 100644 --- a/src/app/utilities/vnf-packages-action/VNFPackagesActionComponent.ts +++ b/src/app/utilities/vnf-packages-action/VNFPackagesActionComponent.ts @@ -86,6 +86,7 @@ export class VNFPackagesActionComponent { private cd: ChangeDetectorRef; /** Set timeout @private */ + // eslint-disable-next-line @typescript-eslint/no-magic-numbers private timeOut: number = 1000; constructor(injector: Injector) { @@ -113,12 +114,15 @@ export class VNFPackagesActionComponent { /** Delete VNF packages @public */ public deleteVNFPackage(): void { + // eslint-disable-next-line security/detect-non-literal-fs-filename const modalRef: NgbModalRef = this.modalService.open(DeleteComponent, { backdrop: 'static' }); modalRef.result.then((result: MODALCLOSERESPONSEDATA) => { if (result) { this.sharedService.callData(); } - }).catch(); + }).catch((): void => { + // Catch Navigation Error + }); } /** Set instance for NSD Edit @public */ @@ -132,6 +136,7 @@ export class VNFPackagesActionComponent { /** list out all the file content of a descriptors @public */ public showContent(): void { + // eslint-disable-next-line security/detect-non-literal-fs-filename this.modalService.open(ShowContentComponent, { backdrop: 'static' }).componentInstance.params = { id: this.vnfID, page: 'vnfd' }; } @@ -164,7 +169,9 @@ export class VNFPackagesActionComponent { /** Compose VNF Packages @public */ public composeVNFPackages(): void { - this.router.navigate(['/packages/vnf/compose/', this.vnfID]).catch(); + this.router.navigate(['/packages/vnf/compose/', this.vnfID]).catch((): void => { + // Catch Navigation Error + }); } /** Change the detaction @public */ @@ -176,12 +183,15 @@ export class VNFPackagesActionComponent { /** Clone NS Packages @public */ public cloneVNFPackage(): void { + // eslint-disable-next-line security/detect-non-literal-fs-filename const cloneModal: NgbModalRef = this.modalService.open(ClonePackageComponent, { backdrop: 'static' }); cloneModal.componentInstance.params = { id: this.vnfID, page: 'vnfd', name: this.vnfName }; cloneModal.result.then((result: MODALCLOSERESPONSEDATA) => { if (result) { this.sharedService.callData(); } - }).catch(); + }).catch((): void => { + // Catch Navigation Error + }); } }