Revision 77b7746d
[#1543] Compatibilité avec TurboGears 2.3.x
Change-Id: Ic87889229488dbc0f47b267bbd933e7b9f2ce5be
Refs: #1543
vigigraph/controllers/rpc.py | ||
---|---|---|
13 | 13 |
import urllib2 |
14 | 14 |
import logging |
15 | 15 |
|
16 |
from pylons.i18n import ugettext as _, lazy_ugettext as l_, \ |
|
17 |
lazy_ungettext as ln_ |
|
16 |
from tg.i18n import ugettext as _, lazy_ugettext as l_, lazy_ungettext as ln_ |
|
18 | 17 |
from tg import expose, request, redirect, tmpl_context, \ |
19 | 18 |
config, validate, flash, exceptions as http_exc |
20 | 19 |
|
... | ... | |
28 | 27 |
from vigilo.turbogears.controllers import BaseController |
29 | 28 |
from vigilo.turbogears.helpers import get_current_user |
30 | 29 |
from vigilo.turbogears.controllers.proxy import get_through_proxy |
31 |
from vigilo.turbogears.decorators import paginate
|
|
30 |
from tg.decorators import paginate
|
|
32 | 31 |
|
33 | 32 |
from vigilo.models.session import DBSession |
34 | 33 |
from vigilo.models.tables import Host, SupItemGroup, PerfDataSource |
... | ... | |
138 | 137 |
validators = SearchHostAndGraphSchema(), |
139 | 138 |
error_handler = process_form_errors) |
140 | 139 |
@expose('json') |
141 |
def searchHostAndGraph(self, search_form_host, search_form_graph):
|
|
140 |
def searchHostAndGraph(self, search_form_host=None, search_form_graph=None):
|
|
142 | 141 |
""" |
143 | 142 |
Determination des couples (hote-graphe) repondant aux criteres de |
144 | 143 |
recherche sur hote et/ou graphe. |
... | ... | |
312 | 311 |
validators = GetIndicatorsSchema(), |
313 | 312 |
error_handler = process_form_errors) |
314 | 313 |
@expose('json') |
315 |
def getIndicators(self, host, graph, nocache): |
|
314 |
def getIndicators(self, host, graph, nocache=None):
|
|
316 | 315 |
""" |
317 | 316 |
Liste d indicateurs associes a un graphe |
318 | 317 |
|
... | ... | |
337 | 336 |
validators = StartTimeSchema(), |
338 | 337 |
error_handler = process_form_errors) |
339 | 338 |
@expose('json') |
340 |
def startTime(self, host, nocache): |
|
339 |
def startTime(self, host, nocache=None):
|
|
341 | 340 |
# urllib2.quote() ne fonctionne pas sur le type unicode. |
342 | 341 |
# On transcode d'abord le nom d'hôte en UTF-8. |
343 | 342 |
quote_host = isinstance(host, unicode) and \ |
Also available in: Unified diff