enhance error handling
This commit is contained in:
+7
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user