- <%= link_to raw('Request a repository ➜'), repositories_path, { :class => "btn disabled", :"data-toggle" => "tooltip", :"data-placement" => "bottom", :title => "Add an SSH public key first!" } %>
+ <table class="table table-bordered table-condensed job-table">
+ <% @my_jobs[0..8].each do |j| %>
+ <tr>
+ <td>
+ <small>
+ <%= link_to j.script[0..31], job_path(j.uuid) %>
+ </small>
+ </td>
+ <td>
+ <small>
+ <%= j.script_version[0..7] %>
+ </small>
+ </td>
+ <td>
+ <small>
+ <%= j.script_parameters.andand[:input].andand.to_s.andand[0..7] %>
+ </small>
+ </td>
+ <td>
+ <% if j.success %>
+ <span class="label label-success">finished</span>
+ <% elsif j.success == false %>
+ <span class="label label-danger">failed</span>
+ <% elsif j.running and j.started_at and not j.finished_at %>
+ <% percent_total_tasks = 100 / (j.tasks_summary[:running] + j.tasks_summary[:done] + j.tasks_summary[:todo]) rescue 0 %>
+ <div class="progress" style="margin-bottom: 0">
+ <div class="bar bar-success" style="width: <%= j.tasks_summary[:done] * percent_total_tasks rescue 0 %>%;"></div>
+ <div class="bar" style="width: <%= j.tasks_summary[:running] * percent_total_tasks rescue 0 %>%; opacity: 0.3"></div>
+ </div>
+ <% else %>
+ <span class="label">queued</span>
+ <% end %>
+ </td>
+ </tr>
+ <% end %>
+ </table>
+ <%= link_to raw("Show more jobs / details →"), jobs_path, class: 'pull-right' %>