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 <sandhya.j@tataelxsi.co.in>
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 @@
<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>
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 @@
/** 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 @@
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;
+ }
}