Les accents dans les graphes de munin, c'est trop gay

Et spamassassin dtecte les messages d'erreur comme des spam

darcs-hash:20081005185753-bd074-f0dd4af4dfead90a538f8cfc973e37a6738d398c.gz
This commit is contained in:
Antoine Durand-Gasselin 2008-10-05 20:57:53 +02:00
parent cee435c7ad
commit 8de055f921
11 changed files with 24 additions and 25 deletions

View file

@ -12,7 +12,7 @@ except :
if arg == "config" :
print 'host_name adherents'
print u'graph_title Adhérents par batiments'
print 'graph_title Adherents par batiment'
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' : u"État des cartouches",
'car' : {'titre' : u"Etat 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' : u"État des cartouches (pourcentage)",
'car-p' : {'titre' : u"Etat 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' : u"État des tambours",
'tam' : {'titre' : u"Etat 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' : u"État des tambours (pourcentage)",
'tam-p' : {'titre' : u"Etat des tambours (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' : u"État des kits images",
'kit' : {'titre' : u"Etat des kits images",
'vlabel' : "nb de pages restantes",
'lower-limit' : 0,
'upper-limit' : 150000,

View file

@ -58,7 +58,7 @@ if arg == "config":
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_title Etat de l'imprimante"
print u"graph_vlabel nb"
print u"etat.label Estimation des embrouilles (>3=problemes)"
print u"etat.warning 4"

View file

@ -16,7 +16,7 @@ if arg == "config":
# Ecrit sur la sortie standard la configuration
print u'host_name laserjet'
print u"graph_category État"
print u"graph_title Pages imprimées"
print "graph_title Pages imprimees"
print u"graph_vlabel nb"
print u"total.label Total"
else:

View file

@ -3,7 +3,7 @@
if [ "$1" = "config" ]; then
# echo 'host_name adherents'
echo 'graph_title Machines connectées'
echo 'graph_title Machines connectees'
echo "graph_args --base 1000 --lower-limit 0"
echo "graph_vlabel nombre de machines"
echo 'ens.label ENS'

View file

@ -3,7 +3,7 @@
if [ "$1" = "config" ]; then
echo 'host_name pulsar.crans.org'
echo 'graph_category Environnement'
echo 'graph_title Hygrométrie 0B'
echo 'graph_title Hygrometrie 0B'
echo 'graph_vlabel Humitidé (%)'
echo 'hygro.label Humidité 0B'
exit 0

View file

@ -6,7 +6,7 @@ if [ "$1" = "config" ]; then
echo 'host_name pulsar.crans.org'
echo 'graph_category B4'
echo 'graph_args --lower-limit 0'
echo 'graph_title Intensité'
echo 'graph_title Intensite'
echo 'graph_vlabel I (A)'
echo 'input.label Entrée'
echo 'input.min 0'

View file

@ -3,7 +3,7 @@
if [ "$1" = "config" ]; then
echo 'host_name pulsar.crans.org'
echo 'graph_category Environnement'
echo 'graph_title Température 0B'
echo 'graph_title Temperature 0B'
echo 'graph_vlabel Température en (°C)'
echo 'temp.label Température 0B'
echo 'temp.warning 22'

View file

@ -15,7 +15,7 @@ except :
if arg == "config" :
print 'host_name web.rouge'
print 'graph_category wiki'
print u'graph_title Thèmes wiki utilisés'
print 'graph_title Themes wiki utilises'
print 'graph_scale no'
print "graph_vlabel nb d'utilisateurs"
for theme in THEMES :

View file

@ -9,7 +9,7 @@
{{{
#!Box titre
blablabla
tables, images....
}}}
@ -51,7 +51,6 @@ class BoxFormatter:
self.formatter = formatter
self.request = request
self.counter = 0
def make(self, title, body_html, color=None):
if color==None:
css_color_class=u""

View file

@ -29,7 +29,7 @@ MoinMoin - Portail parser
image2.png | title2 | description 2
image3.png | title3 | description 3
}}}
CREDIT
Le code est derive de celui de Gallery2.
@ -41,7 +41,7 @@ from MoinMoin.action import AttachFile
#####################################################################
# Fonctions #
#####################################################################
# to_wikiname : transfome la chaine text avec le parser wiki
# to_wikiname : transfome la chaine text avec le parser wiki
# classique et le formateur formatter
# (je sais pas a quoi sert request, mais faut pas
# l'enlever !)
@ -69,10 +69,10 @@ class PortailFormatter:
self.formatter = formatter
self.request = request
self.counter = 0
def open(self):
self.request.write(self.formatter.table(1,{'style':'width:100%;padding:10px;'}))
def cell(self, title, description, image):
if self.counter==0:
self.request.write(self.formatter.table_row(1))
@ -83,7 +83,7 @@ class PortailFormatter:
if self.counter==1:
self.request.write(self.formatter.table_row(0))
self.counter = (self.counter + 1)%2
def close(self):
if self.counter==1:
self.request.write(self.formatter.table_cell(1,{'style':'width:50%;border:none;padding:20px 20px 20px 50px;'}))
@ -95,7 +95,7 @@ class PortailFormatter:
# Parser : classe principale, c'est elle qui parse
#######
class Parser:
def __init__(self, raw, request, **kw):
self.request = request
self.raw = raw
@ -103,10 +103,10 @@ class Parser:
def format(self, formatter):
# on divise le textes en lignes (1 ligne = une entree dans le portail)
quotes = self.raw.split('\n')
# on récupere le chemin des fichiers attaches pour les images
current_pagename=formatter.page.page_name
attachment_path = AttachFile.getAttachDir(self.request, current_pagename, create=1)
@ -114,7 +114,7 @@ class Parser:
# on initialise la classe qui va fabriquer le code html
portail = PortailFormatter(self.request, formatter)
portail.open()
# on traite les ligne une à une
for line in quotes:
line=line.strip()
@ -125,7 +125,7 @@ class Parser:
description=items.pop().strip()
link=items.pop().strip()
image = AttachFile.getAttachUrl(current_pagename, items.pop().strip(), self.request).replace('& ','&')
link = to_wikiname(self.request, formatter, link)
description = to_wikiname(self.request, formatter, description)
portail.cell(link, description, image)