From f8625851704f586d8edcb7ac4e34078b24634a88 Mon Sep 17 00:00:00 2001 From: Timothy Martin Date: Thu, 29 Oct 2015 00:54:44 -0700 Subject: [PATCH] fix date passing to getstatus, remove debugging --- Web Server/getstatus.php | 15 ++++----------- Web Server/js/charts.js | 1 - 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Web Server/getstatus.php b/Web Server/getstatus.php index 697c720..0bc4924 100644 --- a/Web Server/getstatus.php +++ b/Web Server/getstatus.php @@ -29,29 +29,22 @@ if (isset($_GET["date"])) { // TODO: I should verify that the date is properly formatted. $date = $_GET["date"]; - } else if (DEBUG) { - // DEBUG: just always use the same date as today. - $date = "2015-05-05"; } - + if (isset($_GET["scope"])) { // TODO: I should verify that it's an integer in a valid range. $scope = $_GET["scope"]; } switch ($_GET["q"]) { - // FIXME: most if not all of these don't work if a date is actually passed in!! case 'years': - // query_years($date); - query_years(); + query_years($date); break; case 'months': - // query_months($date); - query_months(); + query_months($date); break; case 'days': - // query_days($date); - query_days(); + query_days($date); break; case 'full_day': query_full_day($date, $scope); diff --git a/Web Server/js/charts.js b/Web Server/js/charts.js index fe1029c..004df19 100644 --- a/Web Server/js/charts.js +++ b/Web Server/js/charts.js @@ -448,7 +448,6 @@ function get_cc_input_volts() { } - function get_cc_input_current() { /*global deviceLabel, full_day_data */