[pve-devel] [PATCH ha-manager 5/6] sim: show current master node more prominent

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jan 12 15:51:58 CET 2017


just upercasing the node status if it is the current master is not
really intuitive

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 src/PVE/HA/Sim/RTHardware.pm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/PVE/HA/Sim/RTHardware.pm b/src/PVE/HA/Sim/RTHardware.pm
index bda1356..b3e80d6 100644
--- a/src/PVE/HA/Sim/RTHardware.pm
+++ b/src/PVE/HA/Sim/RTHardware.pm
@@ -596,12 +596,10 @@ sub run {
 	    next if !$d;
 	    my $sl = $d->{node_status_label};
 	    next if !$sl;
-		
-	    if ($mstatus->{master_node} && ($mstatus->{master_node} eq $node)) {
-		$sl->set_text(uc($ns));
-	    } else {
-		$sl->set_text($ns);
-	    }
+
+	    $ns .= " (master)" if ($mstatus->{master_node} && ($mstatus->{master_node} eq $node));
+
+	    $sl->set_text($ns);
 	}
 
 	my $service_status = $mstatus->{service_status} || {};
-- 
2.1.4




More information about the pve-devel mailing list