let ceph dashboard use the full browser width

instead of hardcoding the width of the panels,
use a columnlayout and use one column for screens < 1900 width
and two columns for screens >= 1900 width

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2018-02-23 10:31:56 +01:00 committed by Thomas Lamprecht
parent e7f07a2efc
commit 9f7cbaf393

View File

@ -6,23 +6,34 @@ Ext.define('PVE.node.CephStatus', {
scrollable: true, scrollable: true,
bodyPadding: '10 0 0 0', bodyPadding: 5,
layout: {
type: 'column'
},
defaults: { defaults: {
width: 762, padding: 5
userCls: 'inline-block',
padding: '0 0 10 10'
}, },
items: [ items: [
{ {
xtype: 'panel', xtype: 'panel',
title: gettext('Health'), title: gettext('Health'),
bodyPadding: '0 10 10 10', bodyPadding: 10,
plugins: 'responsive',
responsiveConfig: {
'width < 1900': {
columnWidth: 1
},
'width >= 1900': {
columnWidth: 0.5
}
},
minHeight: 210, minHeight: 210,
layout: { layout: {
type: 'hbox', type: 'hbox',
align: 'top' align: 'stretch'
}, },
items: [ items: [
{ {
@ -36,9 +47,7 @@ Ext.define('PVE.node.CephStatus', {
itemId: 'warnings', itemId: 'warnings',
stateful: true, stateful: true,
stateId: 'ceph-status-warnings', stateId: 'ceph-status-warnings',
padding: '15 0 0 0',
xtype: 'grid', xtype: 'grid',
minHeight: 100,
// since we load the store manually, // since we load the store manually,
// to show the emptytext, we have to // to show the emptytext, we have to
// specify an empty store // specify an empty store
@ -88,7 +97,7 @@ Ext.define('PVE.node.CephStatus', {
}, },
items: [{ items: [{
scrollable: true, scrollable: true,
padding: '10', padding: 10,
xtype: 'box', xtype: 'box',
html: [ html: [
'<span>' + Ext.htmlEncode(record.data.summary) + '</span>', '<span>' + Ext.htmlEncode(record.data.summary) + '</span>',
@ -108,12 +117,22 @@ Ext.define('PVE.node.CephStatus', {
{ {
xtype: 'pveCephStatusDetail', xtype: 'pveCephStatusDetail',
itemId: 'statusdetail', itemId: 'statusdetail',
plugins: 'responsive',
responsiveConfig: {
'width < 1900': {
columnWidth: 1
},
'width >= 1900': {
columnWidth: 0.5
}
},
title: gettext('Status') title: gettext('Status')
}, },
{ {
xtype: 'panel', xtype: 'panel',
title: gettext('Performance'), title: gettext('Performance'),
bodyPadding: '0 10 10 10', columnWidth: 1,
bodyPadding: 5,
layout: { layout: {
type: 'hbox', type: 'hbox',
align: 'center' align: 'center'
@ -129,7 +148,7 @@ Ext.define('PVE.node.CephStatus', {
flex: 2, flex: 2,
xtype: 'container', xtype: 'container',
defaults: { defaults: {
padding: '0 0 0 30', padding: 0,
height: 100 height: 100
}, },
items: [ items: [