Merge branch '11807-yaml-to-json'
[arvados.git] / apps / workbench / app / views / keep_disks / _content_layout.html.erb
index 7178b9c419a4ce87fec2af7278d417525737db23..06822e5e1401bf667026b4e9379e1726f6fc85a3 100644 (file)
@@ -1,6 +1,24 @@
-<% content_for :tab_panes do %>
-<div class='cache-age-vs-disk-histogram'>Histogram will go here.</div>
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
+<% 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 %>