Created Json endpoints and separated json stuff from http pages, moved chart JS to common file.

This commit is contained in:
Ziver Koc 2016-11-28 17:11:17 +01:00
parent 969f089a9e
commit 92f402a07b
12 changed files with 348 additions and 279 deletions

View file

@ -136,7 +136,7 @@
function drawMap(){
// Get map data
$.getJSON("?json&action=getdata", function(json){
$.getJSON("/data/map?action=getdata", function(json){
// reset map
svg.clear();
@ -183,7 +183,7 @@
$.ajax({
async: false,
dataType: "json",
url: "?json",
url: "/data/map?",
data: {
action: "save",
id: element.attr("device-id"),