X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e532b98ce7b426cc17452fc44a6278b3e9b6f9f2..a959f21c8147f26362df392bc3fd3290db69de85:/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 afe4606223..f91357b120 100644 --- a/apps/workbench/app/views/collections/show.html.erb +++ b/apps/workbench/app/views/collections/show.html.erb @@ -1,293 +1,115 @@ -<%= content_for :css do %> -<%# https://github.com/mbostock/d3/wiki/Ordinal-Scales %> -<% n=-1; %w(#1f77b4 #ff7f0e #2ca02c #d62728 #9467bd #8c564b #e377c2 #7f7f7f #bcbd22 #17becf).each do |color| %> -.colorseries-10-<%= n += 1 %>, .btn.colorseries-10-<%= n %>:hover, .label.colorseries-10-<%= n %>:hover { - *background-color: <%= color %>; - background-color: <%= color %>; - background-image: none; -} -<% end %> -.colorseries-nil { } -.label a { - color: inherit; -} -#provenance_graph { - padding-left: 3px; - overflow:auto; - border:solid; - border-width:1px; - border-color: gray -} -<% end %> - -<%#= render :partial => 'nav' %> - -
- - -
-
- - - - - - - - - - <% if @object then @object.files.sort_by{|f|f[1]}.each do |file| %> - <% file_path = "#{file[0]}/#{file[1]}" %> - - - - - - - - - - - <% end; end %> - -
pathfiled/lsize
- <%= file[0] %> - - <%= link_to file[1], {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, {title: 'View in browser'} %> - -
- <%= link_to raw(''), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'attachment'}, {class: 'label label-info', title: 'Download'} %> -
-
- <%= raw(human_readable_bytes_html(file[2])) %> -
+
+
+
+
+

+ <% i = 0 %> + <% @folder_links.each do |l| %> + <%= if i > 0 then ', ' end %> + <% i += 1 %> + <%= l.name %> + <% end %> +

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

No source information available.

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

This collection was the output of:
+ <%= 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? %> +

This collection contains log messages from:
+ <%= 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 %> -
- <%= k.to_s %> - - <% if v and @output2job.has_key? v %> - <%= link_to_if_arvados_object v %> - <% else %> - <%= link_to_if_arvados_object v %> - <% end %> - - <% if v - if @protected[v] - labelclass = 'success' - labeltext = 'keep' - else - labelclass = @output2job.has_key?(v) ? 'warning' : 'danger' - labeltext = 'cache' - end %> - - <%= labeltext %> - <% end %> -
-
- ↓ -
- <%= j.script %>
<%= link_to_if j.script_version.match(/[0-9a-f]{40}/), j.script_version, "https://arvados.org/projects/arvados/repository/revisions/#{j.script_version}/entry/crunch_scripts/#{j.script}" if j.script_version %>
-
- ↓ -
- <%= link_to_if_arvados_object p[:output] %> -
-
- job:
<%= link_to_if_arvados_object j %>
<%= j.submit_id %>
-
- lookup fail -
- <%= p[:target] %> -
-
-
-
- -
- - +
+
+
+

+ Activity +

+
+
+ +
+ <% name_or_object = @name_link.andand.uuid ? @name_link : @object %> + <% if name_or_object.created_at and not @logs.andand.any? %> +

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

+

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

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

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

+ <% end %> + <% end %> +
+
- -
- <%= raw(@prov_svg) %> -
-
-
- - - - - - - - - <% @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/arvados_object' %> +
+
+
+

+ Sharing and permissions +

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

Included in projects:
+ <%= render_arvados_object_list_start(@projects, 'Show all projects', + links_path(filter: [['head_uuid', '=', @object.uuid], + ['link_class', '=', 'name']].to_json)) do |project| %> + <%= link_to_if_arvados_object(project, 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' %>