Added system status box
[arvados.git] / apps / workbench / app / views / users / home.html.erb
index bf14fdd854d72bed8ee9b748d5e07aaa5c5994f9..89fab32097366e271b3148513f9da8a2ffe2eb56 100644 (file)
   </div>
 
 <div class="span4">
+<br/>
+
 <% if @my_ssh_keys.count == 0%>
   <div class="alert alert-info daxalert">
     <button type="button" class="close" data-dismiss="alert">&times;</button>
   </p>
 </div>
 
+<div class="well">
+  <p><strong>System status</strong></p>
+    <table>
+      <% [Human, Trait, Collection, PipelineTemplate,
+         PipelineInstance].each do |aclass| %>
+       <tr>
+         <td>
+           <span style="margin-right: 2em">
+             <a href="/<%= raw(aclass.to_s.pluralize.underscore) %>">
+           <%= raw(aclass.to_s.pluralize.underscore.capitalize.gsub '_', '&nbsp;') %>
+           </a>
+           </span>
+           </td>
+         <td>
+        <% if aclass == 'File' %>
+          <%= Collection.limit(4000).where({}).collect(&:files).flatten(1).count %>
+        <% else %>
+          <%= aclass.limit(4000).where({}).count %>
+        <% end %>
+       </td>
+       </tr>
+      <% end %>
+      </table>
+</div>
+
 </div>
 </div>