Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / pipeline_instances / index.html.erb
index ad941daf5da8e33dd8f9a4cea8b8177c79f2da43..250d51a885e313ffbd82b42e70a8a884e3c7d2aa 100644 (file)
@@ -1,88 +1,21 @@
-<%= form_tag({action: 'compare', controller: 'pipeline_instances', method: 'get'}, {method: 'get', id: 'compare'}) do |f| %>
+<%# Copyright (C) The Arvados Authors. All rights reserved.
 
-<table class="table table-hover">
-  <thead>
-    <tr class="contain-align-left">
-      <th>
-       <%= submit_tag 'Compare', {class: 'btn btn-primary', disabled: true} %>
-      </th><th>
-       status
-      </th><th>
-       id
-      </th><th>
-       name
-      </th><th>
-       template
-      </th><th>
-       owner
-      </th><th>
-       components
-      </th><th>
-       dependencies
-      </th><th>
-       created
-      </th><th>
-      </th>
-    </tr>
-  </thead>
-  <tbody>
+SPDX-License-Identifier: AGPL-3.0 %>
 
-    <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
+<% content_for :tab_line_buttons do %>
+  <div class="input-group">
+    <input type="text" class="form-control filterable-control recent-pipeline-instances-filterable-control"
+           placeholder="Search pipeline instances"
+           data-filterable-target="#recent-pipeline-instances"
+           <%# Just for the double-load test in FilterableInfiniteScrollTest: %>
+           value="<%= params[:search] %>"
+           />
+  </div>
 
-    <tr data-object-uuid="<%= ob.uuid %>">
-      <td>
-        <%= check_box_tag 'uuids[]', ob.uuid, false %>
-      </td><td>
-        <% if ob.success %>
-        <span class="label label-success">success</span>
-        <% elsif ob.active %>
-        <span class="label label-info">active</span>
-        <% end %>
-      </td><td>
-        <%= link_to_if_arvados_object ob %>
-      </td><td>
-        <%= ob.name %>
-      </td><td>
-        <%= link_to_if_arvados_object ob.pipeline_template_uuid %>
-      </td><td>
-        <%= link_to_if_arvados_object ob.owner_uuid %>
-      </td><td>
-        <% 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 %>
-        <span class="label <%= "label-#{status}" if status %>"><%= cname.to_s %></span>
-        <% end %>
-      </td><td>
-        <small>
-          <% ob.dependencies.each do |d| %>
-          <%= d %><br />
-          <% end %>
-        </small>
-      </td><td>
-        <%= ob.created_at %>
-      </td><td>
-        <% if ob.editable? %>
-        <%= link_to({action: 'destroy', id: ob.uuid}, method: :delete, remote: true, data: {confirm: "You are about to delete #{controller.model_class} #{ob.uuid}.\n\nAre you sure?"}) do %>
-        <i class="icon-trash"></i>
-        <% end %>
-        <% end %>
-      </td>
-    </tr>
-
-    <% end %>
-
-  </tbody>
-</table>
+  <%= 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} %>
+  <% end rescue nil %>
 
 <% end %>
 
-<% content_for :footer_js do %>
-$('form#compare input[name="uuids[]"]').on('click', function() {
-    var form = $('form#compare')[0]
-    $('input[type=submit]', form).prop('disabled',true);
-    $('input[name="uuids[]"]', form).each(function(){
-        if(this.checked) {
-            $('input[type=submit]', form).prop('disabled',false);
-        }
-    });
-});
-<% end %>
+<%= render file: 'application/index.html.erb', locals: local_assigns %>