Created Json endpoints and separated json stuff from http pages, moved chart JS to common file.
This commit is contained in:
parent
969f089a9e
commit
92f402a07b
12 changed files with 348 additions and 279 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue