This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new d243dd4  Drop master status from header
d243dd4 is described below

commit d243dd4e195a2691efd402d8279b31d0248846d7
Author: Sebb <[email protected]>
AuthorDate: Wed Jun 7 00:41:11 2017 +0100

    Drop master status from header
---
 www/status/index.cgi          | 10 +---------
 www/status/monitors/system.rb |  2 +-
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/www/status/index.cgi b/www/status/index.cgi
index fc99c7a..9f4ded6 100755
--- a/www/status/index.cgi
+++ b/www/status/index.cgi
@@ -34,14 +34,6 @@ git_repo = `git ls-remote origin master`.strip rescue "?"
 
 hostname = `hostname`
 
-# Are we the master node?
-begin
-  require_relative '../whimsy'
-  master = Whimsy.master?
-  rescue LoadError, StandardError => e
-    master = e
-end
-
 # What the browser sees:
 print <<-EOF
 <!DOCTYPE html>
@@ -62,7 +54,7 @@ print <<-EOF
     <a href="/">
       <img alt="Whimsy logo" title="Whimsy logo" src="../whimsy.svg" 
class="logo"/>
     </a>
-    <h1>Whimsy Status for #{hostname} (master=#{master})</h1>
+    <h1>Whimsy Status for #{hostname}</h1>
 
     <div class="list-group list-group-root well">
       Loading...
diff --git a/www/status/monitors/system.rb b/www/status/monitors/system.rb
index 3c8c9ea..5abca34 100644
--- a/www/status/monitors/system.rb
+++ b/www/status/monitors/system.rb
@@ -51,7 +51,7 @@ def Monitor.system(previous_status)
   status[name] = {command: 'Whimsy.master?'}
   # TODO change the false level to warning or danger at some point?
   # N.B. need to compare with true as master may be a string, i.e. 'truthy'
-  status[name] = {level: master == true ? 'success' : 'info',
+  status[name] = {level: master == true ? 'success' : 'warning',
                   data: master.to_s}
 
   {data: status}

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to