mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 11:32:41 +00:00
api/ui: include the node ha status in resources call and show as icon
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 blue wrench, as wrenches are associated with 'maintenance', and because the state is different than 'online' and 'offline', but don't make it yellow since it's not really a 'failure' state. 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>
This commit is contained in:
parent
666905d47a
commit
993d05abc6
@ -516,6 +516,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;
|
||||
}
|
||||
|
@ -206,6 +206,16 @@
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
/* blue wrench */
|
||||
.x-tree-icon-custom.ha-maintenance:after,
|
||||
.x-grid-icon-custom.ha-maintenance:after {
|
||||
content: "\f0ad";
|
||||
color: #3892d4;
|
||||
/* make it a little bigger since the icon is very small */
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
/* yellow ! triangle */
|
||||
.x-tree-icon-custom.pending:after,
|
||||
.x-grid-icon-custom.pending:after,
|
||||
|
Loading…
Reference in New Issue
Block a user