diff --git a/wiki/macro/HostStatus.py b/wiki/macro/HostStatus.py index 548e665f..95f028b7 100644 --- a/wiki/macro/HostStatus.py +++ b/wiki/macro/HostStatus.py @@ -1,6 +1,6 @@ # -*- coding: iso-8859-1 -*- -from commands import getstatusoutput +from commands import getstatusoutput,getoutput def Cellule(texte, couleur, f) : """ @@ -23,7 +23,7 @@ def execute(macro, text) : return Cellule('Impossible d\'analyser le fichier de status.','yellow',macro.formatter) if not status[1].strip() : - return Cellule('Toutes les machines sont up, Vince est de bonne humeur.','lime',macro.formatter) + return Cellule('Toutes les machines (non down) sont up.','lime',macro.formatter) lines = status[1].split('\n') @@ -35,7 +35,7 @@ def execute(macro, text) : line = line.split(' ') code += f.table_row(1) code += f.table_cell(1,{'style':'background-color:silver'}) - code += f.text(line [0]) + code += f.text('%s (%s)' % (line [0], getoutput("grep '%s' /etc/autostatus/hosts | cut -d ' ' -f 5-" % line [0])) ) code += f.table_cell(0) # nombre de non réponse au ping if int(line[1]) > 2 : @@ -43,7 +43,7 @@ def execute(macro, text) : code += f.text('down') else : code += f.table_cell(1,{'style':'background-color:blue'}) - code += f.text('up') + code += f.text('état incertain') code += f.table_cell(0) code += f.table_row(0)