+ update vtom plugin mode

This commit is contained in:
garnier-quentin 2016-10-20 15:37:23 +02:00
parent f5f6aea0d0
commit 082d986ce6
1 changed files with 8 additions and 0 deletions

View File

@ -210,6 +210,7 @@ sub new {
$options{options}->add_options(arguments => $options{options}->add_options(arguments =>
{ {
"filter-application:s" => { name => 'filter_application' }, "filter-application:s" => { name => 'filter_application' },
"filter-environment:s" => { name => 'filter_environment' },
"filter-name:s" => { name => 'filter_name' }, "filter-name:s" => { name => 'filter_name' },
"filter-family:s" => { name => 'filter_family' }, "filter-family:s" => { name => 'filter_family' },
"warning-status:s" => { name => 'warning_status' }, "warning-status:s" => { name => 'warning_status' },
@ -277,6 +278,9 @@ sub manage_selection {
my $path = '/api/job/getAll'; my $path = '/api/job/getAll';
if (defined($self->{option_results}->{filter_application}) && $self->{option_results}->{filter_application} ne '') { if (defined($self->{option_results}->{filter_application}) && $self->{option_results}->{filter_application} ne '') {
$path = '/api/job/list?applicationName=' . $self->{option_results}->{filter_application}; $path = '/api/job/list?applicationName=' . $self->{option_results}->{filter_application};
}
if (defined($self->{option_results}->{filter_environment}) && $self->{option_results}->{filter_environment} ne '') {
$path = '/api/job/list?environmentName=' . $self->{option_results}->{filter_environment};
} }
my $result = $options{custom}->get(path => $path); my $result = $options{custom}->get(path => $path);
my $entries = defined($result->{result}) && ref($result->{result}) eq 'ARRAY' ? my $entries = defined($result->{result}) && ref($result->{result}) eq 'ARRAY' ?
@ -336,6 +340,10 @@ Check job status.
=over 8 =over 8
=item B<--filter-environment>
Filter environment name (cannot be a regexp).
=item B<--filter-application> =item B<--filter-application>
Filter application name (cannot be a regexp). Filter application name (cannot be a regexp).