Sha256: 998adcf30b89e8bd48a208ee98d4ac795d7433a12c719bb606b4ccd403d78d7f

Contents?: true

Size: 1.4 KB

Versions: 27

Compression:

Stored size: 1.4 KB

Contents

$('div#title_action div.btn-group').html('<%= button_group(job_invocation_task_buttons(@job_invocation.task)).html_safe %>');
$('div#status_chart').html('<%=j job_invocation_chart(@job_invocation) %>');
$('div#status').flot_pie();

<% if params[:hosts_needs_refresh] == 'true' && @job_invocation.resolved? %>
  var hosts_tab = $('div#hosts');
  hosts_tab.html('<%=j render('tab_hosts', :job_invocation => @job_invocation, :hosts => @hosts) %>');
  hosts_tab.data('refresh_required', '');
<% end %>

<% ['name', 'status', 'actions', 'provider'].each do |attribute| %>
  <% if params["host_ids_needing_#{attribute}_update"].present? %>
    var td_element;
    <% Host.authorized(:view_hosts, Host).where(:id => params["host_ids_needing_#{attribute}_update"]).each do |host| %>
      <% template_invocation = @job_invocation.template_invocations.find { |template_invocation| template_invocation.host_id == host.id } %>
      <% task = template_invocation.try(:run_host_job_task) %>
      <% options = { :host => host, :task => task, :job_invocation => @job_invocation, :template_invocation => template_invocation } %>
      td_element= $('#<%= dom_id(host) %>-<%= attribute %>');
      td_element.replaceWith('<%=j render("host_#{attribute}_td", options) %>');
    <% end %>
  <% end %>
<% end %>

<% if @auto_refresh %>
  delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), job_invocation_refresh_data());
<% end %>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foreman_remote_execution-1.5.0 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.4.6 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.4.5 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.4.4 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.4.3 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.4.2 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.7 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.6 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.4.1 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.5 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.4 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.3 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.2 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.1 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.3.0 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.2.2 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.2.1 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.2.0 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.1.1 app/views/job_invocations/show.js.erb
foreman_remote_execution-1.1.0 app/views/job_invocations/show.js.erb