From 78fcb6ee9b379e3b0b42b159511aead7623484fb Mon Sep 17 00:00:00 2001 From: f10 Date: Tue, 8 Jun 2010 19:13:17 +0200 Subject: [PATCH] change json request to correct API calls --- frontend/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index aa451a0..649044d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -196,8 +196,9 @@ $(document).ready(function() { // load channel list + $('#debug').append('json'); // load json data - $.getJSON("../backend/index.php",{uuid: myUUID, controller: 'channel', action: 'get', data: 'channels'}, function(j){ + $.getJSON("../backend/index.php",{uuid: myUUID, controller: 'channel', action: 'get', format: 'json'}, function(j){ $('#channelList').empty(); @@ -262,10 +263,10 @@ function getData() { // calcMyWindowStart myWindowStart = calcMyWindowStart(); - //$('#debug').append('json'); + $('#debug').append('json'); // load json data with given time window //$.getJSON("../backend/index.php",{uuid: myUUID,mode: 'getPulses', ids: ids_parameter, windowEnd: myWindowEnd, windowSize: f.window.value.substring(0,1), windowInterval: f.window.value.substring(1)}, function(j){ - $.getJSON("../backend/index.php",{uuid: myUUID, controller: 'channel', action: 'get', data: 'pulses', ids: ids_parameter, from: myWindowStart, to: myWindowEnd, groupBy: f.grouping.value}, function(j){ + $.getJSON("../backend/index.php",{uuid: myUUID, controller: 'data', action: 'get', format: 'json', ids: ids_parameter, from: myWindowStart, to: myWindowEnd, groupBy: f.grouping.value}, function(j){ data = j; //$('#debug').empty().append(data.toSource()); // then show/reload the chart