X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f3d919829c017376eeccd27db9908b7f5a6e32aa..497ea8e6fd12ce91cad108af78df5e3802a79d69:/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb index e211112946..e9a01dc253 100644 --- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb @@ -1,32 +1,37 @@ <%= content_for :tab_line_buttons do %> <%= form_tag({action: 'compare', controller: params[:controller], method: 'get'}, {method: 'get', id: 'compare', class: 'pull-right small-form-margin'}) do |f| %> - <%= submit_tag 'Compare selected', {class: 'btn btn-primary', disabled: true, style: 'display: none'} %> + <%= submit_tag 'Compare 2 or 3 selected', {class: 'btn btn-primary', disabled: true, style: 'display: none'} %>   <% end rescue nil %> <% end %> +<%= render partial: "paging", locals: {results: @objects, object: @object} %> + <%= form_tag do |f| %> - +
+ + + + + + + + + @@ -37,37 +42,34 @@ + + + + - <% end %> @@ -75,17 +77,22 @@ <% end %> +<%= render partial: "paging", locals: {results: @objects, object: @object} %> + <% content_for :footer_js do %> var showhide_compare = function() { var form = $('form#compare')[0]; $('input[type=hidden][name="uuids[]"]', form).remove(); - $('input[type=submit]', form).prop('disabled',true); - $('input[name="uuids[]"]').each(function(){ - if(this.checked) { - $('input[type=submit]', form).prop('disabled',false).show(); - $(form).append($('').val(this.value)); - } - }); + $('input[type=submit]', form).prop('disabled',true).show(); + var checked_inputs = $('input[name="uuids[]"]:checked'); + if (checked_inputs.length >= 2 && checked_inputs.length <= 3) { + checked_inputs.each(function(){ + if(this.checked) { + $('input[type=submit]', form).prop('disabled',false).show(); + $(form).append($('').val(this.value)); + } + }); + } }; $('form input[name="uuids[]"]').on('click', showhide_compare); showhide_compare();
- status - - id - - name - - template + Status - owner + Instance - components + Template - dependencies + Owner - created + Age
- <%= check_box_tag 'uuids[]', ob.uuid, false %> + <%= check_box_tag 'uuids[]', ob.uuid, false, :class => 'persistent-selection' %> - <% if ob.success %> - success - <% elsif ob.active %> - active - <% end %> - - <%= link_to_if_arvados_object ob %> + <%= render partial: 'pipeline_status_label', locals: {:p => ob} %> + + <%= link_to_if_arvados_object ob, friendly_name: true %> - <%= ob.name %> + <%= link_to_if_arvados_object ob.pipeline_template_uuid, friendly_name: true %> - <%= link_to_if_arvados_object ob.pipeline_template_uuid %> + <%= link_to_if_arvados_object ob.owner_uuid, friendly_name: true %> - <%= link_to_if_arvados_object ob.owner_uuid %> + <%= distance_of_time_in_words(ob.created_at, Time.now) %> + <%= render partial: 'delete_object_button', locals: {object:ob} %> +
+ <% ob.components.each do |cname, c| %> - <% status = if !(c.is_a?(Hash) && c[:job].is_a?(Hash)) then nil elsif c[:job][:success] then 'success' elsif c[:job][:running] then 'info' else 'warning' end %> - "><%= cname.to_s %> - <% end %> - - - <% ob.dependencies.each do |d| %> - <%= d %>
+ <% if c[:job] %> + <%= render partial: "job_status_label", locals: {:j => c[:job], :title => cname.to_s } %> + <% else %> + <%= cname.to_s %> <% end %> -
-
- <%= ob.created_at %> + <% end %>