[pve-devel] [PATCH manager 4/5] make ceph status in cluster dashboard clickable

Dominik Csapak d.csapak at proxmox.com
Tue Nov 29 15:53:52 CET 2016


to get faster from the datacenter dashboard to the ceph dashboard

also refactor the cursor style in the css

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/css/ext6-pve.css      |  3 +++
 www/manager6/Workspace.js |  4 +---
 www/manager6/dc/Health.js | 26 +++++++++++++++++++++++++-
 3 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css
index 5cd09ca..1efd93a 100644
--- a/www/css/ext6-pve.css
+++ b/www/css/ext6-pve.css
@@ -500,3 +500,6 @@ table.osds td:first-of-type {
     text-align: left;
 }
 
+.pointer {
+    cursor: pointer;
+}
diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index dad11ea..48eb05d 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -403,9 +403,7 @@ Ext.define('PVE.StdWorkspace', {
 			    xtype: 'button',
 			    margin: '0 10 0 3',
 			    iconCls: 'fa black fa-gear',
-			    style: {
-				cursor: 'pointer'
-			    },
+			    userCls: 'pointer',
 			    handler: function() {
 				var win = Ext.create('PVE.window.Settings');
 				win.show();
diff --git a/www/manager6/dc/Health.js b/www/manager6/dc/Health.js
index 428f95c..fbb74a6 100644
--- a/www/manager6/dc/Health.js
+++ b/www/manager6/dc/Health.js
@@ -126,9 +126,33 @@ Ext.define('PVE.dc.Health', {
 	    itemId: 'ceph',
 	    width: 250,
 	    columnWidth: undefined,
+	    userCls: 'pointer',
 	    title: gettext('Ceph'),
 	    xtype: 'pveHealthWidget',
-	    hidden: true
+	    hidden: true,
+	    listeners: {
+		element: 'el',
+		click: function() {
+		    var me = this;
+		    var sp = Ext.state.Manager.getProvider();
+
+		    // preselect the ceph tab
+		    sp.set('nodetab', {value:'ceph'});
+
+		    // select the first node which is online
+		    var nodeid = '';
+		    var nodes = PVE.data.ResourceStore.getNodes();
+		    Ext.Array.some(nodes, function(node) {
+			if (node.running) {
+			    nodeid = node.id;
+			    return true;
+			}
+
+			return false;
+		    });
+		    Ext.ComponentQuery.query('pveResourceTree')[0].selectById(nodeid);
+		}
+	    }
 	}
     ],
 
-- 
2.1.4





More information about the pve-devel mailing list