Angular upgrade
[osm/NG-UI.git] / src / app / packages / instantiate-ns / InstantiateNsComponent.html
index dabd469..428515e 100644 (file)
@@ -23,7 +23,7 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
         </button>
     </div>
     <div class="modal-body modal-body-custom-height instantiate-ns">
-        <div class="form-group row">
+        <div class="form-group row mb-3">
             <label class="col-sm-12 col-form-label mandatory-label"
                 [ngClass]="{'text-danger': instantiateForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | translate}}</label>
             <label class="col-sm-4 col-form-label"
@@ -35,7 +35,7 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
                     [ngClass]="{ 'is-invalid': submitted && f.nsName.errors }" required>
             </div>
         </div>
-        <div class="form-group row">
+        <div class="form-group row mb-3">
             <label class="col-sm-4 col-form-label"
                 for="nsDescription">{{'PAGE.INSTANCEINSTANTIATE.DESCRIPTION' | translate}}*</label>
             <div class="col-sm-8">
@@ -44,7 +44,7 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
                     [ngClass]="{ 'is-invalid': submitted && f.nsDescription.errors }" required></textarea>
             </div>
         </div>
-        <div class="form-group row">
+        <div class="form-group row mb-3">
             <label class="col-sm-4 col-form-label" for="nsdId">{{'PAGE.INSTANCEINSTANTIATE.NSID' | translate}}*</label>
             <div class="col-sm-8">
                 <ng-select [items]="nsdSelect" bindLabel="name" bindValue="_id"
@@ -54,18 +54,35 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
                 </ng-select>
             </div>
         </div>
-        <div class="form-group row">
+        <div class="form-group row mb-3">
             <label class="col-sm-4 col-form-label"
                 for="vimAccountId">{{'PAGE.INSTANCEINSTANTIATE.VIMACCOUNT' | translate}}*</label>
-            <div class="col-sm-8">
-                <ng-select [items]="vimAccountSelect" bindLabel="name" bindValue="_id"
+            <div class="col-sm-6">
+                <ng-select  (change)="getSelectedVIMDetails($event)" [items]="vimAccountSelect" bindLabel="name" bindValue="_id"
                     placeholder="{{'SELECT' | translate}} {{'PAGE.INSTANCEINSTANTIATE.VIMACCOUNT' | translate}}"
                     formControlName="vimAccountId" [(ngModel)]="vimAccountId" id="vimAccountId"
                     [ngClass]="{ 'is-invalid': submitted && f.vimAccountId.errors }" required>
                 </ng-select>
             </div>
+            <div class="col-sm-2" *ngIf="selectedVIMDetails !== null && selectedVIMDetails !== undefined" >
+                <ng-template #graphTitle>
+                    <span class="text-primary"><strong>{{'PAGE.VIMDETAILS.VIMRESOURCES' | translate}}</strong></span>
+                    <button class="button-xs close" type="button" (click)="chart.close()">
+                        <i class="fas fa-times-circle text-danger"></i>
+                    </button>
+                </ng-template>
+                <ng-template #graphContent>
+                    <app-resources-overview *ngIf="selectedVIMDetails !== null && selectedVIMDetails !== undefined"
+                    [resourcesData]="selectedVIMDetails"></app-resources-overview>
+                </ng-template>
+                <button type="button" class="btn btn-primary" placement="left" container="body"
+                    [ngbPopover]="graphContent" triggers="manual" #chart="ngbPopover"
+                    (click)="chart.open()" [autoClose]="'outside'" [popoverTitle]="graphTitle" popoverClass="resources-chart-popover">
+                    <i class="fas fa-chart-pie"></i>
+                </button>
+            </div>
         </div>
-        <div class="form-group row">
+        <div class="form-group row mb-3">
             <label class="col-sm-4 col-form-label"
                 for="ssh_keys">{{'PAGE.INSTANCEINSTANTIATE.SSHKEY' | translate}}</label>
             <div class="col-sm-8">
@@ -73,24 +90,20 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
                     formControlName="ssh_keys" id="ssh_keys"></textarea>
                 <div class="fileupload-text mt-1 mb-1">{{'FILEUPLOADLABEL' | translate}}</div>
                 <div class="custom-file">
-                    <input type="file" #fileInputSSH class="custom-file-input" (change)="sshFile($event.target.files)"
+                    <input type="file" #fileInputSSH class="fileupload custom-file-input" (change)="sshFile($event.target.files)"
                         id="customSSHFile">
-                    <label class="custom-file-label" #fileInputSSHLabel
-                        for="customSSHFile">{{'CHOOSEFILE' | translate}}</label>
                 </div>
             </div>
         </div>
-        <div class="form-group row">
+        <div class="form-group row mb-3">
             <label class="col-sm-4 col-form-label" for="config">{{'CONFIG' | translate}}</label>
             <div class="col-sm-8">
                 <textarea class="form-control" placeholder="{{'YAMLCONFIG' | translate}}" formControlName="config"
                     id="config"></textarea>
                 <div class="fileupload-text mt-1 mb-1">{{'FILEUPLOADLABEL' | translate}}</div>
                 <div class="custom-file">
-                    <input type="file" #fileInputConfig class="custom-file-input"
+                    <input type="file" #fileInputConfig class="fileupload custom-file-input"
                         (change)="configFile($event.target.files)" id="customConfigFile">
-                    <label class="custom-file-label" #fileInputConfigLabel
-                        for="customConfigFile">{{'CHOOSEFILE' | translate}}</label>
                 </div>
             </div>
         </div>