* [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; 2+ 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] 2+ messages in thread
* [pve-devel] applied: [PATCH manager] ui: tree: show tooltips for all entries that have sensible information
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 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-11-14 18:09 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 14.11.24 um 09:04 schrieb Dominik Csapak:
> 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(-)
>
>
applied, thanks!
One minor thing I noticed, and where I'm rather unsure if we should do
anything about it, is some potential odd interaction between the tooltip
and the context menu, e.g. if I open the context menu of a node and then
move the cursor up to the node icon the tooltip pops up and is displayed
over the context menu and needs relatively long to hide.
But FWICT this was always the case for guests already anyway, so probably
it's just me overthinking this.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-14 18:09 UTC | newest]
Thread overview: 2+ 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox