diff --git a/snippets/graph.html b/snippets/graph.html index b282273..bf780b0 100644 --- a/snippets/graph.html +++ b/snippets/graph.html @@ -9,10 +9,39 @@ -
-
-   - + @@ -22,6 +51,8 @@ $(function() { var start = moment({hour: 0}); var end = moment(); + var s_start = start.utc().format('YYYY-MM-DDTHH:mm:ss[Z]'); + var s_end = end.utc().format('YYYY-MM-DDTHH:mm:ss[Z]'); console.log("XXX: "+start.format()); @@ -31,9 +62,29 @@ $(function() { s_start = start.utc().format('YYYY-MM-DDTHH:mm:ss[Z]'); s_end = end.utc().format('YYYY-MM-DDTHH:mm:ss[Z]'); console.log("Start: " + s_start + ' End: ' + s_end); - reloadGraph(s_start,s_end); + drawGraph(deveui, alias, property, s_start,s_end, false); } + $('#btn_w').on("click", function() { + drawGraph(deveui, alias, 'w', s_start,s_end, false); + }); + + $('#btn_t').on("click", function() { + drawGraph(deveui, alias, 't', s_start,s_end, false); + }); + + $('#btn_h').on("click", function() { + drawGraph(deveui, alias, 'h', s_start,s_end, false); + }); + + $('#btn_p').on("click", function() { + drawGraph(deveui, alias, 'p', s_start,s_end, false); + }); + + $('#btn_vp').on("click", function() { + drawGraph(deveui, alias, 'vp', s_start,s_end, false); + }); + $('#reportrange').daterangepicker({ startDate: start, endDate: end, @@ -98,19 +149,96 @@ $(function() { diff --git a/snippets/graph.html.test b/snippets/graph.html.test deleted file mode 100644 index 919d3d2..0000000 --- a/snippets/graph.html.test +++ /dev/null @@ -1,149 +0,0 @@ -{{define "body_content"}} -{{ if ne .UserName "" }} - - - - -
-
- -
-{{ index (index .QueryValues "deveui") 0 }} -
- -
-
- -
-
- - - - - - - - - - -{{ else }} -

Bitte zuerst einloggen

-{{end}} -{{end}} diff --git a/snippets/graph2.html b/snippets/graph2.html deleted file mode 100644 index 2109579..0000000 --- a/snippets/graph2.html +++ /dev/null @@ -1,276 +0,0 @@ -{{define "body_content"}} -{{ if ne .UserName "" }} - - - - - - - - - - - - - -
-
- -
-
- - - - - -{{ else }} -

Bitte zuerst einloggen

-{{end}} -{{end}}