diff options
-rw-r--r-- | infra-status.rb | 1 | ||||
-rw-r--r-- | lib/helpers.rb | 6 | ||||
-rw-r--r-- | lib/notice_store.rb | 1 | ||||
-rw-r--r-- | lib/service_registry.rb | 1 | ||||
-rw-r--r-- | views/layout.erb | 2 |
5 files changed, 9 insertions, 2 deletions
diff --git a/infra-status.rb b/infra-status.rb index 5072af5..b3bec91 100644 --- a/infra-status.rb +++ b/infra-status.rb @@ -19,7 +19,6 @@ configure do ServiceRegistry.instance.update! set :partial_template_engine, :erb mime_type :atom, 'application/atom+xml' - set :bind, '0.0.0.0' end get '/' do diff --git a/lib/helpers.rb b/lib/helpers.rb index 2f613b1..aaaf632 100644 --- a/lib/helpers.rb +++ b/lib/helpers.rb @@ -81,6 +81,10 @@ helpers do end def date_format(date) - date.rfc2822 + if date.nil? + 'n/a' + else + date.rfc2822 + end end end
\ No newline at end of file diff --git a/lib/notice_store.rb b/lib/notice_store.rb index efd98f6..77b1edc 100644 --- a/lib/notice_store.rb +++ b/lib/notice_store.rb @@ -7,6 +7,7 @@ require 'singleton' class NoticeStore include Singleton CACHE_SECONDS = 600 + attr_reader :load_date def initialize update! diff --git a/lib/service_registry.rb b/lib/service_registry.rb index 3521fce..7ac5f85 100644 --- a/lib/service_registry.rb +++ b/lib/service_registry.rb @@ -71,6 +71,7 @@ class ServiceRegistry include Singleton include HelperMethods + attr_reader :load_date def initialize end diff --git a/views/layout.erb b/views/layout.erb index 0085139..4b779ec 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -78,6 +78,8 @@ <div class="container"> <div class="row"> <div class="col-md-8"> + Status data updated at <%= date_format ServiceRegistry.instance.load_date %>.<br /> + Notices updated at <%= date_format NoticeStore.instance.load_date %>.<br /> Fugue iconset by <a href="http://p.yusukekamiyamane.com/">Yusuke Kamiyamane</a>. </div> <div class="col-md-4"> |