]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/Dashboard.js
dkim settings: improve label for signing domain source selection
[pmg-gui.git] / js / Dashboard.js
index 3cf9cf0ec5be9c40360501f1af1ef7204ed09c65..b536cb242420fe1b20a6b2b9239ebf92657f6951 100644 (file)
@@ -120,7 +120,8 @@ Ext.define('PMG.Dashboard', {
                }
 
                if (item.data.name === Proxmox.NodeName) {
-                   me.lookup('nodeInfo').setSubscriptionStatus(!!item.data.level);
+                   let repoStatus = me.lookup('nodeInfo').down('#repositoryStatus');
+                   repoStatus.setSubscriptionStatus(!!item.data.level);
                }
 
                // resources count
@@ -176,7 +177,8 @@ Ext.define('PMG.Dashboard', {
            }
 
            let me = this;
-           me.lookup('nodeInfo').setRepositoryInfo(records[0].data['standard-repos']);
+           let repoStatus = me.lookup('nodeInfo').down('#repositoryStatus');
+           repoStatus.setRepositoryInfo(records[0].data['standard-repos']);
        },
 
        init: function(view) {
@@ -184,9 +186,20 @@ Ext.define('PMG.Dashboard', {
            var sp = Ext.state.Manager.getProvider();
            var hours = sp.get('dashboard-hours') || 12;
            me.setHours(hours, false);
+
+           view.mon(sp, 'statechange', function(provider, key, value) {
+               if (key !== 'summarycolumns') {
+                   return;
+               }
+               Proxmox.Utils.updateColumnWidth(view);
+           });
        },
     },
 
+    listeners: {
+       resize: panel => Proxmox.Utils.updateColumnWidth(panel),
+    },
+
     viewModel: {
        data: {
            timespan: 300, // in seconds
@@ -281,6 +294,7 @@ Ext.define('PMG.Dashboard', {
                    url: '/api2/json/statistics/recentreceivers',
                    extraParams: {
                        hours: '{hours}',
+                       limit: 10, // make this also configurable?
                    },
                },
                fields: [
@@ -319,7 +333,7 @@ Ext.define('PMG.Dashboard', {
     bodyPadding: '20 0 0 20',
 
     defaults: {
-       columnWidth: 0.5,
+       columnWidth: 1,
        xtype: 'panel',
        margin: '0 20 20 0',
     },
@@ -405,7 +419,7 @@ Ext.define('PMG.Dashboard', {
                },
                {
                    iconCls: 'fa fa-ticket',
-                   title: 'Subscription',
+                   title: gettext('Subscription'),
                    reference: 'subscription',
                    xtype: 'pmgSubscriptionInfo',
                    margin: '10 0 0 0',
@@ -416,16 +430,16 @@ Ext.define('PMG.Dashboard', {
        {
            xtype: 'pmgNodeInfoPanel',
            reference: 'nodeInfo',
-           height: 275,
+           height: 300,
            bodyPadding: '15 5 15 5',
            iconCls: 'fa fa-tasks',
        },
        {
-           height: 275,
+           height: 300,
            iconCls: 'fa fa-list',
            title: gettext('Top Receivers'),
 
-           bodyPadding: '20 20 20 20',
+           bodyPadding: '10 10 10 10',
            layout: {
                type: 'vbox',
                pack: 'center',