mirror of
https://github.com/longsleep/realtimetraffic.git
synced 2025-01-03 11:22:14 +01:00
Use 5s average and disable difference by default
This commit is contained in:
parent
09bd577ecd
commit
801683b17d
2 changed files with 5 additions and 5 deletions
2
client/static/css/rickshaw.min.css
vendored
2
client/static/css/rickshaw.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -43,10 +43,10 @@
|
||||||
renderer: "multi",
|
renderer: "multi",
|
||||||
interpolation: "cardinal",
|
interpolation: "cardinal",
|
||||||
series: new Rickshaw.Series.FixedDuration([
|
series: new Rickshaw.Series.FixedDuration([
|
||||||
{ name: 'rx_tx_abs_diff', color: "wheat", renderer: "bar" },
|
{ name: 'rx_tx_abs_diff', color: "wheat", renderer: "bar", disabled: true },
|
||||||
|
{ name: 'rx_tx_combined', color: "mistyrose", renderer: "line" },
|
||||||
{ name: 'rx_kbits', color: "mediumslateblue", renderer: "line" },
|
{ name: 'rx_kbits', color: "mediumslateblue", renderer: "line" },
|
||||||
{ name: 'tx_kbits', color: "lightcoral", renderer: "line" },
|
{ name: 'tx_kbits', color: "lightcoral", renderer: "line" },
|
||||||
{ name: 'rx_tx_combined', color: "mistyrose", renderer: "line" }
|
|
||||||
], undefined, {
|
], undefined, {
|
||||||
timeInterval: this.tv,
|
timeInterval: this.tv,
|
||||||
maxDataPoints: 100,
|
maxDataPoints: 100,
|
||||||
|
@ -150,10 +150,10 @@
|
||||||
};
|
};
|
||||||
d.rx_tx_combined = d.rx_kbits + d.tx_kbits;
|
d.rx_tx_combined = d.rx_kbits + d.tx_kbits;
|
||||||
d.rx_tx_abs_diff = Math.abs(d.rx_kbits - d.tx_kbits);
|
d.rx_tx_abs_diff = Math.abs(d.rx_kbits - d.tx_kbits);
|
||||||
if (that.history.rx_bytes.length > 1) {
|
if (that.history.rx_bytes.length >= 5) {
|
||||||
that.history.rx_bytes.shift();
|
that.history.rx_bytes.shift();
|
||||||
}
|
}
|
||||||
if (that.history.tx_bytes.length > 1) {
|
if (that.history.tx_bytes.length >= 5) {
|
||||||
that.history.tx_bytes.shift();
|
that.history.tx_bytes.shift();
|
||||||
}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
Loading…
Reference in a new issue