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

Fix support for external use of js

parent 5d22f717
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,9 @@ window.monitorIfconfigChart = function(element) {
}
};
window.ifconfigChart = new Chart(ctx, config);
if (typeof window.monitorURL === 'undefined') {
window.monitorURL = "https://monitor.web-d.be";
}
var api_url = window.monitorURL + "/api/sensor/"
+ window.monitorServerID + "/" + window.monitorServerToken
+ "/ifconfig";
......
......@@ -36,6 +36,9 @@ window.monitorLoadChart = function(element) {
};
window.loadChart = new Chart(ctx, config);
if (typeof window.monitorURL === 'undefined') {
window.monitorURL = "https://monitor.web-d.be";
}
var load_url = window.monitorURL + "/api/sensor/"
+ window.monitorServerID + "/" + window.monitorServerToken
+ "/load";
......
......@@ -35,6 +35,9 @@ window.monitorMemChart = function(element) {
}
};
window.memChart = new Chart(ctx, config);
if (typeof window.monitorURL === 'undefined') {
window.monitorURL = "https://monitor.web-d.be";
}
var meminfo_url = window.monitorURL + "/api/sensor/"
+ window.monitorServerID + "/" + window.monitorServerToken
+ "/memory";
......
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