X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4c8559157a16bf3d2781714fdec0275fb7f53ac6..e3ac17f8a8aa439e21a8bf56a571f91a671313f7:/apps/workbench/app/views/projects/_show_dashboard.html.erb diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb index c1e3b6e0cb..bcfeb6a466 100644 --- a/apps/workbench/app/views/projects/_show_dashboard.html.erb +++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb @@ -1,5 +1,5 @@ <% - recent_procs = recent_processes(10) + recent_procs = recent_processes(12) wus = {} outputs = [] @@ -13,7 +13,7 @@ collection_pdhs = outputs.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact collection_uuids = outputs - collection_pdhs - if !Rails.configuration.suppress_collections_in_dashboard + if Rails.configuration.show_recent_collections_on_dashboard recent_cs = recent_collections(8) collection_uuids = collection_uuids + recent_cs[:collections].collect {|c| c.uuid} collection_uuids.flatten.uniq @@ -24,23 +24,41 @@ preload_links_for_objects(collection_pdhs + collection_uuids) %> +<% + recent_procs_panel_width = 6 + if !PipelineInstance.api_exists?(:index) + recent_procs_title = 'Recent processes' + run_proc_title = 'Choose a workflow to run:' + show_node_status = false + # Recent processes panel should take the entire width when is the only one + # being rendered. + if !Rails.configuration.show_recent_collections_on_dashboard + recent_procs_panel_width = 12 + end + else + recent_procs_title = 'Recent pipelines and processes' + run_proc_title = 'Choose a pipeline or workflow to run:' + show_node_status = true + end +%> +
-
+
- Recent pipelines and processes + <%=recent_procs_title%> <% if current_user.andand.is_active %> <%= link_to( choose_work_unit_templates_path( - title: 'Choose a pipeline or workflow to run:', + title: run_proc_title, action_name: 'Next: choose inputs ', action_href: work_units_path, action_method: 'post', action_data: {'selection_param' => 'work_unit[template_uuid]', 'work_unit[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json), { class: "btn btn-primary btn-xs", remote: true }) do %> - Run a pipeline... + Run a process... <% end %> @@ -130,6 +148,7 @@
+ <% if show_node_status %> <% nodes = Node.filter([["last_ping_at", ">", Time.now - 3600]]).results %>
Compute node status @@ -163,7 +182,8 @@
- <% if !Rails.configuration.suppress_collections_in_dashboard %> + <% end %> + <% if Rails.configuration.show_recent_collections_on_dashboard %>
Recent collections @@ -176,7 +196,9 @@ <% recent_cs[:collections].each do |p| %>
+ <% if recent_cs[:owners][p[:owner_uuid]].is_a?(Group) %> <%= link_to_if_arvados_object recent_cs[:owners][p[:owner_uuid]], friendly_name: true %>/ + <% end %> <%= render_localized_date(p[:modified_at], "noseconds") %>
<%= link_to_if_arvados_object p, {friendly_name: true, no_tags: true} %>