Line data Source code
1 : /*
2 : * Copyright (C) 2020 Red Hat, Inc.
3 : * SPDX-License-Identifier: LGPL-2.1-or-later
4 : */
5 :
6 1 : import React from "react";
7 :
8 : import { Split, SplitItem } from "@patternfly/react-core/dist/esm/layouts/Split/index.js";
9 : import { Grid, GridItem } from "@patternfly/react-core/dist/esm/layouts/Grid/index.js";
10 : import { ZoomControls, SvgPlot, bits_per_sec_config } from "cockpit-components-plot.jsx";
11 :
12 1 : import cockpit from "cockpit";
13 1 : const _ = cockpit.gettext;
14 :
15 1 : export const NetworkPlots = ({ plot_state }) => {
16 1 : return (
17 1 : <>
18 1 : <Split>
19 1 : <SplitItem isFilled />
20 1 : <SplitItem><ZoomControls plot_state={plot_state} /></SplitItem>
21 1 : </Split>
22 1 : <Grid sm={12} md={6} lg={6} hasGutter>
23 1 : <GridItem>
24 1 : <SvgPlot className="network-graph"
25 1 : title={_("Transmitting")} config={bits_per_sec_config}
26 1 : plot_state={plot_state} plot_id='tx' />
27 1 : </GridItem>
28 1 : <GridItem>
29 1 : <SvgPlot className="network-graph"
30 1 : title={_("Receiving")} config={bits_per_sec_config}
31 1 : plot_state={plot_state} plot_id='rx' />
32 1 : </GridItem>
33 1 : </Grid>
34 1 : </>);
35 1 : };
|