make ceph status in cluster dashboard clickable

to get faster from the datacenter dashboard to the ceph dashboard

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-11-30 11:52:09 +01:00 committed by Dietmar Maurer
parent 7e0c0f5200
commit 1633c3484b
3 changed files with 29 additions and 4 deletions

View File

@ -500,3 +500,6 @@ table.osds td:first-of-type {
text-align: left;
}
.pointer {
cursor: pointer;
}

View File

@ -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();

View File

@ -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);
}
}
}
],