Fix Bug 1974: No.Of Hours Value for the running instances is hidden in Dashboard
[osm/NG-UI.git] / src / app / dashboard / DashboardComponent.ts
index 2feef7c..b7902a0 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[] = [];
 
@@ -327,6 +330,11 @@ export class DashboardComponent implements OnInit {
                 }]
             },
             options: {
+                layout: {
+                    padding: {
+                        top: 20
+                    }
+                },
                 hover: {
                     onHover(evt: Event, item: {}): void {
                         const el: HTMLElement = document.getElementById('canvas');
@@ -398,6 +406,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;
+        }
 
     }