gui: {dc, node}/Summary: choose columns by panel size

instead of viewport size, similar to the guest summary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-12-04 13:41:35 +01:00 committed by Thomas Lamprecht
parent bbc833099e
commit f73a73341a
2 changed files with 16 additions and 20 deletions

View File

@ -10,15 +10,7 @@ Ext.define('PVE.dc.Summary', {
defaults: {
padding: 5,
plugins: 'responsive',
responsiveConfig: {
'width < 1900': {
columnWidth: 1
},
'width >= 1900': {
columnWidth: 0.5
}
}
columnWidth: 1,
},
items: [
@ -81,6 +73,12 @@ Ext.define('PVE.dc.Summary', {
}
],
listeners: {
resize: function(panel) {
PVE.Utils.updateColumns(panel);
},
},
initComponent: function() {
var me = this;

View File

@ -97,19 +97,12 @@ Ext.define('PVE.node.Summary', {
items: [
{
xtype: 'container',
itemId: 'itemcontainer',
layout: 'column',
defaults: {
minHeight: 320,
padding: 5,
plugins: 'responsive',
responsiveConfig: {
'width < 1900': {
columnWidth: 1
},
'width >= 1900': {
columnWidth: 0.5
}
}
columnWidth: 1
},
items: [
{
@ -145,8 +138,13 @@ Ext.define('PVE.node.Summary', {
fields: ['netin','netout'],
store: rrdstore
}
]
}
],
listeners: {
resize: function(panel) {
PVE.Utils.updateColumns(panel);
},
},
},
],
listeners: {
activate: function() { rstore.startUpdate(); rrdstore.startUpdate(); },