X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a59152e34814f453a7380e68a55534e2f8922d57..1db007eb53d0401a7a0ba168add7c4a094790fa5:/apps/workbench/app/views/collections/show.html.erb diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb index d9d06b3172..0be6705a9d 100644 --- a/apps/workbench/app/views/collections/show.html.erb +++ b/apps/workbench/app/views/collections/show.html.erb @@ -1,236 +1,111 @@ -<%= content_for :head do %> - -<% end %> - -<%= render :partial => 'nav' %> - - - -
-
- - - - - <% if @object then @object.files.each do |file| %> - - - - <% end; end %> - -
size (bytes)filename
- <%= raw(human_readable_bytes_html(file[2])) %> - - <%= file[0] %>/<%= file[1] %> -
+
+
+
+
+

+ <% default_name = "Collection #{@object.uuid}" %> + <% name_html = render_editable_attribute @object, 'name', nil, {data: {emptytext: default_name}} %> + <%= (/\S/.match(name_html)) ? name_html : default_name %> +

+
+
+ + <% if not (@output_of.andand.any? or @log_of.andand.any?) %> +

No source information available.

+ <% end %> + + <% if @output_of.andand.any? %> +

Output of jobs:
+ <%= render_arvados_object_list_start(@output_of, 'Show all jobs', + jobs_path(filter: [['output', '=', @object.uuid]].to_json)) do |job| %> + <%= link_to_if_arvados_object(job, friendly_name: true) %>
+ <% end %> +

+ <% end %> + + <% if @log_of.andand.any? %> +

Log of jobs:
+ <%= render_arvados_object_list_start(@log_of, 'Show all jobs', + jobs_path(filter: [['log', '=', @object.uuid]].to_json)) do |job| %> + <%= link_to_if_arvados_object(job, friendly_name: true) %>
+ <% end %> +

+ <% end %> +
+
-
- - - - - - <% @provenance.reverse.each do |p| %> - <% j = p[:job] %> - - <% if j %> - - - - - - - <% else %> - - - - <% end %> - - <% end %> - - -
- - <% j.script_parameters.each do |k,v| %> - - - - <% end %> -
- <% re = v.match(/^([0-9a-f]+)/) %> - <% justhash = (re and re[1].length == 32) ? re[1] : nil %> - <% if justhash and @output2job.has_key? justhash %> - <%= v %> - <% elsif justhash %> - <%= justhash %>
<%= v %> - <% else %> - <%= v %> - <% end %> -
- <% if justhash - if @protected[justhash] - labelclass = 'success' - labeltext = 'keep' - else - labelclass = @output2job.has_key?(v) ? 'warning' : 'danger' - labeltext = 'cache' - end %> - - <%= labeltext %> - <% end %> - - <%= k.to_s %> -
-
- ↓ -
- <%= j.script %>
<%= link_to_if j.script_version.match(/[0-9a-f]{40}/), j.script_version, "https://redmine.clinicalfuture.com/projects/freefactories/repository/revisions/#{j.script_version}/entry/mapreduce/mr-#{j.script}" if j.script_version %>
-
- ↓ -
- <%= p[:output] %> -
-
- job:
<%= j.uuid %>
<%= j.submit_id %>
-
- lookup fail -
- <%= p[:target] %> -
-
+
+
+
+

+ Activity +

+
+
+ +
+ <% if not @logs.andand.any? %> +

+ Created: <%= @object.created_at.to_s(:long) %> +

+

+ Last modified: <%= @object.modified_at.to_s(:long) %> by <%= link_to_if_arvados_object @object.modified_by_user_uuid, friendly_name: true %> +

+ <% else %> + <%= render_arvados_object_list_start(@logs, 'Show all activity', + logs_path(filters: [['object_uuid','=',@object.uuid]].to_json)) do |log| %> +

+ <%= time_ago_in_words(log.event_at) %> ago: <%= log.summary %> + <% if log.object_uuid %> + <%= link_to_if_arvados_object log.object_uuid, link_text: raw('') %> + <% end %> +

+ <% end %> + <% end %> +
+
-
- - - - - - - - - <% @provenance.reverse.each do |p| %> - <% j = p[:job] %> - - <% if j %> - - - - - - <% else %> - - - - <% end %> - - <% end %> - - -
- job - - version - - status - - start - - finish - - clock time -
- <%= j.uuid %> -
- <%= j.submit_id %> -
- <%= j.script_version %> - - - <%= j.success || j.active ? 'ok' : 'failed' %> - - - <%= j.started_at %> - - <%= j.finished_at %> - - <% if j.started_at and j.finished_at %> - <%= raw(distance_of_time_in_words(j.started_at, j.finished_at).sub('about ','~').sub(' ',' ')) %> - <% elsif j.started_at and j.running %> - <%= raw(distance_of_time_in_words(j.started_at, Time.now).sub('about ','~').sub(' ',' ')) %> (running) - <% end %> -
- lookup fail -
- <%= p[:target] %> -
-
-
-
- - - - - - - - - <% @sourcedata.values.each do |sourcedata| %> - - - - - - <% end %> - - -
- collection - - data size - - storage - - origin -
- <%= sourcedata[:uuid] %> - - <%= raw(human_readable_bytes_html(sourcedata[:collection].data_size)) if sourcedata[:collection] and sourcedata[:collection].data_size %> - - <% if @protected[sourcedata[:uuid]] %> - keep - <% else %> - cache - <% end %> - - <% if sourcedata[:data_origins] %> - <% sourcedata[:data_origins].each do |data_origin| %> - <%= data_origin[0] %> - <%= data_origin[2] %> -
- <% end %> - <% end %> -
-
-
- <%= render :partial => 'application/orvos_object' %> +
+
+
+

+ Sharing and permissions +

+
+
+ + +
+ <%= render partial: 'sharing_button' %> +
+ +
+ <% if @folders.andand.any? %> +

Included in folders:
+ <%= render_arvados_object_list_start(@folders, 'Show all folders', + links_path(filter: [['head_uuid', '=', @object.uuid], + ['link_class', '=', 'name']].to_json)) do |folder| %> + <%= link_to_if_arvados_object(folder, friendly_name: true) %>
+ <% end %> +

+ <% end %> + <% if @permissions.andand.any? %> +

Readable by:
+ <%= render_arvados_object_list_start(@permissions, 'Show all permissions', + links_path(filter: [['head_uuid', '=', @object.uuid], + ['link_class', '=', 'permission']].to_json)) do |link| %> + <%= link_to_if_arvados_object(link.tail_uuid, friendly_name: true) %>
+ <% end %> +

+ <% end %> + +
+
+ +<%= render file: 'application/show.html.erb' %>