Revision 350b1bd8
Mise à jour du code qooxdoo de VigiGraph suite aux changements dans le contrôleur proxy.
Correction d'un petit oubli dans un des schémas de validation du contrôleur rpc.
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@2802 b22e2e97-25c9-44ff-b637-2e5ceca36478
javascript/source/class/vigigraph/Application.js | ||
---|---|---|
256 | 256 |
}, true); |
257 | 257 |
|
258 | 258 |
b3.addEventListener("execute",function(e) { |
259 |
var win = new qx.client.NativeWindow(urls.supPage+
|
|
260 |
combo3.getSelected().getLabel()+'/cgi-bin/status.cgi'+
|
|
261 |
'?style=detail&supNav=1');
|
|
259 |
var host = combo3.getSelected().getLabel();
|
|
260 |
var win = new qx.client.NativeWindow(urls.supPage+'/'+encodeURIComponent(host)
|
|
261 |
+'/cgi-bin/status.cgi?host='+encodeURIComponent(host)+'&style=detail&supNav=1');
|
|
262 | 262 |
win.setDimension(800,600); |
263 | 263 |
win.setDependent(false); |
264 | 264 |
win.open(); |
... | ... | |
691 | 691 |
|
692 | 692 |
function setUrl(start,duration) |
693 | 693 |
{ |
694 |
url= urls.getImage+"/"+encodeURIComponent(host)+"/rrdgraph.py?start="+start+"&duration="+duration+"&graphtemplate="+encodeURIComponent(graph)+"&direct=1"; |
|
694 |
url= urls.getImage+"/"+encodeURIComponent(host)+"/rrdgraph.py?start="+start+"&duration="+duration+"&graphtemplate="+encodeURIComponent(graph)+"&host="+encodeURIComponent(host)+"&direct=1";
|
|
695 | 695 |
qx.log.Logger.ROOT_LOGGER.debug(url); |
696 | 696 |
} |
697 | 697 |
function loadImage(myUrl,o) |
... | ... | |
706 | 706 |
} |
707 | 707 |
function updateGraphOnStartTime() |
708 | 708 |
{ |
709 |
var url= urls.getStartTime+"/"+encodeURIComponent(host)+"/rrdgraph.py?getstarttime=1";
|
|
709 |
var url= urls.getStartTime+"/"+encodeURIComponent(host)+"/rrdgraph.py?getstarttime=1&host="+encodeURIComponent(host);
|
|
710 | 710 |
var g=new qx.io.remote.Request(url,"GET","text/plain"); |
711 | 711 |
g.addEventListener("completed", function(e) { |
712 | 712 |
start = parseInt(e.getContent()); |
... | ... | |
1005 | 1005 |
if (indicator != "") |
1006 | 1006 |
{ |
1007 | 1007 |
var end = start + duration; |
1008 |
var url= urls.exportCSV+"/"+encodeURIComponent(host)+"/rrdgraph.py/exportCSV?graphtemplate="+graph+"&ds="+indicator+"&start="+start+"&end="+end;
|
|
1008 |
var url= urls.exportCSV+"/"+encodeURIComponent(host)+"/rrdgraph.py/exportCSV?host="+encodeURIComponent(host)+"&graphtemplate="+encodeURIComponent(graph)+"&ds="+encodeURIComponent(indicator)+"&start="+start+"&end="+end;
|
|
1009 | 1009 |
w4 = window.open(url); |
1010 | 1010 |
w4.onload = function(){ |
1011 | 1011 |
} |
vigigraph/controllers/rpc.py | ||
---|---|---|
319 | 319 |
class SearchHostAndGraphSchema(schema.Schema): |
320 | 320 |
host = validators.String(if_missing=None) |
321 | 321 |
graph = validators.String(if_missing=None) |
322 |
nocache = validators.String(if_missing=None) |
|
322 | 323 |
|
323 | 324 |
# @TODO définir un error_handler différent pour remonter l'erreur via JS. |
324 | 325 |
@validate( |
325 | 326 |
validators=SearchHostAndGraphSchema(), |
326 | 327 |
error_handler=process_form_errors) |
327 | 328 |
@expose('json') |
328 |
def searchHostAndGraph(self, host, graph): |
|
329 |
def searchHostAndGraph(self, host, graph, nocache):
|
|
329 | 330 |
""" |
330 | 331 |
Determination des couples (hote-graphe) repondant aux criteres de |
331 | 332 |
recherche sur hote et/ou graphe. |
Also available in: Unified diff