enhance error handling

This commit is contained in:
2020-06-20 10:40:38 +02:00
parent f74d6fd667
commit b3e93f8478
2 changed files with 11 additions and 5 deletions
+7 -1
View File
@@ -184,7 +184,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
maxfunc = function(max) { return max + 2000 }
labels = {
formatter: function(val, index) {
return (val / 1000.0).toFixed(2);
return (val / 1000.0).toFixed(3);
}
};
} else if (property==="h") {
@@ -212,6 +212,12 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
<div class="message-body">
Abo ist abgelaufen
</div>
</article>`);
} else if (mydata.msg.includes("error:")) {
$('#chart').html(`<article class="message is-danger">
<div class="message-body">
Fehler im Aufruf
</div>
</article>`);
} else {
location.reload(true);