Skip to content

Commit

Permalink
skip lmd parents in backend list
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Oct 22, 2024
1 parent c770f5b commit 0258192
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Thruk/Utils/CLI/Backend.pm
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ sub cmd {
my $backends;
if(!defined $opt->{'backends'} || scalar @{$opt->{'backends'}} == 0) {
my @args;
if(Thruk::Base::array_contains(['-a', '--all'], $commandoptions)) {
my $all = Thruk::Base::array_contains(['-a', '--all'], $commandoptions);
if($all) {
@args = (1, 1);
}
my $peers = $c->db->get_peers(@args);
my @keys;
for my $peer (@{$peers}) {
next if(!$all && $peer->{'disabled'} && $peer->{'disabled'} == HIDDEN_LMD_PARENT);
push @keys, $peer->{'key'};
}
$c->stash->{'backends'} = \@keys;
Expand Down

0 comments on commit 0258192

Please sign in to comment.