]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/Dashboard.js
spam detector: custom rules: consitent add/edit/remove button & modernization
[pmg-gui.git] / js / Dashboard.js
index 4d8067b79b56b732629160468352e641f3a37106..9c51734b4ce0db27b6992a25fa597643b3959ceb 100644 (file)
@@ -119,6 +119,11 @@ Ext.define('PMG.Dashboard', {
                    subStatus = 0;
                }
 
+               if (item.data.name === Proxmox.NodeName) {
+                   let repoStatus = me.lookup('nodeInfo').down('#repositoryStatus');
+                   repoStatus.setSubscriptionStatus(!!item.data.level);
+               }
+
                // resources count
                cpu += item.data.cpu || 0;
 
@@ -140,8 +145,6 @@ Ext.define('PMG.Dashboard', {
            var subscriptionPanel = me.lookup('subscription');
            subscriptionPanel.setSubStatus(subStatus);
 
-           me.lookup('nodeInfo').setSubscriptionStatus(subStatus);
-
            // the node info already displays this information in case there is no cluster
            me.lookup('clusterResources').setHidden(records.length === 1);
 
@@ -174,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) {
@@ -279,6 +283,7 @@ Ext.define('PMG.Dashboard', {
                    url: '/api2/json/statistics/recentreceivers',
                    extraParams: {
                        hours: '{hours}',
+                       limit: 10, // make this also configurable?
                    },
                },
                fields: [
@@ -403,7 +408,7 @@ Ext.define('PMG.Dashboard', {
                },
                {
                    iconCls: 'fa fa-ticket',
-                   title: 'Subscription',
+                   title: gettext('Subscription'),
                    reference: 'subscription',
                    xtype: 'pmgSubscriptionInfo',
                    margin: '10 0 0 0',
@@ -414,16 +419,16 @@ Ext.define('PMG.Dashboard', {
        {
            xtype: 'pmgNodeInfoPanel',
            reference: 'nodeInfo',
-           height: 250,
-           bodyPadding: '10 5 10 5',
+           height: 300,
+           bodyPadding: '15 5 15 5',
            iconCls: 'fa fa-tasks',
        },
        {
-           height: 250,
+           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',
@@ -434,9 +439,7 @@ Ext.define('PMG.Dashboard', {
                bind: {
                    store: '{receivers}',
                },
-
                emptyText: gettext('No data in database'),
-
                // remove all borders/lines/headers
                border: false,
                bodyBorder: false,
@@ -447,7 +450,6 @@ Ext.define('PMG.Dashboard', {
                viewConfig: {
                    stripeRows: false,
                },
-
                columns: [
                    {
                        dataIndex: 'receiver',