Avoided printing graph if no data. Added date histogram was generated.
[arvados.git] / apps / workbench / app / controllers / keep_disks_controller.rb
index c6a42b0974372b1d81ca67d171e43eefafb43859..345d17f251353a7f59a0751eb099ed81fe9bf4b1 100644 (file)
@@ -19,6 +19,7 @@ class KeepDisksController < ApplicationController
       @cache_age_histogram = log_entry['properties'][:histogram]
       # Javascript wants dates in milliseconds.
       @histogram_date = log_entry['event_at'].to_i * 1000
+      @histogram_pretty_date = log_entry['event_at'].strftime('%b %-d, %Y')
 
       total_free_cache = @cache_age_histogram[-1][1]
       persisted_storage = 1 - total_free_cache