all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: tree: show tooltips for all entries that have sensible information
@ 2024-11-14  8:04 Dominik Csapak
  2024-11-14 18:09 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 4+ messages in thread
From: Dominik Csapak @ 2024-11-14  8:04 UTC (permalink / raw)
  To: pve-devel

instead of filtering pools and groups out manually, simply accumulate
the info we want to to have (status/hastate/etc.) and if any of those
exist, show the tooltip.

This results in the nodes also having a tooltip, including their hastate
(such as online/maintenance), and automatically would show such things
in the future if we add those fields to other entries.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/tree/ResourceTree.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
index 312f958f..a7acdf93 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -148,11 +148,10 @@ Ext.define('PVE.tree.ResourceTree', {
     },
 
     getToolTip: function(info) {
-	if (info.type === 'pool' || info.groupbyid !== undefined) {
-	    return undefined;
+	let qtips = [];
+	if (info.qmpstatus || info.status) {
+	    qtips.push(gettext('Status') + ': ' + (info.qmpstatus || info.status));
 	}
-
-	let qtips = [gettext('Status') + ': ' + (info.qmpstatus || info.status)];
 	if (info.lock) {
 	    qtips.push(Ext.String.format(gettext('Config locked ({0})'), info.lock));
 	}
@@ -166,6 +165,10 @@ Ext.define('PVE.tree.ResourceTree', {
 	    }
 	}
 
+	if (qtips.length === 0) {
+	    return undefined;
+	}
+
 	let tip = qtips.join(', ');
 	info.tip = tip;
 	return tip;
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-15  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14  8:04 [pve-devel] [PATCH manager] ui: tree: show tooltips for all entries that have sensible information Dominik Csapak
2024-11-14 18:09 ` [pve-devel] applied: " Thomas Lamprecht
2024-11-15  6:37   ` Dominik Csapak
2024-11-15  7:08     ` Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal