Merge branch 'develop' into feat/status-page-themes-backend

This commit is contained in:
Alex Holliday committed 2026-04-29 11:35:55 -07:00
commit f4c3ee16db
42 files changed
+557 -389

No files matched your search

+6 -5
View File
@@ -25,7 +25,7 @@ cd server
npm install npm install
npm run dev # Start with hot-reload (nodemon + tsx) at http://localhost:52345 npm run dev # Start with hot-reload (nodemon + tsx) at http://localhost:52345
npm run build # TypeScript compile + path alias resolution npm run build # TypeScript compile + path alias resolution
npm run test # Run Mocha tests with c8 coverage npm run test # Run Jest tests with coverage
npm run lint # ESLint v9 npm run lint # ESLint v9
npm run lint-fix # Auto-fix lint issues npm run lint-fix # Auto-fix lint issues
npm run format # Prettier formatting npm run format # Prettier formatting
@@ -174,12 +174,13 @@ t('your.key') // Never hardcode UI strings
- Both use ESLint with strict settings - Both use ESLint with strict settings
### Testing ### Testing
Server tests use Mocha + Chai + Sinon: Server tests use Jest (with `--experimental-vm-modules` for ESM):
```bash ```bash
npm test # Run all tests with coverage npm test # Run all tests with coverage
npm test -- --grep "pattern" # Run specific tests npm test -- -t "pattern" # Run tests matching name pattern
npm test -- path/to/file.test.ts # Run a specific file
``` ```
Test files: `server/tests/**/*.test.js` Test files: `server/test/**/*.test.ts`
## Database Models ## Database Models
+2 -16
View File
@@ -255,20 +255,6 @@ docker rm uptime_database_mongo
Start with [good first issues](https://github.com/bluewave-labs/checkmate/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). Start with [good first issues](https://github.com/bluewave-labs/checkmate/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
### Improve the documentation?
Docs live in [checkmate-documentation](https://github.com/bluewave-labs/checkmate-documentation). You can fix typos, add guides, or explain features better.
### Help with translations?
We use [PoEditor](https://poeditor.com) for translations. You can:
- [Sign up and join your language team](https://poeditor.com/join/project/lRUoGZFCsJ).
- Translate UI strings.
- Ask questions on Discord in the relevant #translations channel.
Make sure all new UI strings in code use `t('key')`.
### Submit a pull request? ### Submit a pull request?
Follow the [pull request checklist](#pull-request-checklist). Your PR should: Follow the [pull request checklist](#pull-request-checklist). Your PR should:
@@ -283,7 +269,7 @@ Follow the [pull request checklist](#pull-request-checklist). Your PR should:
## Code guidelines ## Code guidelines
- Use ESLint and Prettier (`npm run lint`). - Use ESLint and Prettier. Run `npm run lint` and `npm run format-check` in both `client` and `server`. If `format-check` reports issues, fix them with `npm run format` before committing.
- Follow naming conventions: `camelCase` for variables, `PascalCase` for components, `UPPER_CASE` for constants. - Follow naming conventions: `camelCase` for variables, `PascalCase` for components, `UPPER_CASE` for constants.
- No hard-coded strings — use `t('your.key')` for everything visible. - No hard-coded strings — use `t('your.key')` for everything visible.
- Use the shared theme and components. No magic numbers or hardcoded styles. - Use the shared theme and components. No magic numbers or hardcoded styles.
@@ -304,7 +290,7 @@ Before submitting your pull request, please confirm the following:
- You used the shared theme for any styling — no magic numbers or inline styles. - You used the shared theme for any styling — no magic numbers or inline styles.
- The pull request addresses only one issue or topic. - The pull request addresses only one issue or topic.
- You added screenshots or a video for any UI-related changes. - You added screenshots or a video for any UI-related changes.
- Your code passes linting and has no TypeScript errors. - Your code passes `npm run lint`, `npm run format-check`, and `npm run build` in both `client` and `server` with no errors.
If one or more of these are missing, we may ask you to update your pull request before we can merge it. If one or more of these are missing, we may ask you to update your pull request before we can merge it.
-5
View File
@@ -180,8 +180,3 @@ Here's how you can contribute:
[![Star History Chart](https://api.star-history.com/svg?repos=bluewave-labs/checkmate&type=Date)](https://star-history.com/#bluewave-labs/Checkmate&Date) [![Star History Chart](https://api.star-history.com/svg?repos=bluewave-labs/checkmate&type=Date)](https://star-history.com/#bluewave-labs/Checkmate&Date)
## Our sponsors
Thanks to [Gitbook](https://gitbook.io/) for giving us a free tier for their documentation platform, and [Poeditor](https://poeditor.com/) providing us a free account to use their i18n services. If you would like to sponsor Checkmate, please send an email to hello@bluewavelabs.ca
If you would like to sponsor a feature, [see this page](https://checkmate.so/sponsored-features).
@@ -9,13 +9,14 @@ import {
EmptyMonitorFallback, EmptyMonitorFallback,
} from "@/Components/design-elements/Fallback"; } from "@/Components/design-elements/Fallback";
import { EmptyState } from "@/Components/design-elements/EmptyState"; import { EmptyState } from "@/Components/design-elements/EmptyState";
import { NoticeBanner } from "@/Components/design-elements/NoticeBanner";
import { Breadcrumb } from "@/Components/design-elements/Breadcrumb"; import { Breadcrumb } from "@/Components/design-elements/Breadcrumb";
import { PageHeader } from "@/Components/design-elements/PageHeader"; import { PageHeader } from "@/Components/design-elements/PageHeader";
import CircularProgress from "@mui/material/CircularProgress"; import CircularProgress from "@mui/material/CircularProgress";
import { LanguageSelector, SwitchTheme } from "@/Components/inputs"; import { LanguageSelector, SwitchTheme } from "@/Components/inputs";
import type { StackProps } from "@mui/material/Stack"; import type { StackProps } from "@mui/material/Stack";
import { useTheme, alpha } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Link as RouterLink } from "react-router-dom"; import { Link as RouterLink } from "react-router-dom";
import { Typography } from "@mui/material"; import { Typography } from "@mui/material";
@@ -23,60 +24,30 @@ import { Typography } from "@mui/material";
export const PageSpeedKeyPriorityFallback = () => { export const PageSpeedKeyPriorityFallback = () => {
const theme = useTheme(); const theme = useTheme();
const { t } = useTranslation(); const { t } = useTranslation();
const alertBg = alpha(theme.palette.warning.main, 0.08);
const alertBorder = alpha(theme.palette.warning.main, 0.45);
const alertIcon = theme.palette.warning.main;
return ( return (
<EmptyState <EmptyState
fullscreen fullscreen
title={t("pages.pageSpeed.fallback.title")} title={t("pages.pageSpeed.fallback.title")}
description={t("pages.pageSpeed.fallback.description")} description={t("pages.pageSpeed.fallback.description")}
alert={ alert={
<Stack <NoticeBanner severity="warning">
direction="row" <Trans
alignItems="flex-start" i18nKey="common.alerts.pageSpeedApiKey.content"
gap={theme.spacing(LAYOUT.SM)} components={{
sx={{ settingsLink: (
width: "100%", <Link
p: theme.spacing(LAYOUT.MD), component={RouterLink}
borderRadius: 1, to="/settings"
border: `1px solid ${alertBorder}`, color={theme.palette.primary.main}
backgroundColor: alertBg, fontWeight={600}
textAlign: "left", sx={{
}} textDecoration: "underline",
> }}
<Box />
component="span" ),
sx={{
color: alertIcon,
fontSize: 18,
lineHeight: 1,
mt: "2px",
}} }}
> />
⚠ </NoticeBanner>
</Box>
<Typography
sx={{ color: theme.palette.text.primary, lineHeight: 1.55, fontSize: 13 }}
>
<Trans
i18nKey="common.alerts.pageSpeedApiKey.content"
components={{
settingsLink: (
<Link
component={RouterLink}
to="/settings"
sx={{
color: theme.palette.primary.main,
fontWeight: 600,
textDecoration: "underline",
}}
/>
),
}}
/>
</Typography>
</Stack>
} }
/> />
); );
@@ -17,7 +17,7 @@ export const MonitorStatus = ({ monitor }: { monitor: Monitor }) => {
return ( return (
<Stack> <Stack>
<Typography <Typography
fontSize={typographyLevels.xl} fontSize={typographyLevels.xxl}
fontWeight={500} fontWeight={500}
overflow={"hidden"} overflow={"hidden"}
textOverflow={"ellipsis"} textOverflow={"ellipsis"}
@@ -0,0 +1,55 @@
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import { useTheme, alpha } from "@mui/material/styles";
import { LAYOUT } from "@/Utils/Theme/constants";
import { typographyLevels } from "@/Utils/Theme/Palette";
export const Severities = ["info", "warning", "error"] as const;
export type Severity = (typeof Severities)[number];
const SEVERITY_GLYPH: Record<Severity, string> = {
info: "ⓘ",
warning: "⚠",
error: "✕",
};
interface NoticeBannerProps {
severity?: Severity;
children: React.ReactNode;
}
export const NoticeBanner = ({ severity = "info", children }: NoticeBannerProps) => {
const theme = useTheme();
const tone = theme.palette[severity].main;
return (
<Stack
direction="row"
alignItems="flex-start"
gap={theme.spacing(LAYOUT.SM)}
width={"100%"}
p={theme.spacing(LAYOUT.MD)}
borderRadius={theme.shape.borderRadius}
border={`1px solid ${alpha(tone, 0.45)}`}
bgcolor={alpha(tone, 0.08)}
textAlign={"left"}
>
<Box
component="span"
color={tone}
fontSize={typographyLevels.xl}
lineHeight={1}
mt={LAYOUT.XXS}
aria-hidden
>
{SEVERITY_GLYPH[severity]}
</Box>
<Typography
color={theme.palette.text.primary}
lineHeight={1.55}
>
{children}
</Typography>
</Stack>
);
};
@@ -53,7 +53,7 @@ export const ConfigBox = ({
rightContent, rightContent,
}: { }: {
title: string; title: string;
subtitle: string; subtitle: React.ReactNode;
leftContent?: React.ReactNode; leftContent?: React.ReactNode;
rightContent: React.ReactNode; rightContent: React.ReactNode;
}) => { }) => {
@@ -22,5 +22,6 @@ export * from "./Gauge";
export * from "./Tabs"; export * from "./Tabs";
export * from "./SplitBox"; export * from "./SplitBox";
export * from "./TextLink"; export * from "./TextLink";
export * from "./NoticeBanner";
export * from "./OfflineBanner"; export * from "./OfflineBanner";
export * from "./Avatar"; export * from "./Avatar";
+31 -9
View File
@@ -1,19 +1,43 @@
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import type { ButtonProps } from "@mui/material/Button"; import type { ButtonProps } from "@mui/material/Button";
import { useTheme } from "@mui/material/styles"; import { useTheme, darken } from "@mui/material/styles";
import { HOVER } from "@/Utils/Theme/constants";
const PALETTE_COLORS = [
"primary",
"secondary",
"error",
"warning",
"info",
"success",
] as const;
type PaletteColor = (typeof PALETTE_COLORS)[number];
export const ButtonInput = ({ sx, ...props }: ButtonProps) => { export const ButtonInput = ({ sx, ...props }: ButtonProps) => {
const theme = useTheme(); const theme = useTheme();
const outlinedSx =
const hoverOverrides: Record<string, unknown> = { boxShadow: "none" };
if (props.variant === "outlined") {
hoverOverrides.borderColor = theme.palette.text.secondary;
}
if (props.variant === "contained") {
const colorKey = (props.color ?? "primary") as PaletteColor;
const palette = theme.palette[colorKey];
if (palette && typeof palette === "object" && "main" in palette) {
hoverOverrides.backgroundColor = darken(palette.main, HOVER.DARKEN);
}
}
const variantSx =
props.variant === "outlined" props.variant === "outlined"
? { ? {
color: theme.palette.text.primary, color: theme.palette.text.primary,
borderColor: theme.palette.divider, borderColor: theme.palette.divider,
"&:hover": {
borderColor: theme.palette.text.secondary,
},
} }
: {}; : {};
return ( return (
<Button <Button
{...props} {...props}
@@ -26,10 +50,8 @@ export const ButtonInput = ({ sx, ...props }: ButtonProps) => {
textOverflow: "ellipsis", textOverflow: "ellipsis",
overflow: "hidden", overflow: "hidden",
boxShadow: "none", boxShadow: "none",
"&:hover": { "&:hover": hoverOverrides,
boxShadow: "none", ...variantSx,
},
...outlinedSx,
...sx, ...sx,
}} }}
/> />
+45 -12
View File
@@ -2,10 +2,12 @@ import Dialog from "@mui/material/Dialog";
import type { DialogProps } from "@mui/material/Dialog"; import type { DialogProps } from "@mui/material/Dialog";
import DialogActions from "@mui/material/DialogActions"; import DialogActions from "@mui/material/DialogActions";
import DialogContent from "@mui/material/DialogContent"; import DialogContent from "@mui/material/DialogContent";
import DialogContentText from "@mui/material/DialogContentText";
import DialogTitle from "@mui/material/DialogTitle"; import DialogTitle from "@mui/material/DialogTitle";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import { Button } from "@/Components/inputs"; import { Button } from "@/Components/inputs";
import { typographyLevels } from "@/Utils/Theme/Palette"; import { LAYOUT } from "@/Utils/Theme/constants";
import { useTheme } from "@mui/material/styles";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import type { ReactNode } from "react"; import type { ReactNode } from "react";
@@ -16,7 +18,6 @@ export const DialogInput = ({
onConfirm, onConfirm,
onCancel, onCancel,
confirmColor = "primary", confirmColor = "primary",
cancelColor = "error",
loading = false, loading = false,
cancelText, cancelText,
confirmText, confirmText,
@@ -31,7 +32,6 @@ export const DialogInput = ({
onConfirm?(item: any): any; onConfirm?(item: any): any;
onCancel?(item: any): any; onCancel?(item: any): any;
confirmColor?: "error" | "primary"; confirmColor?: "error" | "primary";
cancelColor?: "error" | "primary";
loading?: boolean; loading?: boolean;
cancelText?: string; cancelText?: string;
confirmText?: string; confirmText?: string;
@@ -41,6 +41,7 @@ export const DialogInput = ({
additionalButtons?: ReactNode; additionalButtons?: ReactNode;
}) => { }) => {
const { t } = useTranslation(); const { t } = useTranslation();
const theme = useTheme();
return ( return (
<Dialog <Dialog
open={open} open={open}
@@ -50,16 +51,48 @@ export const DialogInput = ({
if (reason !== "backdropClick" && onCancel) onCancel(undefined); if (reason !== "backdropClick" && onCancel) onCancel(undefined);
}} }}
> >
{title && <DialogTitle sx={{ fontSize: typographyLevels.l }}>{title}</DialogTitle>} {title && (
<DialogContent> <DialogTitle
{content && <DialogContentText>{content}</DialogContentText>} pb={theme.spacing(LAYOUT.XS)}
{children} bgcolor={theme.palette.action.hover}
</DialogContent> borderBottom={`1px solid ${theme.palette.divider}`}
<DialogActions> >
<Typography
component="span"
variant="h2"
fontWeight={600}
display={"block"}
>
{title}
</Typography>
{content && (
<Typography
variant="body1"
color={theme.palette.text.secondary}
mt={theme.spacing(LAYOUT.XS)}
display={"block"}
>
{content}
</Typography>
)}
</DialogTitle>
)}
{children && (
<DialogContent sx={{ pt: theme.spacing(LAYOUT.MD) }}>
<Box pt={theme.spacing(LAYOUT.XS)}>{children}</Box>
</DialogContent>
)}
<DialogActions
sx={{
p: theme.spacing(LAYOUT.MD),
pt: theme.spacing(LAYOUT.SM),
backgroundColor: theme.palette.action.hover,
borderTop: `1px solid ${theme.palette.divider}`,
}}
>
<Button <Button
loading={loading} loading={loading}
variant="contained" variant="outlined"
color={cancelColor}
onClick={onCancel} onClick={onCancel}
> >
{cancelText ?? t("common.buttons.cancel")} {cancelText ?? t("common.buttons.cancel")}
+1 -1
View File
@@ -15,9 +15,9 @@ export const FieldLabel = ({ children, required = false, htmlFor }: FieldLabelPr
return ( return (
<Typography <Typography
component="label" component="label"
variant="body1"
htmlFor={htmlFor} htmlFor={htmlFor}
sx={{ sx={{
fontSize: "14px",
fontWeight: 500, fontWeight: 500,
color: theme.palette.text.secondary, color: theme.palette.text.secondary,
marginBottom: theme.spacing(2), marginBottom: theme.spacing(2),
+35 -28
View File
@@ -5,6 +5,7 @@ import { typographyLevels } from "@/Utils/Theme/Palette";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import { FieldLabel } from "./FieldLabel"; import { FieldLabel } from "./FieldLabel";
import { LAYOUT } from "@/Utils/Theme/constants";
interface TextInputProps extends Omit<TextFieldProps, "label"> { interface TextInputProps extends Omit<TextFieldProps, "label"> {
fieldLabel?: string; fieldLabel?: string;
@@ -12,47 +13,53 @@ interface TextInputProps extends Omit<TextFieldProps, "label"> {
} }
export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(function TextInput( export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(function TextInput(
{ fieldLabel, required, ...props }, { fieldLabel, required, sx, ...props },
ref ref
) { ) {
const theme = useTheme(); const theme = useTheme();
const innerSx = {
width: "100%",
"& .MuiOutlinedInput-root": {
borderRadius: theme.shape.borderRadius,
height: 34,
fontSize: typographyLevels.base,
overflow: "hidden",
},
"& .MuiOutlinedInput-notchedOutline": {
borderColor: theme.palette.divider,
},
"&:hover .MuiOutlinedInput-notchedOutline": {
borderColor: theme.palette.divider,
},
"& .MuiFormHelperText-root": {
marginLeft: 0,
marginRight: 0,
marginTop: theme.spacing(1),
},
"& input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus, & input:-webkit-autofill:active":
{
WebkitBoxShadow: `0 0 0 100px ${theme.palette.background.default} inset !important`,
WebkitTextFillColor: `${theme.palette.text.primary} !important`,
caretColor: theme.palette.text.primary,
transition: "background-color 5000s ease-in-out 0s",
},
};
const input = ( const input = (
<TextField <TextField
{...props} {...props}
inputRef={ref} inputRef={ref}
sx={{ sx={fieldLabel ? innerSx : { ...innerSx, ...sx }}
"& .MuiOutlinedInput-root": {
borderRadius: theme.shape.borderRadius,
height: 34,
fontSize: typographyLevels.base,
overflow: "hidden",
},
"& .MuiOutlinedInput-notchedOutline": {
borderColor: theme.palette.divider,
},
"&:hover .MuiOutlinedInput-notchedOutline": {
borderColor: theme.palette.divider,
},
"& .MuiFormHelperText-root": {
marginLeft: 0,
marginRight: 0,
marginTop: theme.spacing(1),
},
"& input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus, & input:-webkit-autofill:active":
{
WebkitBoxShadow: `0 0 0 100px ${theme.palette.background.default} inset !important`,
WebkitTextFillColor: `${theme.palette.text.primary} !important`,
caretColor: theme.palette.text.primary,
transition: "background-color 5000s ease-in-out 0s",
},
}}
/> />
); );
if (fieldLabel) { if (fieldLabel) {
return ( return (
<Stack spacing={theme.spacing(2)}> <Stack
spacing={theme.spacing(LAYOUT.XXS)}
sx={sx}
>
<FieldLabel required={required}>{fieldLabel}</FieldLabel> <FieldLabel required={required}>{fieldLabel}</FieldLabel>
{input} {input}
</Stack> </Stack>
@@ -9,6 +9,7 @@ import { useAddTeamMemberForm } from "@/Hooks/useAddTeamMemberForm";
import type { AddTeamMemberFormData } from "@/Validation/addTeamMember"; import type { AddTeamMemberFormData } from "@/Validation/addTeamMember";
import type { UserRole, User } from "@/Types/User"; import type { UserRole, User } from "@/Types/User";
import { usePost } from "@/Hooks/UseApi"; import { usePost } from "@/Hooks/UseApi";
import { LAYOUT } from "@/Utils/Theme/constants";
interface AddTeamMemberDialogProps { interface AddTeamMemberDialogProps {
open: boolean; open: boolean;
@@ -82,38 +83,40 @@ export const AddTeamMemberDialog = ({
maxWidth="sm" maxWidth="sm"
fullWidth fullWidth
> >
<Stack <Stack gap={theme.spacing(LAYOUT.XS)}>
gap={theme.spacing(4)} <Stack
mt={theme.spacing(4)} direction="row"
> gap={theme.spacing(LAYOUT.XS)}
<Controller >
name="firstName" <Controller
control={control} name="firstName"
render={({ field, fieldState }) => ( control={control}
<TextField render={({ field, fieldState }) => (
{...field} <TextField
fieldLabel={t("common.form.name.option.firstName.label")} {...field}
placeholder={t("common.form.name.option.firstName.placeholder")} fieldLabel={t("common.form.name.option.firstName.label")}
error={!!fieldState.error} placeholder={t("common.form.name.option.firstName.placeholder")}
helperText={fieldState.error?.message ?? ""} error={!!fieldState.error}
fullWidth helperText={fieldState.error?.message ?? ""}
/> sx={{ flex: 1 }}
)} />
/> )}
<Controller />
name="lastName" <Controller
control={control} name="lastName"
render={({ field, fieldState }) => ( control={control}
<TextField render={({ field, fieldState }) => (
{...field} <TextField
fieldLabel={t("common.form.name.option.lastName.label")} {...field}
placeholder={t("common.form.name.option.lastName.placeholder")} fieldLabel={t("common.form.name.option.lastName.label")}
error={!!fieldState.error} placeholder={t("common.form.name.option.lastName.placeholder")}
helperText={fieldState.error?.message ?? ""} error={!!fieldState.error}
fullWidth helperText={fieldState.error?.message ?? ""}
/> sx={{ flex: 1 }}
)} />
/> )}
/>
</Stack>
<Controller <Controller
name="email" name="email"
control={control} control={control}
@@ -151,36 +154,41 @@ export const AddTeamMemberDialog = ({
</Select> </Select>
)} )}
/> />
<Controller <Stack
name="password" direction="row"
control={control} gap={theme.spacing(LAYOUT.XS)}
render={({ field, fieldState }) => ( >
<TextField <Controller
{...field} name="password"
fieldLabel={t("pages.auth.common.form.option.password.label")} control={control}
placeholder={t("pages.auth.common.form.option.password.placeholder")} render={({ field, fieldState }) => (
type="password" <TextField
error={!!fieldState.error} {...field}
helperText={fieldState.error?.message ?? ""} fieldLabel={t("pages.auth.common.form.option.password.label")}
fullWidth placeholder={t("pages.auth.common.form.option.password.placeholder")}
/> type="password"
)} error={!!fieldState.error}
/> helperText={fieldState.error?.message ?? ""}
<Controller sx={{ flex: 1 }}
name="confirm" />
control={control} )}
render={({ field, fieldState }) => ( />
<TextField <Controller
{...field} name="confirm"
fieldLabel={t("pages.auth.common.form.option.confirmPassword.label")} control={control}
placeholder={t("pages.auth.common.form.option.password.placeholder")} render={({ field, fieldState }) => (
type="password" <TextField
error={!!fieldState.error} {...field}
helperText={fieldState.error?.message ?? ""} fieldLabel={t("pages.auth.common.form.option.confirmPassword.label")}
fullWidth placeholder={t("pages.auth.common.form.option.password.placeholder")}
/> type="password"
)} error={!!fieldState.error}
/> helperText={fieldState.error?.message ?? ""}
sx={{ flex: 1 }}
/>
)}
/>
</Stack>
</Stack> </Stack>
</Dialog> </Dialog>
); );
@@ -9,6 +9,7 @@ import type { UserRole } from "@/Types/User";
import { useInviteForm } from "@/Hooks/useInviteForm"; import { useInviteForm } from "@/Hooks/useInviteForm";
import type { InviteFormData } from "@/Validation/invite"; import type { InviteFormData } from "@/Validation/invite";
import { usePost } from "@/Hooks/UseApi"; import { usePost } from "@/Hooks/UseApi";
import { LAYOUT } from "@/Utils/Theme/constants";
const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST; const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST;
@@ -95,10 +96,7 @@ export const InviteTeamMemberDialog = ({
</Button> </Button>
} }
> >
<Stack <Stack gap={theme.spacing(LAYOUT.XS)}>
gap={theme.spacing(4)}
mt={theme.spacing(4)}
>
<Controller <Controller
name="email" name="email"
control={control} control={control}
+14 -1
View File
@@ -359,7 +359,20 @@ const CreateMonitorPage = () => {
<ConfigBox <ConfigBox
title={t("pages.createMonitor.form.general.title")} title={t("pages.createMonitor.form.general.title")}
subtitle={t(`pages.createMonitor.form.general.description.${watchedType}`)} subtitle={
<Trans
i18nKey={`pages.createMonitor.form.general.description.${watchedType}`}
components={{
gamedigLink: (
<Link
href="https://github.com/gamedig/node-gamedig/blob/master/GAMES_LIST.md"
target="_blank"
rel="noopener noreferrer"
/>
),
}}
/>
}
rightContent={ rightContent={
<Stack spacing={theme.spacing(LAYOUT.MD)}> <Stack spacing={theme.spacing(LAYOUT.MD)}>
{/* URL/Host/Container field - not shown for hardware */} {/* URL/Host/Container field - not shown for hardware */}
@@ -13,6 +13,7 @@ import { useSelector } from "react-redux";
import type { RootState } from "@/Types/state"; import type { RootState } from "@/Types/state";
import { formatDateWithTz } from "@/Utils/TimeUtils"; import { formatDateWithTz } from "@/Utils/TimeUtils";
import { getIncidentsDuration } from "@/Pages/Incidents/utils"; import { getIncidentsDuration } from "@/Pages/Incidents/utils";
import { theme } from "@/Utils/Theme/Theme";
interface CardDetailsProps { interface CardDetailsProps {
incident: Incident | null; incident: Incident | null;
@@ -20,6 +21,24 @@ interface CardDetailsProps {
sx?: object; sx?: object;
} }
const SectionHeading = ({ children }: { children: React.ReactNode }) => {
const theme = useTheme();
return (
<Typography
component="h2"
variant="eyebrow"
color={theme.palette.text.secondary}
>
{children}
</Typography>
);
};
const Cell = ({ children }: { children: React.ReactNode }) => (
<Typography variant="body1">{children}</Typography>
);
export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => { export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const theme = useTheme(); const theme = useTheme();
@@ -33,22 +52,18 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => {
gap={theme.spacing(LAYOUT.MD)} gap={theme.spacing(LAYOUT.MD)}
sx={sx} sx={sx}
> >
<Typography textTransform={"uppercase"}> <SectionHeading>{t("pages.incidents.dialog.details.title")}</SectionHeading>
{t("pages.incidents.dialog.details.title")}
</Typography>
<BaseBox padding={LAYOUT.MD}> <BaseBox padding={LAYOUT.MD}>
<Stack gap={theme.spacing(LAYOUT.MD)}> <Stack gap={theme.spacing(LAYOUT.MD)}>
<Typography textTransform={"uppercase"}> <SectionHeading>{t("pages.incidents.dialog.details.overview")}</SectionHeading>
{t("pages.incidents.dialog.details.overview")}
</Typography>
<Divider />
<Grid <Grid
container container
spacing={theme.spacing(LAYOUT.MD)} spacing={theme.spacing(LAYOUT.MD)}
alignItems="center" alignItems="center"
> >
<Grid size={2}>{t("pages.incidents.dialog.details.status")}</Grid> <Grid size={2}>
<Cell>{t("pages.incidents.dialog.details.status")}</Cell>
</Grid>
<Grid size={10}> <Grid size={10}>
<ValueLabel <ValueLabel
value={incident.status ? "negative" : "positive"} value={incident.status ? "negative" : "positive"}
@@ -61,15 +76,17 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => {
</Grid> </Grid>
{monitor && ( {monitor && (
<> <>
<Grid size={2}>{t("pages.incidents.dialog.details.monitor")}</Grid> <Grid size={2}>
<Cell>{t("pages.incidents.dialog.details.monitor")}</Cell>
</Grid>
<Grid size={10}> <Grid size={10}>
<Typography>{monitor.name ?? "N/A"}</Typography> <Cell>{monitor.name ?? "N/A"}</Cell>
</Grid> </Grid>
<Grid size={2}> <Grid size={2}>
<Typography>{t("pages.incidents.dialog.details.url")}</Typography> <Cell>{t("pages.incidents.dialog.details.url")}</Cell>
</Grid> </Grid>
<Grid size={10}> <Grid size={10}>
<Typography>{monitor.url ?? "N/A"}</Typography> <Cell>{monitor.url ?? "N/A"}</Cell>
</Grid> </Grid>
</> </>
)} )}
@@ -78,51 +95,48 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => {
</BaseBox> </BaseBox>
<BaseBox padding={LAYOUT.MD}> <BaseBox padding={LAYOUT.MD}>
<Stack gap={theme.spacing(LAYOUT.MD)}> <Stack gap={theme.spacing(LAYOUT.MD)}>
<Typography textTransform={"uppercase"}> <SectionHeading>{t("pages.incidents.dialog.details.analysis")}</SectionHeading>
{t("pages.incidents.dialog.details.analysis")}
</Typography>
<Divider />
<Grid <Grid
container container
spacing={theme.spacing(LAYOUT.MD)} spacing={theme.spacing(LAYOUT.MD)}
> >
<Grid size={6}> <Grid size={6}>
<Typography>{t("pages.incidents.dialog.details.timeline")}</Typography> <Cell>{t("pages.incidents.dialog.details.timeline")}</Cell>
</Grid> </Grid>
<Grid size={6}> <Grid size={6}>
<Typography>{t("pages.incidents.dialog.details.detailsLabel")}</Typography> <Cell>{t("pages.incidents.dialog.details.detailsLabel")}</Cell>
</Grid> </Grid>
<Grid size={6}> <Grid size={6}>
<Divider></Divider> <Divider />
</Grid> </Grid>
<Grid size={6}> <Grid size={6}>
<Divider></Divider> <Divider />
</Grid> </Grid>
<Grid size={2}> <Grid size={2}>
<Typography>{t("pages.incidents.dialog.details.startedAt")}</Typography> <Cell>{t("pages.incidents.dialog.details.startedAt")}</Cell>
</Grid> </Grid>
<Grid size={4}> <Grid size={4}>
<Typography> <Cell>
{formatDateWithTz(incident.startTime, "D MMM YYYY, h:mm A", uiTimezone)} {formatDateWithTz(incident.startTime, "D MMM YYYY, h:mm A", uiTimezone)}
</Typography> </Cell>
</Grid> </Grid>
<Grid size={2}> <Grid size={2}>
<Typography>{t("pages.incidents.dialog.details.statusCode")}</Typography> <Cell>{t("pages.incidents.dialog.details.statusCode")}</Cell>
</Grid> </Grid>
<Grid size={4}> <Grid size={4}>
<Typography>{incident.statusCode ?? "N/A"}</Typography> <Cell>{incident.statusCode ?? "N/A"}</Cell>
</Grid> </Grid>
<Grid size={2}> <Grid size={2}>
<Typography>{t("pages.incidents.dialog.details.downtime")}</Typography> <Cell>{t("pages.incidents.dialog.details.downtime")}</Cell>
</Grid> </Grid>
<Grid size={4}> <Grid size={4}>
<Typography>{getIncidentsDuration(incident)}</Typography> <Cell>{getIncidentsDuration(incident)}</Cell>
</Grid> </Grid>
<Grid size={2}> <Grid size={2}>
<Typography>{t("pages.incidents.dialog.details.message")}</Typography> <Cell>{t("pages.incidents.dialog.details.message")}</Cell>
</Grid> </Grid>
<Grid size={4}> <Grid size={4}>
<Typography>{incident.message ?? "N/A"}</Typography> <Cell>{incident.message ?? "N/A"}</Cell>
</Grid> </Grid>
</Grid> </Grid>
</Stack> </Stack>
@@ -130,60 +144,53 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => {
{!incident.status && ( {!incident.status && (
<BaseBox padding={LAYOUT.MD}> <BaseBox padding={LAYOUT.MD}>
<Stack gap={theme.spacing(LAYOUT.XS)}> <Stack gap={theme.spacing(LAYOUT.XS)}>
<Typography textTransform={"uppercase"}> <SectionHeading>
{t("pages.incidents.dialog.details.resolutionDetails")} {t("pages.incidents.dialog.details.resolutionDetails")}
</Typography> </SectionHeading>
<Divider />
<Grid <Grid
container container
spacing={theme.spacing(LAYOUT.MD)} spacing={theme.spacing(LAYOUT.MD)}
alignItems="center" alignItems="center"
> >
<Grid size={2}> <Grid size={2}>
<Typography>{t("pages.incidents.dialog.details.resolvedAt")}</Typography> <Cell>{t("pages.incidents.dialog.details.resolvedAt")}</Cell>
</Grid> </Grid>
<Grid size={10}> <Grid size={10}>
<Typography> <Cell>
{incident.endTime {incident.endTime
? formatDateWithTz(incident.endTime, "D MMM YYYY, h:mm A", uiTimezone) ? formatDateWithTz(incident.endTime, "D MMM YYYY, h:mm A", uiTimezone)
: "N/A"} : "N/A"}
</Typography> </Cell>
</Grid> </Grid>
<Grid size={2}> <Grid size={2}>
<Typography> <Cell>{t("pages.incidents.dialog.details.resolutionType")}</Cell>
{t("pages.incidents.dialog.details.resolutionType")}
</Typography>
</Grid> </Grid>
<Grid size={10}> <Grid size={10}>
<Typography> <Cell>
{incident.resolutionType {incident.resolutionType
? t( ? t(
`pages.incidents.dialog.details.resolutionTypes.${incident.resolutionType}` `pages.incidents.dialog.details.resolutionTypes.${incident.resolutionType}`
) )
: "N/A"} : "N/A"}
</Typography> </Cell>
</Grid> </Grid>
{incident.resolvedBy && ( {incident.resolvedBy && (
<> <>
<Grid size={2}> <Grid size={2}>
<Typography> <Cell>{t("pages.incidents.dialog.details.resolvedBy")}</Cell>
{t("pages.incidents.dialog.details.resolvedBy")}
</Typography>
</Grid> </Grid>
<Grid size={10}> <Grid size={10}>
<Typography> <Cell>{incident.resolvedByEmail ?? incident.resolvedBy}</Cell>
{incident.resolvedByEmail ?? incident.resolvedBy}
</Typography>
</Grid> </Grid>
</> </>
)} )}
{incident.comment && ( {incident.comment && (
<> <>
<Grid size={2}> <Grid size={2}>
<Typography>{t("pages.incidents.dialog.details.comment")}</Typography> <Cell>{t("pages.incidents.dialog.details.comment")}</Cell>
</Grid> </Grid>
<Grid size={10}> <Grid size={10}>
<Typography>{incident.comment}</Typography> <Cell>{incident.comment}</Cell>
</Grid> </Grid>
</> </>
)} )}
@@ -1,8 +1,7 @@
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Divider from "@mui/material/Divider";
import Grid from "@mui/material/Grid"; import Grid from "@mui/material/Grid";
import { BaseBox, ValueLabel } from "@/Components/design-elements"; import { BaseBox, Icon, ValueLabel } from "@/Components/design-elements";
import { CircleCheck, TriangleAlert, Bell, Wrench, Globe } from "lucide-react"; import { CircleCheck, TriangleAlert, Bell, Wrench, Globe } from "lucide-react";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
@@ -25,6 +24,7 @@ const SummaryItem = ({ icon, label, value }: SummaryItemProps) => {
alignItems="center" alignItems="center"
justifyContent="space-between" justifyContent="space-between"
gap={theme.spacing(2)} gap={theme.spacing(2)}
minHeight={32}
> >
<Stack <Stack
direction="row" direction="row"
@@ -32,10 +32,10 @@ const SummaryItem = ({ icon, label, value }: SummaryItemProps) => {
gap={theme.spacing(2)} gap={theme.spacing(2)}
> >
{icon} {icon}
<Typography variant="body2">{label}</Typography> <Typography variant="body1">{label}</Typography>
</Stack> </Stack>
<Typography <Typography
variant="body2" variant="body1"
fontWeight={600} fontWeight={600}
> >
{value} {value}
@@ -67,15 +67,11 @@ export const SummaryCard = ({
> >
<Typography <Typography
component="h2" component="h2"
sx={{ variant="eyebrow"
textTransform: "uppercase", color={theme.palette.text.secondary}
fontWeight: 500,
fontSize: 13,
}}
> >
{title} {title}
</Typography> </Typography>
<Divider />
{children} {children}
</Stack> </Stack>
</BaseBox> </BaseBox>
@@ -97,10 +93,13 @@ export const SummaryCardActiveIncidents = ({
const activeCount = summary.totalActive; const activeCount = summary.totalActive;
const hasActive = activeCount > 0; const hasActive = activeCount > 0;
const color = hasActive ? theme.palette.error.main : theme.palette.success.main; const color = hasActive ? theme.palette.error.main : theme.palette.success.main;
const icon = hasActive ? ( const icon = (
<TriangleAlert color={color} /> <Box sx={{ color, display: "inline-flex" }}>
) : ( <Icon
<CircleCheck color={color} /> icon={hasActive ? TriangleAlert : CircleCheck}
size={32}
/>
</Box>
); );
const msg = t("pages.incidents.summaryCard.activeIncidents.active", { const msg = t("pages.incidents.summaryCard.activeIncidents.active", {
count: activeCount, count: activeCount,
@@ -133,10 +132,7 @@ const SummaryIncidentItem = ({ incident }: { incident: IncidentSummaryItem }) =>
container container
alignItems="center" alignItems="center"
spacing={2} spacing={2}
sx={{ sx={{ width: "100%", minHeight: 32 }}
width: "100%",
py: theme.spacing(0.5),
}}
> >
<Grid <Grid
size={{ xs: 12, lg: 5 }} size={{ xs: 12, lg: 5 }}
@@ -147,7 +143,7 @@ const SummaryIncidentItem = ({ incident }: { incident: IncidentSummaryItem }) =>
gap: theme.spacing(2), gap: theme.spacing(2),
}} }}
> >
<Globe /> <Icon icon={Globe} />
<Typography <Typography
variant="body1" variant="body1"
fontWeight={500} fontWeight={500}
@@ -159,9 +155,7 @@ const SummaryIncidentItem = ({ incident }: { incident: IncidentSummaryItem }) =>
<Grid <Grid
size={{ xs: 12, md: 6, lg: 3 }} size={{ xs: 12, md: 6, lg: 3 }}
sx={{ sx={{ display: "flex" }}
display: "flex",
}}
> >
<ValueLabel <ValueLabel
value={incident.status ? "negative" : "positive"} value={incident.status ? "negative" : "positive"}
@@ -173,7 +167,7 @@ const SummaryIncidentItem = ({ incident }: { incident: IncidentSummaryItem }) =>
size={{ xs: 12, md: 6, lg: 4 }} size={{ xs: 12, md: 6, lg: 4 }}
sx={{ sx={{
textAlign: { xs: "left", md: "right" }, textAlign: { xs: "left", md: "right" },
fontWeight: 500, fontWeight: 600,
}} }}
> >
<Typography variant="body1">{duration}</Typography> <Typography variant="body1">{duration}</Typography>
@@ -190,22 +184,17 @@ export const SummaryCardLatestIncidents = ({
summary, summary,
}: SummaryCardLatestIncidentsProps) => { }: SummaryCardLatestIncidentsProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const theme = useTheme();
const latestIncidents = summary?.latestIncidents ?? []; const latestIncidents = summary?.latestIncidents ?? [];
return ( return (
<SummaryCard title={t("pages.incidents.summaryCard.latestIncidents.title")}> <SummaryCard title={t("pages.incidents.summaryCard.latestIncidents.title")}>
<Stack gap={theme.spacing(4)}> {latestIncidents.slice(0, 3).map((incident) => (
{latestIncidents.slice(0, 3).map((incident, index) => ( <SummaryIncidentItem
<Box key={incident.id}> key={incident.id}
<SummaryIncidentItem incident={incident} /> incident={incident}
{index < latestIncidents.length - 1 && ( />
<Divider sx={{ mt: theme.spacing(2) }} /> ))}
)}
</Box>
))}
</Stack>
</SummaryCard> </SummaryCard>
); );
}; };
@@ -224,17 +213,17 @@ export const SummaryCardStats = ({ summary }: SummaryCardStatsProps) => {
return ( return (
<SummaryCard title={t("pages.incidents.summaryCard.incidentStats.title")}> <SummaryCard title={t("pages.incidents.summaryCard.incidentStats.title")}>
<SummaryItem <SummaryItem
icon={<Bell size={18} />} icon={<Icon icon={Bell} />}
label={t("pages.incidents.summaryCard.incidentStats.totalIncidents")} label={t("pages.incidents.summaryCard.incidentStats.totalIncidents")}
value={summary?.total || 0} value={summary?.total || 0}
/> />
<SummaryItem <SummaryItem
icon={<TriangleAlert size={18} />} icon={<Icon icon={TriangleAlert} />}
label={t("pages.incidents.summaryCard.incidentStats.mostAffectedMonitor")} label={t("pages.incidents.summaryCard.incidentStats.mostAffectedMonitor")}
value={mostAffected} value={mostAffected}
/> />
<SummaryItem <SummaryItem
icon={<Wrench size={18} />} icon={<Icon icon={Wrench} />}
label={t("pages.incidents.summaryCard.incidentStats.avgResolutionTime")} label={t("pages.incidents.summaryCard.incidentStats.avgResolutionTime")}
value={ value={
summary.total > 0 summary.total > 0
@@ -75,7 +75,7 @@ export const ControlsIncidentFilter = ({
variant="contained" variant="contained"
onClick={onClearFilters} onClick={onClearFilters}
> >
{t("pages.incidents.filters.clearFilters")} {t("common.buttons.clearFilters")}
</Button> </Button>
)} )}
</Stack> </Stack>
@@ -1,9 +1,7 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import Box from "@mui/material/Box";
import { Dialog, TextField } from "@/Components/inputs"; import { Dialog, TextField } from "@/Components/inputs";
import { usePut } from "@/Hooks/UseApi"; import { usePut } from "@/Hooks/UseApi";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useTheme } from "@mui/material";
interface DialogResolutionProps { interface DialogResolutionProps {
open: boolean; open: boolean;
@@ -19,7 +17,6 @@ export const DialogResolution = ({
onResolved, onResolved,
}: DialogResolutionProps) => { }: DialogResolutionProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const theme = useTheme();
const [comment, setComment] = useState(""); const [comment, setComment] = useState("");
const { put: resolveIncident, loading: isResolving } = usePut(); const { put: resolveIncident, loading: isResolving } = usePut();
@@ -50,22 +47,19 @@ export const DialogResolution = ({
onCancel={handleCancel} onCancel={handleCancel}
onConfirm={handleConfirm} onConfirm={handleConfirm}
confirmColor="error" confirmColor="error"
cancelColor="primary"
loading={isResolving} loading={isResolving}
maxWidth="sm" maxWidth="sm"
fullWidth fullWidth
> >
<Box sx={{ mt: theme.spacing(4) }}> <TextField
<TextField fieldLabel={t("pages.incidents.dialog.resolveIncident.option.comment.label")}
fieldLabel={t("pages.incidents.dialog.resolveIncident.option.comment.label")} placeholder={t(
placeholder={t( "pages.incidents.dialog.resolveIncident.option.comment.placeholder"
"pages.incidents.dialog.resolveIncident.option.comment.placeholder" )}
)} value={comment}
value={comment} onChange={(e) => setComment(e.target.value)}
onChange={(e) => setComment(e.target.value)} fullWidth
fullWidth />
/>
</Box>
</Dialog> </Dialog>
); );
}; };
+7 -4
View File
@@ -15,6 +15,7 @@ import { HeaderTimeRange } from "@/Components/common";
import { ControlsIncidentFilter } from "@/Pages/Incidents/Components/ControlsIncidentFilter"; import { ControlsIncidentFilter } from "@/Pages/Incidents/Components/ControlsIncidentFilter";
import { useGet } from "@/Hooks/UseApi"; import { useGet } from "@/Hooks/UseApi";
import { LAYOUT } from "@/Utils/Theme/constants";
import { useState, useEffect, useMemo } from "react"; import { useState, useEffect, useMemo } from "react";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import type { Incident, IncidentsResponse, IncidentSummary } from "@/Types/Incident"; import type { Incident, IncidentsResponse, IncidentSummary } from "@/Types/Incident";
@@ -186,8 +187,9 @@ const IncidentsPage = () => {
{activeIncidentsCount > 0 && ( {activeIncidentsCount > 0 && (
<> <>
<Typography <Typography
variant="h6" variant="eyebrow"
sx={{ mb: theme.spacing(4), textTransform: "uppercase" }} color={theme.palette.text.secondary}
mb={theme.spacing(LAYOUT.XS)}
> >
{t("pages.incidents.table.activeIncidents")} {t("pages.incidents.table.activeIncidents")}
</Typography> </Typography>
@@ -208,8 +210,9 @@ const IncidentsPage = () => {
)} )}
<Typography <Typography
variant="h6" variant="eyebrow"
sx={{ mb: theme.spacing(4), textTransform: "uppercase" }} color={theme.palette.text.secondary}
mb={theme.spacing(LAYOUT.XS)}
> >
{t("pages.incidents.table.resolvedIncidents")} {t("pages.incidents.table.resolvedIncidents")}
</Typography> </Typography>
@@ -1,4 +1,6 @@
import Grid from "@mui/material/Grid"; import Grid from "@mui/material/Grid";
import Stack from "@mui/material/Stack";
import { NoticeBanner } from "@/Components/design-elements";
import { HistogramInfrastructure } from "@/Components/monitors"; import { HistogramInfrastructure } from "@/Components/monitors";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -6,6 +8,7 @@ import type { HardwareCheckStats } from "@/Types/Monitor";
import { useMemo } from "react"; import { useMemo } from "react";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery"; import useMediaQuery from "@mui/material/useMediaQuery";
import { LAYOUT } from "@/Utils/Theme/constants";
const formatBytesToMB = (value: number) => `${(value / (1024 * 1024)).toFixed(2)} MB`; const formatBytesToMB = (value: number) => `${(value / (1024 * 1024)).toFixed(2)} MB`;
@@ -60,6 +63,11 @@ const getChartConfigs = (
return configs; return configs;
}; };
const hasAnyNetworkTraffic = (checks: HardwareCheckStats[]): boolean =>
checks.some((c) =>
c.net?.some((iface) => iface.bytesSentPerSecond > 0 || iface.deltaBytesRecv > 0)
);
export const InfraNetworkCharts = ({ export const InfraNetworkCharts = ({
checks, checks,
dateRange, dateRange,
@@ -74,35 +82,43 @@ export const InfraNetworkCharts = ({
() => getChartConfigs(theme, checks, t), () => getChartConfigs(theme, checks, t),
[theme, checks, t] [theme, checks, t]
); );
const showNoTrafficNotice = chartConfigs.length > 0 && !hasAnyNetworkTraffic(checks);
return ( return (
<Grid <Stack gap={theme.spacing(LAYOUT.XS)}>
container {showNoTrafficNotice && (
spacing={theme.spacing(8)} <NoticeBanner severity="warning">
> {t("pages.infrastructure.charts.labels.netNoTraffic")}
{chartConfigs.map((config) => { </NoticeBanner>
return ( )}
<Grid <Grid
size={isSmall ? 12 : 6} container
key={`${config.type}-${config.interfaceName ?? config.idx ?? ""}`} spacing={theme.spacing(LAYOUT.MD)}
> >
<HistogramInfrastructure {chartConfigs.map((config) => {
dateRange={dateRange} return (
title={config.title} <Grid
type={config.type} size={isSmall ? 12 : 6}
idx={config.idx} key={`${config.type}-${config.interfaceName ?? config.idx ?? ""}`}
checks={checks} >
xKey="bucketDate" <HistogramInfrastructure
dataKeys={config.dataKeys} dateRange={dateRange}
gradient={true} title={config.title}
gradientStartColor={config.gradientStartColor} type={config.type}
gradientEndColor="#ffffff" idx={config.idx}
strokeColor={config.strokeColor} checks={checks}
yAxisFormatter={formatBytesToMB} xKey="bucketDate"
/> dataKeys={config.dataKeys}
</Grid> gradient={true}
); gradientStartColor={config.gradientStartColor}
})} gradientEndColor="#ffffff"
</Grid> strokeColor={config.strokeColor}
yAxisFormatter={formatBytesToMB}
/>
</Grid>
);
})}
</Grid>
</Stack>
); );
}; };
+7 -6
View File
@@ -1,12 +1,13 @@
const typographyBase = 13; const typographyBase = 13;
export const typographyLevels = { export const typographyLevels = {
base: typographyBase, base: typographyBase, // 13px
xs: `${(typographyBase - 4) / 16}rem`, xs: `${(typographyBase - 4) / 16}rem`, // 9px
s: `${(typographyBase - 2) / 16}rem`, s: `${(typographyBase - 2) / 16}rem`, // 11px
m: `${typographyBase / 16}rem`, m: `${typographyBase / 16}rem`, // 13px
l: `${(typographyBase + 2) / 16}rem`, l: `${(typographyBase + 2) / 16}rem`, // 15px
xl: `${(typographyBase + 10) / 16}rem`, xl: `${(typographyBase + 5) / 16}rem`, // 18px
xxl: `${(typographyBase + 10) / 16}rem`, // 23px
}; };
export const colors = { export const colors = {
+1 -1
View File
@@ -58,7 +58,7 @@ export const theme = (mode: string, palette: any) =>
fontFamilyMonospace, fontFamilyMonospace,
fontSize: typographyLevels.base, fontSize: typographyLevels.base,
h1: { h1: {
fontSize: typographyLevels.xl, fontSize: typographyLevels.xxl,
fontWeight: 500, fontWeight: 500,
}, },
h2: { h2: {
+5
View File
@@ -8,6 +8,7 @@ export const SPACING = {
} as const; } as const;
export const LAYOUT = { export const LAYOUT = {
XXS: 2,
XS: 4, XS: 4,
SM: 6, SM: 6,
MD: 8, MD: 8,
@@ -15,3 +16,7 @@ export const LAYOUT = {
XL: 12, XL: 12,
XXL: 16, XXL: 16,
} as const; } as const;
export const HOVER = {
DARKEN: 0.06, // This is a coefficient for darkening function
} as const;
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "", "ping": "",
"port": "", "port": "",
"docker": "", "docker": "",
"game": "", "game": "أدخل عنوان IP أو اسم المضيف ورقم المنفذ للاختبار (مثل 192.168.1.100 أو example.com) واختر نوع اللعبة. تتطلب بعض الألعاب تفعيل استعلامات الخادم في ملف الإعدادات الخاص بها — يُرجى مراجعة وثائق خادم اللعبة. اطّلع على <gamedigLink>قائمة الألعاب المدعومة</gamedigLink> لمعرفة تفاصيل البروتوكول.",
"pagespeed": "تتبع أداء تحميل الصفحة ومؤشرات Core Web Vitals ودرجات التحسين لموقعك.", "pagespeed": "تتبع أداء تحميل الصفحة ومؤشرات Core Web Vitals ودرجات التحسين لموقعك.",
"grpc": "أدخل اسم المضيف ومنفذ خادم gRPC، وحدد اختيارياً اسم خدمة لفحص الصحة، وأضف اسم عرض.", "grpc": "أدخل اسم المضيف ومنفذ خادم gRPC، وحدد اختيارياً اسم خدمة لفحص الصحة، وأضف اسم عرض.",
"websocket": "أدخل رابط WebSocket للمراقبة (مثال: wss://example.com/socket) وأضف اسم عرض.", "websocket": "أدخل رابط WebSocket للمراقبة (مثال: wss://example.com/socket) وأضف اسم عرض.",
@@ -769,6 +769,7 @@
"memory": "استخدام الذاكرة", "memory": "استخدام الذاكرة",
"netBytesRecv": "{{name}} - البايتات المستلمة", "netBytesRecv": "{{name}} - البايتات المستلمة",
"netBytesSent": "{{name}} - البايتات المرسلة", "netBytesSent": "{{name}} - البايتات المرسلة",
"netNoTraffic": "Capture يبلغ عن عدم وجود حركة بيانات على أي واجهة. هذا أمر طبيعي عندما يعمل Capture داخل حاوية لا ترى سوى واجهات الاسترجاع — قم بتشغيل Capture مباشرة على المضيف لرؤية نشاط الشبكة الحقيقي.",
"temp": "الحرارة" "temp": "الحرارة"
} }
}, },
@@ -1236,7 +1237,7 @@
"description": "إضافة مراقبات نموذجية لأغراض العرض التوضيحي." "description": "إضافة مراقبات نموذجية لأغراض العرض التوضيحي."
}, },
"removeMonitors": { "removeMonitors": {
"title": "إعادة تعيين النظام", "title": "إعادة ضبط النظام",
"description": "إزالة جميع المراقبات من نظامك.", "description": "إزالة جميع المراقبات من نظامك.",
"dialog": { "dialog": {
"title": "إزالة جميع المراقبات؟", "title": "إزالة جميع المراقبات؟",
+4 -3
View File
@@ -542,7 +542,7 @@
"ping": "", "ping": "",
"port": "", "port": "",
"docker": "", "docker": "",
"game": "", "game": "Zadejte IP adresu nebo název hostitele a číslo portu pro ping (např. 192.168.1.100 nebo example.com) a vyberte typ hry. Některé hry vyžadují povolení dotazů na server v jejich konfiguračním souboru — viz dokumentace vašeho herního serveru. Podrobnosti o protokolu najdete v <gamedigLink>seznamu podporovaných her</gamedigLink>.",
"pagespeed": "Sledujte výkon načítání stránky, metriky Core Web Vitals a hodnocení optimalizace vašeho webu.", "pagespeed": "Sledujte výkon načítání stránky, metriky Core Web Vitals a hodnocení optimalizace vašeho webu.",
"grpc": "Zadejte název hostitele a port gRPC serveru, volitelně zadejte název služby pro kontrolu stavu a přidejte zobrazovaný název.", "grpc": "Zadejte název hostitele a port gRPC serveru, volitelně zadejte název služby pro kontrolu stavu a přidejte zobrazovaný název.",
"websocket": "Zadejte WebSocket URL ke sledování (např. wss://example.com/socket) a přidejte zobrazovaný název.", "websocket": "Zadejte WebSocket URL ke sledování (např. wss://example.com/socket) a přidejte zobrazovaný název.",
@@ -769,6 +769,7 @@
"memory": "Využití paměti", "memory": "Využití paměti",
"netBytesRecv": "{{name}} - přijaté bajty", "netBytesRecv": "{{name}} - přijaté bajty",
"netBytesSent": "{{name}} - odeslané bajty", "netBytesSent": "{{name}} - odeslané bajty",
"netNoTraffic": "Capture hlásí nulový provoz na všech rozhraních. To je normální, když Capture běží uvnitř kontejneru, který vidí pouze loopback rozhraní — spusťte Capture přímo na hostiteli, abyste viděli skutečnou síťovou aktivitu.",
"temp": "Teplota" "temp": "Teplota"
} }
}, },
@@ -1236,8 +1237,8 @@
"description": "Přidejte ukázkové monitory pro demonstrační účely." "description": "Přidejte ukázkové monitory pro demonstrační účely."
}, },
"removeMonitors": { "removeMonitors": {
"title": "Obnovení systému", "title": "Reset systému",
"description": "Odeberte všechny monitory z vašeho systému.", "description": "Odstranit všechny monitory ze systému.",
"dialog": { "dialog": {
"title": "Odebrat všechny monitory?", "title": "Odebrat všechny monitory?",
"description": "Tuto akci nelze vrátit zpět." "description": "Tuto akci nelze vrátit zpět."
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "Geben Sie die IP-Adresse oder den Hostnamen ein, der angepingt werden soll (z. B. 192.168.1.100 oder example.com), und fügen Sie einen eindeutigen Anzeigenamen hinzu, der auf dem Dashboard angezeigt wird.", "ping": "Geben Sie die IP-Adresse oder den Hostnamen ein, der angepingt werden soll (z. B. 192.168.1.100 oder example.com), und fügen Sie einen eindeutigen Anzeigenamen hinzu, der auf dem Dashboard angezeigt wird.",
"port": "Geben Sie die URL oder IP des Servers, die Portnummer und einen eindeutigen Anzeigenamen ein, der auf dem Dashboard angezeigt wird.", "port": "Geben Sie die URL oder IP des Servers, die Portnummer und einen eindeutigen Anzeigenamen ein, der auf dem Dashboard angezeigt wird.",
"docker": "Geben Sie die Docker-ID Ihres Containers ein. Docker-IDs müssen die vollständige 64-Zeichen-ID sein. Sie können docker inspect <short_id> ausführen, um die vollständige Container-ID abzurufen.", "docker": "Geben Sie die Docker-ID Ihres Containers ein. Docker-IDs müssen die vollständige 64-Zeichen-ID sein. Sie können docker inspect <short_id> ausführen, um die vollständige Container-ID abzurufen.",
"game": "IP Adresse oder Hostnamen und Port für Ping eingeben (z.B. 192.168.1.100 oder beispiel.de) und Spieletyp auswählen.", "game": "IP Adresse oder Hostnamen und Port für Ping eingeben (z.B. 192.168.1.100 oder beispiel.de) und Spieletyp auswählen. Einige Spiele erfordern das Aktivieren von Server-Abfragen in ihrer Konfigurationsdatei — sieh in der Dokumentation deines Spielservers nach. In der <gamedigLink>Liste unterstützter Spiele</gamedigLink> findest du Protokolldetails.",
"pagespeed": "Verfolgen Sie die Ladezeit, Core Web Vitals und Optimierungswerte Ihrer Website.", "pagespeed": "Verfolgen Sie die Ladezeit, Core Web Vitals und Optimierungswerte Ihrer Website.",
"grpc": "Geben Sie den Hostnamen und Port des gRPC-Servers ein, optional einen Dienstnamen für den Health-Check, und fügen Sie einen Anzeigenamen hinzu.", "grpc": "Geben Sie den Hostnamen und Port des gRPC-Servers ein, optional einen Dienstnamen für den Health-Check, und fügen Sie einen Anzeigenamen hinzu.",
"websocket": "Geben Sie die zu überwachende WebSocket-URL ein (z. B. wss://example.com/socket) und fügen Sie einen Anzeigenamen hinzu.", "websocket": "Geben Sie die zu überwachende WebSocket-URL ein (z. B. wss://example.com/socket) und fügen Sie einen Anzeigenamen hinzu.",
@@ -769,6 +769,7 @@
"memory": "Arbeitsspeicherauslastung", "memory": "Arbeitsspeicherauslastung",
"netBytesRecv": "{{name}} - Empfangene Bytes", "netBytesRecv": "{{name}} - Empfangene Bytes",
"netBytesSent": "{{name}} - Gesendete Bytes", "netBytesSent": "{{name}} - Gesendete Bytes",
"netNoTraffic": "Capture meldet null Datenverkehr auf allen Schnittstellen. Das ist normal, wenn Capture in einem Container läuft, der nur Loopback-Schnittstellen sieht — führe Capture direkt auf dem Host aus, um echten Netzwerkverkehr zu sehen.",
"temp": "Temp." "temp": "Temp."
} }
}, },
@@ -1237,7 +1238,7 @@
}, },
"removeMonitors": { "removeMonitors": {
"title": "System zurücksetzen", "title": "System zurücksetzen",
"description": "Alle Monitore aus Ihrem System entfernen.", "description": "Alle Monitore aus dem System entfernen.",
"dialog": { "dialog": {
"title": "Alle Monitore entfernen?", "title": "Alle Monitore entfernen?",
"description": "Dies kann nicht rückgängig gemacht werden." "description": "Dies kann nicht rückgängig gemacht werden."
+2 -1
View File
@@ -542,7 +542,7 @@
"ping": "Enter the IP address or hostname to ping (e.g., 192.168.1.100 or example.com) and add a clear display name that appears on the dashboard.", "ping": "Enter the IP address or hostname to ping (e.g., 192.168.1.100 or example.com) and add a clear display name that appears on the dashboard.",
"port": "Enter the URL or IP of the server, the port number and a clear display name that appears on the dashboard.", "port": "Enter the URL or IP of the server, the port number and a clear display name that appears on the dashboard.",
"docker": "Enter the Docker container name or ID. You can use either the container name (e.g., my-app) or the container ID (full 64-char ID or short ID).", "docker": "Enter the Docker container name or ID. You can use either the container name (e.g., my-app) or the container ID (full 64-char ID or short ID).",
"game": "Enter the IP address or hostname and the port number to ping (e.g., 192.168.1.100 or example.com) and choose game type.", "game": "Enter the IP address or hostname and the port number to ping (e.g., 192.168.1.100 or example.com) and choose game type. Some games require enabling server queries in their config file — check your game server's documentation. See the <gamedigLink>supported games list</gamedigLink> for protocol details.",
"pagespeed": "Track page load performance, Core Web Vitals, and optimization scores for your website.", "pagespeed": "Track page load performance, Core Web Vitals, and optimization scores for your website.",
"grpc": "Enter the hostname and port of the gRPC server, optionally specify a service name for the health check, and add a display name.", "grpc": "Enter the hostname and port of the gRPC server, optionally specify a service name for the health check, and add a display name.",
"websocket": "Enter the WebSocket URL to monitor (e.g., wss://example.com/socket) and add a display name.", "websocket": "Enter the WebSocket URL to monitor (e.g., wss://example.com/socket) and add a display name.",
@@ -769,6 +769,7 @@
"memory": "Memory usage", "memory": "Memory usage",
"netBytesRecv": "{{name}} - Bytes Received", "netBytesRecv": "{{name}} - Bytes Received",
"netBytesSent": "{{name}} - Bytes Sent", "netBytesSent": "{{name}} - Bytes Sent",
"netNoTraffic": "Capture is reporting zero traffic on every interface. This is normal when Capture runs inside a container that can only see loopback interfaces — run Capture directly on the host to see real network activity.",
"temp": "Temp" "temp": "Temp"
} }
}, },
+4 -3
View File
@@ -549,7 +549,7 @@
"ping": "Introduce la dirección IP o el nombre de host para hacer ping (p. ej., 192.168.1.100 o ejemplo.com) y un nombre descriptivo que aparecerá en el panel.", "ping": "Introduce la dirección IP o el nombre de host para hacer ping (p. ej., 192.168.1.100 o ejemplo.com) y un nombre descriptivo que aparecerá en el panel.",
"port": "Introduce la URL o IP del servidor, el número de puerto y un nombre descriptivo que aparecerá en el panel.", "port": "Introduce la URL o IP del servidor, el número de puerto y un nombre descriptivo que aparecerá en el panel.",
"docker": "Introduce el nombre o ID del contenedor de Docker. Puedes usar el nombre del contenedor (p. ej., my-app) o su ID.", "docker": "Introduce el nombre o ID del contenedor de Docker. Puedes usar el nombre del contenedor (p. ej., my-app) o su ID.",
"game": "Introduce la dirección IP o el nombre de host y el número de puerto para hacer ping (p. ej., 192.168.1.100 o ejemplo.com) y un nombre descriptivo que aparecerá en el panel.", "game": "Introduce la dirección IP o el nombre de host y el número de puerto para hacer ping (p. ej., 192.168.1.100 o ejemplo.com) y un nombre descriptivo que aparecerá en el panel. Algunos juegos requieren habilitar consultas del servidor en su archivo de configuración — consulta la documentación de tu servidor. Consulta la <gamedigLink>lista de juegos compatibles</gamedigLink> para ver los detalles del protocolo.",
"pagespeed": "Rastree el rendimiento de carga de página, Core Web Vitals y puntuaciones de optimización de su sitio web.", "pagespeed": "Rastree el rendimiento de carga de página, Core Web Vitals y puntuaciones de optimización de su sitio web.",
"grpc": "Ingrese el nombre de host y puerto del servidor gRPC, opcionalmente especifique un nombre de servicio para la verificación de salud, y agregue un nombre para mostrar.", "grpc": "Ingrese el nombre de host y puerto del servidor gRPC, opcionalmente especifique un nombre de servicio para la verificación de salud, y agregue un nombre para mostrar.",
"websocket": "Ingrese la URL de WebSocket a monitorear (p. ej., wss://example.com/socket) y agregue un nombre para mostrar.", "websocket": "Ingrese la URL de WebSocket a monitorear (p. ej., wss://example.com/socket) y agregue un nombre para mostrar.",
@@ -776,6 +776,7 @@
"memory": "Uso de memoria", "memory": "Uso de memoria",
"netBytesRecv": "{{name}} - Bytes recibidos", "netBytesRecv": "{{name}} - Bytes recibidos",
"netBytesSent": "{{name}} - Bytes enviados", "netBytesSent": "{{name}} - Bytes enviados",
"netNoTraffic": "Capture no informa tráfico en ninguna interfaz. Esto es normal cuando Capture se ejecuta dentro de un contenedor que solo ve interfaces de loopback — ejecuta Capture directamente en el host para ver actividad de red real.",
"temp": "Temp" "temp": "Temp"
} }
}, },
@@ -1243,8 +1244,8 @@
"description": "Agregue monitores de ejemplo con fines demostrativos." "description": "Agregue monitores de ejemplo con fines demostrativos."
}, },
"removeMonitors": { "removeMonitors": {
"title": "Reinicio del sistema", "title": "Reiniciar sistema",
"description": "Elimine todos los monitores de su sistema.", "description": "Eliminar todos los monitores del sistema.",
"dialog": { "dialog": {
"title": "¿Eliminar todos los monitores?", "title": "¿Eliminar todos los monitores?",
"description": "Esto no se puede deshacer." "description": "Esto no se puede deshacer."
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "", "ping": "",
"port": "", "port": "",
"docker": "", "docker": "",
"game": "", "game": "Anna IP-osoite tai isäntänimi ja portin numero pingausta varten (esim. 192.168.1.100 tai example.com) ja valitse pelityyppi. Jotkin pelit vaativat palvelinkyselyiden käyttöönoton asetustiedostossaan — tarkista pelipalvelimesi dokumentaatio. Katso protokollatiedot <gamedigLink>tuettujen pelien luettelosta</gamedigLink>.",
"pagespeed": "Seuraa sivun latausnopeutta, Core Web Vitals -arvoja ja optimointipisteitä verkkosivustollasi.", "pagespeed": "Seuraa sivun latausnopeutta, Core Web Vitals -arvoja ja optimointipisteitä verkkosivustollasi.",
"grpc": "Syötä gRPC-palvelimen isäntänimi ja portti, määritä halutessasi palvelun nimi terveystarkistusta varten ja lisää näyttönimi.", "grpc": "Syötä gRPC-palvelimen isäntänimi ja portti, määritä halutessasi palvelun nimi terveystarkistusta varten ja lisää näyttönimi.",
"websocket": "Syötä monitoroitava WebSocket URL (esim. wss://example.com/socket) ja lisää näyttönimi.", "websocket": "Syötä monitoroitava WebSocket URL (esim. wss://example.com/socket) ja lisää näyttönimi.",
@@ -769,6 +769,7 @@
"memory": "Muistin käyttö", "memory": "Muistin käyttö",
"netBytesRecv": "{{name}} - tavua vastaanotettu", "netBytesRecv": "{{name}} - tavua vastaanotettu",
"netBytesSent": "{{name}} - tavua lähetetty", "netBytesSent": "{{name}} - tavua lähetetty",
"netNoTraffic": "Capture ilmoittaa nollaliikennettä kaikilla rajapinnoilla. Tämä on normaalia, kun Capture käynnistetään säiliössä, joka näkee vain loopback-rajapinnat — suorita Capture suoraan isännällä nähdäksesi todellisen verkkoaktiviteetin.",
"temp": "Lämpö" "temp": "Lämpö"
} }
}, },
@@ -1236,7 +1237,7 @@
"description": "Lisää esimerkkimonitoreja esittelytarkoituksiin." "description": "Lisää esimerkkimonitoreja esittelytarkoituksiin."
}, },
"removeMonitors": { "removeMonitors": {
"title": "Järjestelmän nollaus", "title": "Järjestelmän palautus",
"description": "Poista kaikki monitorit järjestelmästäsi.", "description": "Poista kaikki monitorit järjestelmästäsi.",
"dialog": { "dialog": {
"title": "Poistetaanko kaikki monitorit?", "title": "Poistetaanko kaikki monitorit?",
+4 -3
View File
@@ -542,7 +542,7 @@
"ping": "Entrez l'adresse IP ou le nom d'hôte à tester (par exemple, 192.168.1.100 ou exemple.fr) et ajoutez un nom familier qui apparaîtra sur le tableau de bord.", "ping": "Entrez l'adresse IP ou le nom d'hôte à tester (par exemple, 192.168.1.100 ou exemple.fr) et ajoutez un nom familier qui apparaîtra sur le tableau de bord.",
"port": "Entrez l'URL ou l'adresse IP du serveur, le numéro de port et un nom d'affichage familier qui apparaîtra sur le tableau de bord.", "port": "Entrez l'URL ou l'adresse IP du serveur, le numéro de port et un nom d'affichage familier qui apparaîtra sur le tableau de bord.",
"docker": "Entrer l'ID Docker du container. Les identifiants Docker doivent être les 64 caractères de l'ID Docker. Vous pouvez utiliser la commande docker inspect <short_id> pour avoir l'ID complet.", "docker": "Entrer l'ID Docker du container. Les identifiants Docker doivent être les 64 caractères de l'ID Docker. Vous pouvez utiliser la commande docker inspect <short_id> pour avoir l'ID complet.",
"game": "", "game": "Saisissez l'adresse IP ou le nom d'hôte et le numéro de port à interroger (par ex. 192.168.1.100 ou example.com) et choisissez le type de jeu. Certains jeux nécessitent l'activation des requêtes serveur dans leur fichier de configuration — consultez la documentation de votre serveur de jeu. Voir la <gamedigLink>liste des jeux pris en charge</gamedigLink> pour les détails du protocole.",
"pagespeed": "Suivez les performances de chargement, les Core Web Vitals et les scores d'optimisation de votre site web.", "pagespeed": "Suivez les performances de chargement, les Core Web Vitals et les scores d'optimisation de votre site web.",
"grpc": "Saisissez le nom d'hôte et le port du serveur gRPC, spécifiez éventuellement un nom de service pour le bilan de santé, et ajoutez un nom d'affichage.", "grpc": "Saisissez le nom d'hôte et le port du serveur gRPC, spécifiez éventuellement un nom de service pour le bilan de santé, et ajoutez un nom d'affichage.",
"websocket": "Saisissez l'URL WebSocket à surveiller (ex. wss://example.com/socket) et ajoutez un nom d'affichage.", "websocket": "Saisissez l'URL WebSocket à surveiller (ex. wss://example.com/socket) et ajoutez un nom d'affichage.",
@@ -769,6 +769,7 @@
"memory": "Utilisation mémoire", "memory": "Utilisation mémoire",
"netBytesRecv": "{{name}} - Octets reçus", "netBytesRecv": "{{name}} - Octets reçus",
"netBytesSent": "{{name}} - Octets envoyés", "netBytesSent": "{{name}} - Octets envoyés",
"netNoTraffic": "Capture ne signale aucun trafic sur toutes les interfaces. C'est normal lorsque Capture s'exécute dans un conteneur qui ne voit que les interfaces de loopback — exécutez Capture directement sur l'hôte pour voir l'activité réseau réelle.",
"temp": "Temp." "temp": "Temp."
} }
}, },
@@ -1236,8 +1237,8 @@
"description": "Ajoutez des moniteurs d'exemple à des fins de démonstration." "description": "Ajoutez des moniteurs d'exemple à des fins de démonstration."
}, },
"removeMonitors": { "removeMonitors": {
"title": "Réinitialisation du système", "title": "Réinitialiser le système",
"description": "Supprimez tous les moniteurs de votre système.", "description": "Supprimer tous les moniteurs de votre système.",
"dialog": { "dialog": {
"title": "Supprimer tous les moniteurs ?", "title": "Supprimer tous les moniteurs ?",
"description": "Cette action est irréversible." "description": "Cette action est irréversible."
+2 -1
View File
@@ -542,7 +542,7 @@
"ping": "pingするIPアドレスまたはホスト名を入力(例: 192.168.1.100 または example.com)し、ダッシュボードに表示される明確な表示名を追加。", "ping": "pingするIPアドレスまたはホスト名を入力(例: 192.168.1.100 または example.com)し、ダッシュボードに表示される明確な表示名を追加。",
"port": "サーバーのURLまたはIP、ポート番号、ダッシュボードに表示される明確な表示名を入力。", "port": "サーバーのURLまたはIP、ポート番号、ダッシュボードに表示される明確な表示名を入力。",
"docker": "コンテナのDocker IDを入力。Docker IDは64文字のフルDocker IDである必要があります。docker inspect <short_id>を実行してフルコンテナIDを取得できます。", "docker": "コンテナのDocker IDを入力。Docker IDは64文字のフルDocker IDである必要があります。docker inspect <short_id>を実行してフルコンテナIDを取得できます。",
"game": "", "game": "Ping を実行する IP アドレスまたはホスト名とポート番号(例: 192.168.1.100 や example.com)を入力し、ゲームタイプを選択してください。一部のゲームでは設定ファイルでサーバークエリを有効にする必要があります — ゲームサーバーのドキュメントを確認してください。プロトコルの詳細は<gamedigLink>サポートされているゲームの一覧</gamedigLink>をご覧ください。",
"pagespeed": "Webサイトのページ読み込みパフォーマンス、Core Web Vitals、最適化スコアを追跡します。", "pagespeed": "Webサイトのページ読み込みパフォーマンス、Core Web Vitals、最適化スコアを追跡します。",
"grpc": "gRPCサーバーのホスト名とポートを入力し、必要に応じてヘルスチェック用のサービス名を指定し、表示名を追加してください。", "grpc": "gRPCサーバーのホスト名とポートを入力し、必要に応じてヘルスチェック用のサービス名を指定し、表示名を追加してください。",
"websocket": "監視するWebSocket URLを入力し(例: wss://example.com/socket)、表示名を追加してください。", "websocket": "監視するWebSocket URLを入力し(例: wss://example.com/socket)、表示名を追加してください。",
@@ -769,6 +769,7 @@
"memory": "メモリ使用率", "memory": "メモリ使用率",
"netBytesRecv": "{{name}} - 受信バイト数", "netBytesRecv": "{{name}} - 受信バイト数",
"netBytesSent": "{{name}} - 送信バイト数", "netBytesSent": "{{name}} - 送信バイト数",
"netNoTraffic": "Capture はすべてのインターフェイスでゼロのトラフィックを報告しています。これは Capture がループバックインターフェイスのみを認識できるコンテナ内で実行されている場合に正常です — 実際のネットワークアクティビティを表示するには、ホスト上で Capture を直接実行してください。",
"temp": "温度" "temp": "温度"
} }
}, },
+4 -3
View File
@@ -542,7 +542,7 @@
"ping": "Insira o endereço IP ou nome de domínio para ping (ex. 192.168.1.100 ou exemplo.com.br) e adicione uma descrição que aparecerá na dashboard.", "ping": "Insira o endereço IP ou nome de domínio para ping (ex. 192.168.1.100 ou exemplo.com.br) e adicione uma descrição que aparecerá na dashboard.",
"port": "Insira a URL ou o IP do servidor, aporta e uma descrição que aparecerá na dashboard.", "port": "Insira a URL ou o IP do servidor, aporta e uma descrição que aparecerá na dashboard.",
"docker": "Insira o Docker Id do seu container. Docker Ids devem ser todos os 64 caracteres. Você pode executar docker inspect <short_id> para descobrir o Id completo.", "docker": "Insira o Docker Id do seu container. Docker Ids devem ser todos os 64 caracteres. Você pode executar docker inspect <short_id> para descobrir o Id completo.",
"game": "", "game": "Digite o endereço IP ou nome de host e o número da porta para pingar (por exemplo, 192.168.1.100 ou example.com) e escolha o tipo de jogo. Alguns jogos exigem habilitar consultas ao servidor no arquivo de configuração — consulte a documentação do seu servidor de jogo. Veja a <gamedigLink>lista de jogos suportados</gamedigLink> para detalhes do protocolo.",
"pagespeed": "Acompanhe o desempenho de carregamento da página, Core Web Vitals e pontuações de otimização do seu site.", "pagespeed": "Acompanhe o desempenho de carregamento da página, Core Web Vitals e pontuações de otimização do seu site.",
"grpc": "Digite o hostname e a porta do servidor gRPC, opcionalmente especifique um nome de serviço para a verificação de saúde e adicione um nome de exibição.", "grpc": "Digite o hostname e a porta do servidor gRPC, opcionalmente especifique um nome de serviço para a verificação de saúde e adicione um nome de exibição.",
"websocket": "Digite a URL do WebSocket para monitorar (ex.: wss://exemplo.com/socket) e adicione um nome de exibição.", "websocket": "Digite a URL do WebSocket para monitorar (ex.: wss://exemplo.com/socket) e adicione um nome de exibição.",
@@ -769,6 +769,7 @@
"memory": "Uso de memória", "memory": "Uso de memória",
"netBytesRecv": "{{name}} - Bytes recebidos", "netBytesRecv": "{{name}} - Bytes recebidos",
"netBytesSent": "{{name}} - Bytes enviados", "netBytesSent": "{{name}} - Bytes enviados",
"netNoTraffic": "Capture está reportando zero tráfego em todas as interfaces. Isso é normal quando Capture é executado dentro de um container que só consegue ver interfaces de loopback — execute Capture diretamente no host para ver a atividade real da rede.",
"temp": "Temp" "temp": "Temp"
} }
}, },
@@ -1236,8 +1237,8 @@
"description": "Adicione monitores de exemplo para fins de demonstração." "description": "Adicione monitores de exemplo para fins de demonstração."
}, },
"removeMonitors": { "removeMonitors": {
"title": "Redefinição do sistema", "title": "Redefinir sistema",
"description": "Remova todos os monitores do seu sistema.", "description": "Remover todos os monitores do seu sistema.",
"dialog": { "dialog": {
"title": "Remover todos os monitores?", "title": "Remover todos os monitores?",
"description": "Isso não pode ser desfeito." "description": "Isso não pode ser desfeito."
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "Ведите IP-адрес или имя хоста для пинга (например, 192.168.1.100 или example.com) и добавьте понятное имя, которое будет отображаться на панели инструментов.", "ping": "Ведите IP-адрес или имя хоста для пинга (например, 192.168.1.100 или example.com) и добавьте понятное имя, которое будет отображаться на панели инструментов.",
"port": "Введите URL-адрес или IP-адрес сервера, номер порта и понятное имя, которое будет отображаться на панели инструментов.", "port": "Введите URL-адрес или IP-адрес сервера, номер порта и понятное имя, которое будет отображаться на панели инструментов.",
"docker": "Введите Docker ID вашего контейнера. Docker ID должен быть полным 64-символьным Docker ID. Вы можете запустить docker inspect <short_id>, чтобы получить полный ID контейнера.", "docker": "Введите Docker ID вашего контейнера. Docker ID должен быть полным 64-символьным Docker ID. Вы можете запустить docker inspect <short_id>, чтобы получить полный ID контейнера.",
"game": "Введите IP-адрес или имя хоста и номер порта для пинга (например, 192.168.1.100 или example.com) и выберите тип игры.", "game": "Введите IP-адрес или имя хоста и номер порта для пинга (например, 192.168.1.100 или example.com) и выберите тип игры. Некоторым играм требуется включить серверные запросы в файле конфигурации — проверьте документацию вашего игрового сервера. См. <gamedigLink>список поддерживаемых игр</gamedigLink> для деталей протокола.",
"pagespeed": "Отслеживайте производительность загрузки, Core Web Vitals и показатели оптимизации для Вашего сайта.", "pagespeed": "Отслеживайте производительность загрузки, Core Web Vitals и показатели оптимизации для Вашего сайта.",
"grpc": "Введите имя хоста и порт gRPC-сервера, при необходимости укажите имя сервиса для проверки состояния и добавьте отображаемое имя.", "grpc": "Введите имя хоста и порт gRPC-сервера, при необходимости укажите имя сервиса для проверки состояния и добавьте отображаемое имя.",
"websocket": "Введите WebSocket URL для мониторинга (напр., wss://example.com/socket) и добавьте отображаемое имя.", "websocket": "Введите WebSocket URL для мониторинга (напр., wss://example.com/socket) и добавьте отображаемое имя.",
@@ -769,6 +769,7 @@
"memory": "Использование памяти", "memory": "Использование памяти",
"netBytesRecv": "{{name}} - байт получено", "netBytesRecv": "{{name}} - байт получено",
"netBytesSent": "{{name}} - байт отправлено", "netBytesSent": "{{name}} - байт отправлено",
"netNoTraffic": "Capture сообщает о нулевом трафике на всех интерфейсах. Это нормально, когда Capture работает внутри контейнера, который видит только loopback-интерфейсы — запустите Capture непосредственно на хосте, чтобы увидеть реальную сетевую активность.",
"temp": "Температура" "temp": "Температура"
} }
}, },
@@ -1237,7 +1238,7 @@
}, },
"removeMonitors": { "removeMonitors": {
"title": "Сброс системы", "title": "Сброс системы",
"description": "Удалить все мониторы из Вашей системы.", "description": "Удалить все мониторы из вашей системы.",
"dialog": { "dialog": {
"title": "Удалить все мониторы?", "title": "Удалить все мониторы?",
"description": "Это действие нельзя отменить." "description": "Это действие нельзя отменить."
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "กรอกที่อยู่ IP หรือชื่อโฮสต์ที่ต้องการ ping (เช่น 192.168.1.100 หรือ example.com) และตั้งชื่อที่ชัดเจนให้แสดงบนแดชบอร์ด", "ping": "กรอกที่อยู่ IP หรือชื่อโฮสต์ที่ต้องการ ping (เช่น 192.168.1.100 หรือ example.com) และตั้งชื่อที่ชัดเจนให้แสดงบนแดชบอร์ด",
"port": "กรอก URL หรือ IP ของเซิร์ฟเวอร์ หมายเลขพอร์ต และตั้งชื่อที่ชัดเจนให้แสดงบนแดชบอร์ด", "port": "กรอก URL หรือ IP ของเซิร์ฟเวอร์ หมายเลขพอร์ต และตั้งชื่อที่ชัดเจนให้แสดงบนแดชบอร์ด",
"docker": "กรอกชื่อหรือ ID ของคอนเทนเนอร์ Docker คุณสามารถใช้ชื่อคอนเทนเนอร์ (เช่น my-app) หรือ ID ของคอนเทนเนอร์ (ID เต็ม 64 ตัวอักษร หรือ ID สั้น)", "docker": "กรอกชื่อหรือ ID ของคอนเทนเนอร์ Docker คุณสามารถใช้ชื่อคอนเทนเนอร์ (เช่น my-app) หรือ ID ของคอนเทนเนอร์ (ID เต็ม 64 ตัวอักษร หรือ ID สั้น)",
"game": "กรอกที่อยู่ IP หรือชื่อโฮสต์และหมายเลขพอร์ตเพื่อทำการ ping (เช่น 192.168.1.100 หรือ example.com) และเลือกประเภทเกม", "game": "กรอกที่อยู่ IP หรือชื่อโฮสต์และหมายเลขพอร์ตเพื่อทำการ ping (เช่น 192.168.1.100 หรือ example.com) และเลือกประเภทเกม เกมบางเกมต้องเปิดใช้งานการสอบถามเซิร์ฟเวอร์ในไฟล์การตั้งค่า — โปรดดูเอกสารของเซิร์ฟเวอร์เกมของคุณ ดู<gamedigLink>รายการเกมที่รองรับ</gamedigLink>สำหรับรายละเอียดของโปรโตคอล",
"pagespeed": "ติดตามประสิทธิภาพการโหลดหน้า Core Web Vitals และคะแนนการเพิ่มประสิทธิภาพของเว็บไซต์", "pagespeed": "ติดตามประสิทธิภาพการโหลดหน้า Core Web Vitals และคะแนนการเพิ่มประสิทธิภาพของเว็บไซต์",
"grpc": "กรอกชื่อโฮสต์และพอร์ตของเซิร์ฟเวอร์ gRPC ระบุชื่อบริการสำหรับ health check (ไม่บังคับ) และตั้งชื่อที่แสดง", "grpc": "กรอกชื่อโฮสต์และพอร์ตของเซิร์ฟเวอร์ gRPC ระบุชื่อบริการสำหรับ health check (ไม่บังคับ) และตั้งชื่อที่แสดง",
"websocket": "กรอก URL ของ WebSocket ที่ต้องการตรวจสอบ (เช่น wss://example.com/socket) และตั้งชื่อที่แสดง", "websocket": "กรอก URL ของ WebSocket ที่ต้องการตรวจสอบ (เช่น wss://example.com/socket) และตั้งชื่อที่แสดง",
@@ -769,6 +769,7 @@
"memory": "การใช้งานหน่วยความจำ", "memory": "การใช้งานหน่วยความจำ",
"netBytesRecv": "{{name}} - ไบต์ที่รับ", "netBytesRecv": "{{name}} - ไบต์ที่รับ",
"netBytesSent": "{{name}} - ไบต์ที่ส่ง", "netBytesSent": "{{name}} - ไบต์ที่ส่ง",
"netNoTraffic": "Capture รายงานว่าไม่มีการรับส่งข้อมูลบนอินเทอร์เฟซใดๆ เลย ซึ่งเป็นเรื่องปกติเมื่อ Capture ทำงานอยู่ในคอนเทนเนอร์ที่มองเห็นเพียงอินเทอร์เฟซ loopback เท่านั้น — รัน Capture บนโฮสต์โดยตรงเพื่อดูกิจกรรมเครือข่ายจริง",
"temp": "อุณหภูมิ" "temp": "อุณหภูมิ"
} }
}, },
@@ -1237,7 +1238,7 @@
}, },
"removeMonitors": { "removeMonitors": {
"title": "รีเซ็ตระบบ", "title": "รีเซ็ตระบบ",
"description": "ลบมอนิเตอร์ทั้งหมดออกจากระบบ", "description": "ลบมอนิเตอร์ทั้งหมดจากระบบของคุณ",
"dialog": { "dialog": {
"title": "ลบมอนิเตอร์ทั้งหมด?", "title": "ลบมอนิเตอร์ทั้งหมด?",
"description": "ไม่สามารถย้อนกลับได้" "description": "ไม่สามารถย้อนกลับได้"
+4 -3
View File
@@ -542,7 +542,7 @@
"ping": "", "ping": "",
"port": "", "port": "",
"docker": "", "docker": "",
"game": "", "game": "Ping atılacak IP adresini veya ana bilgisayar adını ve port numarasını girin (ör. 192.168.1.100 veya example.com) ve oyun türünü seçin. Bazı oyunlar yapılandırma dosyasında sunucu sorgularının etkinleştirilmesini gerektirir — oyun sunucunuzun belgelerine bakın. Protokol ayrıntıları için <gamedigLink>desteklenen oyunlar listesine</gamedigLink> bakın.",
"pagespeed": "Web sitenizin sayfa yükleme performansını, Core Web Vitals metriklerini ve optimizasyon puanlarını takip edin.", "pagespeed": "Web sitenizin sayfa yükleme performansını, Core Web Vitals metriklerini ve optimizasyon puanlarını takip edin.",
"grpc": "gRPC sunucusunun ana bilgisayar adını ve portunu girin, isteğe bağlı olarak sağlık kontrolü için bir servis adı belirtin ve bir görünen ad ekleyin.", "grpc": "gRPC sunucusunun ana bilgisayar adını ve portunu girin, isteğe bağlı olarak sağlık kontrolü için bir servis adı belirtin ve bir görünen ad ekleyin.",
"websocket": "İzlenecek WebSocket URL'sini girin (örn. wss://example.com/socket) ve bir görünen ad ekleyin.", "websocket": "İzlenecek WebSocket URL'sini girin (örn. wss://example.com/socket) ve bir görünen ad ekleyin.",
@@ -769,6 +769,7 @@
"memory": "Bellek kullanımı", "memory": "Bellek kullanımı",
"netBytesRecv": "{{name}} - Alınan bayt", "netBytesRecv": "{{name}} - Alınan bayt",
"netBytesSent": "{{name}} - Gönderilen bayt", "netBytesSent": "{{name}} - Gönderilen bayt",
"netNoTraffic": "Capture tüm arabirimlerde sıfır trafik raporluyor. Bu, Capture yalnızca loopback arabirimlerini görebilen bir konteyner içinde çalışırken normaldir — gerçek ağ etkinliğini görmek için Capture'ı doğrudan host üzerinde çalıştırın.",
"temp": "Sıcaklık" "temp": "Sıcaklık"
} }
}, },
@@ -1236,8 +1237,8 @@
"description": "Gösterim amaçlı örnek monitörler ekleyin." "description": "Gösterim amaçlı örnek monitörler ekleyin."
}, },
"removeMonitors": { "removeMonitors": {
"title": "Sistem sıfırlama", "title": "Sistemi sıfırla",
"description": "Sisteminizdeki tüm monitörleri kaldırın.", "description": "Sistemdeki tüm monitörleri kaldır.",
"dialog": { "dialog": {
"title": "Tüm monitörler kaldırılsın mı?", "title": "Tüm monitörler kaldırılsın mı?",
"description": "Bu işlem geri alınamaz." "description": "Bu işlem geri alınamaz."
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "", "ping": "",
"port": "", "port": "",
"docker": "", "docker": "",
"game": "", "game": "Введіть IP-адресу або ім'я хоста та номер порту для пінгу (наприклад, 192.168.1.100 або example.com) і виберіть тип гри. Деяким іграм потрібно ввімкнути серверні запити у файлі конфігурації — перевірте документацію вашого ігрового сервера. Деталі протоколу див. у <gamedigLink>списку підтримуваних ігор</gamedigLink>.",
"pagespeed": "Відстежуйте швидкість завантаження сторінки, показники Core Web Vitals та оцінки оптимізації Вашого сайту.", "pagespeed": "Відстежуйте швидкість завантаження сторінки, показники Core Web Vitals та оцінки оптимізації Вашого сайту.",
"grpc": "Введіть ім'я хоста та порт gRPC-сервера, за бажанням вкажіть назву сервісу для перевірки стану та додайте відображуване ім'я.", "grpc": "Введіть ім'я хоста та порт gRPC-сервера, за бажанням вкажіть назву сервісу для перевірки стану та додайте відображуване ім'я.",
"websocket": "Введіть WebSocket URL для моніторингу (напр., wss://example.com/socket) та додайте відображуване ім'я.", "websocket": "Введіть WebSocket URL для моніторингу (напр., wss://example.com/socket) та додайте відображуване ім'я.",
@@ -769,6 +769,7 @@
"memory": "Використання пам'яті", "memory": "Використання пам'яті",
"netBytesRecv": "{{name}} - Отримано байтів", "netBytesRecv": "{{name}} - Отримано байтів",
"netBytesSent": "{{name}} - Надіслано байтів", "netBytesSent": "{{name}} - Надіслано байтів",
"netNoTraffic": "Capture повідомляє про нульовий трафік на всіх інтерфейсах. Це нормально, коли Capture працює всередині контейнера, який бачить лише loopback-інтерфейси — запустіть Capture безпосередньо на хості, щоб побачити реальну мережеву активність.",
"temp": "Темп." "temp": "Темп."
} }
}, },
@@ -1237,7 +1238,7 @@
}, },
"removeMonitors": { "removeMonitors": {
"title": "Скидання системи", "title": "Скидання системи",
"description": "Видалити всі монітори з Вашої системи.", "description": "Видалити всі монітори з вашої системи.",
"dialog": { "dialog": {
"title": "Видалити всі монітори?", "title": "Видалити всі монітори?",
"description": "Це не можна скасувати." "description": "Це не можна скасувати."
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "", "ping": "",
"port": "", "port": "",
"docker": "", "docker": "",
"game": "", "game": "Nhập địa chỉ IP hoặc tên máy chủ và số cổng để ping (ví dụ: 192.168.1.100 hoặc example.com) và chọn loại trò chơi. Một số trò chơi yêu cầu bật truy vấn máy chủ trong tệp cấu hình của chúng — hãy xem tài liệu của máy chủ trò chơi. Xem <gamedigLink>danh sách các trò chơi được hỗ trợ</gamedigLink> để biết chi tiết giao thức.",
"pagespeed": "Theo dõi hiệu suất tải trang, Core Web Vitals và điểm tối ưu hóa cho trang web của bạn.", "pagespeed": "Theo dõi hiệu suất tải trang, Core Web Vitals và điểm tối ưu hóa cho trang web của bạn.",
"grpc": "Nhập tên máy chủ và cổng của máy chủ gRPC, tùy chọn chỉ định tên dịch vụ cho kiểm tra sức khỏe và thêm tên hiển thị.", "grpc": "Nhập tên máy chủ và cổng của máy chủ gRPC, tùy chọn chỉ định tên dịch vụ cho kiểm tra sức khỏe và thêm tên hiển thị.",
"websocket": "Nhập URL WebSocket cần giám sát (vd: wss://example.com/socket) và thêm tên hiển thị.", "websocket": "Nhập URL WebSocket cần giám sát (vd: wss://example.com/socket) và thêm tên hiển thị.",
@@ -769,6 +769,7 @@
"memory": "Sử dụng bộ nhớ", "memory": "Sử dụng bộ nhớ",
"netBytesRecv": "{{name}} - Byte nhận", "netBytesRecv": "{{name}} - Byte nhận",
"netBytesSent": "{{name}} - Byte gửi", "netBytesSent": "{{name}} - Byte gửi",
"netNoTraffic": "Capture đang báo cáo lưu lượng bằng không trên mọi giao diện. Điều này là bình thường khi Capture chạy bên trong một container chỉ có thể thấy các giao diện loopback — hãy chạy Capture trực tiếp trên máy chủ để xem hoạt động mạng thực tế.",
"temp": "Nhiệt độ" "temp": "Nhiệt độ"
} }
}, },
@@ -1237,7 +1238,7 @@
}, },
"removeMonitors": { "removeMonitors": {
"title": "Đặt lại hệ thống", "title": "Đặt lại hệ thống",
"description": "Xóa tất cả trình giám sát khỏi hệ thống.", "description": "Xóa tất cả các monitor khỏi hệ thống của bạn.",
"dialog": { "dialog": {
"title": "Xóa tất cả trình giám sát?", "title": "Xóa tất cả trình giám sát?",
"description": "Không thể hoàn tác." "description": "Không thể hoàn tác."
+3 -2
View File
@@ -542,7 +542,7 @@
"ping": "输入要 ping 的 IP 地址或主机名(例如.. 192.168.1.100 或 example.com),并添加显示在仪表板上的清晰显示名称。", "ping": "输入要 ping 的 IP 地址或主机名(例如.. 192.168.1.100 或 example.com),并添加显示在仪表板上的清晰显示名称。",
"port": "输入服务器的 URL 或 IP、端口号和仪表板上显示的清晰显示名称。", "port": "输入服务器的 URL 或 IP、端口号和仪表板上显示的清晰显示名称。",
"docker": "码输入 Docker 容器名称或 ID。您可以使用容器名称(例如.. my-app)或容器 ID(完整的 64 字符 ID 或短 ID)。", "docker": "码输入 Docker 容器名称或 ID。您可以使用容器名称(例如.. my-app)或容器 ID(完整的 64 字符 ID 或短 ID)。",
"game": "输入要 ping 的 IP 地址或主机名和端口号(例如.. 192.168.1.100 或 example.com)并选择游戏类型。", "game": "输入要 ping 的 IP 地址或主机名和端口号(例如.. 192.168.1.100 或 example.com)并选择游戏类型。某些游戏需要在配置文件中启用服务器查询 — 请查阅你的游戏服务器文档。详见<gamedigLink>支持的游戏列表</gamedigLink>了解协议细节。",
"pagespeed": "跟踪网站的页面加载性能、Core Web Vitals 和优化评分。", "pagespeed": "跟踪网站的页面加载性能、Core Web Vitals 和优化评分。",
"grpc": "输入 gRPC 服务器的主机名和端口,可选指定健康检查的服务名称,并添加显示名称。", "grpc": "输入 gRPC 服务器的主机名和端口,可选指定健康检查的服务名称,并添加显示名称。",
"websocket": "输入要监控的 WebSocket URL(例如 wss://example.com/socket),并添加显示名称。", "websocket": "输入要监控的 WebSocket URL(例如 wss://example.com/socket),并添加显示名称。",
@@ -769,6 +769,7 @@
"memory": "内存使用率", "memory": "内存使用率",
"netBytesRecv": "{{name}} - 接收字节", "netBytesRecv": "{{name}} - 接收字节",
"netBytesSent": "{{name}} - 发送字节", "netBytesSent": "{{name}} - 发送字节",
"netNoTraffic": "Capture 报告所有接口的流量均为零。当 Capture 在只能看到回环接口的容器内运行时,这属于正常情况——请直接在主机上运行 Capture 才能看到真实的网络活动。",
"temp": "温度" "temp": "温度"
} }
}, },
@@ -1237,7 +1238,7 @@
}, },
"removeMonitors": { "removeMonitors": {
"title": "系统重置", "title": "系统重置",
"description": "从系统中移除所有监控。", "description": "从系统中移除所有监视器。",
"dialog": { "dialog": {
"title": "移除所有监控?", "title": "移除所有监控?",
"description": "此操作无法撤销。" "description": "此操作无法撤销。"
+4 -3
View File
@@ -542,7 +542,7 @@
"ping": "輸入要 Ping 的 IP 位址或主機名稱(例如 192.168.1.100 或 example.com),並新增一個顯示在儀表板上的清晰顯示名稱。", "ping": "輸入要 Ping 的 IP 位址或主機名稱(例如 192.168.1.100 或 example.com),並新增一個顯示在儀表板上的清晰顯示名稱。",
"port": "輸入伺服器的 URL 或 IP、連接埠號碼,以及顯示在儀表板上的清晰顯示名稱。", "port": "輸入伺服器的 URL 或 IP、連接埠號碼,以及顯示在儀表板上的清晰顯示名稱。",
"docker": "輸入 Docker 容器名稱或 ID。您可以使用容器名稱(例如 my-app)或容器 ID(完整的 64 字元 ID 或短 ID)。", "docker": "輸入 Docker 容器名稱或 ID。您可以使用容器名稱(例如 my-app)或容器 ID(完整的 64 字元 ID 或短 ID)。",
"game": "輸入要 Ping 的 IP 位址或主機名稱及連接埠號碼(例如 192.168.1.100 或 example.com),並選擇遊戲類型。", "game": "輸入要 Ping 的 IP 位址或主機名稱及連接埠號碼(例如 192.168.1.100 或 example.com),並選擇遊戲類型。部分遊戲需要在設定檔中啟用伺服器查詢 — 請參閱你的遊戲伺服器文件。詳見<gamedigLink>支援的遊戲清單</gamedigLink>了解協定細節。",
"pagespeed": "追蹤您網站的頁面載入效能、Core Web Vitals 和最佳化分數。", "pagespeed": "追蹤您網站的頁面載入效能、Core Web Vitals 和最佳化分數。",
"grpc": "輸入 gRPC 伺服器的主機名稱和連接埠,可選擇指定健康檢查的服務名稱,並新增一個顯示名稱。", "grpc": "輸入 gRPC 伺服器的主機名稱和連接埠,可選擇指定健康檢查的服務名稱,並新增一個顯示名稱。",
"websocket": "輸入要監控的 WebSocket URL(例如 wss://example.com/socket),並新增一個顯示名稱。", "websocket": "輸入要監控的 WebSocket URL(例如 wss://example.com/socket),並新增一個顯示名稱。",
@@ -769,6 +769,7 @@
"memory": "記憶體使用率", "memory": "記憶體使用率",
"netBytesRecv": "{{name}} - 接收位元組", "netBytesRecv": "{{name}} - 接收位元組",
"netBytesSent": "{{name}} - 發送位元組", "netBytesSent": "{{name}} - 發送位元組",
"netNoTraffic": "Capture 回報所有介面的流量皆為零。當 Capture 在只能看到回環介面的容器中執行時,這是正常情況——請直接在主機上執行 Capture 才能看到實際的網路活動。",
"temp": "溫度" "temp": "溫度"
} }
}, },
@@ -1236,8 +1237,8 @@
"description": "新增範例監控以供示範用途。" "description": "新增範例監控以供示範用途。"
}, },
"removeMonitors": { "removeMonitors": {
"title": "系統重設", "title": "系統重置",
"description": "從系統中移除所有監控。", "description": "從系統中移除所有監視器。",
"dialog": { "dialog": {
"title": "移除所有監控?", "title": "移除所有監控?",
"description": "此操作無法復原。" "description": "此操作無法復原。"
@@ -232,10 +232,17 @@ export class StatusService implements IStatusService {
// Build the status patch — computed against the projected window // Build the status patch — computed against the projected window
const patch: Partial<Monitor> = {}; const patch: Partial<Monitor> = {};
// Not enough data points yet // Resolve "initializing" up-front, incidents should be created on initialization && down
if (projectedWindow.length < monitor.statusWindowSize) { let newStatus: MonitorStatus = monitor.status;
patch.status = status === true ? "up" : "down"; let statusChanged = false;
if (monitor.status === "initializing") {
newStatus = status === true ? "up" : "down";
patch.status = newStatus;
statusChanged = newStatus === "down";
}
// Not enough data points yet — record the check and return
if (projectedWindow.length < monitor.statusWindowSize) {
const updated = await this.monitorsRepository.updateStatusWindowAndChecks( const updated = await this.monitorsRepository.updateStatusWindowAndChecks(
monitor.id, monitor.id,
monitor.teamId, monitor.teamId,
@@ -248,24 +255,13 @@ export class StatusService implements IStatusService {
return { return {
monitor: updated, monitor: updated,
statusChanged: false, statusChanged,
prevStatus, prevStatus,
code, code,
timestamp: Date.now(), timestamp: Date.now(),
}; };
} }
// With a full window, a single raw check must not change UNLESS we are initializing.
// Otherwise, only the sliding-window threshold can trigger a transition.
let newStatus: MonitorStatus;
if (monitor.status === "initializing") {
newStatus = status === true ? "up" : "down";
} else {
newStatus = monitor.status;
}
let statusChanged = false;
// First evaluate reachability-based status changes, which apply to all monitor types // First evaluate reachability-based status changes, which apply to all monitor types
// and take precedence over hardware breaches. // and take precedence over hardware breaches.
const reachabilityResult = this.computeReachability(newStatus, projectedWindow, monitor.statusWindowThreshold); const reachabilityResult = this.computeReachability(newStatus, projectedWindow, monitor.statusWindowThreshold);
@@ -502,9 +502,12 @@ describe("StatusService", () => {
expect(result.monitor.status).toBe("down"); expect(result.monitor.status).toBe("down");
}); });
it("during warmup (window not full) the stored status tracks the raw check", async () => { it("during warmup, sub-threshold raw checks no longer flip stored status (regression: down-during-init incident not resolving)", async () => {
// Early-return branch: monitor.status is written to reflect the current check and // Once the monitor has left 'initializing', the warmup branch must NOT silently
// no status-changed notification is emitted. This is the service's documented warmup behavior. // flip status from raw checks. Otherwise a down check during warmup writes
// status='down' without statusChanged, and the next up check leaks status='up'
// the same way — by the time the window fills, monitor.status is already 'up'
// and computeReachability cannot fire down→up to resolve the incident.
const monitor = makeMonitor({ statusWindow: [true, true], statusWindowSize: 5, status: "up" }); const monitor = makeMonitor({ statusWindow: [true, true], statusWindowSize: 5, status: "up" });
const { service, monitorsRepository } = createService(); const { service, monitorsRepository } = createService();
(monitorsRepository.findById as jest.Mock).mockResolvedValue(monitor); (monitorsRepository.findById as jest.Mock).mockResolvedValue(monitor);
@@ -513,10 +516,58 @@ describe("StatusService", () => {
const result = await service.updateMonitorStatus(makeStatusResponse({ status: false }), makeCheck({ status: false })); const result = await service.updateMonitorStatus(makeStatusResponse({ status: false }), makeCheck({ status: false }));
expect(result.statusChanged).toBe(false); expect(result.statusChanged).toBe(false);
expect(result.monitor.status).toBe("down"); expect(result.monitor.status).toBe("up");
expect(monitor.statusWindow).toEqual([true, true, false]); expect(monitor.statusWindow).toEqual([true, true, false]);
}); });
it("creates incident on initial down check when statusWindowSize is 1 (regression: alert on initial down skips warmup branch)", async () => {
// statusWindowSize=1 means the very first check skips the warmup branch entirely
// (1 < 1 is false) and lands in the full-window branch. The 'initializing' override
// must still surface statusChanged=true on a down result, otherwise computeReachability
// sees currentStatus='down' and refuses to transition, and no incident is opened.
const monitor = makeMonitor({ statusWindow: [], statusWindowSize: 1, statusWindowThreshold: 60, status: "initializing" });
const { service, monitorsRepository } = createService();
(monitorsRepository.findById as jest.Mock).mockResolvedValue(monitor);
(monitorsRepository.updateById as jest.Mock).mockImplementation((_id: unknown, _tid: unknown, m: unknown) => Promise.resolve(m));
const result = await service.updateMonitorStatus(makeStatusResponse({ status: false }), makeCheck({ status: false }));
expect(result.statusChanged).toBe(true);
expect(result.monitor.status).toBe("down");
expect(result.prevStatus).toBe("initializing");
});
it("creates incident on initial down check for a brand-new monitor (regression: alert on initial down)", async () => {
// Brand-new monitor: status='initializing', empty statusWindow. First check is down.
// Must surface statusChanged=true with monitor.status='down' so the helper opens an incident.
const monitor = makeMonitor({ statusWindow: [], statusWindowSize: 5, status: "initializing" });
const { service, monitorsRepository } = createService();
(monitorsRepository.findById as jest.Mock).mockResolvedValue(monitor);
(monitorsRepository.updateById as jest.Mock).mockImplementation((_id: unknown, _tid: unknown, m: unknown) => Promise.resolve(m));
const result = await service.updateMonitorStatus(makeStatusResponse({ status: false }), makeCheck({ status: false }));
expect(result.statusChanged).toBe(true);
expect(result.monitor.status).toBe("down");
expect(result.prevStatus).toBe("initializing");
});
it("does not flip status on subsequent checks during warmup once 'initializing' has been left (regression: down→up incident resolves once window fills)", async () => {
// After a 'initializing'→'down' transition on check #1, monitor.status is now 'down'
// and statusWindow has one false. Subsequent up checks during warmup must leave
// monitor.status='down' so the sliding window can detect the down→up transition
// once the window fills.
const monitor = makeMonitor({ statusWindow: [false], statusWindowSize: 5, status: "down" });
const { service, monitorsRepository } = createService();
(monitorsRepository.findById as jest.Mock).mockResolvedValue(monitor);
(monitorsRepository.updateById as jest.Mock).mockImplementation((_id: unknown, _tid: unknown, m: unknown) => Promise.resolve(m));
const result = await service.updateMonitorStatus(makeStatusResponse({ status: true }), makeCheck({ status: true }));
expect(result.statusChanged).toBe(false);
expect(result.monitor.status).toBe("down");
});
it("logs a warning but still succeeds when running-stats update fails mid-flight", async () => { it("logs a warning but still succeeds when running-stats update fails mid-flight", async () => {
const monitor = makeMonitor({ statusWindow: [true, true, true, true], statusWindowSize: 5, status: "up" }); const monitor = makeMonitor({ statusWindow: [true, true, true, true], statusWindowSize: 5, status: "up" });
const { service, logger, monitorsRepository, monitorStatsRepository } = createService(); const { service, logger, monitorsRepository, monitorStatsRepository } = createService();