[ARVADOS] updated: ade9fc709137c19429ac93eed00550ce8335373e
git at public.curoverse.com
git at public.curoverse.com
Fri Jun 6 17:08:19 EDT 2014
Summary of changes:
.../views/application/_show_object_button.html.erb | 6 +-
.../pipeline_instances/_show_components.html.erb | 67 +++++++++++-----------
2 files changed, 39 insertions(+), 34 deletions(-)
via ade9fc709137c19429ac93eed00550ce8335373e (commit)
from 743e9c54b5a97ebd8c2119e6f5b2953987e22f4b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ade9fc709137c19429ac93eed00550ce8335373e
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Jun 6 17:07:56 2014 -0400
2872: Fix up pipeline instance table, show "resume" button if paused.
diff --git a/apps/workbench/app/views/application/_show_object_button.html.erb b/apps/workbench/app/views/application/_show_object_button.html.erb
index 762ff7c..8d81e08 100644
--- a/apps/workbench/app/views/application/_show_object_button.html.erb
+++ b/apps/workbench/app/views/application/_show_object_button.html.erb
@@ -1,7 +1,9 @@
<% htmloptions = {class: ''}.merge(htmloptions || {})
- htmloptions[:class] += " btn-#{size}" rescue nil %>
+ htmloptions[:class] += " btn-#{size}" rescue nil
+ link_text = 'Show' unless defined?(link_text)
+ %>
<%= link_to_if_arvados_object object, {
- link_text: raw('<i class="fa fa-fw ' + fa_icon_class_for_object(object) + '"></i> Show'),
+ link_text: raw('<i class="fa fa-fw ' + fa_icon_class_for_object(object) + '"></i> ' + link_text),
name_link: (defined?(name_link) && name_link && name_link.uuid) ? name_link : nil
}, {
data: {
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index d0fcbc9..d7b86bf 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -23,14 +23,21 @@
<% if !@object.state.in? ['New', 'Ready'] %>
- <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
- <% content_for :tab_line_buttons do %>
+ <% content_for :tab_line_buttons do %>
+ <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
<%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
class: 'btn btn-primary run-pipeline-button',
method: :patch
) do %>
Stop <i class="fa fa-fw fa-stop"></i>
<% end %>
+ <% elsif @object.state == 'Paused' %>
+ <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+ class: 'btn btn-primary run-pipeline-button',
+ method: :patch
+ ) do %>
+ Resume <i class="fa fa-fw fa-play"></i>
+ <% end %>
<% end %>
<% end %>
@@ -43,26 +50,23 @@
<table class="table pipeline-components-table">
<colgroup>
<col style="width: 15%" />
- <col style="width: 20%" />
- <col style="width: 12%" />
+ <col style="width: 25%" />
+ <col style="width: 8%" />
+ <col style="width: 13%" />
<col style="width: 12%" />
- <col style="width: 45%" />
+ <col style="width: 14%" />
+ <col style="width: 13%" />
</colgroup>
<thead>
<tr>
- <th>
+ <th colspan="2">
component
- </th><th>
- script, version
- </th><th>
+ </th><th colspan="5">
job
<%# format:'js' here helps browsers avoid using the cached js
content in html context (e.g., duplicate tab -> see
javascript) %>
<%= link_to '(refresh)', {format: :js}, {class: 'refresh hide', remote: true, method: 'get'} %>
- </th><th>
- </th><th>
- output
</th>
</tr>
</thead>
@@ -78,37 +82,36 @@
<%= pj[:script] %>
<br /><span class="deemphasize"><%= pj[:script_version] %></span>
</td><td>
+ <%= render(partial: 'job_status_label', locals: { j: pj[:job] }) %>
+ </td><td>
<%= pj[:progress_bar] %>
- <% if @object.state == 'Complete' || @object.state == 'Failed' %>
- <% if pj[:job].andand[:uuid] %>
- <span class="deemphasize">
- <%= link_to("..."+pj[:job][:uuid].last(15), job_url(id: pj[:job][:uuid])) %>
- </span>
-
- <% current_job = Job.find(pj[:job][:uuid]) rescue nil %>
- <% if current_job.andand[:log] %>
- <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
- <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
- <% c.files.each do |file| %>
- <br/><span class="deemphasize">
- <a href="<%= collection_path(current_job[:log]) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">log</a>
- </span>
- <% end %>
+ </td>
+ <% current_job = Job.find(pj[:job][:uuid]) rescue nil %>
+ <td>
+ <% if current_job %>
+ <%= render partial: 'show_object_button', locals: {object: current_job, size: 'xs', link_text: 'Show job details'} %>
+ <% end %>
+ </td><td>
+ <% if current_job.andand[:log] %>
+ <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
+ <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
+ <% c.files.first.andand do |file| %>
+ <%= link_to url_for(controller: 'collections', action: 'show_file', uuid: current_job[:log], file: "#{file[0]}/#{file[1]}", disposition: 'inline', size: file[2]), class: 'btn btn-default btn-xs' do %>
+ <i class="fa fa-fw fa-info"></i> Show log messages
<% end %>
<% end %>
<% end %>
<% end %>
</td><td>
- <%= render(partial: 'job_status_label',
- locals: { :j => pj[:job] }) %>
- </td><td>
- <%= link_to_if_arvados_object pj[:output], {:thumbnail => true} %>
+ <% if current_job.andand[:output] %>
+ <%= link_to_if_arvados_object current_job[:output], {thumbnail: true, link_text: raw('<i class="fa fa-fw fa-archive"></i> Show output files')}, {class: 'btn btn-default btn-xs'} %>
+ <% end %>
</td>
</tr>
<% end %>
</tbody>
<tfoot>
- <tr><td colspan="5"></td></tr>
+ <tr><td colspan="7"></td></tr>
</tfoot>
</table>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list