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 <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 @@
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 @@
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 @@
if (result.message === CONFIGCONSTANT.done) {
this.onSubmit();
}
- }).catch();
+ }).catch((): void => { //empty
+ });
}
this.isLoadingResults = false;
}
@@ -274,14 +278,16 @@
}
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 @@
if (result.message === CONFIGCONSTANT.done) {
this.onSubmit();
}
- }).catch();
+ }).catch((): void => { //empty
+ });
}
}, (error: ERRORDATA): void => {
this.restService.handleError(error, 'get');