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;
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);
cpu = cpu/count;
mem = mem/count;
}
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) {
},
],
},
- {
- height: 250,
- iconCls: 'fa fa-tasks',
- title: gettext('Cluster Resources (average)'),
- bodyPadding: '0 20 0 20',
- layout: {
- type: 'hbox',
- align: 'center',
- },
- defaults: {
- xtype: 'proxmoxGauge',
- spriteFontSize: '20px',
- flex: 1,
- },
- items: [
- {
- title: gettext('CPU'),
- reference: 'cpu',
- },
- {
- title: gettext('Memory'),
- reference: 'mem',
- },
- {
- title: gettext('Storage'),
- reference: 'hd',
- },
- ],
- },
{
xtype: 'pmgNodeInfoPanel',
reference: 'nodeInfo',
- height: 250,
- bodyPadding: '10 5 10 5',
+ height: 275,
+ bodyPadding: '15 5 15 5',
iconCls: 'fa fa-tasks',
},
{
- height: 250,
+ height: 275,
iconCls: 'fa fa-list',
title: gettext('Top Receivers'),
bind: {
store: '{receivers}',
},
-
emptyText: gettext('No data in database'),
-
// remove all borders/lines/headers
border: false,
bodyBorder: false,
viewConfig: {
stripeRows: false,
},
-
columns: [
{
dataIndex: 'receiver',
],
}],
},
+ {
+ height: 250,
+ iconCls: 'fa fa-tasks',
+ title: gettext('Cluster Resources (average)'),
+ reference: 'clusterResources',
+ hidden: true,
+ bodyPadding: '0 20 0 20',
+ layout: {
+ type: 'hbox',
+ align: 'center',
+ },
+ defaults: {
+ xtype: 'proxmoxGauge',
+ spriteFontSize: '20px',
+ flex: 1,
+ },
+ items: [
+ {
+ title: gettext('CPU'),
+ reference: 'cpu',
+ },
+ {
+ title: gettext('Memory'),
+ reference: 'mem',
+ },
+ {
+ title: gettext('Storage'),
+ reference: 'hd',
+ },
+ ],
+ },
],
});