From 82082ca9d1f1bef6d88be2f5674d9154a5a80ef3 Mon Sep 17 00:00:00 2001 From: Marco Jardim Date: Wed, 3 Dec 2014 11:59:32 -0200 Subject: [PATCH] Corrigindo a URL do /all e parsing de datas --- public/relatorioCodigo.js | 9 ++------- riobus-config.json | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/public/relatorioCodigo.js b/public/relatorioCodigo.js index 48b3ced..519ddb0 100644 --- a/public/relatorioCodigo.js +++ b/public/relatorioCodigo.js @@ -66,9 +66,7 @@ window.onload = function() { } function toDateTime(dateTimeString) { - var dateBR = dateTimeString.substring(3, 6) + dateTimeString.substring(0, 2) + dateTimeString.substring(5); - - return new Date(Date.parse(dateBR)); + return new Date(dateTimeString); } // lines by buses count @@ -139,12 +137,9 @@ window.onload = function() { return output; } - function getData() { - - }; $(document).on('click', '#button', function() { var selected = $('input[name="report"]:checked').val(); - $.getJSON('http://192.168.1.128:8080/all?callback=?', function(data, status) { + $.getJSON('http://riob.us:81/all?callback=?', function(data, status) { switch (selected) { case "empty-lines": result = emptyLines(data) diff --git a/riobus-config.json b/riobus-config.json index 017c3ea..c7de5c9 100644 --- a/riobus-config.json +++ b/riobus-config.json @@ -3,6 +3,6 @@ "host": "riob.us", "path": "/all", "port": 81, - "intervalTime": 10000 + "intervalTime": 60000 } } \ No newline at end of file