Commit 65ba363edf936afc41a7e815195e688ca5e4a958:
use info status when board minutes are updated
Branch: refs/heads/master
Author: Sam Ruby <[email protected]>
Committer: Sam Ruby <[email protected]>
Pusher: rubys <[email protected]>
------------------------------------------------------------
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