[ARVADOS] updated: 4c1d34eee72603b850bea8d5dc95c225e644954f
Git user
git at public.curoverse.com
Tue May 9 11:30:17 EDT 2017
Summary of changes:
.../app/views/workflows/_show_definition.html.erb | 51 +---------------------
.../test/controllers/workflows_controller_test.rb | 12 +++++
2 files changed, 14 insertions(+), 49 deletions(-)
via 4c1d34eee72603b850bea8d5dc95c225e644954f (commit)
from 79aeb557d94681fb7e55321aeee2e20df1430b30 (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 4c1d34eee72603b850bea8d5dc95c225e644954f
Author: radhika <radhika at curoverse.com>
Date: Tue May 9 11:29:02 2017 -0400
10112: use show_text_with_locators partial to display the various attributes of the definition
diff --git a/apps/workbench/app/views/workflows/_show_definition.html.erb b/apps/workbench/app/views/workflows/_show_definition.html.erb
index f362647..3ca15e2 100644
--- a/apps/workbench/app/views/workflows/_show_definition.html.erb
+++ b/apps/workbench/app/views/workflows/_show_definition.html.erb
@@ -20,67 +20,20 @@
%>
<div class="col-md-12">
- <table style="width:100%;">
+ <table class="table table-condensed" style="table-layout:fixed;">
<col width="15%" />
<col width="85%" />
<% items.each do |k, v| %>
- <% if ['baseCommand', 'arguments'].include? k %>
- <tr>
- <td valign="top">
- <%= k %>:
- </td>
- <td>
- <div style="max-height:200px; overflow-y:auto;">
- <%=v%>
- </div>
- </td>
- </tr>
- <% end %>
-
- <% if ['inputs', 'outputs'].include? k %>
- <tr>
- <td valign="top">
- <%= k %>:
- </td>
- <td>
- <% val = JSON.pretty_generate(v) %>
- <div style="max-height:300px; overflow:auto;">
- <% val.each_line do |l| %>
- <% text_part = l %>
- <% match = l.match /\"keep:.*?\"/ %>
- <% if match %>
- <% text_part = l[0..l.index("\"keep:")-1] %>
- <% loc_part = match[0][6..-2] %>
- <% end %>
- <span style="white-space: pre-wrap; margin: none;"><%= text_part %><%= if loc_part then link_to_arvados_object_if_readable(loc_part, loc_part, friendly_name: true) end %> <% if loc_part then %> <br/> <% end %></span>
- <% end %>
- </div>
- </td>
- </tr>
- <% end %>
-
- <% if k == 'hints' %>
<tr>
<td valign="top">
<%= k %>:
</td>
<td>
<% val = JSON.pretty_generate(v) %>
- <div style="max-height:300px; overflow:auto;">
- <% val.each_line do |l| %>
- <% text_part = l %>
- <% match = l.match /\"keep:.*?\"/ %>
- <% if match %>
- <% text_part = l[0..l.index("\"keep:")-1] %>
- <% loc_part = match[0][6..-2] %>
- <% end %>
- <span style="white-space: pre-wrap; margin: none;"><%= text_part %><%= if loc_part then link_to_arvados_object_if_readable(loc_part, loc_part, friendly_name: true) end %> <% if loc_part then %> <br/> <% end %></span>
- <% end %>
- </div>
+ <%= render partial: 'show_text_with_locators', locals: {data_height: 300, text_data: val} %>
</td>
</tr>
- <% end %>
<% end %>
</table>
</div>
diff --git a/apps/workbench/test/controllers/workflows_controller_test.rb b/apps/workbench/test/controllers/workflows_controller_test.rb
index 14db731..cb298f4 100644
--- a/apps/workbench/test/controllers/workflows_controller_test.rb
+++ b/apps/workbench/test/controllers/workflows_controller_test.rb
@@ -6,4 +6,16 @@ class WorkflowsControllerTest < ActionController::TestCase
assert_response :success
assert_includes @response.body, 'Valid workflow with no definition yaml'
end
+
+ test "show" do
+ use_token 'active'
+
+ wf = api_fixture('workflows')['workflow_with_input_specifications']
+
+ get :show, {id: wf['uuid']}, session_for(:active)
+ assert_response :success
+
+ assert_includes @response.body, "a short label for this parameter (optional)"
+ assert_includes @response.body, "href=\"#Advanced\""
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list