* [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
@ 2024-05-31 8:07 Dominik Csapak
2024-05-31 10:07 ` Dominik Csapak
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Dominik Csapak @ 2024-05-31 8:07 UTC (permalink / raw)
To: pve-devel
we already have the information parsed, so it's cheap, and we already
have a mechanism in place that adds 'ha-<hastate>' as a css class, so
let's reuse that.
I chose a yellow wrench, as wrenches are associated with 'maintenance',
and because the state warrants more notice than 'online' but less than
'offline'.
Users mentioned in the forum that this would be nice:
https://forum.proxmox.com/threads/125768/
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
not sure about the color, since the yellow has relatively low contrast
in the light mode (in dark mode it's fine). It's the same yellow as for
'io-errors' though.
PVE/API2/Cluster.pm | 3 +++
www/css/ext6-pve.css | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm
index 04387ab4..4fc838be 100644
--- a/PVE/API2/Cluster.pm
+++ b/PVE/API2/Cluster.pm
@@ -463,6 +463,9 @@ __PACKAGE__->register_method({
if (defined(my $mode = $info->{'cgroup-mode'})) {
$entry->{'cgroup-mode'} = int($mode);
}
+ if (defined(my $status = $hastatus->{node_status}->{$node})) {
+ $entry->{'hastate'} = $status;
+ }
push @$res, $entry;
}
diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css
index b5a3683a..83580afb 100644
--- a/www/css/ext6-pve.css
+++ b/www/css/ext6-pve.css
@@ -206,6 +206,14 @@
font-size: 0.75em;
}
+/* yellow wrench */
+.x-tree-icon-custom.ha-maintenance:after,
+.x-grid-icon-custom.ha-maintenance:after {
+ content: "\f0ad";
+ color: #FFCC00;
+}
+
+
/* yellow ! triangle */
.x-tree-icon-custom.pending:after,
.x-grid-icon-custom.pending:after,
--
2.39.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
2024-05-31 8:07 [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon Dominik Csapak
@ 2024-05-31 10:07 ` Dominik Csapak
2024-11-12 19:49 ` Thomas Lamprecht
2024-11-13 11:39 ` Dominik Csapak
2 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2024-05-31 10:07 UTC (permalink / raw)
To: pve-devel
sorry there is a word missing in the subject:
'include the node ha status in resources call and show maintenance as icon'
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
2024-05-31 8:07 [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon Dominik Csapak
2024-05-31 10:07 ` Dominik Csapak
@ 2024-11-12 19:49 ` Thomas Lamprecht
2024-11-13 9:16 ` Aaron Lauterer
2024-11-13 11:39 ` Dominik Csapak
2 siblings, 1 reply; 8+ messages in thread
From: Thomas Lamprecht @ 2024-11-12 19:49 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 31.05.24 um 10:07 schrieb Dominik Csapak:
> we already have the information parsed, so it's cheap, and we already
> have a mechanism in place that adds 'ha-<hastate>' as a css class, so
> let's reuse that.
>
> I chose a yellow wrench, as wrenches are associated with 'maintenance',
> and because the state warrants more notice than 'online' but less than
> 'offline'.
>
> Users mentioned in the forum that this would be nice:
> https://forum.proxmox.com/threads/125768/
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> not sure about the color, since the yellow has relatively low contrast
> in the light mode (in dark mode it's fine). It's the same yellow as for
> 'io-errors' though.
maybe blue as more of a "notice" color, this state is not problematic per
se after all.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
2024-11-12 19:49 ` Thomas Lamprecht
@ 2024-11-13 9:16 ` Aaron Lauterer
2024-11-13 10:49 ` Thomas Lamprecht
0 siblings, 1 reply; 8+ messages in thread
From: Aaron Lauterer @ 2024-11-13 9:16 UTC (permalink / raw)
To: Proxmox VE development discussion, Thomas Lamprecht, Dominik Csapak
On 2024-11-12 20:49, Thomas Lamprecht wrote:
> Am 31.05.24 um 10:07 schrieb Dominik Csapak:
>> we already have the information parsed, so it's cheap, and we already
>> have a mechanism in place that adds 'ha-<hastate>' as a css class, so
>> let's reuse that.
>>
>> I chose a yellow wrench, as wrenches are associated with 'maintenance',
>> and because the state warrants more notice than 'online' but less than
>> 'offline'.
>>
>> Users mentioned in the forum that this would be nice:
>> https://forum.proxmox.com/threads/125768/
>>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>> not sure about the color, since the yellow has relatively low contrast
>> in the light mode (in dark mode it's fine). It's the same yellow as for
>> 'io-errors' though.
>
> maybe blue as more of a "notice" color, this state is not problematic per
> se after all.
Some thoughts from my side:
We use #3892d4 for the Ceph PG pie chart if PGs are doing some non
critical work. It is a "mid" blue that works quite well in both, light
and dark theme.
The wrench symbol can be a bit thin as it is even smaller than the main
icon. Maybe the `cog` icon works better? But no hard feelings on either
from my side.
The cog wheel and the blue would result in the following CSS class:
.x-tree-icon-custom.ha-maintenance:after,
.x-grid-icon-custom.ha-maintenance:after {
content: "\f013";
color: #3892d4;
}
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
2024-11-13 9:16 ` Aaron Lauterer
@ 2024-11-13 10:49 ` Thomas Lamprecht
2024-11-13 10:53 ` Dominik Csapak
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Lamprecht @ 2024-11-13 10:49 UTC (permalink / raw)
To: Aaron Lauterer, Proxmox VE development discussion, Dominik Csapak
Am 13.11.24 um 10:16 schrieb Aaron Lauterer:
> We use #3892d4 for the Ceph PG pie chart if PGs are doing some non
> critical work. It is a "mid" blue that works quite well in both, light
> and dark theme.
That or no specific color at all would work for me.
> The wrench symbol can be a bit thin as it is even smaller than the main
> icon. Maybe the `cog` icon works better? But no hard feelings on either
> from my side.
One option would be to use the same thing as we do for PBS Datastore
maintenance, is kinda related. There we just grey out the datastore icon
and use a wrench with "normal" foreground color, albeit it might make it
harder do differ between shutdown and powered on nodes.
A cog is more for options/settings, not so much for maintenance IMO.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
2024-11-13 10:49 ` Thomas Lamprecht
@ 2024-11-13 10:53 ` Dominik Csapak
2024-11-13 11:20 ` Thomas Lamprecht
0 siblings, 1 reply; 8+ messages in thread
From: Dominik Csapak @ 2024-11-13 10:53 UTC (permalink / raw)
To: Thomas Lamprecht, Aaron Lauterer, Proxmox VE development discussion
On 11/13/24 11:49, Thomas Lamprecht wrote:
> Am 13.11.24 um 10:16 schrieb Aaron Lauterer:
>> We use #3892d4 for the Ceph PG pie chart if PGs are doing some non
>> critical work. It is a "mid" blue that works quite well in both, light
>> and dark theme.
>
> That or no specific color at all would work for me.
>
>> The wrench symbol can be a bit thin as it is even smaller than the main
>> icon. Maybe the `cog` icon works better? But no hard feelings on either
>> from my side.
>
> One option would be to use the same thing as we do for PBS Datastore
> maintenance, is kinda related. There we just grey out the datastore icon
> and use a wrench with "normal" foreground color, albeit it might make it
> harder do differ between shutdown and powered on nodes.
>
> A cog is more for options/settings, not so much for maintenance IMO.
>
a solution that seems to improve it, would be to incread the font-size
of the wrench. It's not something we do for other icons, but
this one is especially small and bumping the font-size to e.g. 14px
(from 13) seems to make it much easier to see
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
2024-11-13 10:53 ` Dominik Csapak
@ 2024-11-13 11:20 ` Thomas Lamprecht
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Lamprecht @ 2024-11-13 11:20 UTC (permalink / raw)
To: Dominik Csapak, Aaron Lauterer, Proxmox VE development discussion
Am 13.11.24 um 11:53 schrieb Dominik Csapak:
> a solution that seems to improve it, would be to incread the font-size
> of the wrench. It's not something we do for other icons, but
> this one is especially small and bumping the font-size to e.g. 14px
> (from 13) seems to make it much easier to see
fine by me, maybe throw in some comment that this is special.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon
2024-05-31 8:07 [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon Dominik Csapak
2024-05-31 10:07 ` Dominik Csapak
2024-11-12 19:49 ` Thomas Lamprecht
@ 2024-11-13 11:39 ` Dominik Csapak
2 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2024-11-13 11:39 UTC (permalink / raw)
To: pve-devel
sent a v2:
https://lore.proxmox.com/pve-devel/20241113113259.2210108-1-d.csapak@proxmox.com/
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-11-13 11:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 8:07 [pve-devel] [RFC PATCH manager] api/ui: include the node ha status in resources call and show as icon Dominik Csapak
2024-05-31 10:07 ` Dominik Csapak
2024-11-12 19:49 ` Thomas Lamprecht
2024-11-13 9:16 ` Aaron Lauterer
2024-11-13 10:49 ` Thomas Lamprecht
2024-11-13 10:53 ` Dominik Csapak
2024-11-13 11:20 ` Thomas Lamprecht
2024-11-13 11:39 ` Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox