Dans affich_tools, tableau_ng remplace dornavant tableau.
darcs-hash:20060326160011-68412-d87c57d6e2edf22dd78fd5c78e07793a19421ff5.gz
This commit is contained in:
parent
821905a295
commit
7428178ab9
5 changed files with 101 additions and 123 deletions
|
@ -107,7 +107,7 @@ def adhers_brief(adhers) :
|
|||
* chambre
|
||||
* machines
|
||||
"""
|
||||
data = [ ( u'aid' , u'Prénom Nom' , u'Chbre', u'P', u'C', u'Machines' ) ]
|
||||
data = []
|
||||
|
||||
for a in adhers :
|
||||
## Etat administratif
|
||||
|
@ -140,12 +140,15 @@ def adhers_brief(adhers) :
|
|||
else : machines = coul(nom,k)
|
||||
|
||||
# Données
|
||||
data.append((a.id() , a.Nom(), a.chbre(),paid,carte,machines ))
|
||||
data.append([a.id(), a.Nom(), a.chbre(), paid, carte, machines])
|
||||
|
||||
return u"Machines en rouge = machines avec limitation de services\n" + \
|
||||
u"P : paiement année en cours, le fond vert indique le précâblage\n" + \
|
||||
u"C : carte d'étudiant année en cours\n" + \
|
||||
tableau([5, 30 , 5, 1, 1, '*'], data)
|
||||
tableau(data,
|
||||
titre = [u'aid', u'Prénom Nom', u'Chbre', u'P', u'C', u'Machines'],
|
||||
largeur = [5, 30, 5, 1, 1, '*'],
|
||||
alignement = ['d', 'c', 'g', 'c', 'c', 'c'])
|
||||
|
||||
def machines_brief(machines) :
|
||||
"""
|
||||
|
@ -157,7 +160,7 @@ def machines_brief(machines) :
|
|||
* adresse MAC
|
||||
* si blacklistée
|
||||
"""
|
||||
data = [ ( u'mid' , u'Type', u'Nom de machine', u'Propriétaire', u'Chbre', u'Limitation' ) ]
|
||||
data = []
|
||||
|
||||
for m in machines :
|
||||
t, bl = __bases_machines(m)
|
||||
|
@ -171,10 +174,13 @@ def machines_brief(machines) :
|
|||
p = coul(p,'rouge')
|
||||
|
||||
# Données
|
||||
data.append((m.id() , t, m.nom().split('.')[0], p, a.chbre(), bl))
|
||||
data.append([m.id() , t, m.nom().split('.')[0], p, a.chbre(), bl])
|
||||
|
||||
return u"Le propriétaire en rouge signale un problème administratif\n" + \
|
||||
tableau([5, 4, 18, '*', 5, 10], data)
|
||||
tableau(data,
|
||||
titre = [u'mid', u'Type', u'Nom de machine', u'Propriétaire', u'Chbre', u'Limitation'],
|
||||
largeur = [5, 4, 18, '*', 5, 10],
|
||||
alignement = ['d', 'c', 'c', 'c', 'g', 'c'])
|
||||
|
||||
def clubs_brief(clubs) :
|
||||
"""
|
||||
|
@ -184,7 +190,7 @@ def clubs_brief(clubs) :
|
|||
* local
|
||||
* machines
|
||||
"""
|
||||
data = [ ( u'cid' , u'Nom ', u'Local',u'P', u'Responsable', u'Machines' ) ]
|
||||
data = []
|
||||
|
||||
for c in clubs :
|
||||
## Etat administratif
|
||||
|
@ -213,11 +219,14 @@ def clubs_brief(clubs) :
|
|||
resp = c.responsable().Nom()
|
||||
|
||||
# Données
|
||||
data.append((c.id() , c.Nom(), c.local(),paid, resp, machines ))
|
||||
data.append([c.id() , c.Nom(), c.local(), paid, resp, machines])
|
||||
|
||||
return u"Machines en rouge = machines avec limitation de services\n" + \
|
||||
u"P : signature charte année en cours, le fond vert indique le précâblage\n" + \
|
||||
tableau([5, '*' , 6, 1, 21, 15], data)
|
||||
tableau(data,
|
||||
titre = [u'cid', u'Nom ', u'Local', u'P', u'Responsable', u'Machines'],
|
||||
largeur = [5, '*', 6, 1, 21, 15],
|
||||
alignement = ['d', 'c', 'g', 'c', 'c', 'c'])
|
||||
|
||||
|
||||
def list_machines(machines) :
|
||||
|
@ -230,15 +239,18 @@ def list_machines(machines) :
|
|||
* adresse MAC
|
||||
* si blacklistée
|
||||
"""
|
||||
data = [ ( u'mid' , u'Type', u'Nom de machine', u'Adresse IP', u'Adresse MAC', u'Limitation' ) ]
|
||||
data = []
|
||||
|
||||
for m in machines :
|
||||
t, bl = __bases_machines(m)
|
||||
|
||||
# Données
|
||||
data.append((m.id() , t, m.nom().split('.')[0], m.ip(), m.mac(), bl))
|
||||
data.append([m.id(), t, m.nom().split('.')[0], m.ip(), m.mac(), bl])
|
||||
|
||||
return tableau([5, 4, '*', 17, 19, 10], data)
|
||||
return tableau(data,
|
||||
titre = [u'mid', u'Type', u'Nom de machine', u'Adresse IP', u'Adresse MAC', u'Limitation'],
|
||||
largeur = [5, 4, '*', 17, 19, 10],
|
||||
alignement = ['d', 'c', 'c', 'c', 'c', 'c'])
|
||||
|
||||
def list_bornes(bornes) :
|
||||
"""
|
||||
|
@ -252,7 +264,7 @@ def list_bornes(bornes) :
|
|||
* canal
|
||||
* lieu (la première remarque en fait)
|
||||
"""
|
||||
data = [ ( u'mid' , u'Nom', u'Adresse IP', u'Adresse MAC', u'E', u'Can' , u'P', u'Pris', u'Lieu') ]
|
||||
data = []
|
||||
|
||||
ok = u'\x1b[1;32mu\x1b[1;0m'
|
||||
nok = u'\x1b[1;31md\x1b[1;0m'
|
||||
|
@ -278,9 +290,13 @@ def list_bornes(bornes) :
|
|||
else :
|
||||
puiss = b.puissance()
|
||||
|
||||
data.append((b.id() , b.nom().split('.')[0], b.ip(), b.mac(), etat, b.canal(), puiss, b.prise(),l ))
|
||||
data.append([b.id(), b.nom().split('.')[0], b.ip(), b.mac(), etat, b.canal(), puiss, b.prise(), l])
|
||||
|
||||
return u"Can=canaux, P=puissance, E=état\n" + tableau([4, 13, 15, 17, 1, 5, 3, 4, '*'], data)
|
||||
return u"Can=canaux, P=puissance, E=état\n" + \
|
||||
tableau(data,
|
||||
titre = [u'mid', u'Nom', u'Adresse IP', u'Adresse MAC', u'E', u'Can', u'P', u'Pris', u'Lieu'],
|
||||
largeur = [5, 13, 15, 17, 1, 5, 3, 4, '*'],
|
||||
alignement = ['d', 'c', 'c', 'c', 'c', 'c', 'c', 'g', 'c'])
|
||||
|
||||
def adher_details(adher) :
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue