From: SANDHYA.JS Date: Mon, 4 Apr 2022 13:14:53 +0000 (+0530) Subject: Fix Bug 1973: VIM Resources Type Overview issue in Dashboard X-Git-Tag: v11.0.3~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=875df44e1baa5d7e34d16f03154cc7045531a707;p=osm%2FNG-UI.git Fix Bug 1973: VIM Resources Type Overview issue in Dashboard - 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 --- diff --git a/src/app/dashboard/DashboardComponent.html b/src/app/dashboard/DashboardComponent.html index a54351b..9689e03 100644 --- a/src/app/dashboard/DashboardComponent.html +++ b/src/app/dashboard/DashboardComponent.html @@ -150,12 +150,12 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i + bindValue="name" id="vimList" [(ngModel)]="vimListData"> - diff --git a/src/app/dashboard/DashboardComponent.ts b/src/app/dashboard/DashboardComponent.ts index 2feef7c..d6dc801 100644 --- a/src/app/dashboard/DashboardComponent.ts +++ b/src/app/dashboard/DashboardComponent.ts @@ -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; + } } diff --git a/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html b/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html index 515066e..51c57b0 100644 --- a/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html +++ b/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html @@ -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"> - + \ No newline at end of file diff --git a/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.html b/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.html index 39990b5..483fc0b 100644 --- a/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.html +++ b/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.html @@ -44,6 +44,9 @@ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in) [legend]="chartLegend" [colors]="list.colorValues"> +
+

{{'PAGE.VIMDETAILS.NODATA' | translate}}

+
{{list.title}}

diff --git a/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.scss b/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.scss index e042092..721e8ad 100644 --- a/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.scss +++ b/src/app/vim-accounts/Resources-Overview/ResourcesOverviewComponent.scss @@ -27,6 +27,10 @@ .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); diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 7489891..ffa152f 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -238,7 +238,8 @@ "FREE": "Kostenlos", "VIMRESOURCES": "Übersicht über die VIM-Ressourcen", "DOUGHNUT": "Krapfen", - "PIE": "Kuchen" + "PIE": "Kuchen", + "NODATA": "Keine Daten" }, "WIMACCOUNTS": { "CREATEDSUCCESSFULLY": "WIM erfolgreich erstellt", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index c1e4cd7..1642dbc 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -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", @@ -238,7 +238,8 @@ "FREE": "Free", "VIMRESOURCES": "VIM Resources Overview", "DOUGHNUT": "Doughnut", - "PIE": "Pie" + "PIE": "Pie", + "NODATA": "No Data" }, "WIMACCOUNTS": { "CREATEDSUCCESSFULLY": "WIM Created Successfully", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 5a3920d..d826ccb 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -238,7 +238,8 @@ "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", @@ -446,7 +447,7 @@ "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", diff --git a/src/assets/i18n/pt.json b/src/assets/i18n/pt.json index 65c9855..bd9d91b 100644 --- a/src/assets/i18n/pt.json +++ b/src/assets/i18n/pt.json @@ -238,7 +238,8 @@ "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",