10112: use show_text_with_locators partial to display the various attributes of the...
[arvados.git] / apps / workbench / app / views / workflows / _show_definition.html.erb
1 <%
2   wf_def = ActiveSupport::HashWithIndifferentAccess.new YAML::load(@object.definition) if @object.definition
3   wf_def = wf_def[:"$graph"].andand[0] || wf_def if wf_def
4
5   items = {}
6   baseCommand = wf_def.andand["baseCommand"]
7   items['baseCommand'] = baseCommand if baseCommand
8
9   args = wf_def.andand["arguments"]
10   items['arguments'] = args if args
11
12   hints = wf_def.andand["hints"]
13   items['hints'] = hints if hints
14
15   inputs = wf_def.andand["inputs"]
16   items['inputs'] = inputs if inputs
17
18   outputs = wf_def.andand["outputs"]
19   items['outputs'] = outputs if outputs
20 %>
21
22   <div class="col-md-12">
23     <table class="table table-condensed" style="table-layout:fixed;">
24       <col width="15%" />
25       <col width="85%" />
26
27       <% items.each do |k, v| %>
28           <tr>
29             <td valign="top">
30               <%= k %>:
31             </td>
32             <td>
33               <% val = JSON.pretty_generate(v) %>
34               <%= render partial: 'show_text_with_locators', locals: {data_height: 300, text_data: val} %>
35             </td>
36           </tr>
37       <% end %>
38     </table>
39   </div>