[ARVADOS] created: a4218e78015f802b179dd9bf804478972a4e6c2e

Git user git at public.curoverse.com
Mon May 15 20:10:08 EDT 2017


        at  a4218e78015f802b179dd9bf804478972a4e6c2e (commit)


commit a4218e78015f802b179dd9bf804478972a4e6c2e
Author: radhika <radhika at curoverse.com>
Date:   Mon May 15 20:09:25 2017 -0400

    11580: add container_requests index page

diff --git a/apps/workbench/app/views/container_requests/_show_recent.html.erb b/apps/workbench/app/views/container_requests/_show_recent.html.erb
new file mode 100644
index 0000000..4ac50fc
--- /dev/null
+++ b/apps/workbench/app/views/container_requests/_show_recent.html.erb
@@ -0,0 +1,37 @@
+<%= form_tag({}, {id: "containerRequests"}) do |f| %>
+
+<table class="table table-condensed table-fixedlayout arv-recent-container-requests">
+  <colgroup>
+    <col width="10%" />
+    <col width="15%" />
+    <col width="25%" />
+    <col width="15%" />
+    <col width="15%" />
+    <col width="15%" />
+    <col width="5%" />
+  </colgroup>
+  <thead>
+    <tr class="contain-align-left">
+      <th>
+      	Status
+      </th><th>
+      	ContainerRequest
+      </th><th>
+      	Description
+      </th><th>
+      	Workflow
+      </th><th>
+      	Owner
+      </th><th>
+      	Created at
+      </th><th>
+      </th>
+    </tr>
+  </thead>
+
+  <tbody data-infinite-scroller="#recent-container-requests" id="recent-container-requests"
+         data-infinite-content-href="<%= url_for partial: :recent_rows %>" >
+  </tbody>
+</table>
+
+<% end %>
diff --git a/apps/workbench/app/views/container_requests/_show_recent_rows.html.erb b/apps/workbench/app/views/container_requests/_show_recent_rows.html.erb
new file mode 100644
index 0000000..0629006
--- /dev/null
+++ b/apps/workbench/app/views/container_requests/_show_recent_rows.html.erb
@@ -0,0 +1,40 @@
+<%
+  containers = @objects.map(&:container_uuid).compact.uniq
+  preload_objects_for_dataclass(Container, containers) if containers.any?
+
+  workflows = @objects.collect {|o| o.properties[:template_uuid]}.compact.uniq
+  preload_objects_for_dataclass(Workflow, workflows) if workflows.any?
+
+  owner_uuids = @objects.map(&:owner_uuid).compact.uniq
+  preload_objects_for_dataclass(User, owner_uuids) if owner_uuids.any?
+  preload_objects_for_dataclass(Group, owner_uuids) if owner_uuids.any?
+
+  objs = containers + workflows + owner_uuids
+  preload_links_for_objects objs if objs.any?
+%>
+
+<% @objects.sort_by { |obj| obj.created_at }.reverse.each do |obj| %>
+  <%
+    cntr = object_for_dataclass(Container, obj.container_uuid) if obj.container_uuid
+    wu = obj.work_unit(obj.name, cntr=cntr)
+    template_uuid = wu.template_uuid
+  %>
+
+  <tr data-object-uuid="<%= wu.uuid %>" >
+    <td>
+      <%= render partial: 'work_units/progress', locals: {wu: wu} %>
+    </td><td>
+      <%= link_to_if_arvados_object obj, friendly_name: true %>
+    </td><td>
+      <%= obj.description || '' %>
+    </td><td>
+      <%= link_to_if_arvados_object(template_uuid, friendly_name: true) %>
+    </td><td>
+      <%= link_to_if_arvados_object wu.owner_uuid, friendly_name: true %>
+    </td><td>
+      <%= wu.created_at.to_s %>
+    </td><td>
+      <%= render partial: 'delete_object_button', locals: {object:obj} %>
+    </td>
+  </tr>
+<% end %>
diff --git a/apps/workbench/app/views/container_requests/index.html.erb b/apps/workbench/app/views/container_requests/index.html.erb
new file mode 100644
index 0000000..f0a8959
--- /dev/null
+++ b/apps/workbench/app/views/container_requests/index.html.erb
@@ -0,0 +1,11 @@
+<% content_for :tab_line_buttons do %>
+  <div class="input-group">
+    <input type="text" class="form-control filterable-control recent-container-requests-filterable-control"
+           placeholder="Search container requests"
+           data-filterable-target="#recent-container-requests"
+           value="<%= params[:search] %>"
+           />
+  </div>
+<% end %>
+
+<%= render file: 'application/index.html.erb', locals: local_assigns %>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list