change json request to correct API calls

This commit is contained in:
f10 2010-06-08 19:13:17 +02:00
parent 888fc0aa1a
commit 78fcb6ee9b

View file

@ -196,8 +196,9 @@ $(document).ready(function() {
// load channel list
$('#debug').append('<a href="../backend/index.php?uuid='+myUUID+'&controller=channel&action=get&format=json">json</a>');
// 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('<a href="../backend/index.php?uuid='+myUUID+'&mode=getPulses&ids='+ids_parameter+'&windowStart='+myWindowStart+'&windowEnd='+myWindowEnd+'&windowGrouping='+f.grouping.value+'">json</a>');
$('#debug').append('<a href="../backend/index.php?uuid='+myUUID+'&controller=data&action=get&format=json&ids='+ids_parameter+'&from='+myWindowStart+'&to='+myWindowEnd+'&groupBy='+f.grouping.value+'">json</a>');
// 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