<%= @job.class.name %>
State
<%= @job.state %>
<% if sub_state = @job['sub_state'] %>
Batch
<%= @job.sub_state %>
<% end %>
<% if @job.respond_to?(:input) && @job.input.failed.count > 0 %>
<%= link_to('Show Exceptions', exceptions_job_path(@job), class: 'btn btn-default') %>
<% end %> <% if @job.scheduled? %>
<%= job_action_link('Run', rocket_job_mission_control.run_now_job_path(@job), :patch) %>
<% end %>
<% valid_events = @job.aasm.events.collect { |e| e.name } %> <% if valid_events.include?(:pause) %> <%= job_action_link('Pause', rocket_job_mission_control.pause_job_path(@job), :patch) %> <% end %> <% if valid_events.include?(:resume) %> <%= job_action_link('Resume', rocket_job_mission_control.resume_job_path(@job), :patch) %> <% end %> <% if valid_events.include?(:retry) %> <%= job_action_link('Retry', rocket_job_mission_control.retry_job_path(@job), :patch) %> <% end %>
<% if valid_events.include?(:fail) %> <%= job_action_link('Fail', rocket_job_mission_control.fail_job_path(@job), :patch) %> <% end %> <% if valid_events.include?(:abort) %> <%= job_action_link('Abort', rocket_job_mission_control.abort_job_path(@job), :patch) %> <% end %> <%= job_action_link('Destroy', rocket_job_mission_control.job_path(@job), :delete) %>
<% unless @job.completed? || @job.aborted? %>
<%= link_to "Edit", edit_job_path(@job), class: "btn btn-default" %>
<% end %>
<%= render partial: 'status', locals: {job: @job} %>