diff --git a/apps/vtom/restapi/mode/jobstatus.pm b/apps/vtom/restapi/mode/jobstatus.pm index 5f63bbf91..e376da865 100644 --- a/apps/vtom/restapi/mode/jobstatus.pm +++ b/apps/vtom/restapi/mode/jobstatus.pm @@ -210,6 +210,7 @@ sub new { $options{options}->add_options(arguments => { "filter-application:s" => { name => 'filter_application' }, + "filter-environment:s" => { name => 'filter_environment' }, "filter-name:s" => { name => 'filter_name' }, "filter-family:s" => { name => 'filter_family' }, "warning-status:s" => { name => 'warning_status' }, @@ -277,6 +278,9 @@ sub manage_selection { my $path = '/api/job/getAll'; if (defined($self->{option_results}->{filter_application}) && $self->{option_results}->{filter_application} ne '') { $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 $entries = defined($result->{result}) && ref($result->{result}) eq 'ARRAY' ? @@ -336,6 +340,10 @@ Check job status. =over 8 +=item B<--filter-environment> + +Filter environment name (cannot be a regexp). + =item B<--filter-application> Filter application name (cannot be a regexp).