]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/storage/Summary.js
bump version to 8.2.6
[pve-manager.git] / www / manager6 / storage / Summary.js
index 43b1b028ab577b66f41469e91cd4344ce349e97f..bc61139d2871ad0672fdc9cf9c9a0c922e142a77 100644 (file)
@@ -2,17 +2,20 @@ Ext.define('PVE.storage.Summary', {
     extend: 'Ext.panel.Panel',
     alias: 'widget.pveStorageSummary',
     scrollable: true,
-    bodyPadding: 10,
-    defaults: {
-       style: {'padding-top':'10px'},
-       width: 800
-    },
+    bodyPadding: 5,
     tbar: [
        '->',
        {
-           xtype: 'pveRRDTypeSelector'
-       }
+           xtype: 'proxmoxRRDTypeSelector',
+       },
     ],
+    layout: {
+       type: 'column',
+    },
+    defaults: {
+       padding: 5,
+       columnWidth: 1,
+    },
     initComponent: function() {
         var me = this;
 
@@ -26,35 +29,37 @@ Ext.define('PVE.storage.Summary', {
            throw "no storage ID specified";
        }
 
-       var statusview = Ext.create('PVE.storage.StatusView', {
-           pveSelNode: me.pveSelNode,
-           style: {'padding-top':'0px'}
+       var rstore = Ext.create('Proxmox.data.ObjectStore', {
+           url: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/status",
+           interval: 1000,
        });
 
-       var rstore = statusview.rstore;
-
-       var rrdstore = Ext.create('PVE.data.RRDStore', {
-           rrdurl:  "/api2/json/nodes/" + nodename + "/storage/" + storage + "/rrddata"
+       var rrdstore = Ext.create('Proxmox.data.RRDStore', {
+           rrdurl: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/rrddata",
+           model: 'pve-rrd-storage',
        });
 
        Ext.apply(me, {
            items: [
-               statusview,
                {
-                   xtype: 'pveRRDChart',
+                   xtype: 'pveStorageStatusView',
+                   pveSelNode: me.pveSelNode,
+                   rstore: rstore,
+               },
+               {
+                   xtype: 'proxmoxRRDChart',
                    title: gettext('Usage'),
-                   fields: ['total','used'],
+                   fields: ['total', 'used'],
                    fieldTitles: ['Total Size', 'Used Size'],
-                   store: rrdstore
-               }
+                   store: rrdstore,
+               },
            ],
            listeners: {
                activate: function() { rstore.startUpdate(); rrdstore.startUpdate(); },
-               hide: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); },
-               destroy: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); }
-           }
+               destroy: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); },
+           },
        });
 
        me.callParent();
-    }
+    },
 });