X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6038a018b758e1a4babc5669df50622cd470df2f..8c87d1cf55e096ce472fa9a749b60f2aab7fbb74:/apps/workbench/app/views/pipeline_instances/show.html.erb
diff --git a/apps/workbench/app/views/pipeline_instances/show.html.erb b/apps/workbench/app/views/pipeline_instances/show.html.erb
index 96c32db44c..b30db3b12e 100644
--- a/apps/workbench/app/views/pipeline_instances/show.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/show.html.erb
@@ -1,52 +1,49 @@
-<% content_for :css do %>
- .pipeline_color_legend {
- padding-left: 1em;
- padding-right: 1em;
- }
+<% template = PipelineTemplate.find?(@object.pipeline_template_uuid) %>
+<%= content_for :content_top do %>
+
+ <%= render_editable_attribute @object, 'name', nil %>
+
+ <% if template %>
+ From template:
+ <%= link_to_if_arvados_object template, friendly_name: true %>
+ <%= template.description %>
+
+ <% end %>
<% end %>
-
-
-
-
- <% @object.attributes_for_display.each do |attr, attrvalue| %>
- <% if attr == 'components' and attrvalue.is_a? Hash %>
+<% content_for :tab_line_buttons do %>
+ <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'pipeline_instance[state]' => 'New'),
+ class: 'btn btn-primary',
+ #data: {toggle: :tooltip, placement: :top}, title: 'copy and modify',
+ method: :post,
+ ) do %>
+ Clone and edit
+ <% end %>
- <%= attr %> |
-
- <% render_pipeline_jobs.each do |pj| %>
- <% %w(index name result job_link script script_version progress_detail progress_bar output_link).each do |key| %>
-
- <% if key == 'script_version' %>
- <%= pj[key.to_sym][0..6] rescue '' %>
- <% else %>
- <%= pj[key.to_sym] %>
- <% end %>
- |
- <% end %>
-
- <% end %>
-
- |
-
- <% else %>
- <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
+ <% if @object.state.in? ['New', 'Ready'] %>
+ <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+ class: 'btn btn-primary run-pipeline-button',
+ method: :patch
+ ) do %>
+ Run
<% end %>
+ <% else %>
+ <% 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
+ <% end %>
+ <% elsif @object.state == 'Paused' %>
+ <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+ class: 'btn btn-primary run-pipeline-button',
+ method: :patch
+ ) do %>
+ Resume
+ <% end %>
<% end %>
-
-
-
-
-This pipeline
-Comparison pipeline
-Shared by both pipelines
-
-
- <%= render partial: 'application/svg_div', locals: {
- divId: "provenance_graph",
- svgId: "provenance_svg",
- svg: @prov_svg } %>
+ <% end %>
+<% end %>
-
-<%= JSON.pretty_generate(@object.attributes) rescue nil %>
-
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>