diff --git a/wiki/macro/InfosBornes.py b/wiki/macro/InfosBornes.py index 54d127c8..630a64ed 100755 --- a/wiki/macro/InfosBornes.py +++ b/wiki/macro/InfosBornes.py @@ -26,7 +26,7 @@ def execute(macro, text): code += f.table(1) code += f.table_row(1) - for nom_col in [u"nom",u"hotspot",u"up",u"description",u"clients",u"mac wifi",u"canal",u"uptime",u"x",u"y"]: + for nom_col in [u"nom",u"hotspot",u"état",u"description",u"clients",u"mac wifi",u"canal",u"uptime",u"x GPS",u"y GPS"]: code += f.table_cell(1) code += f.strong(1) code += f.text(nom_col) @@ -43,20 +43,28 @@ def execute(macro, text): code += f.table_cell(0) dico={u"hotspot" : {u"1" : u"+" , u"0" : u""}, - u"up" : {u"1" : u"y" , u"0": u"n"}} + u"up" : {u"1" : u"marche" , u"0": u"éteint"}} for nom_attribut in [u"hotspot",u"up"]: code += f.table_cell(1) code += f.text(dico[nom_attribut][b.getAttribute(nom_attribut)]) code += f.table_cell(0) - for tag in [u'description', u"clients",u"mac",u"canal",u"uptime"]: + for tag in [u'description', u"clients",u"mac",u"canal"]: code += f.table_cell(1) if (b.getElementsByTagName(tag)!=[]): code += f.text(b.getElementsByTagName(tag)[0].firstChild.data) else: code += f.text(u"") code += f.table_cell(0) + + code += f.table_cell(1) + if (b.getElementsByTagName(u"uptime")!=[]): + code += f.text("%.2f" % float(b.getElementsByTagName(u"uptime")[0].firstChild.data)+" j") + else: + code += f.text(u"") + code += f.table_cell(0) + if (b.getElementsByTagName(u"position")!=[]): for nom_attribut in [u'x',u'y']: code += f.table_cell(1)