X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/26114a84293ea3fbcc5ef4adcf7900060716e62c..1ab33aed37fdcd448fe224375951089282901c48:/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 ed5b2d086a..3aac9309bb 100644 --- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb @@ -1,21 +1,18 @@ -<%= 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 2 or 3 selected', {class: 'btn btn-primary', disabled: true, style: 'display: none'} %> -   -<% end rescue nil %> -<% end %> +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> -<%= form_tag do |f| %> +<%= form_tag({}, {id: "comparedInstances"}) do |f| %> - +
- + + - - - + + @@ -24,80 +21,21 @@ Status - - - <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %> - - - - - - - - - <% end %> + -
Instance - + Template Owner - Age + Created at +
- <%= 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, friendly_name: true %> - - <%= link_to_if_arvados_object ob.pipeline_template_uuid, friendly_name: true %> - - <%= link_to_if_arvados_object ob.owner_uuid, friendly_name: true %> - - <%= distance_of_time_in_words(ob.created_at, Time.now) %> -
- - <% ob.components.each do |cname, c| %> - <% status = if !(c.is_a?(Hash) && c[:job].is_a?(Hash)) - nil - elsif c[:job][:success] == true - 'success' - elsif c[:job][:success] == false - 'danger' - elsif c[:job][:running] == true - 'info' - else - 'warning' - end %> - <%= cname.to_s %> - <% end %> -
-<% end %> + -<% 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).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(); <% end %>