Skip to content
Snippets Groups Projects
Commit a62bb477 authored by Tomáš Čejka's avatar Tomáš Čejka
Browse files

graphs: write error message when there is an error

parent 6802b1f0
Branches
Tags
No related merge requests found
...@@ -252,8 +252,12 @@ function plotGraph(data) ...@@ -252,8 +252,12 @@ function plotGraph(data)
$(document).ready(function() { $(document).ready(function() {
var statsurl = "{% url routestats route.name %}"; var statsurl = "{% url routestats route.name %}";
$.get(statsurl).done(function(data) { $.get(statsurl).done(function(data) {
$("#traffic-plot-loading").hide(); if (data["error"]) {
plotGraph(data); $("#traffic-plot-loading").text("No data, try later");
} else {
$("#traffic-plot-loading").hide();
plotGraph(data);
}
}); });
}); });
</script> </script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment