From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 146281FF15C for <inbox@lore.proxmox.com>; Wed, 13 Nov 2024 12:33:03 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9C7A41419C; Wed, 13 Nov 2024 12:33:02 +0100 (CET) From: Dominik Csapak <d.csapak@proxmox.com> To: pve-devel@lists.proxmox.com Date: Wed, 13 Nov 2024 12:32:59 +0100 Message-Id: <20241113113259.2210108-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.016 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager v2] api/ui: include the node ha status in resources call and show as icon X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> 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> --- changes from v1: * make the wrench blue; and make it a little bigger so it's easier to see PVE/API2/Cluster.pm | 3 +++ www/css/ext6-pve.css | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index c2a7a946..a0e5c11b 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -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; } diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css index b5a3683a..975291f6 100644 --- a/www/css/ext6-pve.css +++ b/www/css/ext6-pve.css @@ -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, -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel