From: SANDHYA.JS Date: Wed, 24 Aug 2022 02:05:16 +0000 (+0530) Subject: Fix Bug 2091: NS Update on NS Instances fail with database exception on screen when... X-Git-Tag: v12.0.3^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=41c8a2c2ac959edd93815d30d121737517c868de;p=osm%2FNG-UI.git Fix Bug 2091: NS Update on NS Instances fail with database exception on screen when VNFD ID is incorrect - Changed the VNFD ID text field to dropdown field with VNFD Name listed - Changed the NSUpdate popup message Change-Id: Iacf6572eb7e56cfd97a8e871d4671f56c6eb94ba Signed-off-by: SANDHYA.JS --- diff --git a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html index f84fcff..3ac6a60 100644 --- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html +++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html @@ -45,10 +45,14 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i data-container="body" ngbTooltip="{{'REBUILD' | translate}}"> {{'REBUILD' | translate}} - +
@@ -62,14 +66,10 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i - -
-
@@ -51,12 +51,12 @@ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
- +
- +
diff --git a/src/app/utilities/ns-update/NsUpdateComponent.ts b/src/app/utilities/ns-update/NsUpdateComponent.ts index 80ddbb4..80773e2 100644 --- a/src/app/utilities/ns-update/NsUpdateComponent.ts +++ b/src/app/utilities/ns-update/NsUpdateComponent.ts @@ -68,6 +68,8 @@ export class NsUpdateComponent implements OnInit { public vnfdIdShow: boolean = false; /** Contains MemberVNFIndex values @public */ public memberVnfIndex: {}[] = []; + /** Contains MemberVNFIndex content @public */ + public selectedVnf: {}[]; /** Array holds VNFR Data filtered with nsr ID @public */ public nsIdFilteredData: {}[] = []; /** Contains vnfdId value @public */ @@ -188,6 +190,7 @@ export class NsUpdateComponent implements OnInit { vnfdData[memberIndex] === this.memberIndexValue); const vnfId: string = 'VNFID'; const selectedvnfId: string = 'VNFD'; + this.selectedVnf = memberIndexFilteredData; for (const data of memberIndexFilteredData) { this.vnfID = data[vnfId]; this.selectedvnfId = data[selectedvnfId]; @@ -243,7 +246,8 @@ export class NsUpdateComponent implements OnInit { if (result.message === CONFIGCONSTANT.done) { this.onSubmit(); } - }).catch(); + }).catch((): void => { //empty + }); } this.isLoadingResults = false; } @@ -274,14 +278,16 @@ export class NsUpdateComponent implements OnInit { } if (this.version === this.vnfversion) { const modalRef: NgbModalRef = this.modalService.open(WarningComponent, { backdrop: 'static' }); - modalRef.componentInstance.heading = this.translateService.instant('UPDATEPOLICIES'); - modalRef.componentInstance.confirmationMessage = this.translateService.instant('UPDATEPOLICIESCONTENT'); - modalRef.componentInstance.submitMessage = this.translateService.instant('UPDATEPOLICIES'); + modalRef.componentInstance.heading = this.translateService.instant('UPDATENS'); + modalRef.componentInstance.confirmationMessage = this.translateService.instant('GENERICCONTENT'); + modalRef.componentInstance.submitMessage = this.translateService.instant('UPDATENS'); modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => { if (result.message === CONFIGCONSTANT.done) { this.onSubmit(); } - }).catch(); + }).catch((): void => { //empty + } + ); } else { const modalRef: NgbModalRef = this.modalService.open(WarningComponent, { backdrop: 'static' }); modalRef.componentInstance.heading = this.translateService.instant('REDEPLOY'); @@ -291,7 +297,8 @@ export class NsUpdateComponent implements OnInit { if (result.message === CONFIGCONSTANT.done) { this.onSubmit(); } - }).catch(); + }).catch((): void => { //empty + }); } }, (error: ERRORDATA): void => { this.restService.handleError(error, 'get'); diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index d65ddcd..dc1d2a0 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -191,6 +191,9 @@ "MEMORYMB": "Arbeitsspeicher MB", "STORAGEGB": "Speicher GB", "VCPUCOUNT": "VCPU-Anzahl", + "UPDATENS": "NS aktualisieren", + "GENERICCONTENT": "Diese Aktion umfasst die Neuerstellung der Ressourcen dieser VNF. Sind Sie sicher, dass Sie fortfahren möchten", + "VNFDNAME": "Vnfd-Name", "PAGE": { "DASHBOARD": { "DASHBOARD": "Instrumententafel", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 2dfbd94..cb4ac32 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -191,6 +191,9 @@ "MEMORYMB": "Memory MB", "STORAGEGB": "Storage GB", "VCPUCOUNT": "VCPU Count", + "UPDATENS": "Update NS", + "GENERICCONTENT": "This action involves recreating the resources of this VNF. Are you sure you want to proceed", + "VNFDNAME": "Vnfd Name", "PAGE": { "DASHBOARD": { "DASHBOARD": "Dashboard", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 5658926..e4331c4 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -191,6 +191,9 @@ "MEMORYMB": "MB de memoria", "STORAGEGB": "GB de almacenamiento", "VCPUCOUNT": "Recuento de VCPU", + "UPDATENS": "Actualizar NS", + "GENERICCONTENT": "Esta acción implica recrear los recursos de este VNF. Estas seguro que deseas continuar", + "VNFDNAME": "Nombre Vnfd", "PAGE": { "DASHBOARD": { "DASHBOARD": "Tablero", diff --git a/src/assets/i18n/pt.json b/src/assets/i18n/pt.json index 266e93a..160ef8d 100644 --- a/src/assets/i18n/pt.json +++ b/src/assets/i18n/pt.json @@ -191,6 +191,9 @@ "MEMORYMB": "MB de memória", "STORAGEGB": "GB de armazenamento", "VCPUCOUNT": "Contagem de VCPU", + "UPDATENS": "Atualizar NS", + "GENERICCONTENT": "Esta ação envolve a recriação dos recursos desta VNF. Tem certeza de que deseja continuar", + "VNFDNAME": "Nome Vnfd", "PAGE": { "DASHBOARD": { "DASHBOARD": "painel de controle",