on ajoute les infos de la machine (celles disponible sur la page complete)
darcs-hash:20051006225458-4ec08-3f295fe6d8bce820d63bfbd68c50862c9cad1a7d.gz
This commit is contained in:
parent
68ac01dcc3
commit
3a907a40c8
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue