Merge branch '9005-conn-leak'
[arvados.git] / apps / workbench / app / views / keep_disks / _content_layout.html.erb
index cbad20ab3f58be3df5820aa129531cdd17e0f436..2cf3291c5c7173c3072c942ae2c9529f4a5ced10 100644 (file)
@@ -1,10 +1,20 @@
-<% content_for :tab_panes do %>
-  <div class='cache-age-vs-disk-histogram'>
-    <%= raw @cache_age_histogram.to_json %>
-    <br>
-    <%= @histogram_date %>
+<% unless @histogram_pretty_date.nil? %>
+  <% content_for :tab_panes do %>
+  <script type="text/javascript">
+    $(document).ready(function(){
+      $.renderHistogram(<%= raw @cache_age_histogram.to_json %>);
+    });
+  </script>
+  <div class='graph'>
+    <h3>Cache Age vs. Disk Utilization</h3>
+    <h4>circa <%= @histogram_pretty_date %></h4>
+    <div id='cache-age-vs-disk-histogram'>
+    </div>
   </div>
+  <% end %>
 <% end %>
 <%= content_for :content_top %>
-<%= content_for :tab_line_buttons %>
+<div class="pull-right">
+  <%= content_for :tab_line_buttons %>
+</div>
 <%= content_for :tab_panes %>