Revision 228aad1c
Fusion de modifications issues de la branche Riran2 et concernant les traductions.
Mise à jour des traductions.
Déplacement de certains éléments de la configuration du development.ini vers app_cfg.py (ceux qui posaient problème à PasteDeploy).
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@1385 b22e2e97-25c9-44ff-b637-2e5ceca36478
development.ini | ||
---|---|---|
36 | 36 |
; NE PAS METTRE DE GUILLEMETS/APOSTROPHES AUTOUR DE LA VALEUR. |
37 | 37 |
vigiboard_priority_order = asc |
38 | 38 |
|
39 |
; XXX PasteDeploy uses ConfigParser which doesn't play well with interpolation. |
|
40 |
; See http://trac.pythonpaste.org/pythonpaste/ticket/379 |
|
41 |
; |
|
42 |
; vigicore/patches/paste_deploy_SafeConfigParser.diff contains a patch to |
|
43 |
; use SafeConfigParser which supports string interpolation escapes. |
|
44 |
; |
|
45 |
; URL des tickets, possibilités: |
|
46 |
; - %(idaggregate)s |
|
47 |
; - %(host)s |
|
48 |
; - %(service)s |
|
49 |
; - %(tt)s |
|
50 |
vigiboard_links.tt = http://example4.com/%%(idcorrevent)d/%%(tt)s |
|
51 |
|
|
52 | 39 |
; Default font size, must be a valid size as per the CSS 2.1 specification. |
53 | 40 |
; See http://www.w3.org/TR/CSS21/fonts.html#font-size-props |
54 | 41 |
vigiboard_font.size = 10px |
vigiboard/config/app_cfg.py | ||
---|---|---|
71 | 71 |
# Vigiboard version |
72 | 72 |
base_config['vigilo_version'] = u'2.0-pre0.1' |
73 | 73 |
|
74 |
# Links configuration |
|
75 |
# XXX Should be part of ini settings. |
|
74 |
# Configuration des liens |
|
76 | 75 |
# Les elements suivants peuvent etre utilises dans la chaine de formatage : |
77 | 76 |
# - idcorrevent : identifiant de l'aggregat (alerte correlee) |
78 | 77 |
# - host : le nom de l'hote concerne par l'alerte |
... | ... | |
84 | 83 |
'servicetype': ['Service Type', 'http://example4.com/%(idcorrevent)d'], |
85 | 84 |
} |
86 | 85 |
|
86 |
# URL des tickets, possibilités: |
|
87 |
# - %(idaggregate)s |
|
88 |
# - %(host)s |
|
89 |
# - %(service)s |
|
90 |
# - %(tt)s |
|
91 |
base_config['vigiboard_links.tt'] = 'http://example4.com/%(idcorrevent)d/%(tt)s' |
|
92 |
|
|
87 | 93 |
# Plugins to use |
88 |
# XXX Should be part of ini settings. |
|
89 | 94 |
base_config['vigiboard_plugins'] = [ |
90 | 95 |
['shn', 'PluginSHN'], |
91 | 96 |
] |
vigiboard/controllers/root.py | ||
---|---|---|
53 | 53 |
redirect('/') |
54 | 54 |
|
55 | 55 |
@expose('vigiboard.html') |
56 |
@require(Any(not_anonymous(), msg=_("You need to be authenticated"))) |
|
56 |
@require(Any(not_anonymous(), msg=l_("You need to be authenticated")))
|
|
57 | 57 |
def default(self, page = None, host = None, service = None, output = None, |
58 | 58 |
trouble_ticket=None, *argv, **krgv): |
59 | 59 |
|
... | ... | |
154 | 154 |
@validate(validators={'idcorrevent':validators.Int(not_empty=True)}, |
155 | 155 |
error_handler=process_form_errors) |
156 | 156 |
@expose('json') |
157 |
@require(Any(not_anonymous(), msg=_("You need to be authenticated"))) |
|
157 |
@require(Any(not_anonymous(), msg=l_("You need to be authenticated")))
|
|
158 | 158 |
def history_dialog(self, idcorrevent): |
159 | 159 |
|
160 | 160 |
""" |
... | ... | |
229 | 229 |
@validate(validators={'idcorrevent':validators.Int(not_empty=True)}, |
230 | 230 |
error_handler=process_form_errors) |
231 | 231 |
@expose('vigiboard.html') |
232 |
@require(Any(not_anonymous(), msg=_("You need to be authenticated"))) |
|
232 |
@require(Any(not_anonymous(), msg=l_("You need to be authenticated")))
|
|
233 | 233 |
def event(self, idcorrevent): |
234 | 234 |
""" |
235 | 235 |
Affichage de l'historique d'un événement. |
... | ... | |
276 | 276 |
@validate(validators={'host':validators.NotEmpty(), |
277 | 277 |
'service':validators.NotEmpty()}, error_handler=process_form_errors) |
278 | 278 |
@expose('vigiboard.html') |
279 |
@require(Any(not_anonymous(), msg=_("You need to be authenticated"))) |
|
279 |
@require(Any(not_anonymous(), msg=l_("You need to be authenticated")))
|
|
280 | 280 |
def host_service(self, host, service): |
281 | 281 |
|
282 | 282 |
""" |
... | ... | |
337 | 337 |
"status":validators.OneOf(['NoChange', 'None', 'Acknowledged', |
338 | 338 |
'AAClosed']) |
339 | 339 |
}, error_handler=process_form_errors) |
340 |
@require(Any(not_anonymous(), msg=_("You need to be authenticated"))) |
|
340 |
@require(Any(not_anonymous(), msg=l_("You need to be authenticated")))
|
|
341 | 341 |
def update(self,**krgv): |
342 | 342 |
|
343 | 343 |
""" |
vigiboard/i18n/fr_FR/LC_MESSAGES/vigiboard.po | ||
---|---|---|
45 | 45 |
#: vigiboard/controllers/root.py:232 vigiboard/controllers/root.py:279 |
46 | 46 |
#: vigiboard/controllers/root.py:340 |
47 | 47 |
msgid "You need to be authenticated" |
48 |
msgstr "Vous devez être authentifié"
|
|
48 |
msgstr "Vous devez vous authentifier"
|
|
49 | 49 |
|
50 | 50 |
#: vigiboard/controllers/root.py:247 |
51 | 51 |
msgid "Error in DB" |
vigiboard/widgets/edit_event.py | ||
---|---|---|
2 | 2 |
# vim:set expandtab tabstop=4 shiftwidth=4: |
3 | 3 |
"""Les différents formulaires de Vigiboard""" |
4 | 4 |
|
5 |
from pylons.i18n import ugettext as _
|
|
5 |
from pylons.i18n import lazy_ugettext as l_
|
|
6 | 6 |
from tw.forms import TableForm, SingleSelectField, TextField, HiddenField |
7 | 7 |
|
8 |
__all__ = ('EditEventForm', 'SearchForm', ) |
|
9 |
|
|
8 | 10 |
edit_event_status_options = [ |
9 |
['NoChange',_('No change')],
|
|
10 |
['None',_('Change to None')],
|
|
11 |
['Acknowledged',_('Change to Acknowledged')],
|
|
12 |
['AAClosed',_('Change to Closed')]
|
|
13 |
]
|
|
11 |
['NoChange', l_('No change')],
|
|
12 |
['None', l_('Change to None')],
|
|
13 |
['Acknowledged', l_('Change to Acknowledged')],
|
|
14 |
['AAClosed', l_('Change to Closed')],
|
|
15 |
] |
|
14 | 16 |
|
15 | 17 |
class EditEventForm(TableForm): |
16 | 18 |
|
... | ... | |
22 | 24 |
""" |
23 | 25 |
|
24 | 26 |
fields = [ |
25 |
HiddenField('id'), |
|
26 |
TextField('trouble_ticket',label_text=_('Trouble Ticket')), |
|
27 |
SingleSelectField('status',options=edit_event_status_options) |
|
28 |
] |
|
29 |
submit_text = _('Apply') |
|
27 |
HiddenField('id'), |
|
28 |
TextField('trouble_ticket', label_text=l_('Trouble Ticket')), |
|
29 |
SingleSelectField('status', label_text=l_('Status'), |
|
30 |
options=edit_event_status_options), |
|
31 |
] |
|
32 |
submit_text = l_('Apply') |
|
30 | 33 |
|
31 | 34 |
class SearchForm(TableForm): |
32 | 35 |
|
... | ... | |
38 | 41 |
""" |
39 | 42 |
|
40 | 43 |
fields = [ |
41 |
TextField('host',label_text=_('Host')),
|
|
42 |
TextField('service',label_text=_('Service')),
|
|
43 |
TextField('output',label_text=_('Output')),
|
|
44 |
TextField('trouble_ticket',label_text=_('Trouble Ticket')),
|
|
45 |
]
|
|
44 |
TextField('host', label_text=l_('Host')),
|
|
45 |
TextField('service', label_text=l_('Service')),
|
|
46 |
TextField('output', label_text=l_('Output')),
|
|
47 |
TextField('trouble_ticket', label_text=l_('Trouble Ticket')),
|
|
48 |
]
|
|
46 | 49 |
|
47 | 50 |
method = 'GET' |
48 |
submit_text = _('Search') |
|
51 |
submit_text = l_('Search') |
|
52 |
|
Also available in: Unified diff