Fix Bug 1870: All Pdu instance parameters takes the same mgmt option (all of them... 39/11939/2
authorSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Tue, 26 Apr 2022 12:29:39 +0000 (17:59 +0530)
committerramanathan <ramerama@tataelxsi.co.in>
Fri, 6 May 2022 09:36:35 +0000 (11:36 +0200)
- When creating pdu instances, made the 'mgmt' parameter independent for each interface.

Change-Id: Ia148b098d512b4a288a76601c87501a4b1a76170
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
src/app/instances/pdu-instances/add-pdu-instances/AddPDUInstancesComponent.html
src/app/instances/pdu-instances/add-pdu-instances/AddPDUInstancesComponent.ts

index f785426..54e36fa 100644 (file)
@@ -70,7 +70,7 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
                         <div class="row mr-top-5">
                             <label class="col-sm-2 col-form-label" for="mgmt{{i}}">{{'MGMT' | translate}}*</label>
                             <div class="col-sm-4">
-                                <ng-select placeholder="{{'SELECT' | translate}} {{'MGMT' | translate}}" [items]="mgmtState" bindLabel="name" bindValue="value" formControlName="mgmt" id="mgmt{{i}}" [(ngModel)]="selectedMgmt" [ngClass]="{ 'is-invalid': submitted && params.controls.mgmt.errors }"></ng-select>
+                                <ng-select placeholder="{{'SELECT' | translate}} {{'MGMT' | translate}}" [items]="mgmtState" bindLabel="name" bindValue="value" formControlName="mgmt" id="mgmt{{i}}" [ngClass]="{ 'is-invalid': submitted && params.controls.mgmt.errors }"></ng-select>
                             </div>
                             <label class="col-sm-2 col-form-label padLeft0 padRight0" for="vimNetName{{i}}">{{'NETNAME' | translate}}*</label>
                             <div class="col-sm-4">
index 0dcbb60..644b83d 100644 (file)
@@ -59,9 +59,6 @@ export class AddPDUInstancesComponent implements OnInit {
     /** Variable set for twoway binding @public */
     public pduInstanceId: string;
 
-    /** Set mgmt field to empty on load @public */
-    public selectedMgmt: string;
-
     /** Set vim field to empty on load @public */
     public selectedVIM: string;
 
@@ -141,7 +138,7 @@ export class AddPDUInstancesComponent implements OnInit {
         return this.formBuilder.group({
             name: ['', [Validators.required]],
             'ip-address': ['', [Validators.required, Validators.pattern(this.sharedService.REGX_IP_PATTERN)]],
-            mgmt: ['', [Validators.required]],
+            mgmt: [null, [Validators.required]],
             'vim-network-name': ['', [Validators.required]]
         });
     }