public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager/widget-toolkit 0/2] make rule status checkmark
@ 2025-09-19 15:28 Michael Köppl
  2025-09-19 15:29 ` [pve-devel] [PATCH widget-toolkit 1/1] css: add class for making elements unclickable Michael Köppl
  2025-09-19 15:29 ` [pve-devel] [PATCH manager 1/1] ui: ha: rules: make status icon unclickable if there are no errors Michael Köppl
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Köppl @ 2025-09-19 15:28 UTC (permalink / raw)
  To: pve-devel

If there are no errors related to the given rule, a checkmark is
displayed as the status icon. The icon is displayed as clickable to the
user since a handler function is defined. However, the handler function
does not do anything if there are no errors. The first patch adds a CSS
class for making such elements appear as non-clickable and the second
patch applies this class to the status icon for rules.

proxmox-widget-toolkit:

Michael Köppl (1):
  css: add class for making elements unclickable

 src/proxmox-dark/scss/proxmox/_general.scss | 5 +++++
 1 file changed, 5 insertions(+)


pve-manager:

Michael Köppl (1):
  ui: ha: rules: make status icon unclickable if there are no errors

 www/manager6/ha/Rules.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Summary over all repositories:
  2 files changed, 6 insertions(+), 1 deletions(-)

-- 
Generated by git-murpp 0.8.0


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

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

* [pve-devel] [PATCH widget-toolkit 1/1] css: add class for making elements unclickable
  2025-09-19 15:28 [pve-devel] [PATCH manager/widget-toolkit 0/2] make rule status checkmark Michael Köppl
@ 2025-09-19 15:29 ` Michael Köppl
  2025-09-19 15:29 ` [pve-devel] [PATCH manager 1/1] ui: ha: rules: make status icon unclickable if there are no errors Michael Köppl
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Köppl @ 2025-09-19 15:29 UTC (permalink / raw)
  To: pve-devel

This is useful for elements which have a click handler defined, but the
action of that handler is dependent on some condition. Without adding
pointer-events:none; the element would be displayed as clickable.

Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
 src/proxmox-dark/scss/proxmox/_general.scss | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/proxmox-dark/scss/proxmox/_general.scss b/src/proxmox-dark/scss/proxmox/_general.scss
index 1342f02..35a5a01 100644
--- a/src/proxmox-dark/scss/proxmox/_general.scss
+++ b/src/proxmox-dark/scss/proxmox/_general.scss
@@ -42,3 +42,8 @@ div.eol-notice + div[id^="panel-"] > div[id^="panel-"][id$="-bodyWrap"] > div {
 .pmx-hint a:active {
   color: $highlighted-text;
 }
+
+// Unclickable elements (mostly for elements with conditional handlers)
+.pmx-unclickable {
+  pointer-events: none;
+}
-- 
2.47.3



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

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

* [pve-devel] [PATCH manager 1/1] ui: ha: rules: make status icon unclickable if there are no errors
  2025-09-19 15:28 [pve-devel] [PATCH manager/widget-toolkit 0/2] make rule status checkmark Michael Köppl
  2025-09-19 15:29 ` [pve-devel] [PATCH widget-toolkit 1/1] css: add class for making elements unclickable Michael Köppl
@ 2025-09-19 15:29 ` Michael Köppl
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Köppl @ 2025-09-19 15:29 UTC (permalink / raw)
  To: pve-devel

The check icon should not be clickable since it is misleading if
clicking it triggers no action, so add a class to the element that
disables pointer events if there is no error.

Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
 www/manager6/ha/Rules.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/ha/Rules.js b/www/manager6/ha/Rules.js
index b2c510d69..1b4fc7148 100644
--- a/www/manager6/ha/Rules.js
+++ b/www/manager6/ha/Rules.js
@@ -148,7 +148,7 @@ Ext.define('PVE.ha.RulesBaseView', {
                             getClass: (value) =>
                                 Object.keys(value ?? {}).length
                                     ? 'fa fa-exclamation-triangle'
-                                    : 'fa fa-check',
+                                    : 'fa fa-check pmx-unclickable',
                         },
                     ],
                 },
-- 
2.47.3



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

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

end of thread, other threads:[~2025-09-19 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19 15:28 [pve-devel] [PATCH manager/widget-toolkit 0/2] make rule status checkmark Michael Köppl
2025-09-19 15:29 ` [pve-devel] [PATCH widget-toolkit 1/1] css: add class for making elements unclickable Michael Köppl
2025-09-19 15:29 ` [pve-devel] [PATCH manager 1/1] ui: ha: rules: make status icon unclickable if there are no errors Michael Köppl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal