assert 0 if no quality data is available

This commit is contained in:
Dominik Heidler 2015-11-08 21:58:51 +01:00
parent 9cf93e8c18
commit 8bb4c8ce82
3 changed files with 12 additions and 10 deletions

View File

@ -25,3 +25,12 @@ table.neighbours {
.panel-heading {
padding: 6px 12px;
}
.graph {
height: 200px;
width: 100%;
}
.graph .legendLabel {
padding-left: 5px;
padding-right: 7px;
}

View File

@ -81,9 +81,10 @@ function neighbour_graph(neighbours) {
try {
var quality = router_stats[i].neighbours[mac];
var date_value = router_stats[i].time.$date;
if(quality != null) {
data.push([date_value, quality]);
if(quality == null) {
quality = 0;
}
data.push([date_value, quality]);
}
catch(TypeError) {
// pass

View File

@ -12,14 +12,6 @@
<script src="{{ url_for('static', filename='js/graph/jquery.flot.resize.js') }}"></script>
<script src="{{ url_for('static', filename='js/graph.js') }}"></script>
<style type="text/css">
.graph {
height: 200px;
width: 100%;
}
.graph .legendLabel {
padding-left: 5px;
padding-right: 7px;
}
#map {
height: 405px;
width: 100%;