padding-left: 1em;
padding-right: 1em;
}
+table.pipeline-components-table {
+ width: 100%;
+ table-layout: fixed;
++ overflow: hidden;
+}
+
table.pipeline-components-table thead th {
text-align: bottom;
}
table.pipeline-components-table div.progress {
margin-bottom: 0;
}
+
++table.pipeline-components-table td {
++ overflow: hidden;
++ text-overflow: ellipsis;
++}
++
<% end %>
-<br />
+<% if @object.active != nil %>
<table class="table pipeline-components-table">
<colgroup>
- <col width="15%" />
- <col width="15%" />
- <col width="35%" />
- <col width="35%" />
+ <col style="width: 15%" />
- <col style="width: 35%" />
- <col style="width: 15%" />
- <col style="width: 35%" />
++ <col style="width: 20%" />
++ <col style="width: 20%" />
++ <col style="width: 45%" />
</colgroup>
<thead>
<tr>
<% end %>
<% end %>
-<pre><%= JSON.pretty_generate @object.attributes %></pre>
+<% else %>
+
+ <%= form_tag @object, :method => :put do |f| %>
+
+ <%= hidden_field @object.class.to_s.underscore.singularize.to_sym, :active, :value => true %>
+ <%= button_tag "Run pipeline", {class: 'btn btn-primary pull-right'} %>
+ <% end %>
+
+<table class="table pipeline-components-table" style="margin-top: -.1em">
+ <colgroup>
+ <col style="width: 15%" />
- <col style="width: 35%" />
- <col style="width: 15%" />
- <col style="width: 35%" />
++ <col style="width: 20%" />
++ <col style="width: 20%" />
++ <col style="width: 45%" />
+ </colgroup>
+
+ <thead>
+ <tr>
+ <th>
+ component
+ </th><th>
+ script, version
+ </th><th>
+ parameter
+ </th><th>
+ input
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <% @object.components.each do |k, v| %>
+
+ <% sp = v[:script_parameters].collect do |k, v| [k, v] end %>
+
+ <tr>
+ <td><%= k %></td>
+
+ <td><%= v[:script] %>
+ <br /><span class="deemphasize"> <%= v[:script_version] %></span>
+ </td>
+
+ <td>
+ <%= sp[0][0] %>
+ </td>
+
+ <td>
+ <%= sp[0][1] %>
+ </td>
+ </tr>
+
+ <% if sp.length > 1 %>
+ <tr>
- <td></td>
- <td></td>
++ <td style="border-top: none"></td>
++ <td style="border-top: none"></td>
+
+ <% sp[1..-1].each do |p| %>
- <%= p[0] %>
- <%= p[1] %>
++ <td style="border-top: none"><%= p[0] %></td>
++ <td style="border-top: none"><%= p[1] %></td>
+ <% end %>
+ </tr>
+ <% end %>
+ <% end %>
+ </tbody>
+ </table>
+
+<% end %>