mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
(plugin) apps::pvx::restapi - fix bugs when default-value option is used
This commit is contained in:
parent
760205dbad
commit
2c4b9bd8fa
@ -169,8 +169,10 @@ sub query_range {
|
|||||||
|
|
||||||
if (defined( $self->{option_results}->{default_value} ) && $options{filter} ne '' && !exists( $result->{data} )) {
|
if (defined( $self->{option_results}->{default_value} ) && $options{filter} ne '' && !exists( $result->{data} )) {
|
||||||
$options{filter} =~ /([^\s\\]+) = \"([^\s\\]+)\"/;
|
$options{filter} =~ /([^\s\\]+) = \"([^\s\\]+)\"/;
|
||||||
push @{$result->{data}->{key}}, { value => $2 };
|
$result->{data} = [
|
||||||
push @{$result->{data}->{values}}, { value => $self->{option_results}->{default_value} };
|
{ key => [ { value => $2 } ] },
|
||||||
|
{ values => [ { value => $self->{option_results}->{default_value} } ] }
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result->{data};
|
return $result->{data};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user