highlight "bad" states
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# $Id: hbd,v 1.29 2012/03/29 00:16:11 andreas Exp $
|
||||
# $Id: hbd,v 1.30 2012/06/09 15:21:07 andreas Exp $
|
||||
# Wait for heartbeat messages and act on them (or their absence)
|
||||
#
|
||||
import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle
|
||||
@@ -75,9 +75,13 @@ class Host:
|
||||
return self.state
|
||||
|
||||
def dispstate(self):
|
||||
if self.state in ["down","overdue"]:
|
||||
state="<b>%s</b>" % self.state
|
||||
else:
|
||||
state="%s" % self.state
|
||||
if self.doesack != "":
|
||||
return "%s(%s)" % (self.state, self.doesack)
|
||||
return self.state
|
||||
return "%s(%s)" % (state, self.doesack)
|
||||
return state
|
||||
|
||||
# set new state, return number of secs in previous state
|
||||
def newstate(self, state, when=0):
|
||||
|
||||
Reference in New Issue
Block a user