Fix Bug 2091: NS Update on NS Instances fail with database exception on screen when... 79/12479/2
authorSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Wed, 24 Aug 2022 02:05:16 +0000 (07:35 +0530)
committerSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Mon, 29 Aug 2022 06:17:20 +0000 (11:47 +0530)
- 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>
src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
src/app/utilities/ns-update/NsUpdateComponent.html
src/app/utilities/ns-update/NsUpdateComponent.ts
src/assets/i18n/de.json
src/assets/i18n/en.json
src/assets/i18n/es.json
src/assets/i18n/pt.json

index f84fcff..3ac6a60 100644 (file)
@@ -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}}">
                 <i class="fas fa-arrows-alt"></i> {{'REBUILD' | translate}}
             </button>
-            <button type="button" class="btn btn-primary dropdown-item" (click)="openVerticalScaling()" placement="left" 
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openVerticalScaling()" placement="left"
                 data-container="body" ngbTooltip="{{'VERTICALSCALING' | translate}}">
                 <i class="fas fa-grip-vertical"></i> {{'VERTICALSCALING' | translate}}
             </button>
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openVmMigration()" placement="left" data-container="body"
+                [disabled]="operationalStatus === 'failed' || configStatus === 'failed'" ngbTooltip="{{'VMMIGRATION' | translate}}">
+                <i class="fas fa-angle-double-left"></i> {{'VMMIGRATION' | translate}}
+            </button>
         </div>
     </div>
     <div class="btn-group" placement="bottom-right" ngbDropdown display="dynamic" container="body">
@@ -62,14 +66,10 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
             <button type="button" class="btn btn-primary dropdown-item" (click)="execNSPrimitiveModal()" placement="left" container="body" ngbTooltip="{{'EXECPRIMITIVE' | translate}}" [disabled]="operationalStatus == 'failed' || configStatus == 'failed'">
                 <i class="fas fa-magic"></i> {{'EXECPRIMITIVE' | translate}}
             </button>
-            <button type="button" class="btn btn-primary dropdown-item" [disabled]="operationalStatus === 'scaling'" (click)="manualScaling()"
+            <button type="button" class="btn btn-primary dropdown-item" [disabled]="operationalStatus === 'scaling' || operationalStatus === 'failed' || configStatus === 'failed'" (click)="manualScaling()"
                 placement="left" data-container="body" ngbTooltip="{{'SCALING' | translate}}">
                 <i class="fas fa-cubes"></i> {{'SCALING' | translate}}
             </button>
-            <button type="button" class="btn btn-primary dropdown-item" (click)="openVmMigration()" placement="left" data-container="body"
-                [disabled]="operationalStatus === 'failed' || configStatus === 'failed'" ngbTooltip="{{'VMMIGRATION' | translate}}">
-                <i class="fas fa-angle-double-left"></i> {{'VMMIGRATION' | translate}}
-            </button>
             <button type="button" class="btn btn-primary dropdown-item" (click)="openNsUpdate()" placement="left" data-container="body"
                 [disabled]="operationalStatus === 'failed' || configStatus === 'failed'" ngbTooltip="{{'NSUPDATE' | translate}}">
                 <i class="fas fa-arrow-alt-circle-up"></i> {{'NSUPDATE' | translate}}
index e3058d6..2c98599 100644 (file)
@@ -32,7 +32,7 @@ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
                 <label for="updateType"> {{'UPDATETYPE' | translate}} *</label>
             </div>
             <div class="col-sm-6">
-                <ng-select formControlName="updateType" [clearable]="false" placeholder="{{'SELECT' | translate}}"
+                <ng-select formControlName="updateType" [clearable]="false" placeholder="{{'SELECT' | translate}} {{'UPDATETYPE' | translate}}"
                     [items]="updateTypeList" bindLabel="title" bindValue="value" (change)="terminateVNF($event.value)"
                     [ngClass]="{ 'is-invalid': submitted && f.updateType.errors }"></ng-select>
             </div>
@@ -51,12 +51,12 @@ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
         </div>
         <div class="form-group row" *ngIf="!vnfdIdShow">
             <div class="col-sm-6">
-                <label for="vnfdId"> {{'VNFDID' | translate}} *</label>
+                <label for="vnfdId"> {{'VNFDNAME' | translate}} *</label>
             </div>
             <div class="col-sm-6">
-                <input autocomplete="off" class="form-control" placeholder="{{'VNFDID' | translate}}" type="text"
-                    formControlName="vnfdId" id="computeHost"
-                    [ngClass]="{ 'is-invalid': submitted && f.vnfdId.errors }">
+                <ng-select formControlName="vnfdId" [clearable]="false" placeholder="{{'SELECT' | translate}} {{'VNFDNAME' | translate}}"
+                    [items]="selectedVnf" bindLabel="VNFD" bindValue="VNFID"
+                    [ngClass]="{ 'is-invalid': submitted && f.vnfdId.errors }"></ng-select>
             </div>
         </div>
     </div>
index 80ddbb4..80773e2 100644 (file)
@@ -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');
index d65ddcd..dc1d2a0 100644 (file)
     "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",
index 2dfbd94..cb4ac32 100644 (file)
     "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",
index 5658926..e4331c4 100644 (file)
     "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",
index 266e93a..160ef8d 100644 (file)
     "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",