diff --git a/src/rust/lqosd/src/node_manager/js_build/src/graphs/flows_graph.js b/src/rust/lqosd/src/node_manager/js_build/src/graphs/flows_graph.js index 9c75b187..df0bd2bc 100644 --- a/src/rust/lqosd/src/node_manager/js_build/src/graphs/flows_graph.js +++ b/src/rust/lqosd/src/node_manager/js_build/src/graphs/flows_graph.js @@ -1,6 +1,6 @@ import {DashboardGraph} from "./dashboard_graph"; -import {scaleNumber} from "../lq_js_common/helpers/scaling"; import {GraphOptionsBuilder} from "../lq_js_common/e_charts/chart_builder"; +import {RingBuffer} from "../lq_js_common/helpers/ringbuffer"; const RING_SIZE = 60 * 5; // 5 Minutes @@ -35,35 +35,4 @@ export class FlowCountGraph extends DashboardGraph { this.chart.setOption(this.option); } -} - -class RingBuffer { - constructor(size) { - this.size = size; - let data = []; - for (let i=0; i { - return Math.abs(val) + "%"; - }, - } - }, - series: [ + this.option.legend = { + orient: "horizontal", + right: 10, + top: "bottom", + selectMode: false, + data: [ { - name: 'Download', - data: [], - type: 'line', - symbol: 'none', + name: "Download", + icon: 'circle', }, { - name: 'Upload', - data: [], - type: 'line', - symbol: 'none', + name: "Upload", + icon: 'circle', }, ], - tooltip: { - trigger: 'item', + textStyle: { + color: '#aaa' }, - animation: false, - } + }; + this.option.series = [ + { + name: 'Download', + data: [], + type: 'line', + symbol: 'none', + }, + { + name: 'Upload', + data: [], + type: 'line', + symbol: 'none', + }, + ]; this.option && this.chart.setOption(this.option); } @@ -87,35 +69,4 @@ export class RetransmitsGraph extends DashboardGraph { this.chart.setOption(this.option); } -} - -class RingBuffer { - constructor(size) { - this.size = size; - let data = []; - for (let i=0; i