[pve-devel] [PATCH manager v2 3/8] let cluster dashboard use full browser width

Dominik Csapak d.csapak at proxmox.com
Fri Feb 23 10:31:57 CET 2018


use one/two column layout instead of hardcoding width for the panels
also optimize padding values

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/dc/Guests.js  |  2 +-
 www/manager6/dc/Health.js  |  4 ++--
 www/manager6/dc/Summary.js | 18 +++++++++++++-----
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/www/manager6/dc/Guests.js b/www/manager6/dc/Guests.js
index 56c37e62..d84fd9be 100644
--- a/www/manager6/dc/Guests.js
+++ b/www/manager6/dc/Guests.js
@@ -4,7 +4,7 @@ Ext.define('PVE.dc.Guests', {
 
 
     title: gettext('Guests'),
-    height: 200,
+    height: 220,
     layout: {
 	type: 'table',
 	columns: 2,
diff --git a/www/manager6/dc/Health.js b/www/manager6/dc/Health.js
index 3c7f17b5..487012fe 100644
--- a/www/manager6/dc/Health.js
+++ b/www/manager6/dc/Health.js
@@ -4,8 +4,8 @@ Ext.define('PVE.dc.Health', {
 
     title: gettext('Health'),
 
-    bodyPadding: '0 20 0 20',
-    height: 200,
+    bodyPadding: 10,
+    height: 220,
     layout: {
 	type: 'hbox',
 	align: 'stretch'
diff --git a/www/manager6/dc/Summary.js b/www/manager6/dc/Summary.js
index f984f58f..d2a52ff3 100644
--- a/www/manager6/dc/Summary.js
+++ b/www/manager6/dc/Summary.js
@@ -4,13 +4,21 @@ Ext.define('PVE.dc.Summary', {
 
     scrollable: true,
 
-    bodyPadding: '10 0 0 0',
+    bodyPadding: 5,
 
     layout: 'column',
 
     defaults: {
-	width: 762,
-	padding: '0 0 10 10'
+	padding: 5,
+	plugins: 'responsive',
+	responsiveConfig: {
+	    'width < 1900': {
+		columnWidth: 1
+	    },
+	    'width >= 1900': {
+		columnWidth: 0.5
+	    }
+	}
     },
 
     items: [
@@ -25,8 +33,8 @@ Ext.define('PVE.dc.Summary', {
 	{
 	    title: gettext('Resources'),
 	    xtype: 'panel',
-	    height: 250,
-	    bodyPadding: '0 0 10 0',
+	    minHeight: 250,
+	    bodyPadding: 5,
 	    layout: 'hbox',
 	    defaults: {
 		xtype: 'proxmoxGauge',
-- 
2.11.0





More information about the pve-devel mailing list