[pve-devel] [PATCH pve-manager 1/5] Fix Qemu summary view:

Emmanuel Kasper e.kasper at proxmox.com
Thu Mar 17 10:31:08 CET 2016


* replace scrollable with autoScroll and move to prototype body
* use 'activate' to load store on F5
* do not set a height on the StatusView component: it hides some rows,
and the framework sets a good working default height
* replace deprecated 'rows' parameter in textareafield with
height in pixels
---
 www/manager6/panel/NotesView.js  | 11 ++++++-----
 www/manager6/qemu/Config.js      |  6 ++----
 www/manager6/qemu/StatusView.js  |  1 -
 www/manager6/qemu/Summary.js     | 17 +++++++++--------
 www/manager6/window/NotesEdit.js |  2 +-
 5 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/www/manager6/panel/NotesView.js b/www/manager6/panel/NotesView.js
index add9e5e..54593d1 100644
--- a/www/manager6/panel/NotesView.js
+++ b/www/manager6/panel/NotesView.js
@@ -1,6 +1,12 @@
 Ext.define('PVE.panel.NotesView', {
     extend: 'Ext.panel.Panel',
 
+    title: gettext("Notes"),
+    style: 'padding-left:10px',
+    bodyStyle: 'white-space:pre',
+    bodyPadding: 10,
+    scrollable: true,
+
     load: function() {
 	var me = this;
 	
@@ -42,11 +48,6 @@ Ext.define('PVE.panel.NotesView', {
 	}
 
 	Ext.apply(me, {
-	    title: gettext("Notes"),
-	    style: 'padding-left:10px',
-	    bodyStyle: 'white-space:pre',
-	    bodyPadding: 10,
-	    autoScroll: true,
 	    listeners: {
 		render: function(c) {
 		    c.el.on('dblclick', function() { 
diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js
index 4a094c7..1d66621 100644
--- a/www/manager6/qemu/Config.js
+++ b/www/manager6/qemu/Config.js
@@ -132,10 +132,8 @@ Ext.define('PVE.qemu.Config', {
 	    defaults: { statusStore: me.statusStore },
 	    items: [
 		{
-		    title: gettext('SummaryTODO'),
-		    xtype: 'panel',
-//		    title: gettext('Summary'),
-//		    xtype: 'pveQemuSummary',
+		    title: gettext('Summary'),
+		    xtype: 'pveQemuSummary',
 		    itemId: 'summary'
 		} ]
 	});
diff --git a/www/manager6/qemu/StatusView.js b/www/manager6/qemu/StatusView.js
index ce224e5..5cac296 100644
--- a/www/manager6/qemu/StatusView.js
+++ b/www/manager6/qemu/StatusView.js
@@ -52,7 +52,6 @@ Ext.define('PVE.qemu.StatusView', {
 
 	Ext.applyIf(me, {
 	    cwidth1: 150,
-	    height: 166,
 	    rows: rows
 	});
 
diff --git a/www/manager6/qemu/Summary.js b/www/manager6/qemu/Summary.js
index 273ba94..a71b4fd 100644
--- a/www/manager6/qemu/Summary.js
+++ b/www/manager6/qemu/Summary.js
@@ -2,6 +2,14 @@ Ext.define('PVE.qemu.Summary', {
     extend: 'Ext.panel.Panel',
     alias: 'widget.pveQemuSummary',
 
+    tbar: [ '->', { xtype: 'pveRRDTypeSelector' } ],
+    scrollable: true,
+    bodyStyle: 'padding:10px',
+    defaults: {
+	style: 'padding-top:10px',
+	width: 800
+    },
+
     initComponent: function() {
         var me = this;
 
@@ -40,13 +48,6 @@ Ext.define('PVE.qemu.Summary', {
 	});
 
 	Ext.apply(me, {
-	    tbar: [ '->', { xtype: 'pveRRDTypeSelector' } ],
-	    autoScroll: true,
-	    bodyStyle: 'padding:10px',
-	    defaults: {
-		style: 'padding-top:10px',
-		width: 800
-	    },		
 	    items: [
 		{
 		    style: 'padding-top:0px',
@@ -88,7 +89,7 @@ Ext.define('PVE.qemu.Summary', {
 	    ]
 	});
 
-	me.on('show', function() {
+	me.on('activate', function() {
 	    notesview.load();
 	});
 
diff --git a/www/manager6/window/NotesEdit.js b/www/manager6/window/NotesEdit.js
index 650b196..9212ae4 100644
--- a/www/manager6/window/NotesEdit.js
+++ b/www/manager6/window/NotesEdit.js
@@ -11,7 +11,7 @@ Ext.define('PVE.window.NotesEdit', {
 	    items: {
 		xtype: 'textarea',
 		name: 'description',
-		rows: 7,
+		height: 200,
 		value: '',
 		hideLabel: true
 	    }
-- 
2.1.4





More information about the pve-devel mailing list