mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-12 22:41:01 +00:00
Add minimum scales for memory and bandwidth (#103)
This commit is contained in:
@@ -31,6 +31,8 @@ import unknownImplementationIcon from '../../icons/question-solid.svg';
|
||||
import './Row.css';
|
||||
|
||||
const SEMVER_PATTERN = /^\d+\.\d+\.\d+/;
|
||||
const BANDWIDTH_SCALE = 1024 * 1024;
|
||||
const MEMORY_SCALE = 2 * 1024 * 1024;
|
||||
|
||||
export namespace Row {
|
||||
export interface Props {
|
||||
@@ -183,7 +185,7 @@ export class Row extends React.Component<Row.Props, Row.State> {
|
||||
}
|
||||
|
||||
return (
|
||||
<Sparkline width={44} height={16} stroke={1} format={formatMemory} values={mem} stamps={chartstamps} />
|
||||
<Sparkline width={44} height={16} stroke={1} format={formatMemory} values={mem} stamps={chartstamps} minScale={MEMORY_SCALE} />
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -198,7 +200,7 @@ export class Row extends React.Component<Row.Props, Row.State> {
|
||||
}
|
||||
|
||||
return (
|
||||
<Sparkline width={44} height={16} stroke={1} format={formatBandwidth} values={upload} stamps={chartstamps} />
|
||||
<Sparkline width={44} height={16} stroke={1} format={formatBandwidth} values={upload} stamps={chartstamps} minScale={BANDWIDTH_SCALE} />
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -213,7 +215,7 @@ export class Row extends React.Component<Row.Props, Row.State> {
|
||||
}
|
||||
|
||||
return (
|
||||
<Sparkline width={44} height={16} stroke={1} format={formatBandwidth} values={download} stamps={chartstamps} />
|
||||
<Sparkline width={44} height={16} stroke={1} format={formatBandwidth} values={download} stamps={chartstamps} minScale={BANDWIDTH_SCALE} />
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16"><path d="M8.1 6.9l-2.9 4.7h5.6z"/><path fill="none" stroke="#fff" stroke-width=".3" stroke-miterlimit="10" d="M8.1 1.9L.9 14.1h14.2z"/><circle cx="8" cy="1.9" r="1"/><circle cx="15" cy="14.1" r="1"/><circle cx="1" cy="14.1" r="1"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16"><path d="M8.1 6.9l-2.9 4.7h5.6z"/><path fill="none" stroke-width=".3" stroke="currentColor" stroke-miterlimit="10" d="M8.1 1.9L.9 14.1h14.2z"/><circle cx="8" cy="1.9" r="1"/><circle cx="15" cy="14.1" r="1"/><circle cx="1" cy="14.1" r="1"/></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 349 B |
Reference in New Issue
Block a user