X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/91dc5f1d7f5ad9eb2640f6089e2d0476cbf87c8e..3aaefcb3c76ff470b475d950398d01255e87712a:/apps/workbench/app/views/work_units/_show_component.html.erb diff --git a/apps/workbench/app/views/work_units/_show_component.html.erb b/apps/workbench/app/views/work_units/_show_component.html.erb index 4feb292209..4cce090a22 100644 --- a/apps/workbench/app/views/work_units/_show_component.html.erb +++ b/apps/workbench/app/views/work_units/_show_component.html.erb @@ -1,11 +1,15 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + <%# Work unit status %>
<% if wu.is_paused? %>

- This <%= wu.title %> is paused. Children that are already running - will continue to run, but no new processes will be submitted. + This <%= wu.title %> is paused. Children that were running + were cancelled and no new processes will be submitted.

<% end %> @@ -23,70 +27,74 @@
<% if wu.can_cancel? and @object.editable? %> + <% confirm = if wu.confirm_cancellation then {confirm: wu.confirm_cancellation} else {} end %> <%= form_tag "#{wu.uri}/cancel", remote: true, style: "display:inline; padding-left: 1em" do |f| %> <%= hidden_field_tag :return_to, url_for(@object) %> - <%= button_tag "Cancel", {class: 'btn btn-xs btn-danger', id: "cancel-obj-button"} %> + <%= button_tag "Cancel", {class: 'btn btn-xs btn-warning', id: "cancel-obj-button", data: confirm} %> <% end %> <% end %>
<% end %>
+<%# Display runtime error information %> +<% if wu.runtime_status.andand[:error] %> +
+
+
+ +
+ <% if wu.runtime_status[:errorDetail] %> +
<%= h(wu.runtime_status[:errorDetail]) %>
+ <% else %> + No detailed information available. + <% end %> +
+
+
+
+<% end %> + +<%# Display runtime warning message %> +<% if wu.runtime_status.andand[:warning] %> +
+
+
+ +
+ <% if wu.runtime_status[:warningDetail] %> +
<%= h(wu.runtime_status[:warningDetail]) %>
+ <% else %> + No detailed information available. + <% end %> +
+
+
+
+<% end %> +

<%= render(partial: 'work_units/component_detail', locals: {current_obj: wu}) %>

<%# Work unit children %> - -<% - uuids = wu.children.collect {|c| c.uuid}.compact - if uuids.any? - resource_class = resource_class_for_uuid(uuids.first, friendly_name: true) - - start = 0; inc = 200 - while start < uuids.length - preload_objects_for_dataclass resource_class, uuids[start, inc] - start += inc - end - end - - collections = wu.outputs.flatten.uniq - collections << wu.log_collection if wu.log_collection - collections << wu.docker_image if wu.docker_image - collections = wu.children.collect {|j| j.outputs}.compact - collections = collections.flatten.uniq - collections.concat wu.children.collect {|j| j.docker_image}.uniq.compact - collections.concat wu.children.collect {|j| j.log_collection}.uniq.compact - collections_pdhs = collections.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact - collections_uuids = collections - collections_pdhs - - if collections_uuids.any? - start = 0; inc = 200 - while start < collections_uuids.length - preload_collections_for_objects collections_uuids[start, inc] - start += inc - end - end - - if collections_pdhs.any? - start = 0; inc = 200 - while start < collections_pdhs.length - preload_for_pdhs collections_pdhs[start, inc] - start += inc - end - end - - repos = wu.children.collect {|c| c.repository}.uniq.compact - preload_objects_for_dataclass(Repository, repos, :name) if repos.any? -%> - <% if wu.has_unreadable_children %> <%= render(partial: "pipeline_instances/show_components_json", locals: {error_name: "Unreadable components", backtrace: nil, wu: wu}) %> <% else %> - <% @descendent_count = 0 if !@descendent_count %> <% wu.children.each do |c| %> - <% @descendent_count += 1 %> - <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: @descendent_count, expanded: false}) %> + <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: (c.uuid || rand(2**128).to_s(36)), expanded: false}) %> <% end %> <% end %>