Skip to content

Commit 27acfef

Browse files
committed
Fixes #38597 - Add 'Scheduled' option
1 parent c0053b6 commit 27acfef

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

app/controllers/api/v2/job_invocations_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ def hosts
119119
@total = @job_invocation.targeting.hosts.size
120120
@hosts = @hosts.search_for(params[:search], :order => params[:order]).paginate(:page => params[:page], :per_page => params[:per_page])
121121
@subtotal = @hosts.respond_to?(:total_entries) ? @hosts.total_entries : @hosts.sizes
122+
if params[:awaiting]
123+
@hosts = @hosts.select { |host| @host_statuses[host.id] == 'N/A' }
124+
@subtotal = @hosts.size
125+
end
122126
render :hosts, :layout => 'api/v2/layouts/index_layout'
123127
end
124128

webpack/JobInvocationDetail/JobInvocationConstants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const STATUS_TITLES = {
5353
FAILED: { id: 'failed', title: __('Failed') },
5454
PENDING: { id: 'pending', title: __('In Progress') },
5555
CANCELLED: { id: 'cancelled', title: __('Cancelled') },
56+
NOT_STARTED: { id: 'N/A', title: __('Scheduled') },
5657
};
5758

5859
export const DATE_OPTIONS = {

webpack/JobInvocationDetail/JobInvocationHostTable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ const JobInvocationHostTable = ({
146146
...newParams,
147147
};
148148

149-
if (filterSearch !== '') {
149+
if (filterSearch === '(job_invocation.result = N/A)') {
150+
finalParams.awaiting = 'true';
151+
} else if (filterSearch !== '') {
150152
finalParams.search = filterSearch;
151153
}
152154

0 commit comments

Comments
 (0)