mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-12-29 19:31:32 +00:00
add tooltips to the tree
to give the user better feedback about the various icons (play, pause, warning, error, etc) add a tooltip to the tree elements which contain that information Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
c8e4fedd09
commit
dca23c54a9
@ -131,12 +131,26 @@ Ext.define('PVE.tree.ResourceTree', {
|
||||
info.text = status + info.text;
|
||||
},
|
||||
|
||||
setToolTip: function(info) {
|
||||
if (info.type === 'pool' || info.groupbyid !== undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
var qtips = [gettext('Status') + ': ' + (info.qmpstatus || info.status)];
|
||||
if (info.hastate != 'unmanaged') {
|
||||
qtips.push(gettext('HA State') + ": " + info.hastate);
|
||||
}
|
||||
|
||||
info.qtip = qtips.join(', ');
|
||||
},
|
||||
|
||||
// private
|
||||
addChildSorted: function(node, info) {
|
||||
var me = this;
|
||||
|
||||
me.setIconCls(info);
|
||||
me.setText(info);
|
||||
me.setToolTip(info);
|
||||
|
||||
var defaults;
|
||||
if (info.groupbyid) {
|
||||
@ -301,6 +315,7 @@ Ext.define('PVE.tree.ResourceTree', {
|
||||
Ext.apply(info, item.data);
|
||||
me.setIconCls(info);
|
||||
me.setText(info);
|
||||
me.setToolTip(info);
|
||||
olditem.commit();
|
||||
}
|
||||
if ((!item || moved) && olditem.isLeaf()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user