]> git.proxmox.com Git - pmg-api.git/commitdiff
pmgdb: highlight active rules
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 22 Feb 2024 21:06:18 +0000 (22:06 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Feb 2024 10:53:51 +0000 (11:53 +0100)
by printing the ACTIVE in caps. For me this improves quickly skimming
through a ruleset (in a few support cases I wasted quite a bit of time
on the wrong spot - only to see that the rule in question is inactive
anyways)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by:  Friedrich Weber <f.weber@proxmox.com>
Tested-by:  Alexander Zeidler <a.zeidler@proxmox.com>
src/PMG/CLI/pmgdb.pm

index bb22965dda2055e41b90a211510240c683b7976a..87c8804ef10925cd397665e7411fd176d28e342e 100644 (file)
@@ -48,7 +48,7 @@ sub print_rule {
        1 => 'out',
        2 => 'in+out',
     };
-    my $active = $rule->{active} ? 'active' : 'inactive';
+    my $active = $rule->{active} ? 'ACTIVE' : 'inactive';
     my $dir = $direction->{$rule->{direction}};
     my $rulename = encode('UTF-8', $rule->{name});