1 <%= content_for :head do %>
3 <%# https://github.com/mbostock/d3/wiki/Ordinal-Scales %>
4 <% n=-1; %w(#1f77b4 #ff7f0e #2ca02c #d62728 #9467bd #8c564b #e377c2 #7f7f7f #bcbd22 #17becf).each do |color| %>
5 .colorseries-10-<%= n += 1 %>, .btn.colorseries-10-<%= n %>:hover, .label.colorseries-10-<%= n %>:hover {
6 *background-color: <%= color %>;
7 background-color: <%= color %>;
8 background-image: none;
18 <%= render :partial => 'nav' %>
20 <ul class="nav nav-tabs">
21 <li class="active"><a href="#files" data-toggle="tab">Files (<%= @object.files ? @object.files.size : 0 %>)</a></li>
22 <li><a href="#provenance" data-toggle="tab">Provenance (<%= @provenance.size %>)</a></li>
23 <li><a href="#jobs" data-toggle="tab">Jobs (<%= @provenance.size %>)</a></li>
24 <li><a href="#sourcedata" data-toggle="tab">Source data (<%= @sourcedata.size %>)</a></li>
25 <li><a href="#owner-groups-resources" data-toggle="tab">Owner, groups, resources</a></li>
28 <div class="tab-content">
29 <div id="files" class="tab-pane fade in active">
30 <table class="table table-bordered">
32 <tr><th style="text-align:right">size (bytes)</th><th>filename</th></tr>
34 <% if @object then @object.files.each do |file| %>
36 <td style="text-align:right">
37 <%= raw(human_readable_bytes_html(file[2])) %>
39 <%= file[0] %>/<%= file[1] %>
46 <div id="provenance" class="tab-pane fade">
47 <table class="topalign table table-bordered">
52 <% @provenance.reverse.each do |p| %>
58 <td style="padding-bottom: 3em">
59 <table class="table" style="margin-bottom: 0; background: #f0f0ff">
60 <% j.script_parameters.each do |k,v| %>
62 <td style="width: 60%">
63 <% re = v.match(/^([0-9a-f]+)/) %>
64 <% justhash = (re and re[1].length == 32) ? re[1] : nil %>
65 <% if justhash and @output2job.has_key? justhash %>
66 <tt class="label colorseries-10-<%= @output2colorindex[v] %>"><%= v %></tt>
68 <tt class="label colorseries-nil"><%= justhash %></tt><br /><span class="deemphasize"><%= v %></span>
70 <span class="deemphasize"><%= v %></span>
72 </td><td style="text-align: center; width: 20%">
74 if @protected[justhash]
75 labelclass = 'success'
78 labelclass = @output2job.has_key?(v) ? 'warning' : 'danger'
82 <tt class="label label-<%= labelclass %>"><%= labeltext %></tt>
84 </td><td style="width: 20%">
90 <div style="text-align: center">
93 <span class="label"><%= j.script %><br /><tt><%= link_to_if j.script_version.match(/[0-9a-f]{40}/), j.script_version, "https://redmine.clinicalfuture.com/projects/freefactories/repository/revisions/#{j.script_version}/entry/mapreduce/mr-#{j.script}" if j.script_version %></tt></span>
97 <tt class="label colorseries-10-<%= @output2colorindex[p[:output]] %>"><%= p[:output] %></tt>
101 <tt><span class="deemphasize">job:</span><br /><%= j.uuid %><br /><span class="deemphasize"><%= j.submit_id %></span></tt>
108 <span class="label label-danger">lookup fail</span>
110 <tt class="deemphasize"><%= p[:target] %></tt>
111 </td><td colspan="5">
121 <div id="jobs" class="tab-pane fade">
122 <table class="topalign table table-bordered">
124 <tr class="contain-align-left">
142 <% @provenance.reverse.each do |p| %>
149 <tt><%= j.uuid %></tt>
151 <tt class="deemphasize"><%= j.submit_id %></tt>
153 <%= j.script_version %>
155 <span class="label <%= if j.success then 'label-success'; elsif j.active then 'label-primary'; else 'label-warning'; end %>">
156 <%= j.success || j.active ? 'ok' : 'failed' %>
163 <% if j.started_at and j.finished_at %>
164 <%= raw(distance_of_time_in_words(j.started_at, j.finished_at).sub('about ','~').sub(' ',' ')) %>
165 <% elsif j.started_at and j.running %>
166 <%= raw(distance_of_time_in_words(j.started_at, Time.now).sub('about ','~').sub(' ',' ')) %> (running)
174 <span class="label label-danger">lookup fail</span>
176 <tt class="deemphasize"><%= p[:target] %></tt>
177 </td><td colspan="4">
187 <div id="sourcedata" class="tab-pane fade">
188 <table class="table table-bordered table-striped">
190 <tr class="contain-align-left">
193 </th><th class="data-size">
204 <% @sourcedata.values.each do |sourcedata| %>
206 <tr class="collection">
208 <tt class="label"><%= sourcedata[:uuid] %></tt>
209 </td><td class="data-size">
210 <%= raw(human_readable_bytes_html(sourcedata[:collection].data_size)) if sourcedata[:collection] and sourcedata[:collection].data_size %>
212 <% if @protected[sourcedata[:uuid]] %>
213 <span class="label label-success">keep</span>
215 <span class="label label-danger">cache</span>
218 <% if sourcedata[:data_origins] %>
219 <% sourcedata[:data_origins].each do |data_origin| %>
220 <span class="deemphasize"><%= data_origin[0] %></span>
221 <%= data_origin[2] %>
233 <div id="owner-groups-resources" class="tab-pane fade">
234 <%= render :partial => 'application/arvados_object' %>