Fix Bug 1973: VIM Resources Type Overview issue in Dashboard 37/11837/2
authorSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Mon, 4 Apr 2022 13:14:53 +0000 (18:44 +0530)
committerramanathan <ramerama@tataelxsi.co.in>
Thu, 7 Apr 2022 05:35:51 +0000 (07:35 +0200)
- Charts of selected VIM Resource type will change when a different type is selected.
        - VIM resource overview shows 'No Data' content for invalid VIM account details.
- Added tooltip in VimAccountActions for VimResourcesOverview &
  RunningInstances

Change-Id: I45dcf504309f58a6c0345e0c01220ee392b37502
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
src/app/dashboard/DashboardComponent.html
src/app/dashboard/DashboardComponent.ts
src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html
src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.html
src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.scss
src/assets/i18n/de.json
src/assets/i18n/en.json
src/assets/i18n/es.json
src/assets/i18n/pt.json

index a54351b..9689e03 100644 (file)
@@ -150,12 +150,12 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
                                     <label for="vimList">{{'PAGE.VIMDETAILS.NAME' | translate}}</label>
                                     <ng-select (change)="getSelectedVIMDetails($event)" [clearable]="false"
                                         placeholder="{{'SELECT' | translate}}" [items]="vimList" bindLabel="name"
-                                        bindValue="name" id="vimList"></ng-select>
+                                        bindValue="name" id="vimList" [(ngModel)]="vimListData"></ng-select>
                                 </div>
                             </div>
                         </div>
                     </div>
-                    <app-resources-overview *ngIf="selectedVIMDetails !== null && selectedVIMDetails !== undefined"
+                    <app-resources-overview *ngIf="selectedVIMDetails !== null && selectedVIMDetails !== undefined && vimListData !== null"
                         [resourcesData]="selectedVIMDetails"></app-resources-overview>
                 </div>
             </div>
index 2feef7c..d6dc801 100644 (file)
@@ -123,6 +123,9 @@ export class DashboardComponent implements OnInit {
     /** Array holds Vim data filtered with selected vimtype  */
     public vimList: VimAccountDetails[] = [];
 
+    /** Model value used to hold selected vimtype Data @public */
+    public vimListData: string;
+
     /** List of color for Instances @private */
     private backgroundColor: string[] = [];
 
@@ -398,6 +401,9 @@ export class DashboardComponent implements OnInit {
     public getSelectedVimTypeList(selectedVIMType: string): void {
         this.vimList = this.vimData.filter((vimData: VimAccountDetails): boolean =>
             vimData.vim_type === selectedVIMType);
+        if (this.vimList.length === 0) {
+            this.vimListData = null;
+        }
 
     }
 
index 515066e..51c57b0 100644 (file)
@@ -44,7 +44,7 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
         [ngbPopover]="graphContent" triggers="manual" #chart="ngbPopover"
         (click)="chart.open()" [autoClose]="'outside'" [popoverTitle]="graphTitle" popoverClass="resources-chart-popover"
         [disabled]="value.resources === null">
-        <i class="fas fa-chart-pie"></i>
+        <i ngbTooltip="{{'PAGE.VIMDETAILS.VIMRESOURCES' | translate}}" class="fas fa-chart-pie"></i>
     </button>
     <button type="button" class="btn btn-primary" (click)="vimInfo()" placement="top" container="body"
         ngbTooltip="{{'INFO' | translate}}">
@@ -57,6 +57,6 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
     <button type="button" placement="left" container="body" [ngbPopover]="popContent" triggers="manual" #p="ngbPopover"
         (click)="p.open()" [autoClose]="'outside'" [popoverTitle]="popTitle" class="btn btn-primary"
         popoverClass="runninginstances" [disabled]="!showMapIcon">
-        <i class="fas fa-layer-group"></i>
+        <i ngbTooltip="{{'PAGE.DASHBOARD.RUNNINGINSTANCES' | translate}}" class="fas fa-layer-group"></i>
     </button>
 </div>
\ No newline at end of file
index 39990b5..483fc0b 100644 (file)
@@ -44,6 +44,9 @@ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
                             [legend]="chartLegend"
                             [colors]="list.colorValues">
                         </canvas>
+                         <div class="no-data" *ngIf="list.values.total === 0 || list.values.total === null">
+                            <h4><strong>{{'PAGE.VIMDETAILS.NODATA' | translate}}</strong></h4>
+                        </div>
                         <div class="card-body">
                             <h5 class="card-title"><strong>{{list.title}}</strong></h5>
                             <p class="card-text">
index e042092..721e8ad 100644 (file)
     .card-body {
         @include padding-value(5, 5, 5, 10);
     }
+    .no-data {
+        margin-bottom: 2.5rem;
+        margin-top: -1.5rem;
+    }
 }
 .switch {
     @include position_value(relative, null, null, null, null);
index 7489891..ffa152f 100644 (file)
             "FREE": "Kostenlos",
             "VIMRESOURCES": "Übersicht über die VIM-Ressourcen",
             "DOUGHNUT": "Krapfen",
-            "PIE": "Kuchen"
+            "PIE": "Kuchen",
+            "NODATA": "Keine Daten"
         },
         "WIMACCOUNTS": {
             "CREATEDSUCCESSFULLY": "WIM erfolgreich erstellt",
index c1e4cd7..1642dbc 100644 (file)
@@ -40,7 +40,7 @@
     "PACKAGES": "Packages",
     "MODIFIED": "Modified",
     "NODATAMSG": "No data available in table",
-    "PRODUCTNAME":"Product Name",
+    "PRODUCTNAME": "Product Name",
     "IDENTIFIER": "Identifier",
     "DESCRIPTION": "Description",
     "DESIGNER": "Designer",
             "FREE": "Free",
             "VIMRESOURCES": "VIM Resources Overview",
             "DOUGHNUT": "Doughnut",
-            "PIE": "Pie"
+            "PIE": "Pie",
+            "NODATA": "No Data"
         },
         "WIMACCOUNTS": {
             "CREATEDSUCCESSFULLY": "WIM Created Successfully",
index 5a3920d..d826ccb 100644 (file)
             "FREE": "Libre",
             "VIMRESOURCES": "Descripción general de los recursos de VIM",
             "DOUGHNUT": "Rosquilla",
-            "PIE": "Pastel"
+            "PIE": "Pastel",
+            "NODATA": "Sin datos"
         },
         "WIMACCOUNTS": {
             "CREATEDSUCCESSFULLY": "WIM Creado correctamente",
             "EDITOSMREPO": "Editar repositorios de OSM",
             "OSMREPOTITLE": "Repositorio OSM registrado",
             "CREATEDSUCCESSFULLY": "Repositorio OSM agregado correctamente",
-            "UPDATEDSUCCESSFULLY" : "Repositorio OSM actualizado correctamente"
+            "UPDATEDSUCCESSFULLY": "Repositorio OSM actualizado correctamente"
         },
         "OPERATIONALDASHBOARD": {
             "TITLE": "Tablero operativo",
index 65c9855..bd9d91b 100644 (file)
             "FREE": "Livre",
             "VIMRESOURCES": "Visão geral dos recursos do VIM",
             "DOUGHNUT": "rosquinha",
-            "PIE": "torta"
+            "PIE": "torta",
+            "NODATA": "Sem dados"
         },
         "WIMACCOUNTS": {
             "CREATEDSUCCESSFULLY": "WIM criado com sucesso",