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