From 80d625695e2dd391c119cf3d1a33aa1d8fa68b26 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 11 Sep 2010 05:09:00 +0200 Subject: [PATCH] getting fe and be together --- frontend/index.html | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 25f3fe6..cee0bb4 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -161,8 +161,8 @@
- - + +
@@ -235,8 +235,8 @@ $(document).ready(function() { // code for adding a channel - var ucid = $("#ucid"), - allFields = $([]).add(ucid), + var uuid = $("#uuid"), + allFields = $([]).add(uuid), tips = $(".validateTips"); @@ -283,7 +283,7 @@ $(document).ready(function() { var bValid = true; allFields.removeClass('ui-state-error'); - bValid = bValid && checkLength(ucid,"UCID",36,36); + bValid = bValid && checkLength(uuid,"UUID",36,36); //bValid = bValid && checkRegexp(name,/^[a-z]([0-9a-z_])+$/i,"Username may consist of a-z, 0-9, underscores, begin with a letter."); // From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/ @@ -323,9 +323,10 @@ $(document).ready(function() { function loadChannelList() { - $('#debug').append('json'); + $('#debug').append('json'); // load json data - $.getJSON("../backend/index.php",{uuid: myUUID, controller: 'channel', action: 'get', format: 'json'}, function(j){ + $.getJSON("../backend/index.php/data/" + myUUID + {format: 'json'}); + /*$.getJSON("../backend/index.php/data/" + myUUID + {format: 'json'}, function(j){ $('#channelList').empty(); @@ -337,7 +338,7 @@ function loadChannelList() { // initioal load data with all channels getData(); - }); + });*/ } @@ -368,7 +369,7 @@ function moveWindow(mode) { function getData() { if(f.ids.length>0) - $('#loading').empty().html(''); + $('#loading').empty().html(''); // list of channel ids, comma separated ids_parameter = ""; @@ -387,10 +388,11 @@ 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: 'data', action: 'get', format: 'json', ids: ids_parameter, from: myWindowStart, to: myWindowEnd, groupBy: f.grouping.value}, function(j){ + $.getJSON("../backend/index.php/data/" + myUUID + {format: 'json', ids: ids_parameter, from: myWindowStart, to: myWindowEnd}); + /* $.getJSON("../backend/index.php/data/" + myUUID + {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 @@ -401,7 +403,7 @@ function getData() { showChart(); $('#loading').empty(); - }); + });*/ return false; } @@ -565,4 +567,4 @@ function generateAxisTicks() { - \ No newline at end of file +