4 files changed
+7
-7
No files matched your search
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "client",
|
"name": "client",
|
||||||
"version": "3.7.0",
|
"version": "3.7.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "client",
|
"name": "client",
|
||||||
"version": "3.7.0",
|
"version": "3.7.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.13.3",
|
"@emotion/react": "^11.13.3",
|
||||||
"@emotion/styled": "^11.13.0",
|
"@emotion/styled": "^11.13.0",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "client",
|
"name": "client",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "3.7.0",
|
"version": "3.7.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ export const ThemedHeatmap = ({ checks, containerSx, cellSx }: Props) => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const uiTimezone = useSelector((state: RootState) => state.ui.timezone);
|
const uiTimezone = useSelector((state: RootState) => state.ui.timezone);
|
||||||
|
|
||||||
const source = checks.slice(0, CELLS).reverse();
|
const source = checks.slice(-CELLS);
|
||||||
const padded: (CheckSnapshot | null)[] = [
|
const padded: (CheckSnapshot | null)[] = [
|
||||||
...Array.from({ length: Math.max(0, CELLS - source.length) }, () => null),
|
|
||||||
...source,
|
...source,
|
||||||
|
...Array.from({ length: Math.max(0, CELLS - source.length) }, () => null),
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ export const ThemedHistogram = ({
|
|||||||
const uiTimezone = useSelector((state: RootState) => state.ui.timezone);
|
const uiTimezone = useSelector((state: RootState) => state.ui.timezone);
|
||||||
|
|
||||||
const { padded, max, avg, peak } = useMemo(() => {
|
const { padded, max, avg, peak } = useMemo(() => {
|
||||||
const source = checks.slice(0, CELLS).reverse();
|
const source = checks.slice(-CELLS);
|
||||||
const out: (CheckSnapshot | null)[] = [
|
const out: (CheckSnapshot | null)[] = [
|
||||||
...Array.from({ length: Math.max(0, CELLS - source.length) }, () => null),
|
|
||||||
...source,
|
...source,
|
||||||
|
...Array.from({ length: Math.max(0, CELLS - source.length) }, () => null),
|
||||||
];
|
];
|
||||||
const valid = out.filter((c): c is CheckSnapshot => c !== null && c.responseTime > 0);
|
const valid = out.filter((c): c is CheckSnapshot => c !== null && c.responseTime > 0);
|
||||||
const maxRt = valid.length ? Math.max(...valid.map((c) => c.responseTime)) : 1;
|
const maxRt = valid.length ? Math.max(...valid.map((c) => c.responseTime)) : 1;
|
||||||
|
|||||||
Reference in new issue
Block a user