mirror of
https://github.com/openziti/zrok.git
synced 2025-06-24 19:51:32 +02:00
lint
This commit is contained in:
parent
ce4eac8e4c
commit
714b0b11d1
@ -21,7 +21,7 @@ const MetricsTab = (props) => {
|
|||||||
.then(resp => {
|
.then(resp => {
|
||||||
setMetrics1(buildMetrics(resp.data));
|
setMetrics1(buildMetrics(resp.data));
|
||||||
});
|
});
|
||||||
}, []);
|
}, [props.selection.id]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let mounted = true;
|
let mounted = true;
|
||||||
@ -45,7 +45,7 @@ const MetricsTab = (props) => {
|
|||||||
mounted = false;
|
mounted = false;
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
}, []);
|
}, [props.selection.id]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MetricsView metrics30={metrics30} metrics7={metrics7} metrics1={metrics1} />
|
<MetricsView metrics30={metrics30} metrics7={metrics7} metrics1={metrics1} />
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {Col, Container, Row, Tooltip} from "react-bootstrap";
|
import {Col, Container, Row} from "react-bootstrap";
|
||||||
import {bytesToSize} from "./util";
|
import {bytesToSize} from "./util";
|
||||||
import {Bar, BarChart, CartesianGrid, ResponsiveContainer, XAxis, YAxis} from "recharts";
|
import {Area, AreaChart, CartesianGrid, ResponsiveContainer, XAxis, YAxis} from "recharts";
|
||||||
import moment from "moment/moment";
|
import moment from "moment/moment";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@ -46,14 +46,13 @@ const MetricsGraph = (props) => {
|
|||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<ResponsiveContainer width={"100%"} height={150}>
|
<ResponsiveContainer width={"100%"} height={150}>
|
||||||
<BarChart data={props.metrics.data}>
|
<AreaChart data={props.metrics.data}>
|
||||||
<CartesianGrid strokeDasharay={"3 3"} />
|
<CartesianGrid strokeDasharay={"3 3"} />
|
||||||
<XAxis dataKey={(v) => v.timestamp} scale={"time"} tickFormatter={(v) => moment(v).format("MMM DD") } style={{ fontSize: '75%'}}/>
|
<XAxis dataKey={(v) => v.timestamp} scale={"time"} tickFormatter={(v) => moment(v).format("MMM DD") } style={{ fontSize: '75%'}}/>
|
||||||
<YAxis tickFormatter={(v) => bytesToSize(v)} style={{ fontSize: '75%' }}/>
|
<YAxis tickFormatter={(v) => bytesToSize(v)} style={{ fontSize: '75%' }}/>
|
||||||
<Bar stroke={"#231069"} fill={"#04adef"} dataKey={(v) => v.rx ? v.rx : 0} />
|
<Area type={"basis"} stroke={"#231069"} fill={"#9BF316"} dataKey={(v) => v.tx ? v.tx : 0} stackId={"1"} />
|
||||||
<Bar stroke={"#231069"} fill={"#9BF316"} dataKey={(v) => v.tx ? v.tx : 0} />
|
<Area type={"basis"} stroke={"#231069"} fill={"#04adef"} dataKey={(v) => v.rx ? v.rx : 0} stackId={"1"} />
|
||||||
<Tooltip />
|
</AreaChart>
|
||||||
</BarChart>
|
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -48,6 +48,8 @@ const Network = (props) => {
|
|||||||
case "account":
|
case "account":
|
||||||
nodeIcon.addPath(accountIcon, xform);
|
nodeIcon.addPath(accountIcon, xform);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.fill(nodeIcon);
|
ctx.fill(nodeIcon);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user