[pve-devel] [PATCH pve-manager 3/3] set 'disabled' for grid panels which disaply a read only, not sortable content

Emmanuel Kasper e.kasper at proxmox.com
Tue May 10 15:01:56 CEST 2016


 * closes the bug #976
 * minor usability improvement: having a clickable row where
 no action was possible is a bit misleading
---
 www/manager6/grid/ObjectGrid.js    | 6 ++++++
 www/manager6/lxc/StatusView.js     | 1 +
 www/manager6/node/StatusView.js    | 1 +
 www/manager6/pool/StatusView.js    | 1 +
 www/manager6/qemu/StatusView.js    | 1 +
 www/manager6/storage/StatusView.js | 1 +
 6 files changed, 11 insertions(+)

diff --git a/www/manager6/grid/ObjectGrid.js b/www/manager6/grid/ObjectGrid.js
index 0415b9f..afe0dbe 100644
--- a/www/manager6/grid/ObjectGrid.js
+++ b/www/manager6/grid/ObjectGrid.js
@@ -10,11 +10,17 @@ rows: an object container where each propery is a key-value object we want to re
                required: true
            },
 
+optional:
+disabled: setting this parameter to true will disable selection and focus on the
+pveObjectGrid as well as greying out input elements.
+Useful for a readonly tabular display
+
 */
 
 Ext.define('PVE.grid.ObjectGrid', {
     extend: 'Ext.grid.GridPanel',
     alias: ['widget.pveObjectGrid'],
+    disabled: false,
 
     getObjectValue: function(key, defaultValue) {
 	var me = this;
diff --git a/www/manager6/lxc/StatusView.js b/www/manager6/lxc/StatusView.js
index eaf9486..1d66495 100644
--- a/www/manager6/lxc/StatusView.js
+++ b/www/manager6/lxc/StatusView.js
@@ -1,5 +1,6 @@
 Ext.define('PVE.lxc.StatusView', {
     extend: 'PVE.grid.ObjectGrid',
+    disabled: true,
 
     initComponent : function() {
 	var me = this;
diff --git a/www/manager6/node/StatusView.js b/www/manager6/node/StatusView.js
index 1af0afc..68b2217 100644
--- a/www/manager6/node/StatusView.js
+++ b/www/manager6/node/StatusView.js
@@ -1,6 +1,7 @@
 Ext.define('PVE.node.StatusView', {
     extend: 'PVE.grid.ObjectGrid',
     alias: ['widget.pveNodeStatusView'],
+    disabled: true,
 
     initComponent : function() {
 	var me = this;
diff --git a/www/manager6/pool/StatusView.js b/www/manager6/pool/StatusView.js
index ce06897..0454a29 100644
--- a/www/manager6/pool/StatusView.js
+++ b/www/manager6/pool/StatusView.js
@@ -1,6 +1,7 @@
 Ext.define('PVE.pool.StatusView', {
     extend: 'PVE.grid.ObjectGrid',
     alias: ['widget.pvePoolStatusView'],
+    disabled: true,
 
     title: gettext('Status'),
     cwidth1: 150,
diff --git a/www/manager6/qemu/StatusView.js b/www/manager6/qemu/StatusView.js
index 8a8d1ff..340c358 100644
--- a/www/manager6/qemu/StatusView.js
+++ b/www/manager6/qemu/StatusView.js
@@ -1,6 +1,7 @@
 Ext.define('PVE.qemu.StatusView', {
     extend: 'PVE.grid.ObjectGrid',
     alias: ['widget.pveQemuStatusView'],
+    disabled: true,
 
     initComponent : function() {
 	var me = this;
diff --git a/www/manager6/storage/StatusView.js b/www/manager6/storage/StatusView.js
index c90e73f..58d63aa 100644
--- a/www/manager6/storage/StatusView.js
+++ b/www/manager6/storage/StatusView.js
@@ -1,6 +1,7 @@
 Ext.define('PVE.storage.StatusView', {
     extend: 'PVE.grid.ObjectGrid',
     alias: 'widget.pveStorageStatusView',
+    disabled: true,
 
     title: gettext('Status'),
     cwidth1: 150,
-- 
2.1.4





More information about the pve-devel mailing list