You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/01/18 02:03:08 UTC

[whimsy.git] [1/1] Commit 65ba363: use info status when board minutes are updated

Commit 65ba363edf936afc41a7e815195e688ca5e4a958:
    use info status when board minutes are updated


Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>

------------------------------------------------------------
www/status/monitors/board_minutes.rb                         | ++++++++ --
------------------------------------------------------------
10 changes: 8 additions, 2 deletions.
------------------------------------------------------------


diff --git a/www/status/monitors/board_minutes.rb b/www/status/monitors/board_minutes.rb
index c5371d4..a6781c9 100644
--- a/www/status/monitors/board_minutes.rb
+++ b/www/status/monitors/board_minutes.rb
@@ -4,14 +4,20 @@
 
 def Monitor.board_minutes(previous_status)
   index = File.expand_path('../../www/board/minutes/index.html')
-  log = File.expand_path('../../www/logs/collate_minutes')
+  log = File.read(File.expand_path('../../www/logs/collate_minutes'))
 
-  if File.read(log) =~ /\*\*\* (Exception.*) \*\*\*/
+  if log =~ /\*\*\* (Exception.*) \*\*\*/
     {
       level: 'danger',
       data: $1,
       href: '../logs/collate_minutes'
     }
+  elsif log.length > 0
+    {
+      level: 'info',
+      data: "Last updated: #{File.mtime(index)}",
+      href: '../logs/collate_minutes'
+    }
   else
     "Last updated: #{File.mtime(index)}"
   end