Skip to content
Snippets Groups Projects
Commit 573593d6 authored by Tibo's avatar Tibo
Browse files

Load JSON from correct domain

parent 94b3fef8
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,10 @@ window.monitorMemChart = function(element) {
};
window.memChart = new Chart(ctx, config);
var used_url = "/api/sensor/"
if (typeof window.monitorURL === 'undefined') {
window.monitorURL = "https://monitor.web-d.be";
}
var used_url = window.monitorURL + "/api/sensor/"
+ window.monitorServerID + "/" + window.monitorServerToken
+ "/memory/used"
$.getJSON(used_url, function( data ) {
......
......@@ -2,6 +2,7 @@
<canvas id="memory-chart" width='400' height='300'></canvas>
<script src="/js/sensor.memory.js"></script>
<script>
window.monitorURL = {{ url('/') }};
window.monitorServerID = {{ $server->id }};
window.monitorServerToken = "{{ $server->read_token }}";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment