kikoololisation de munin

(on rajoute des accents partout :)

darcs-hash:20081004175702-bd074-cf32f0e641d84d78ea6a7a8d3a2ed5902ca514b4.gz
This commit is contained in:
Antoine Durand-Gasselin 2008-10-04 19:57:02 +02:00
parent ce5e155942
commit cee435c7ad
8 changed files with 29 additions and 34 deletions

View file

@ -12,7 +12,7 @@ except :
if arg == "config" :
print 'host_name adherents'
print 'graph_title Adhérents par batiments'
print u'graph_title Adhérents par batiments'
print "graph_args --base 1000 --lower-limit 0"
print "graph_vlabel nb d'adhérents"
print 'bata.label Bâtiment A'

View file

@ -7,7 +7,7 @@ sys.path.append("/usr/scripts/gestion")
import hptools
dico_courbes_gen = {
'car' : {'titre' : "Etat des cartouches",
'car' : {'titre' : u"État des cartouches",
'vlabel' : "nb de pages restantes",
'lower-limit' : 0,
'upper-limit' : 30000,
@ -19,7 +19,7 @@ dico_courbes_gen = {
'car_mag' : ("enterprises.11.2.3.9.4.2.1.4.1.10.5.1.1.3.0","Cartouche magenta","ff00ff"),
'car_yel' : ("enterprises.11.2.3.9.4.2.1.4.1.10.5.1.1.4.0","Cartouche jaune","ffff00")
}},
'car-p' : {'titre' : "Etat des cartouches",
'car-p' : {'titre' : u"État des cartouches (pourcentage)",
'vlabel' : "pourcentage restant",
'lower-limit' : 0,
'upper-limit' : 100,
@ -29,7 +29,7 @@ dico_courbes_gen = {
'car_p_mag' : ("enterprises.11.2.3.9.4.2.1.4.1.10.1.1.18.3.0","Cartouche magenta","ff00ff"),
'car_p_yel' : ("enterprises.11.2.3.9.4.2.1.4.1.10.1.1.18.4.0","Cartouche jaune","ffff00")
}},
'tam' : {'titre' : "Etat des tambours",
'tam' : {'titre' : u"État des tambours",
'vlabel' : "nb de pages restantes",
'lower-limit' : 0,
'upper-limit' : 40000,
@ -41,7 +41,7 @@ dico_courbes_gen = {
'tam_mag' : ("enterprises.11.2.3.9.4.2.1.4.1.10.5.1.1.7.0","Tambour d'imagerie magenta","ff00ff"),
'tam_yel' : ("enterprises.11.2.3.9.4.2.1.4.1.10.5.1.1.8.0","Tambour d'imagerie jaune","ffff00"),
}},
'tam-p' : {'titre' : "Etat des tambours",
'tam-p' : {'titre' : u"État des tambours (pourcentage)",
'vlabel' : "Pourcentage restant",
'lower-limit' : 0,
'upper-limit' : 100,
@ -65,7 +65,7 @@ dico_courbes_gen = {
'tray1' : ("1.3.6.1.2.1.43.8.2.1.10.1.1","Transparents","ffff33"),
'tray1_max' : ("1.3.6.1.2.1.43.8.2.1.9.1.1","Transparents (max)","cccc00"),
}},
'stock-papier-p' : {'titre' : "Stock papier",
'stock-papier-p' : {'titre' : "Stock papier (pourcentage)",
'vlabel' : "Pourcentage restant",
'lower-limit' : 0,
'upper-limit' : 100,
@ -81,7 +81,7 @@ dico_courbes_gen = {
'tray2' : "1.3.6.1.2.1.43.8.2.1.9.1.2",
'tray1' : "1.3.6.1.2.1.43.8.2.1.9.1.1",
}},
'kit' : {'titre' : "Etat des kits images",
'kit' : {'titre' : u"État des kits images",
'vlabel' : "nb de pages restantes",
'lower-limit' : 0,
'upper-limit' : 150000,

View file

@ -44,7 +44,6 @@ def etat():
if diff == None:
diff = 4
total += diff
except Exception, err:
total += 24
return total
@ -56,15 +55,15 @@ else:
if arg == "config":
# Ecrit sur la sortie standard la configuration
print 'host_name laserjet'
print "graph_category etat"
print "graph_args --lower-limit 0 --upper-limit 10"
print "graph_title Etat de l'imprimante"
print "graph_vlabel nb"
print "etat.label Estimation des embrouilles (>3=problemes)"
print "etat.warning 4"
print "etat.critical 8"
print "lpq.label Taille de la file d'attente"
print u'host_name laserjet'
print u"graph_category État"
print u"graph_args --lower-limit 0 --upper-limit 10"
print u"graph_title État de l'imprimante"
print u"graph_vlabel nb"
print u"etat.label Estimation des embrouilles (>3=problemes)"
print u"etat.warning 4"
print u"etat.critical 8"
print u"lpq.label Taille de la file d'attente"
else:
# Ecrit les valeurs actuelles sur la sortie standard
print "etat.value %s" % etat()

View file

@ -14,11 +14,11 @@ else:
if arg == "config":
# Ecrit sur la sortie standard la configuration
print 'host_name laserjet'
print "graph_category etat"
print "graph_title Pages imprimees"
print "graph_vlabel nb"
print "total.label Total"
print u'host_name laserjet'
print u"graph_category État"
print u"graph_title Pages imprimées"
print u"graph_vlabel nb"
print u"total.label Total"
else:
# Ecrit les valeurs actuelles sur la sortie standard
oid = "1.3.6.1.2.1.43.10.2.1.4.1.1"

View file

@ -26,15 +26,11 @@ if arg == "config" :
print 'orphelines.draw AREA'
elif arg == "fichier" :
request = RequestCLI(u"wiki.crans.org/")
request.form = request.args = request.setup_args()
_ = request.getText
#if request.mode_getpagelinks: # prevent recursion
#return ''
# find root page.
#from MoinMoin.Page import Page
#rootpage = Page(request, u"FrontPage", is_rootpage=1)

View file

@ -15,7 +15,7 @@ except :
if arg == "config" :
print 'host_name web.rouge'
print 'graph_category wiki'
print 'graph_title Thèmes wiki utilisés'
print u'graph_title Thèmes wiki utilisés'
print 'graph_scale no'
print "graph_vlabel nb d'utilisateurs"
for theme in THEMES :
@ -35,4 +35,3 @@ else :
for char in [' ','_','-','/','\\',':',';','.','<','>'] :
nom = nom.replace(char, '')
print '%s.value %s' % (nom, nb)

View file

@ -7,7 +7,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title Utilisateurs wiki'
echo 'graph_args --base 1000 --lower-limit 0'
echo "graph_vlabel nombre d'utilisateurs"
echo 'enregistres.label Nb enregistrés'
echo u'enregistres.label Nb enregistrés'
echo 'enregistres.draw AREA'
echo 'favoris.label Nb avec favoris'
exit 0

View file

@ -118,6 +118,7 @@ class ThemeCrans(ThemeBase):
return classic_head + open_search_desc + wiki_rel
def headscript(self, d):
html = []
# Check mode
if d.get('print_mode'):
link = ""