<%= form_for @task, :url => "#" do %>

<%= link_to(_('Dynflow console'), format('/foreman_tasks/dynflow/%s', @task.external_id), class: %w(btn btn-sm btn-info)) if Setting['dynflow_enable_console'] %> <%= link_to(_('Resume'), resume_foreman_tasks_task_path(@task), class: ['btn', 'btn-sm', 'btn-primary', ('disabled' unless @task.state == 'paused')].compact, method: :post) %> <%= link_to(_('Stop'), '', class: ['btn', 'btn-sm', 'btn-warning', ('disabled' unless @task.state == 'paused')].compact, :'data-toggle' => "modal", :'data-target' => "#stop_modal") %> <%= link_to(_('Force Stop'), '', class: %w(btn btn-sm btn-danger), :'data-toggle' => "modal", :'data-target' => "#force_stop_modal") %>

<%= _("Id") %>: <%= @task.id %>
<%= _("Label") %>: <%= @task.label %>
<%= _("Name") %>: <%= @task.humanized[:action] %>
<%= _("Owner") %>: <%= @task.username %>
<%= _("Started at") %>: <%= @task.started_at %>
<%= _("Ended at") %>: <%= @task.ended_at %>
<%= _("State") %>: <%= @task.state %>
<%= _("Result") %>: <%= @task.result %>
<%= _("Params") %>: <%= format_task_input(@task) %>
<%= _("Progress") %>:
<% progress = 100 * @task.progress %>
<%= progress %>% Complete
<% if @task.cli_example %>
<%= _("CLI Example") %>:
<%= @task.cli_example %>
<% end %>
<%= _("Output") %>:
<%= @task.humanized[:output] %>
<%= _("Raw input") %>:
<%= @task.input.pretty_inspect %>
<%= _("Raw output") %>:
<%= @task.output.pretty_inspect %>
<%= _("External Id") %>: <%= @task.external_id %>
<%= _("Locks") %>:
    <% @task.locks.each do |lock| %>
  • name: <%= lock.name %>
    resource: <%= format('%s id:%s', lock.resource_type, lock.resource_id) %>
    exclusive: <%= lock.exclusive %>
  • <% end %>
<% end %>