Merge branch 'feat/saas' of github.com:bluewave-labs/Checkmate into feat/saas
This commit is contained in:
commit
4d7c5ca885
4 files changed
+15
-5
No files matched your search
@@ -65,13 +65,15 @@ export const Breadcrumb = ({
|
|||||||
const last = index === pathnames.length - 1;
|
const last = index === pathnames.length - 1;
|
||||||
const to = `/${pathnames.slice(0, index + 1).join("/")}`;
|
const to = `/${pathnames.slice(0, index + 1).join("/")}`;
|
||||||
|
|
||||||
let displayName =
|
let displayName = "";
|
||||||
t(`common.breadcrumbs.${value}`) ||
|
|
||||||
value.charAt(0).toUpperCase() + value.slice(1);
|
|
||||||
|
|
||||||
// Paths that are IDs should be detail pages
|
// Paths that are IDs should be detail pages
|
||||||
if (value.length === 24 || value.match(/^[a-f0-9-]{36}$/)) {
|
if (value.length === 24 || value.match(/^[a-f0-9-]{36}$/)) {
|
||||||
displayName = "Details";
|
displayName = "Details";
|
||||||
|
} else {
|
||||||
|
displayName =
|
||||||
|
t(`common.breadcrumbs.${value}`) ||
|
||||||
|
value.charAt(0).toUpperCase() + value.slice(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return last ? (
|
return last ? (
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { BaseChart } from "@/components/monitors/Chart";
|
import { BaseChart } from "@/components/monitors/Chart";
|
||||||
import { TrendingUp } from "lucide-react";
|
import { TrendingUp } from "lucide-react";
|
||||||
|
import { XTick } from "./ChartResponseTime";
|
||||||
import {
|
import {
|
||||||
|
XAxis,
|
||||||
AreaChart,
|
AreaChart,
|
||||||
Area,
|
Area,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
@@ -48,8 +50,10 @@ const config: Record<string, ConfigItem> = {
|
|||||||
|
|
||||||
export const HistogramPageSpeedScores = ({
|
export const HistogramPageSpeedScores = ({
|
||||||
checks,
|
checks,
|
||||||
|
range,
|
||||||
}: {
|
}: {
|
||||||
checks: GroupedCheck[];
|
checks: GroupedCheck[];
|
||||||
|
range: string;
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
@@ -59,6 +63,10 @@ export const HistogramPageSpeedScores = ({
|
|||||||
>
|
>
|
||||||
<ResponsiveContainer width="100%" minWidth={25} height={215}>
|
<ResponsiveContainer width="100%" minWidth={25} height={215}>
|
||||||
<AreaChart data={checks}>
|
<AreaChart data={checks}>
|
||||||
|
<XAxis
|
||||||
|
dataKey={"_id"}
|
||||||
|
tick={(props) => <XTick {...props} range={range} />}
|
||||||
|
/>
|
||||||
<CartesianGrid
|
<CartesianGrid
|
||||||
stroke={theme.palette.divider}
|
stroke={theme.palette.divider}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
|
|||||||
@@ -82,13 +82,13 @@ export const HistogramStatus = ({
|
|||||||
const normalChecks = normalizeResponseTimes(checks, "avgResponseTime");
|
const normalChecks = normalizeResponseTimes(checks, "avgResponseTime");
|
||||||
|
|
||||||
const CustomTooltip = ({ active, payload }: any) => {
|
const CustomTooltip = ({ active, payload }: any) => {
|
||||||
|
const uiTimezone = useAppSelector((state: any) => state.ui.timezone);
|
||||||
if (!active || !payload?.length) return null;
|
if (!active || !payload?.length) return null;
|
||||||
const d = payload[0]?.payload as GroupedCheck & {
|
const d = payload[0]?.payload as GroupedCheck & {
|
||||||
avgResponseTime?: number;
|
avgResponseTime?: number;
|
||||||
};
|
};
|
||||||
const avg = d?.avgResponseTime ?? 0;
|
const avg = d?.avgResponseTime ?? 0;
|
||||||
const titleText = t("common.charts.uptime.avgResponseTime");
|
const titleText = t("common.charts.uptime.avgResponseTime");
|
||||||
const uiTimezone = useAppSelector((state: any) => state.ui.timezone);
|
|
||||||
const fmt = range === "30d" ? "MMM D, YYYY" : "ddd, MMM D, YYYY, h:mm A";
|
const fmt = range === "30d" ? "MMM D, YYYY" : "ddd, MMM D, YYYY, h:mm A";
|
||||||
let dateLabel = "";
|
let dateLabel = "";
|
||||||
if (d?._id) {
|
if (d?._id) {
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ const PageSpeedDetailsPage = () => {
|
|||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<HeaderRange loading={isValidating} range={range} setRange={setRange} />
|
<HeaderRange loading={isValidating} range={range} setRange={setRange} />
|
||||||
<HistogramPageSpeedScores checks={checks} />
|
<HistogramPageSpeedScores checks={checks} range={range} />
|
||||||
<Stack direction={isSmall ? "column" : "row"} gap={theme.spacing(10)}>
|
<Stack direction={isSmall ? "column" : "row"} gap={theme.spacing(10)}>
|
||||||
<ChartPageSpeedReport latestCheck={checks?.[0]} />
|
<ChartPageSpeedReport latestCheck={checks?.[0]} />
|
||||||
<ChartPageSpeedReportLegend latestCheck={checks?.[0]} />
|
<ChartPageSpeedReportLegend latestCheck={checks?.[0]} />
|
||||||
|
|||||||
Reference in new issue
Block a user