diff options
Diffstat (limited to 'modules/admin-full/luasrc/view/admin_status/bandwidth.htm')
-rw-r--r-- | modules/admin-full/luasrc/view/admin_status/bandwidth.htm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/admin-full/luasrc/view/admin_status/bandwidth.htm b/modules/admin-full/luasrc/view/admin_status/bandwidth.htm index da6837370..b8a21bd33 100644 --- a/modules/admin-full/luasrc/view/admin_status/bandwidth.htm +++ b/modules/admin-full/luasrc/view/admin_status/bandwidth.htm @@ -188,11 +188,14 @@ $Id$ continue; /* normalize difference against time interval */ - var time_delta = data[i][TIME] - data[i-1][TIME]; - if (time_delta) + if (i > 0) + { + var time_delta = data[i][TIME] - data[i-1][TIME]; + if (time_delta) { - data_rx.push((data[i][RXB] - data[i-1][RXB]) / time_delta); - data_tx.push((data[i][TXB] - data[i-1][TXB]) / time_delta); + data_rx.push((data[i][RXB] - data[i-1][RXB]) / time_delta); + data_tx.push((data[i][TXB] - data[i-1][TXB]) / time_delta); + } } } |