api: status: code style clean-up

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-11-20 17:54:19 +01:00
parent f80628066d
commit 77cfe89238

View File

@ -195,8 +195,12 @@ __PACKAGE__->register_method ({
my $lrm_status = PVE::HA::Config::read_lrm_status($node); my $lrm_status = PVE::HA::Config::read_lrm_status($node);
my $id = "lrm:$node"; my $id = "lrm:$node";
if (!$lrm_status->{timestamp}) { if (!$lrm_status->{timestamp}) {
push @$res, { id => $id, type => 'lrm', node => $node, push @$res, {
status => "$node (unable to read lrm status)"}; id => $id,
type => 'lrm',
node => $node,
status => "$node (unable to read lrm status)",
};
} else { } else {
my $status_str = &$timestamp_to_status($ctime, $lrm_status->{timestamp}); my $status_str = &$timestamp_to_status($ctime, $lrm_status->{timestamp});
my $lrm_mode = $lrm_status->{mode}; my $lrm_mode = $lrm_status->{mode};