Commit 44139361 authored by Gabriel Detraz's avatar Gabriel Detraz
Browse files

Si TEST dans le commentaire, affichage map spécial

parent 1ad18c2e
......@@ -48,7 +48,7 @@ STATUS_URL = 'http://wifi-status.adm.crans.org/wifi-status.xml'
# Informations publiques (n'importe quel visiteur de la page peut les voir)
public_tags = ['borne','hostname','uptime','lon','lat','location',\
'floor','network','ssid','bssid','channel','currdate',\
'monitor','pontwifi',
'monitor','pontwifi', 'test'
]
# Informations accessibles qu'aux users logués
......@@ -157,7 +157,7 @@ def global_status(public=True, logged=True):
elif public:
allowed=public_tags
public_process(borne, allowed)
return doc
class Raw_filter:
......@@ -242,6 +242,12 @@ class Raw_filter:
node.parentNode.appendChild(self.create_embeded_text('pontwifi',\
'pontwifi'))
def test(self,text,node):
if self.borne.get('info', [None])[0]:
if 'TEST' in self.borne.get('info', [None])[0].value:
node.parentNode.appendChild(self.create_embeded_text('test',\
'test'))
def neighborhood(self,text,node):
"""Fonction moche qui parse un flux venant de iwlist pour en resortir
la liste des cellules
......
......@@ -3,6 +3,7 @@
<uptime>0</uptime>
<editable/>
<raw fun="test"></raw>
<raw fun="currdate"></raw>
<raw fun="position"></raw>
<raw fun="comments"></raw>
......
......@@ -130,6 +130,7 @@ cat <<EOF
<raw fun="prise"></raw>
<raw fun="comments"></raw>
<raw fun="pontwifi"></raw>
<raw fun="test"></raw>
<editable />
$EXTRA_XML
EOF
......@@ -188,6 +189,7 @@ cat <<EOF
<raw fun="prise"></raw>
<raw fun="comments"></raw>
<raw fun="pontwifi"></raw>
<raw fun="test"></raw>
<editable />
$EXTRA_XML
EOF
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment