diff --git a/CLAUDE.md b/CLAUDE.md index 9af1a6742..c5f16d3a9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,20 +12,22 @@ Checkmate is an open-source uptime and infrastructure monitoring application. It ```bash cd client npm install -npm run dev # Start dev server at http://localhost:5173 +npm run dev -- --port 10001 --strictPort # Local dev port is 10001 (5173 is used by another project on this machine) npm run build # TypeScript check + production build npm run lint # ESLint (strict, max-warnings 0) npm run format # Prettier formatting npm run format-check # Check formatting ``` +Server `.env` on this machine is configured with `CLIENT_HOST="http://localhost:10001"` to match the client dev port. If you change the client port, keep `.env` in sync. + ### Server (Node.js/Express) ```bash cd server npm install npm run dev # Start with hot-reload (nodemon + tsx) at http://localhost:52345 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-fix # Auto-fix lint issues npm run format # Prettier formatting @@ -157,6 +159,14 @@ When working on anything related to check scheduling, incident lifecycle, or not ## Code Conventions +### Frontend conventions (mandatory for `client/src`) +Read `docs/frontend-conventions.md` before touching any `.tsx` file. Five rules, all enforced in code review: +1. Prefer MUI native props over `sx` (e.g. `color={…}`, `bgcolor={…}`, `mt={…}` — not `sx={{ color, bgcolor, mt }}`). +2. Use the full theme path for colors: `color={theme.palette.text.secondary}`, never `color="text.secondary"` (greppability). +3. No hardcoded literals — use `LAYOUT.*`, `typographyLevels.*`, `theme.shape.borderRadius`, `theme.palette.*`. +4. Use `useTheme()` inside components; don't `import { theme } from "@/Utils/Theme/Theme"`. +5. Pair runtime tuples with derived types: `const X = [...] as const; type X = (typeof X)[number]`. + ### Internationalization All user-facing strings must use the translation function: ```javascript @@ -174,12 +184,13 @@ t('your.key') // Never hardcode UI strings - Both use ESLint with strict settings ### Testing -Server tests use Mocha + Chai + Sinon: +Server tests use Jest (with `--experimental-vm-modules` for ESM): ```bash -npm test # Run all tests with coverage -npm test -- --grep "pattern" # Run specific tests +npm test # Run all tests with coverage +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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 38ca4eeb2..17ad26903 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -240,7 +240,7 @@ docker rm uptime_database_mongo **Need more help?** -- Check the [full documentation](https://docs.checkmate.so) +- Check the [full documentation](https://checkmate.so/docs) - Ask on [Discord](https://discord.com/invite/NAb6H3UTjK) ### Start contributing code? @@ -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). -### 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? 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 -- 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. - No hard-coded strings — use `t('your.key')` for everything visible. - 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. - The pull request addresses only one issue or topic. - 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. @@ -316,7 +302,7 @@ If one or more of these are missing, we may ask you to update your pull request - `master` is used for stable releases. - Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`. - Make sure that you are using the latest version. -- Make sure you run the code locally. The Checkmate [documentation](https://docs.checkmate.so) covers it. +- Make sure you run the code locally. The Checkmate [documentation](https://checkmate.so/docs) covers it. - Find out if the functionality is already covered, maybe by an individual configuration. - Perform a [search](/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. diff --git a/README.es.md b/README.es.md index e57efc2e4..92237ea3c 100644 --- a/README.es.md +++ b/README.es.md @@ -49,11 +49,11 @@ Puedes ver la última versión de [Checkmate](https://checkmate-demo.bluewavelab ## Guía del usuario -Las instrucciones de uso se pueden encontrar [aquí](https://docs.checkmate.so/checkmate-2.1). Todavía está en desarrollo y parte de la información puede estar desactualizada ya que continuamente añadimos funciones cada semana. ¡Ten por seguro que estamos haciendo lo mejor posible! :) +Las instrucciones de uso se pueden encontrar [aquí](https://checkmate.so/docs). Todavía está en desarrollo y parte de la información puede estar desactualizada ya que continuamente añadimos funciones cada semana. ¡Ten por seguro que estamos haciendo lo mejor posible! :) ## Instalación -Consulta las instrucciones de instalación en el [portal de documentación de Checkmate](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart). +Consulta las instrucciones de instalación en el [portal de documentación de Checkmate](https://checkmate.so/docs/getting-started/installation). Alternativamente, también puedes usar [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md) o [Pikapods](https://www.pikapods.com/) para desplegar rápidamente una instancia de Checkmate. Si deseas monitorear tu infraestructura de servidores, necesitarás el agente [Capture](https://github.com/bluewave-labs/capture). El repositorio de Capture también contiene las instrucciones de instalación. @@ -147,7 +147,7 @@ Cómo contribuir: 0. Dale una estrella al repositorio :) 1. Revisa la [guía para contribuidores](https://github.com/bluewave-labs/Checkmate/blob/develop/CONTRIBUTING.md). Se anima a los nuevos a revisar las etiquetas `good-first-issue`. -2. Consulta la [estructura del proyecto](https://docs.checkmate.so/checkmate-2.1/developers-guide/general-project-structure) y la [visión general](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview). +2. Consulta la [estructura del proyecto](https://deepwiki.com/bluewave-labs/Checkmate#system-architecture) y la [visión general](https://deepwiki.com/bluewave-labs/Checkmate#overview). 3. Lee una estructura detallada de [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) si deseas profundizar en la arquitectura. 4. Abre un issue si crees que has encontrado un error. 5. Revisa los issues con la etiqueta `good-first-issue` si eres nuevo. diff --git a/README.md b/README.md index 0402ea5f0..3f32f1b60 100644 --- a/README.md +++ b/README.md @@ -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) -## 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). diff --git a/client/.eslintrc.cjs b/client/.eslintrc.cjs index 86d523a6f..f8bd3d31f 100644 --- a/client/.eslintrc.cjs +++ b/client/.eslintrc.cjs @@ -1,3 +1,104 @@ +// MUI sx keys that have a native (system) prop equivalent. +// Flagged when found inside an sx={{ ... }} object literal — see frontend-conventions.md rule #1. +const SX_NATIVE_EQUIVALENT_KEYS = [ + "color", + "bgcolor", + "backgroundColor", + "borderRadius", + "border", + "borderTop", + "borderBottom", + "borderLeft", + "borderRight", + "width", + "height", + "minHeight", + "maxWidth", + "minWidth", + "maxHeight", + "p", + "pt", + "pb", + "px", + "py", + "pl", + "pr", + "m", + "mt", + "mb", + "mx", + "my", + "ml", + "mr", + "display", + "textAlign", + "fontWeight", + "fontSize", + "lineHeight", + "gap", +]; + +// MUI components that accept system props as top-level attributes. +// sx={{ color, p, mt, ... }} on these can be hoisted into native props. +// Dialog*, Drawer*, Menu*, Tab*, Toolbar etc. only accept sx — don't flag those. +const SX_HOISTABLE_COMPONENTS = [ + "Box", + "Stack", + "Typography", + "Grid", + "Container", + "Paper", + "Card", + "CardContent", + "CardActions", + "CardHeader", + "Divider", + "Link", + "Chip", +]; + +const sxKeySelector = SX_HOISTABLE_COMPONENTS.flatMap((component) => + SX_NATIVE_EQUIVALENT_KEYS.map( + (k) => + `JSXOpeningElement[name.name='${component}'] > JSXAttribute[name.name='sx'] > JSXExpressionContainer > ObjectExpression > Property[key.name='${k}']` + ) +).join(", "); + +const FRONTEND_CONVENTION_RULES = { + // Rule #2 — color/bgcolor/borderColor as a string shorthand like "text.secondary". + // Catches: — should be color={theme.palette.text.secondary}. + "no-restricted-syntax": [ + "warn", + { + selector: + "JSXAttribute[name.name=/^(color|bgcolor|borderColor)$/] > Literal[value=/\\./]", + message: + 'Use the full theme path instead of a string shorthand. e.g. color={theme.palette.text.secondary} not color="text.secondary". See docs/frontend-conventions.md rule #2.', + }, + { + // Rule #1 — sx={{ key: ... }} where key has a native prop equivalent. + selector: sxKeySelector, + message: + "Hoist this key out of `sx` onto the component as a native MUI prop (e.g. color={...}, mt={...}, width={...}). See docs/frontend-conventions.md rule #1.", + }, + { + // Rule #4 — importing the singleton theme from the Theme module. + // Catches: import { theme } from "@/Utils/Theme/Theme" — should be useTheme() inside the component. + selector: + "ImportDeclaration[source.value='@/Utils/Theme/Theme'] > ImportSpecifier[imported.name='theme']", + message: + "Don't import { theme } from @/Utils/Theme/Theme — use the useTheme() hook inside the component. See docs/frontend-conventions.md rule #4.", + }, + { + // Rule #3 (subset) — Typography fontSize={13} is the body default; drop it. + selector: + "JSXOpeningElement[name.name='Typography'] JSXAttribute[name.name='fontSize'] > JSXExpressionContainer > Literal[value=13]", + message: + "fontSize={13} is the Typography body default — drop the prop. For other sizes use typographyLevels tokens. See docs/frontend-conventions.md rule #3.", + }, + ], +}; + module.exports = { root: true, env: { browser: true, es2020: true }, @@ -15,9 +116,43 @@ module.exports = { "react/jsx-no-target-blank": "off", "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], "react/no-unescaped-entities": "off", + ...FRONTEND_CONVENTION_RULES, }, globals: { __APP_VERSION__: "readonly", process: "readonly", }, + overrides: [ + { + files: ["**/*.ts", "**/*.tsx"], + parser: "@typescript-eslint/parser", + parserOptions: { ecmaVersion: "latest", sourceType: "module" }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:react-hooks/recommended", + ], + plugins: ["@typescript-eslint", "react-refresh"], + rules: { + "react/jsx-no-target-blank": "off", + "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], + "react/no-unescaped-entities": "off", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, + ], + // TS handles these; eslint duplicates create noise on existing files. + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/no-non-null-assertion": "off", + ...FRONTEND_CONVENTION_RULES, + }, + }, + ], }; diff --git a/client/NOTICE b/client/NOTICE new file mode 100644 index 000000000..a72e9c36f --- /dev/null +++ b/client/NOTICE @@ -0,0 +1,18 @@ +Checkmate +Copyright (c) BlueWave Labs + +This product includes assets developed by third parties. + +---------------------------------------------------------------------- + +King chess-piece silhouette used in the Checkmate logo +(client/src/assets/icons/checkmate-icon.svg and + client/public/checkmate_favicon.svg) +is adapted from "Chess klt45.svg" by Cburnett, available at: + https://commons.wikimedia.org/wiki/File:Chess_klt45.svg +Licensed under Creative Commons Attribution-ShareAlike 3.0 Unported +(CC BY-SA 3.0): https://creativecommons.org/licenses/by-sa/3.0/ + +The original artwork has been recolored from the white-with-black-stroke +chess piece to the Checkmate brand green (#13715B) for use as a logo. +Modifications: stroke color change only; geometry unchanged. diff --git a/client/package-lock.json b/client/package-lock.json index 7462d95d7..445e09548 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "client", - "version": "0.0.0", + "version": "3.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "client", - "version": "0.0.0", + "version": "3.7.0", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", @@ -20,7 +20,6 @@ "@types/maplibre-gl": "^1.13.2", "axios": "^1.7.4", "dayjs": "1.11.13", - "flag-icons": "7.3.2", "html2canvas": "^1.4.1", "human-interval": "2.0.1", "i18next": "25.4.2", @@ -50,6 +49,8 @@ "@types/node": "24.5.2", "@types/react": "^18.2.66", "@types/react-dom": "^18.2.22", + "@typescript-eslint/eslint-plugin": "^7.18.0", + "@typescript-eslint/parser": "^7.18.0", "@vitejs/plugin-react": "^4.2.1", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.1", @@ -2351,6 +2352,238 @@ "version": "0.0.6", "license": "MIT" }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "dev": true, @@ -2558,6 +2791,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/array.prototype.findlast": { "version": "1.2.5", "dev": true, @@ -3273,6 +3516,19 @@ "node": ">=6" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { "version": "3.0.0", "dev": true, @@ -3815,6 +4071,36 @@ "node": ">=6.0.0" } }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "dev": true, @@ -3891,10 +4177,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flag-icons": { - "version": "7.3.2", - "license": "MIT" - }, "node_modules/flat-cache": { "version": "3.2.0", "dev": true, @@ -4175,6 +4457,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gopd": { "version": "1.2.0", "license": "MIT", @@ -5142,6 +5445,16 @@ "node": ">= 0.4" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -6398,6 +6711,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/slice-ansi": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", @@ -6798,6 +7121,19 @@ "node": ">=8.0" } }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/tslib": { "version": "2.8.1", "license": "0BSD" diff --git a/client/package.json b/client/package.json index 2e6b5cfcb..e67c16616 100644 --- a/client/package.json +++ b/client/package.json @@ -1,13 +1,14 @@ { "name": "client", "private": true, - "version": "0.0.0", + "version": "3.7.0", "type": "module", "scripts": { "dev": "vite", "build": "tsc -b && vite build", "build-dev": "tsc -b && vite build --mode development", - "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", + "lint": "eslint . --ext js,jsx,ts,tsx --report-unused-disable-directives", + "lint-strict": "eslint . --ext js,jsx,ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "format": "prettier --write .", "format-check": "prettier --check ." @@ -28,7 +29,6 @@ "@types/maplibre-gl": "^1.13.2", "axios": "^1.7.4", "dayjs": "1.11.13", - "flag-icons": "7.3.2", "html2canvas": "^1.4.1", "human-interval": "2.0.1", "i18next": "25.4.2", @@ -58,6 +58,8 @@ "@types/node": "24.5.2", "@types/react": "^18.2.66", "@types/react-dom": "^18.2.22", + "@typescript-eslint/eslint-plugin": "^7.18.0", + "@typescript-eslint/parser": "^7.18.0", "@vitejs/plugin-react": "^4.2.1", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.1", diff --git a/client/public/checkmate_favicon.svg b/client/public/checkmate_favicon.svg index e0e6bf6f4..e1701573a 100644 --- a/client/public/checkmate_favicon.svg +++ b/client/public/checkmate_favicon.svg @@ -1,49 +1,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Checkmate + King silhouette adapted from Cburnett's chess set (Wikimedia Commons, CC BY-SA 3.0). + + + + + + diff --git a/client/src/App.tsx b/client/src/App.tsx index 15c94dbb5..5a1a36455 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -33,6 +33,14 @@ function App() { body: { backgroundColor: theme.palette.background.default, }, + ".Toastify__progress-bar": { + height: 2, + bottom: 0, + top: "auto", + }, + ".Toastify__progress-bar--bg": { + display: "none", + }, }} /> @@ -41,12 +49,23 @@ function App() { diff --git a/client/src/Components/design-elements/BaseChart.tsx b/client/src/Components/design-elements/BaseChart.tsx index de87395eb..c6d8298a7 100644 --- a/client/src/Components/design-elements/BaseChart.tsx +++ b/client/src/Components/design-elements/BaseChart.tsx @@ -8,7 +8,7 @@ import type { ResponsiveStyleValue } from "@mui/system"; import { useTheme } from "@mui/material/styles"; type BaseChartProps = React.PropsWithChildren<{ - icon: React.ReactNode; + icon?: React.ReactNode; title: string; width?: number | string; maxWidth?: number | string; @@ -17,7 +17,6 @@ type BaseChartProps = React.PropsWithChildren<{ export const BaseChart = ({ children, - icon, title, width = "100%", maxWidth = "100%", @@ -38,34 +37,12 @@ export const BaseChart = ({ gap={theme.spacing(LAYOUT.MD)} flex={1} > - - {icon && ( - - {icon} - - )} - {title} - + {title} + {children} diff --git a/client/src/Components/design-elements/BasePage.tsx b/client/src/Components/design-elements/BasePage.tsx index 691e770dc..c955fb6b7 100644 --- a/client/src/Components/design-elements/BasePage.tsx +++ b/client/src/Components/design-elements/BasePage.tsx @@ -1,18 +1,19 @@ import Logo from "@/assets/icons/checkmate-icon.svg?react"; import Stack from "@mui/material/Stack"; import Box from "@mui/material/Box"; -import Alert from "@mui/material/Alert"; import Link from "@mui/material/Link"; -import { LAYOUT, SPACING } from "@/Utils/Theme/constants"; +import { LAYOUT } from "@/Utils/Theme/constants"; import { ErrorFallback, EmptyFallback, EmptyMonitorFallback, - BaseFallback, } from "@/Components/design-elements/Fallback"; +import { EmptyState } from "@/Components/design-elements/EmptyState"; +import { NoticeBanner } from "@/Components/design-elements/NoticeBanner"; import { Breadcrumb } from "@/Components/design-elements/Breadcrumb"; +import { PageHeader } from "@/Components/design-elements/PageHeader"; import CircularProgress from "@mui/material/CircularProgress"; -import { HeaderAuthControls } from "@/Pages/Auth/components/HeaderAuthControls"; +import { LanguageSelector, SwitchTheme } from "@/Components/inputs"; import type { StackProps } from "@mui/material/Stack"; import { useTheme } from "@mui/material/styles"; @@ -21,16 +22,15 @@ import { Link as RouterLink } from "react-router-dom"; import { Typography } from "@mui/material"; export const PageSpeedKeyPriorityFallback = () => { + const theme = useTheme(); + const { t } = useTranslation(); return ( - - - + { ), }} /> - - - + + } + /> ); }; @@ -55,6 +58,9 @@ interface BasePageProps extends StackProps { error?: boolean; children: React.ReactNode; breadcrumbOverride?: string[]; + headerKey?: string; + backTo?: string; + backLabel?: string; } export const BasePage = ({ @@ -62,9 +68,13 @@ export const BasePage = ({ error, children, breadcrumbOverride, + headerKey, + backTo, + backLabel, ...props }: BasePageProps) => { const theme = useTheme(); + const { t } = useTranslation(); if (loading) { return ( @@ -95,7 +105,16 @@ export const BasePage = ({ spacing={theme.spacing(LAYOUT.LG)} {...props} > - + {headerKey ? ( + + ) : ( + + )} {children} ); @@ -105,11 +124,12 @@ interface BasePageWithStatesProps extends StackProps { loading: boolean; error: any; totalCount: number; - bullets: string[] | unknown; + description?: string; page: string; actionButtonText: string; actionLink: string; children: React.ReactNode; + headerKey?: string; } export const BasePageWithStates = ({ @@ -117,10 +137,11 @@ export const BasePageWithStates = ({ error, totalCount, page, - bullets, + description, actionButtonText, actionLink, children, + headerKey, ...props }: BasePageWithStatesProps) => { const showLoading = loading && totalCount === 0; @@ -128,7 +149,7 @@ export const BasePageWithStates = ({ if (!loading && totalCount === 0) { return ( {children} @@ -155,6 +177,7 @@ interface MonitorBasePageWithStatesProps extends StackProps { actionLink?: string; children: React.ReactNode; priorityFallback?: React.ReactNode; + headerKey?: string; } export const MonitorBasePageWithStates = ({ @@ -165,6 +188,7 @@ export const MonitorBasePageWithStates = ({ actionLink, children, priorityFallback, + headerKey, ...props }: MonitorBasePageWithStatesProps) => { const { t } = useTranslation(); @@ -172,15 +196,7 @@ export const MonitorBasePageWithStates = ({ const showLoading = loading && totalCount === 0; if (priorityFallback) { - return ( - - {priorityFallback} - - ); + return <>{priorityFallback}; } if (!loading && totalCount === 0) { @@ -188,7 +204,7 @@ export const MonitorBasePageWithStates = ({ @@ -199,6 +215,7 @@ export const MonitorBasePageWithStates = ({ {children} @@ -215,51 +232,163 @@ export const BaseAuthPage = ({ title, subtitle, children, - ...props + component, + onSubmit, }: BaseAuthPageProps) => { const theme = useTheme(); + const { t } = useTranslation(); return ( - - - - - - - + - {title} - - {subtitle} + + + + + + + + + + {t("common.appName")} + + + + + {title} + + + {subtitle} + + + {children} + - {children} +
+ + + {t("pages.auth.brandPanel.eyebrow")} + + + {t("pages.auth.brandPanel.tagline")} + + + {t("pages.auth.brandPanel.description")} + + + + v{__APP_VERSION__} + - + ); }; diff --git a/client/src/Components/design-elements/EmptyState.tsx b/client/src/Components/design-elements/EmptyState.tsx new file mode 100644 index 000000000..a8850d516 --- /dev/null +++ b/client/src/Components/design-elements/EmptyState.tsx @@ -0,0 +1,158 @@ +import Stack from "@mui/material/Stack"; +import Typography from "@mui/material/Typography"; +import { useTheme } from "@mui/material/styles"; +import { Link as RouterLink } from "react-router-dom"; +import { Button } from "@/Components/inputs"; +import { LAYOUT } from "@/Utils/Theme/constants"; +import { EmptyStateIllustration } from "./EmptyStateIllustration"; + +import type { ReactNode } from "react"; + +interface EmptyStateProps { + title: string; + description?: ReactNode; + actionText?: string; + actionTo?: string; + onAction?: () => void; + secondaryText?: string; + secondaryHref?: string; + compact?: boolean; + fullscreen?: boolean; + alert?: ReactNode; + children?: ReactNode; +} + +export const EmptyState = ({ + title, + description, + actionText, + actionTo, + onAction, + secondaryText, + secondaryHref, + compact = false, + fullscreen = false, + alert, + children, +}: EmptyStateProps) => { + const theme = useTheme(); + + if (compact) { + return ( + + + + + {title} + + {description && ( + + {description} + + )} + + + ); + } + + return ( + + + + {title} + + {description && ( + + {description} + + )} + {alert && ( + + {alert} + + )} + {(actionText || secondaryText) && ( + + {actionText && (actionTo || onAction) && ( + + )} + {secondaryText && secondaryHref && ( + + {secondaryText} → + + )} + + )} + {children} + + ); +}; diff --git a/client/src/Components/design-elements/EmptyStateIllustration.tsx b/client/src/Components/design-elements/EmptyStateIllustration.tsx new file mode 100644 index 000000000..d4557bc9a --- /dev/null +++ b/client/src/Components/design-elements/EmptyStateIllustration.tsx @@ -0,0 +1,197 @@ +import { useTheme } from "@mui/material/styles"; + +interface EmptyStateIllustrationProps { + width?: number | string; + height?: number | string; +} + +const PALETTE = { + light: { + grid: "#CBD5E1", + backFill: "#F5F7FA", + backStroke: "#D5DBE3", + backInner: "#B6C2CF", + frontFill: "#EAF5F0", + frontStroke: "#7DBFAA", + frontInner: "#4DAF94", + }, + dark: { + grid: "#3A4452", + backFill: "#475569", + backStroke: "#64748B", + backInner: "#CBD5E1", + frontFill: "#0F5D4A", + frontStroke: "#4DAF94", + frontInner: "#B5E2D2", + }, +}; + +export const EmptyStateIllustration = ({ + width = 160, + height = 120, +}: EmptyStateIllustrationProps) => { + const theme = useTheme(); + const p = theme.palette.mode === "dark" ? PALETTE.dark : PALETTE.light; + return ( + + ); +}; diff --git a/client/src/Components/design-elements/Fallback.tsx b/client/src/Components/design-elements/Fallback.tsx index 003bda647..989c2bed4 100644 --- a/client/src/Components/design-elements/Fallback.tsx +++ b/client/src/Components/design-elements/Fallback.tsx @@ -1,12 +1,8 @@ import Stack from "@mui/material/Stack"; -import Typography from "@mui/material/Typography"; -import { BulletPointCheck, SkeletonCard } from "@/Components/design-elements"; -import { Button } from "@/Components/inputs"; -import { SPACING, LAYOUT } from "@/Utils/Theme/constants"; - -import { useNavigate } from "react-router"; -import useMediaQuery from "@mui/material/useMediaQuery"; import { useTheme } from "@mui/material/styles"; +import { LAYOUT } from "@/Utils/Theme/constants"; +import { EmptyState } from "./EmptyState"; + import type { StackProps } from "@mui/material/Stack"; interface BaseFallbackProps extends StackProps { @@ -15,30 +11,13 @@ interface BaseFallbackProps extends StackProps { export const BaseFallback = ({ children, ...props }: BaseFallbackProps) => { const theme = useTheme(); - const isSmall = useMediaQuery(theme.breakpoints.down("md")); - return ( - {children} ); @@ -51,126 +30,56 @@ export const ErrorFallback = ({ title: string; subtitle: string; }) => { - const theme = useTheme(); return ( - - - {title} - - {subtitle} - + ); }; export const EmptyFallback = ({ title, - bullets, + description, actionButtonText, actionLink, }: { title: string; - bullets: any; + description?: string; actionButtonText: string; actionLink: string; }) => { - const theme = useTheme(); - const navigate = useNavigate(); return ( - - - {title} - - {Array.isArray(bullets) && - bullets?.map((bullet: string) => ( - - ))} - - - - - - + ); }; export const EmptyMonitorFallback = ({ - page, title, - bullets, + description, actionButtonText, actionLink, }: { page: string; title: string; - bullets: any; + description?: string; actionButtonText: string; actionLink: string; }) => { - const theme = useTheme(); - const navigate = useNavigate(); return ( - - - - {title} - - - {Array.isArray(bullets) && - bullets?.map((bullet: string, index: number) => ( - - ))} - - - - - - + ); }; diff --git a/client/src/Components/design-elements/Gauge.tsx b/client/src/Components/design-elements/Gauge.tsx index fda42df3c..a377a5925 100644 --- a/client/src/Components/design-elements/Gauge.tsx +++ b/client/src/Components/design-elements/Gauge.tsx @@ -114,6 +114,7 @@ export const DetailGauge = ({ upperValue, lowerLabel, lowerValue, + maxWidth = 225, }: { title: string; progress: number; @@ -121,13 +122,14 @@ export const DetailGauge = ({ upperValue?: string | number; lowerLabel?: string; lowerValue?: string | number; + maxWidth?: number; }) => { const theme = useTheme(); return ( { return ( { = { + 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 ( + + + {SEVERITY_GLYPH[severity]} + + + {children} + + + ); +}; diff --git a/client/src/Components/design-elements/PageHeader.tsx b/client/src/Components/design-elements/PageHeader.tsx new file mode 100644 index 000000000..84b0f61c6 --- /dev/null +++ b/client/src/Components/design-elements/PageHeader.tsx @@ -0,0 +1,164 @@ +import Stack from "@mui/material/Stack"; +import Typography from "@mui/material/Typography"; +import Box from "@mui/material/Box"; +import Tooltip from "@mui/material/Tooltip"; +import { Link as RouterLink } from "react-router-dom"; +import { useTranslation } from "react-i18next"; +import { useTheme } from "@mui/material/styles"; +import { ChevronLeft, HelpCircle, FileText, Code } from "lucide-react"; + +import type { ReactNode } from "react"; + +const EXTERNAL_LINKS = { + support: "https://discord.com/invite/NAb6H3UTjK", + docs: "https://checkmate.so/docs", + changelog: "https://github.com/bluewave-labs/checkmate/releases", +}; + +interface PageHeaderProps { + title: string; + description?: ReactNode; + backTo?: string; + backLabel?: string; +} + +export const PageHeader = ({ + title, + description, + backTo, + backLabel, +}: PageHeaderProps) => { + const theme = useTheme(); + const { t } = useTranslation(); + + const linkItems: { key: keyof typeof EXTERNAL_LINKS; icon: ReactNode }[] = [ + { + key: "support", + icon: ( + + ), + }, + { + key: "docs", + icon: ( + + ), + }, + { + key: "changelog", + icon: ( + + ), + }, + ]; + + return ( + + + {backTo && backLabel && ( + + + {backLabel} + + )} + + {title} + + {description && ( + + {description} + + )} + + + {linkItems.map((item, idx) => ( + + + {item.icon} + + + ))} + + + ); +}; diff --git a/client/src/Components/design-elements/SplitBox.tsx b/client/src/Components/design-elements/SplitBox.tsx index 08f245178..3cb0637b8 100644 --- a/client/src/Components/design-elements/SplitBox.tsx +++ b/client/src/Components/design-elements/SplitBox.tsx @@ -53,7 +53,7 @@ export const ConfigBox = ({ rightContent, }: { title: string; - subtitle: string; + subtitle: React.ReactNode; leftContent?: React.ReactNode; rightContent: React.ReactNode; }) => { @@ -63,9 +63,9 @@ export const ConfigBox = ({ left={ {title} diff --git a/client/src/Components/design-elements/StatBox.tsx b/client/src/Components/design-elements/StatBox.tsx index 01a8e9835..954120fe5 100644 --- a/client/src/Components/design-elements/StatBox.tsx +++ b/client/src/Components/design-elements/StatBox.tsx @@ -69,7 +69,12 @@ export const StatBox = ({ > - {title} + + {title} + {tooltip && ( { overflow: "hidden", position: "relative", flex: 1, - padding: theme.spacing(4), + padding: theme.spacing(6), ...sx, }} > @@ -65,9 +65,13 @@ const StatusBox = ({ {label} diff --git a/client/src/Components/design-elements/Table.tsx b/client/src/Components/design-elements/Table.tsx index 505f79fea..91bb69615 100644 --- a/client/src/Components/design-elements/Table.tsx +++ b/client/src/Components/design-elements/Table.tsx @@ -18,10 +18,9 @@ import { ChevronsRight, ChevronLeft, ChevronRight, - Coffee, Ellipsis, - PartyPopper, } from "lucide-react"; +import { EmptyState } from "./EmptyState"; import TablePagination from "@mui/material/TablePagination"; import type { TablePaginationOwnProps } from "@mui/material/TablePagination"; @@ -163,14 +162,19 @@ export function DataTable< }, "& .MuiTableHead-root .MuiTableRow-root": { height: "28px", + borderBottom: `1px solid ${theme.palette.divider}`, + }, + "& .MuiTableHead-root .MuiTableCell-root": { + borderBottom: "none", }, "& :is(th)": { backgroundColor: theme.palette.background.paper, color: theme.palette.text.secondary, fontWeight: 500, textTransform: "uppercase", + letterSpacing: "0.08em", padding: `${theme.spacing(SPACING.LG)} ${theme.spacing(LAYOUT.MD)}`, - fontSize: theme.typography.fontSize, + fontSize: 11, }, "& :is(td)": { backgroundColor: theme.palette.background.paper, @@ -548,49 +552,18 @@ export const Pagination = ({ ...props }: PaginationProps) => { ); }; -const EmptyView = ({ text, positive }: { text?: string; positive?: boolean }) => { - const theme = useTheme(); +const EmptyView = ({ text }: { text?: string; positive?: boolean }) => { const { t } = useTranslation(); - const Icon = positive ? PartyPopper : Coffee; + const theme = useTheme(); return ( - - - - - - {text ?? t("common.table.empty")} - - + + ); }; diff --git a/client/src/Components/design-elements/Tooltip.tsx b/client/src/Components/design-elements/Tooltip.tsx index f83b1331c..f9bbbb92b 100644 --- a/client/src/Components/design-elements/Tooltip.tsx +++ b/client/src/Components/design-elements/Tooltip.tsx @@ -16,16 +16,15 @@ export const Tooltip = ({ placement = "top", ...props }: StyledTooltipProps) => slotProps={{ tooltip: { sx: { - background: + backgroundColor: theme.palette.mode === "dark" - ? "linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)" - : "linear-gradient(135deg, #2c3e50 0%, #1a252f 100%)", - backgroundColor: "transparent", - color: "#ffffff", + ? theme.palette.grey[900] + : theme.palette.grey[800], + color: theme.palette.common.white, fontSize: "13px", padding: `${theme.spacing(4)} ${theme.spacing(5)}`, borderRadius: `${theme.shape.borderRadius}px`, - boxShadow: "0 8px 24px rgba(0, 0, 0, 0.4)", + boxShadow: theme.shadows[6], }, }, }} diff --git a/client/src/Components/design-elements/index.tsx b/client/src/Components/design-elements/index.tsx index ed6a885f6..f6e2771ec 100644 --- a/client/src/Components/design-elements/index.tsx +++ b/client/src/Components/design-elements/index.tsx @@ -1,5 +1,8 @@ export * from "./Breadcrumb"; +export * from "./PageHeader"; export * from "./BasePage"; +export * from "./EmptyState"; +export * from "./EmptyStateIllustration"; export * from "./Fallback"; export * from "./SkeletonCard"; export * from "./BulletPointCheck"; @@ -19,5 +22,6 @@ export * from "./Gauge"; export * from "./Tabs"; export * from "./SplitBox"; export * from "./TextLink"; +export * from "./NoticeBanner"; export * from "./OfflineBanner"; export * from "./Avatar"; diff --git a/client/src/Components/inputs/Button.tsx b/client/src/Components/inputs/Button.tsx index 54f776075..4eae654b2 100644 --- a/client/src/Components/inputs/Button.tsx +++ b/client/src/Components/inputs/Button.tsx @@ -1,19 +1,43 @@ import Button 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) => { const theme = useTheme(); - const outlinedSx = + + const hoverOverrides: Record = { 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" ? { color: theme.palette.text.primary, borderColor: theme.palette.divider, - "&:hover": { - borderColor: theme.palette.text.secondary, - }, } : {}; + return ( } > - + { const { t } = useTranslation(); const navigate = useNavigate(); const isAdmin = useIsAdmin(); + const { pagedRows, paginationProps } = useClientPagination(users); const headers: Header[] = [ { @@ -51,10 +54,13 @@ export const TeamTable = ({ users }: TeamTableProps) => { }; return ( - + <> +
+ {users.length > 0 && } + ); }; diff --git a/client/src/Pages/Account/index.tsx b/client/src/Pages/Account/index.tsx index fbe8db64b..ac05cd519 100644 --- a/client/src/Pages/Account/index.tsx +++ b/client/src/Pages/Account/index.tsx @@ -25,7 +25,7 @@ const Account = ({ open = "profile" }: AccountProps) => { }, [open]); return ( - + setActiveTab(newValue)} diff --git a/client/src/Pages/Auth/Register/index.tsx b/client/src/Pages/Auth/Register/index.tsx index 71603058f..92c712bda 100644 --- a/client/src/Pages/Auth/Register/index.tsx +++ b/client/src/Pages/Auth/Register/index.tsx @@ -95,7 +95,23 @@ const RegisterPage = () => { title={t("pages.auth.register.title")} subtitle={t("pages.auth.register.subtitle")} > - {!token && {t("pages.auth.register.setupNotice")}} + {!token && ( + ({ + fontSize: 13, + lineHeight: 1.55, + color: theme.palette.text.secondary, + backgroundColor: theme.palette.action.hover, + border: `1px solid ${theme.palette.divider}`, + borderRadius: 1, + "& .MuiAlert-message": { padding: 0 }, + })} + > + {t("pages.auth.register.setupNotice")} + + )} { const downChecks = summaryResponse?.downChecks || 0; const upChecks = totalChecks - (summaryResponse?.downChecks || 0); + const noMonitors = !isLoadingMonitors && (monitorsResponse?.length ?? 0) === 0; + if (noMonitors) { + return ( + + ); + } + return ( - + { + ), + }} + /> + } rightContent={ {/* URL/Host/Container field - not shown for hardware */} diff --git a/client/src/Pages/Incidents/Components/CardDetails.tsx b/client/src/Pages/Incidents/Components/CardDetails.tsx index 448ba2e69..b6c1288dd 100644 --- a/client/src/Pages/Incidents/Components/CardDetails.tsx +++ b/client/src/Pages/Incidents/Components/CardDetails.tsx @@ -20,6 +20,24 @@ interface CardDetailsProps { sx?: object; } +const SectionHeading = ({ children }: { children: React.ReactNode }) => { + const theme = useTheme(); + + return ( + + {children} + + ); +}; + +const Cell = ({ children }: { children: React.ReactNode }) => ( + {children} +); + export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => { const { t } = useTranslation(); const theme = useTheme(); @@ -33,22 +51,18 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => { gap={theme.spacing(LAYOUT.MD)} sx={sx} > - - {t("pages.incidents.dialog.details.title")} - + {t("pages.incidents.dialog.details.title")} - - {t("pages.incidents.dialog.details.overview")} - - - + {t("pages.incidents.dialog.details.overview")} - {t("pages.incidents.dialog.details.status")} + + {t("pages.incidents.dialog.details.status")} + { {monitor && ( <> - {t("pages.incidents.dialog.details.monitor")} + + {t("pages.incidents.dialog.details.monitor")} + - {monitor.name ?? "N/A"} + {monitor.name ?? "N/A"} - {t("pages.incidents.dialog.details.url")} + {t("pages.incidents.dialog.details.url")} - {monitor.url ?? "N/A"} + {monitor.url ?? "N/A"} )} @@ -78,51 +94,48 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => { - - {t("pages.incidents.dialog.details.analysis")} - - + {t("pages.incidents.dialog.details.analysis")} - {t("pages.incidents.dialog.details.timeline")} + {t("pages.incidents.dialog.details.timeline")} - {t("pages.incidents.dialog.details.detailsLabel")} + {t("pages.incidents.dialog.details.detailsLabel")} - + - + - {t("pages.incidents.dialog.details.startedAt")} + {t("pages.incidents.dialog.details.startedAt")} - + {formatDateWithTz(incident.startTime, "D MMM YYYY, h:mm A", uiTimezone)} - + - {t("pages.incidents.dialog.details.statusCode")} + {t("pages.incidents.dialog.details.statusCode")} - {incident.statusCode ?? "N/A"} + {incident.statusCode ?? "N/A"} - {t("pages.incidents.dialog.details.downtime")} + {t("pages.incidents.dialog.details.downtime")} - {getIncidentsDuration(incident)} + {getIncidentsDuration(incident)} - {t("pages.incidents.dialog.details.message")} + {t("pages.incidents.dialog.details.message")} - {incident.message ?? "N/A"} + {incident.message ?? "N/A"} @@ -130,60 +143,53 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => { {!incident.status && ( - + {t("pages.incidents.dialog.details.resolutionDetails")} - - + - {t("pages.incidents.dialog.details.resolvedAt")} + {t("pages.incidents.dialog.details.resolvedAt")} - + {incident.endTime ? formatDateWithTz(incident.endTime, "D MMM YYYY, h:mm A", uiTimezone) : "N/A"} - + - - {t("pages.incidents.dialog.details.resolutionType")} - + {t("pages.incidents.dialog.details.resolutionType")} - + {incident.resolutionType ? t( `pages.incidents.dialog.details.resolutionTypes.${incident.resolutionType}` ) : "N/A"} - + {incident.resolvedBy && ( <> - - {t("pages.incidents.dialog.details.resolvedBy")} - + {t("pages.incidents.dialog.details.resolvedBy")} - - {incident.resolvedByEmail ?? incident.resolvedBy} - + {incident.resolvedByEmail ?? incident.resolvedBy} )} {incident.comment && ( <> - {t("pages.incidents.dialog.details.comment")} + {t("pages.incidents.dialog.details.comment")} - {incident.comment} + {incident.comment} )} diff --git a/client/src/Pages/Incidents/Components/CardSummary.tsx b/client/src/Pages/Incidents/Components/CardSummary.tsx index 938455808..60dadaa74 100644 --- a/client/src/Pages/Incidents/Components/CardSummary.tsx +++ b/client/src/Pages/Incidents/Components/CardSummary.tsx @@ -1,8 +1,7 @@ import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; -import Divider from "@mui/material/Divider"; 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 Box from "@mui/material/Box"; @@ -25,6 +24,7 @@ const SummaryItem = ({ icon, label, value }: SummaryItemProps) => { alignItems="center" justifyContent="space-between" gap={theme.spacing(2)} + minHeight={32} > { gap={theme.spacing(2)} > {icon} - {label} + {label} {value} @@ -67,15 +67,11 @@ export const SummaryCard = ({ > {title} - {children} @@ -97,10 +93,13 @@ export const SummaryCardActiveIncidents = ({ const activeCount = summary.totalActive; const hasActive = activeCount > 0; const color = hasActive ? theme.palette.error.main : theme.palette.success.main; - const icon = hasActive ? ( - - ) : ( - + const icon = ( + + + ); const msg = t("pages.incidents.summaryCard.activeIncidents.active", { count: activeCount, @@ -133,10 +132,7 @@ const SummaryIncidentItem = ({ incident }: { incident: IncidentSummaryItem }) => container alignItems="center" spacing={2} - sx={{ - width: "100%", - py: theme.spacing(0.5), - }} + sx={{ width: "100%", minHeight: 32 }} > gap: theme.spacing(2), }} > - + size={{ xs: 12, md: 6, lg: 4 }} sx={{ textAlign: { xs: "left", md: "right" }, - fontWeight: 500, + fontWeight: 600, }} > {duration} @@ -190,22 +184,17 @@ export const SummaryCardLatestIncidents = ({ summary, }: SummaryCardLatestIncidentsProps) => { const { t } = useTranslation(); - const theme = useTheme(); const latestIncidents = summary?.latestIncidents ?? []; return ( - - {latestIncidents.slice(0, 3).map((incident, index) => ( - - - {index < latestIncidents.length - 1 && ( - - )} - - ))} - + {latestIncidents.slice(0, 3).map((incident) => ( + + ))} ); }; @@ -224,17 +213,17 @@ export const SummaryCardStats = ({ summary }: SummaryCardStatsProps) => { return ( } + icon={} label={t("pages.incidents.summaryCard.incidentStats.totalIncidents")} value={summary?.total || 0} /> } + icon={} label={t("pages.incidents.summaryCard.incidentStats.mostAffectedMonitor")} value={mostAffected} /> } + icon={} label={t("pages.incidents.summaryCard.incidentStats.avgResolutionTime")} value={ summary.total > 0 diff --git a/client/src/Pages/Incidents/Components/ControlsIncidentFilter.tsx b/client/src/Pages/Incidents/Components/ControlsIncidentFilter.tsx index a0f4eb15a..af7cba105 100644 --- a/client/src/Pages/Incidents/Components/ControlsIncidentFilter.tsx +++ b/client/src/Pages/Incidents/Components/ControlsIncidentFilter.tsx @@ -75,7 +75,7 @@ export const ControlsIncidentFilter = ({ variant="contained" onClick={onClearFilters} > - {t("pages.incidents.filters.clearFilters")} + {t("common.buttons.clearFilters")} )} diff --git a/client/src/Pages/Incidents/Components/DialogResolution.tsx b/client/src/Pages/Incidents/Components/DialogResolution.tsx index 99dd898dd..de5a9c4d5 100644 --- a/client/src/Pages/Incidents/Components/DialogResolution.tsx +++ b/client/src/Pages/Incidents/Components/DialogResolution.tsx @@ -1,9 +1,7 @@ import { useState, useEffect } from "react"; -import Box from "@mui/material/Box"; import { Dialog, TextField } from "@/Components/inputs"; import { usePut } from "@/Hooks/UseApi"; import { useTranslation } from "react-i18next"; -import { useTheme } from "@mui/material"; interface DialogResolutionProps { open: boolean; @@ -19,7 +17,6 @@ export const DialogResolution = ({ onResolved, }: DialogResolutionProps) => { const { t } = useTranslation(); - const theme = useTheme(); const [comment, setComment] = useState(""); const { put: resolveIncident, loading: isResolving } = usePut(); @@ -50,22 +47,19 @@ export const DialogResolution = ({ onCancel={handleCancel} onConfirm={handleConfirm} confirmColor="error" - cancelColor="primary" loading={isResolving} maxWidth="sm" fullWidth > - - setComment(e.target.value)} - fullWidth - /> - + setComment(e.target.value)} + fullWidth + /> ); }; diff --git a/client/src/Pages/Incidents/index.tsx b/client/src/Pages/Incidents/index.tsx index 9003f6956..63cd18889 100644 --- a/client/src/Pages/Incidents/index.tsx +++ b/client/src/Pages/Incidents/index.tsx @@ -1,4 +1,4 @@ -import { BasePage } from "@/Components/design-elements"; +import { BasePage, EmptyState } from "@/Components/design-elements"; import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; import Divider from "@mui/material/Divider"; @@ -15,6 +15,7 @@ import { HeaderTimeRange } from "@/Components/common"; import { ControlsIncidentFilter } from "@/Pages/Incidents/Components/ControlsIncidentFilter"; import { useGet } from "@/Hooks/UseApi"; +import { LAYOUT } from "@/Utils/Theme/constants"; import { useState, useEffect, useMemo } from "react"; import { useParams } from "react-router-dom"; import type { Incident, IncidentsResponse, IncidentSummary } from "@/Types/Incident"; @@ -153,8 +154,20 @@ const IncidentsPage = () => { refetchSummary(); }; + const trulyEmpty = summaryData !== undefined && (summaryData?.total ?? 0) === 0; + + if (trulyEmpty) { + return ( + + ); + } + return ( - + { setSelectedResolutionType={setFilter} onClearFilters={handleClearFilters} /> - {activeIncidentsCount > 0 ? ( + {activeIncidentsCount > 0 && ( <> {t("pages.incidents.table.activeIncidents")} @@ -193,18 +207,12 @@ const IncidentsPage = () => { /> - ) : ( - - {t("pages.incidents.summaryCard.activeIncidents.active_zero")} - )} {t("pages.incidents.table.resolvedIncidents")} diff --git a/client/src/Pages/Infrastructure/Details/Components/ChartsNetwork.tsx b/client/src/Pages/Infrastructure/Details/Components/ChartsNetwork.tsx index 54e3cc1ed..c7ebac5be 100644 --- a/client/src/Pages/Infrastructure/Details/Components/ChartsNetwork.tsx +++ b/client/src/Pages/Infrastructure/Details/Components/ChartsNetwork.tsx @@ -1,4 +1,6 @@ import Grid from "@mui/material/Grid"; +import Stack from "@mui/material/Stack"; +import { NoticeBanner } from "@/Components/design-elements"; import { HistogramInfrastructure } from "@/Components/monitors"; import { useTranslation } from "react-i18next"; @@ -6,6 +8,7 @@ import type { HardwareCheckStats } from "@/Types/Monitor"; import { useMemo } from "react"; import { useTheme } from "@mui/material/styles"; import useMediaQuery from "@mui/material/useMediaQuery"; +import { LAYOUT } from "@/Utils/Theme/constants"; const formatBytesToMB = (value: number) => `${(value / (1024 * 1024)).toFixed(2)} MB`; @@ -60,6 +63,11 @@ const getChartConfigs = ( return configs; }; +const hasAnyNetworkTraffic = (checks: HardwareCheckStats[]): boolean => + checks.some((c) => + c.net?.some((iface) => iface.bytesSentPerSecond > 0 || iface.deltaBytesRecv > 0) + ); + export const InfraNetworkCharts = ({ checks, dateRange, @@ -74,35 +82,43 @@ export const InfraNetworkCharts = ({ () => getChartConfigs(theme, checks, t), [theme, checks, t] ); + const showNoTrafficNotice = chartConfigs.length > 0 && !hasAnyNetworkTraffic(checks); return ( - - {chartConfigs.map((config) => { - return ( - - - - ); - })} - + + {showNoTrafficNotice && ( + + {t("pages.infrastructure.charts.labels.netNoTraffic")} + + )} + + {chartConfigs.map((config) => { + return ( + + + + ); + })} + + ); }; diff --git a/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable.tsx b/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable.tsx index 994ddcea1..d369dc7c6 100644 --- a/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable.tsx +++ b/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable.tsx @@ -80,14 +80,6 @@ export const InfraMonitorsTable = ({ const getActions = (monitor: Monitor): ActionMenuItem[] => { return [ - { - id: 1, - label: t("pages.common.monitors.actions.openSite"), - action: () => { - window.open(monitor.url, "_blank", "noreferrer"); - }, - closeMenu: true, - }, { id: 2, label: t("pages.common.monitors.actions.details"), diff --git a/client/src/Pages/Infrastructure/Monitors/index.tsx b/client/src/Pages/Infrastructure/Monitors/index.tsx index bdf477613..ff63ee51e 100644 --- a/client/src/Pages/Infrastructure/Monitors/index.tsx +++ b/client/src/Pages/Infrastructure/Monitors/index.tsx @@ -122,6 +122,7 @@ const InfrastructureMonitors = () => { return ( { const theme = useTheme(); + const { t } = useTranslation(); const { data: diagnostics, isLoading: _isLoading, @@ -16,9 +19,35 @@ export const TabDiagnostics = () => { } = useGet("/diagnostic/system", {}, { refreshInterval: 5000 }); return ( - - - + + + + + {t("pages.logs.diagnostics.sections.runtimeStats.title")} + + + {t("pages.logs.diagnostics.sections.runtimeStats.description")} + + + + + + + + {t("pages.logs.diagnostics.sections.memoryCpu.title")} + + + {t("pages.logs.diagnostics.sections.memoryCpu.description")} + + + + ); }; diff --git a/client/src/Pages/Logs/TabLogs.tsx b/client/src/Pages/Logs/TabLogs.tsx index a05726b42..4bf59e149 100644 --- a/client/src/Pages/Logs/TabLogs.tsx +++ b/client/src/Pages/Logs/TabLogs.tsx @@ -4,6 +4,7 @@ import Typography from "@mui/material/Typography"; import { useSelector } from "react-redux"; import { Select } from "@/Components/inputs"; import { TableLogs } from "@/Pages/Logs/components/TableLogs"; +import { EmptyState } from "@/Components/design-elements"; import { useTheme } from "@mui/material"; import { useGet } from "@/Hooks/UseApi"; @@ -15,7 +16,7 @@ import type { RootState } from "@/Types/state"; export const TabLogs = () => { const theme = useTheme(); - const { data: logs } = useGet("/logs"); + const { data: logs, isLoading } = useGet("/logs"); const [selectedLogLevel, setSelectedLogLevel] = useState("all"); const [page, setPage] = useState(0); const rowsPerPage = useSelector( @@ -33,6 +34,16 @@ export const TabLogs = () => { const paginatedLogs = filteredLogs?.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage) ?? []; + if (!isLoading && (logs?.length ?? 0) === 0) { + return ( + + ); + } + return (
({ ...(row.lockedAt && { - "& td": { backgroundColor: theme.palette.success.light }, + "& td": { backgroundColor: runningBg }, }), })} /> @@ -106,6 +121,7 @@ interface TableFailedJobsProps { } export const TableFailedJobs = ({ metrics }: TableFailedJobsProps) => { const { t } = useTranslation(); + const theme = useTheme(); if (!metrics) { return null; } @@ -122,7 +138,11 @@ export const TableFailedJobs = ({ metrics }: TableFailedJobsProps) => { id: "monitorId", content: t("common.table.headers.monitorId"), render: (row) => { - return {row.monitorId}; + return ( + + {row.monitorId} + + ); }, }, { diff --git a/client/src/Pages/Logs/components/TableLogs.tsx b/client/src/Pages/Logs/components/TableLogs.tsx index 144d6056c..1244a65aa 100644 --- a/client/src/Pages/Logs/components/TableLogs.tsx +++ b/client/src/Pages/Logs/components/TableLogs.tsx @@ -45,6 +45,7 @@ const LevelBadge = ({ level }: { level: LogLevel }) => { export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) => { const { t } = useTranslation(); + const theme = useTheme(); const dispatch = useDispatch(); const rowsPerPage = useSelector( (state: RootState) => state?.ui?.logs?.rowsPerPage ?? 15 @@ -55,7 +56,7 @@ export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) => id: "timestamp", content: t("pages.logs.table.headers.timestamp"), render: (row) => ( - + {formatTimestamp(row.timestamp)} ), @@ -74,7 +75,9 @@ export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) => id: "method", content: t("pages.logs.table.headers.method"), render: (row) => ( - {row.method || "-"} + + {row.method || "-"} + ), }, { diff --git a/client/src/Pages/Logs/index.tsx b/client/src/Pages/Logs/index.tsx index 467e2f3a7..9d71e3253 100644 --- a/client/src/Pages/Logs/index.tsx +++ b/client/src/Pages/Logs/index.tsx @@ -10,7 +10,7 @@ const LogsPage = () => { const { t } = useTranslation(); const [activeTab, setActiveTab] = useState(1); return ( - + setActiveTab(newValue)} diff --git a/client/src/Pages/Maintenance/index.tsx b/client/src/Pages/Maintenance/index.tsx index 6a9c6f12b..abdfb4392 100644 --- a/client/src/Pages/Maintenance/index.tsx +++ b/client/src/Pages/Maintenance/index.tsx @@ -32,11 +32,10 @@ const MaintenanceWindowPage = () => { return ( { return [ @@ -68,7 +72,23 @@ export const NotificationsTable = ({ id: "destination", content: t("pages.notifications.table.headers.destination"), render: (row) => { - return {row?.address}; + return ( + + + {row?.address} + + + ); }, }, { @@ -82,15 +102,16 @@ export const NotificationsTable = ({ return headers; }; - const headers = getHeaders(); - return ( -
{ - navigate(`/notifications/configure/${row.id}`); - }} - /> + <> +
{ + navigate(`/notifications/configure/${row.id}`); + }} + /> + {notifications.length > 0 && } + ); }; diff --git a/client/src/Pages/Notifications/index.tsx b/client/src/Pages/Notifications/index.tsx index 1e4091461..3287cf0d3 100644 --- a/client/src/Pages/Notifications/index.tsx +++ b/client/src/Pages/Notifications/index.tsx @@ -39,10 +39,9 @@ const NotificationsPage = () => { return ( { return ( { return ( @@ -326,7 +328,7 @@ export const SettingsPage = () => { key={lang} value={lang} > - {lang.toUpperCase()} + {languageNames[lang] ?? lang} ))} @@ -578,11 +580,11 @@ export const SettingsPage = () => { @@ -972,21 +974,21 @@ export const SettingsPage = () => { setIsDemoMonitorsDialogOpen(false); }} loading={isDeletingAllMonitors} - /> + confirmColor="error" + confirmText={t("common.buttons.removeMonitors")} + > + + {t("pages.settings.form.removeMonitors.dialog.paragraph")} + + - {/* Sticky Save Button */} diff --git a/client/src/Pages/StatusPage/Create/Components/ThemePicker.tsx b/client/src/Pages/StatusPage/Create/Components/ThemePicker.tsx new file mode 100644 index 000000000..d68e1d0c1 --- /dev/null +++ b/client/src/Pages/StatusPage/Create/Components/ThemePicker.tsx @@ -0,0 +1,66 @@ +import { useTranslation } from "react-i18next"; +import Stack from "@mui/material/Stack"; +import RadioGroup from "@mui/material/RadioGroup"; +import MenuItem from "@mui/material/MenuItem"; +import { useTheme } from "@mui/material/styles"; +import { RadioWithDescription, Select } from "@/Components/inputs"; +import { + STATUS_PAGE_THEMES, + STATUS_PAGE_THEME_MODES, + type StatusPageTheme, + type StatusPageThemeMode, +} from "@/Types/StatusPage"; + +interface Props { + theme: StatusPageTheme; + themeMode: StatusPageThemeMode; + onThemeChange: (value: StatusPageTheme) => void; + onThemeModeChange: (value: StatusPageThemeMode) => void; +} + +export const ThemePicker = ({ + theme, + themeMode, + onThemeChange, + onThemeModeChange, +}: Props) => { + const { t } = useTranslation(); + const muiTheme = useTheme(); + + return ( + + onThemeChange(value as StatusPageTheme)} + > + + {STATUS_PAGE_THEMES.map((option) => ( + + ))} + + + + + + ); +}; diff --git a/client/src/Pages/StatusPage/Create/index.tsx b/client/src/Pages/StatusPage/Create/index.tsx index f09d9e47d..d972a90c7 100644 --- a/client/src/Pages/StatusPage/Create/index.tsx +++ b/client/src/Pages/StatusPage/Create/index.tsx @@ -34,6 +34,7 @@ import timezones from "@/Utils/timezones.json"; import { useNavigate, useParams } from "react-router-dom"; import axios from "axios"; import { HeaderConfigStatusControls } from "./Components/HeaderConfigStatusControls"; +import { ThemePicker } from "./Components/ThemePicker"; const monitorsUrl = (() => { const params = new URLSearchParams(); @@ -139,6 +140,8 @@ const CreateStatusPage = () => { fd.append("showUptimePercentage", String(data.showUptimePercentage)); fd.append("showAdminLoginLink", String(data.showAdminLoginLink)); fd.append("showInfrastructure", String(data.showInfrastructure)); + if (data.theme) fd.append("theme", data.theme); + if (data.themeMode) fd.append("themeMode", data.themeMode); data.monitors.forEach((monitorId) => { fd.append("monitors[]", monitorId); @@ -438,6 +441,30 @@ const CreateStatusPage = () => { } /> + ( + ( + + )} + /> + )} + /> + } + /> { window.open( - `/status/public/${statusPage.url}`, + `${PUBLIC_STATUS_PAGE_PREFIX}/${statusPage.url}`, "_blank", "noopener,noreferrer" ); diff --git a/client/src/Pages/StatusPage/Status/Components/InfrastructureMetrics.tsx b/client/src/Pages/StatusPage/Status/Components/InfrastructureMetrics.tsx deleted file mode 100644 index 32a15d64b..000000000 --- a/client/src/Pages/StatusPage/Status/Components/InfrastructureMetrics.tsx +++ /dev/null @@ -1,246 +0,0 @@ -import Stack from "@mui/material/Stack"; -import Typography from "@mui/material/Typography"; -import { Gauge } from "@/Components/design-elements"; -import { useTheme } from "@mui/material/styles"; -import { useTranslation } from "react-i18next"; -import prettyBytes from "pretty-bytes"; -import type { Monitor } from "@/Types/Monitor"; -import Grid from "@mui/material/Grid"; -import useMediaQuery from "@mui/material/useMediaQuery"; -import Box from "@mui/material/Box"; -import { LAYOUT, SPACING } from "@/Utils/Theme/constants"; - -const GAUGE_RADIUS = 60; -const GAUGE_STROKE_WIDTH = 12; -const PERCENTAGE_MULTIPLIER = 100; - -interface StatusPageMonitor extends Monitor { - checks?: Monitor["recentChecks"]; -} - -interface MetricDetail { - label: string; - value: string; -} - -interface MetricConfig { - key: string; - label: string; - hasData: boolean; - progress: number; - details: MetricDetail[]; -} - -const MetricDetailRow = ({ label, value }: MetricDetail) => { - const theme = useTheme(); - return ( - - - {label} - - {value} - - ); -}; - -interface MetricItemProps { - label: string; - progress: number; - details?: MetricDetail[]; -} - -const MetricItem = ({ label, progress, details }: MetricItemProps) => { - const theme = useTheme(); - const isSmall = useMediaQuery(theme.breakpoints.down("md")); - return ( - - - - {label} - - {details && details.length > 0 && ( - - {details.map((detail) => ( - - ))} - - )} - - ); -}; - -type LatestCheck = NonNullable[number]; - -const buildCpuMetric = ( - check: LatestCheck, - t: (key: string) => string -): MetricConfig | null => { - if (!check.cpu || typeof check.cpu.usage_percent !== "number") { - return null; - } - const usagePercent = (check.cpu.usage_percent ?? 0) * PERCENTAGE_MULTIPLIER; - return { - key: "cpu", - label: t("pages.statusPages.monitorsList.infrastructure.cpu"), - hasData: true, - progress: usagePercent, - details: [ - { - label: t("pages.statusPages.monitorsList.infrastructure.usage"), - value: `${usagePercent.toFixed(2)}%`, - }, - ], - }; -}; - -const buildMemoryMetric = ( - check: LatestCheck, - t: (key: string) => string -): MetricConfig | null => { - if ( - !check.memory || - typeof check.memory.usage_percent !== "number" || - typeof check.memory.used_bytes !== "number" || - typeof check.memory.total_bytes !== "number" - ) { - return null; - } - return { - key: "memory", - label: t("pages.statusPages.monitorsList.infrastructure.memory"), - hasData: true, - progress: (check.memory.usage_percent ?? 0) * PERCENTAGE_MULTIPLIER, - details: [ - { - label: t("pages.statusPages.monitorsList.infrastructure.used"), - value: prettyBytes(check.memory.used_bytes ?? 0), - }, - { - label: t("pages.statusPages.monitorsList.infrastructure.total"), - value: prettyBytes(check.memory.total_bytes ?? 0), - }, - ], - }; -}; - -const buildDiskMetric = ( - check: LatestCheck, - t: (key: string) => string -): MetricConfig | null => { - if (!check.disk || check.disk.length === 0) { - return null; - } - const disks = check.disk; - const avgUsagePercent = - (disks.reduce((acc, disk) => acc + (disk?.usage_percent ?? 0), 0) / disks.length) * - PERCENTAGE_MULTIPLIER; - const totalUsedBytes = disks.reduce((acc, disk) => acc + (disk?.used_bytes ?? 0), 0); - const totalTotalBytes = disks.reduce((acc, disk) => acc + (disk?.total_bytes ?? 0), 0); - - return { - key: "disk", - label: t("pages.statusPages.monitorsList.infrastructure.disk"), - hasData: true, - progress: avgUsagePercent, - details: [ - { - label: t("pages.statusPages.monitorsList.infrastructure.used"), - value: prettyBytes(totalUsedBytes), - }, - { - label: t("pages.statusPages.monitorsList.infrastructure.total"), - value: prettyBytes(totalTotalBytes), - }, - ], - }; -}; - -export const InfrastructureMetrics = ({ monitor }: { monitor: StatusPageMonitor }) => { - const theme = useTheme(); - const { t } = useTranslation(); - - const latestCheck = monitor.recentChecks?.[0] ?? monitor.checks?.[0]; - - if (!latestCheck) { - return ( - - {t("pages.statusPages.monitorsList.noData")} - - ); - } - - const metrics: MetricConfig[] = [ - buildCpuMetric(latestCheck, t), - buildMemoryMetric(latestCheck, t), - buildDiskMetric(latestCheck, t), - ].filter((m): m is MetricConfig => m !== null); - - if (metrics.length === 0) { - return ( - - {t("pages.statusPages.monitorsList.noData")} - - ); - } - - return ( - - {metrics.map(({ key, label, progress, details }) => ( - - ))} - - ); -}; diff --git a/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx b/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx deleted file mode 100644 index 248a69c9b..000000000 --- a/client/src/Pages/StatusPage/Status/Components/MonitorsList.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import Stack from "@mui/material/Stack"; -import { useTranslation } from "react-i18next"; -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import { HistogramResponseTime, HeatmapResponseTime } from "@/Components/common"; -import { StatusLabel, BaseBox } from "@/Components/design-elements"; -import { SwitchComponent } from "@/Components/inputs"; -import { InfrastructureMetrics } from "@/Pages/StatusPage/Status/Components/InfrastructureMetrics"; - -import { useTheme, type Theme } from "@mui/material/styles"; -import { useSelector } from "react-redux"; -import { useState } from "react"; -import type { Monitor } from "@/Types/Monitor"; -import type { StatusPage } from "@/Types/StatusPage"; -import { getMonitorTypeLabel } from "@/Types/StatusPage"; -import type { RootState } from "@/Types/state"; -import { LAYOUT, SPACING } from "@/Utils/Theme/constants"; - -interface StatusPageMonitor extends Monitor { - checks?: Monitor["recentChecks"]; -} - -interface MonitorsListProps { - statusPage: StatusPage; - monitors: StatusPageMonitor[]; -} - -const getMonitorBadgeStyles = (monitorType: string, theme: Theme) => { - const bg = - monitorType === "hardware" ? theme.palette.info.light : theme.palette.success.light; - return { - backgroundColor: bg, - color: theme.palette.background.paper, - padding: `${theme.spacing(SPACING.SM)} ${theme.spacing(SPACING.LG)}`, - borderRadius: theme.shape.borderRadius, - }; -}; - -const MonitorHeader = ({ - monitor, - showURL, -}: { - monitor: StatusPageMonitor; - showURL: boolean; -}) => { - const theme = useTheme(); - const { t } = useTranslation(); - - return ( - - - - - {monitor.name} - - - {getMonitorTypeLabel(monitor.type, t)} - - - {showURL && monitor.url && ( - - {monitor.url} - - )} - - - - ); -}; - -const MonitorContent = ({ - monitor, - statusPage, - chartType, -}: { - monitor: StatusPageMonitor; - statusPage: StatusPage; - chartType: string; -}) => { - const theme = useTheme(); - - if (monitor.type === "hardware") { - if (statusPage.showInfrastructure === false) return null; - return ; - } - - if (statusPage.showCharts === false) return null; - - const checks = monitor.checks?.slice().reverse() ?? []; - return ( - - {chartType === "histogram" ? ( - - ) : ( - - )} - - ); -}; - -export const MonitorsList = ({ statusPage, monitors }: MonitorsListProps) => { - const theme = useTheme(); - const { t } = useTranslation(); - const showURL = useSelector((state: RootState) => state.ui?.showURL); - const [chartType, setChartType] = useState<"histogram" | "heatmap">("histogram"); - - return ( - - {statusPage.showCharts && ( - - {t("pages.statusPages.monitorsList.chartTypeHeatmap")} - setChartType(e.target.checked ? "histogram" : "heatmap")} - /> - - {t("pages.statusPages.monitorsList.chartTypeHistogram")} - - - )} - - {monitors.map((monitor) => ( - - - - - ))} - - ); -}; diff --git a/client/src/Pages/StatusPage/Status/Components/StatusBar.tsx b/client/src/Pages/StatusPage/Status/Components/StatusBar.tsx deleted file mode 100644 index d2043a7f3..000000000 --- a/client/src/Pages/StatusPage/Status/Components/StatusBar.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import { - AlertTriangle, - CircleCheck, - CircleX, - Loader, - PauseCircle, - ShieldAlert, - Wrench, -} from "lucide-react"; -import Stack from "@mui/material/Stack"; -import Typography from "@mui/material/Typography"; - -import { useTranslation } from "react-i18next"; -import { useTheme } from "@mui/material"; -import type { Theme } from "@mui/material"; -import type { Monitor, MonitorStatus } from "@/Types/Monitor"; - -interface StatusDisplay { - icon: JSX.Element; - msg?: string; - color?: string; -} - -const getMonitorStatus = (monitors: Monitor[], theme: Theme, t: Function) => { - const monitorsStatus: StatusDisplay = { - icon: , - }; - - // Handle empty monitors array - if (monitors.length === 0) { - monitorsStatus.msg = t("pages.statusPages.statusBar.noMonitors"); - monitorsStatus.color = theme.palette.warning.main; - monitorsStatus.icon = ; - return monitorsStatus; - } - - const allOf = (...statuses: MonitorStatus[]) => - monitors.every((m) => statuses.includes(m.status)); - const someOf = (...statuses: MonitorStatus[]) => - monitors.some((m) => statuses.includes(m.status)); - const noneOf = (...statuses: MonitorStatus[]) => - monitors.every((m) => !statuses.includes(m.status)); - - // All monitors in a single state - if (allOf("up")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.allUp"); - monitorsStatus.color = theme.palette.success.main; - monitorsStatus.icon = ; - } else if (allOf("breached")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.allBreached"); - monitorsStatus.color = theme.palette.error.main; - monitorsStatus.icon = ; - } else if (allOf("maintenance")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.allMaintenance"); - monitorsStatus.color = theme.palette.warning.main; - monitorsStatus.icon = ; - } else if (allOf("down")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.allDown"); - monitorsStatus.color = theme.palette.error.main; - monitorsStatus.icon = ; - } else if (allOf("paused")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.allPaused"); - monitorsStatus.color = theme.palette.warning.main; - monitorsStatus.icon = ; - } else if (allOf("initializing")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.allInitializing"); - monitorsStatus.color = theme.palette.warning.main; - monitorsStatus.icon = ; - - // Breached takes highest priority in mixed states - } else if (someOf("breached") && someOf("down")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.breachedAndDown"); - monitorsStatus.color = theme.palette.error.main; - monitorsStatus.icon = ; - } else if (someOf("breached")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.breached"); - monitorsStatus.color = theme.palette.error.main; - monitorsStatus.icon = ; - - // Maintenance combinations - } else if (someOf("maintenance") && someOf("down")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.maintenanceAndDown"); - monitorsStatus.color = theme.palette.error.main; - monitorsStatus.icon = ; - } else if (someOf("maintenance") && noneOf("down")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.maintenance"); - monitorsStatus.color = theme.palette.warning.main; - monitorsStatus.icon = ; - - // Degraded (some down, no maintenance/breached) - } else if (someOf("down")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.degraded"); - monitorsStatus.color = theme.palette.warning.main; - monitorsStatus.icon = ; - - // Some Paused - } else if (someOf("paused")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.partiallyPaused"); - monitorsStatus.color = theme.palette.warning.main; - monitorsStatus.icon = ; - - // Initializing - } else if (someOf("initializing")) { - monitorsStatus.msg = t("pages.statusPages.statusBar.initializing"); - monitorsStatus.color = theme.palette.info.main; - monitorsStatus.icon = ; - } else { - monitorsStatus.msg = t("pages.statusPages.statusBar.unknown"); - monitorsStatus.color = theme.palette.warning.main; - } - - return monitorsStatus; -}; - -interface StatusBarProps { - monitors: Monitor[]; -} - -export const StatusBar = ({ monitors }: StatusBarProps) => { - const theme = useTheme(); - const { t } = useTranslation(); - const monitorsStatus = getMonitorStatus(monitors, theme, t); - - return ( - - {monitorsStatus.icon} - {monitorsStatus.msg} - - ); -}; diff --git a/client/src/Pages/StatusPage/Status/index.tsx b/client/src/Pages/StatusPage/Status/index.tsx index 78b7cba41..a3a535ace 100644 --- a/client/src/Pages/StatusPage/Status/index.tsx +++ b/client/src/Pages/StatusPage/Status/index.tsx @@ -1,18 +1,43 @@ import { BasePage, BaseFallback } from "@/Components/design-elements"; -import { StatusBar } from "@/Pages/StatusPage/Status/Components/StatusBar"; -import { MonitorsList } from "@/Pages/StatusPage/Status/Components/MonitorsList"; import Typography from "@mui/material/Typography"; import { Link } from "react-router-dom"; import Stack from "@mui/material/Stack"; -import Box from "@mui/material/Box"; -import { useMediaQuery, useTheme } from "@mui/material"; +import { useTheme } from "@mui/material"; import { useTranslation } from "react-i18next"; import { useIsAdmin } from "@/Hooks/useIsAdmin"; import { useLocation, useParams } from "react-router-dom"; import { useGet } from "@/Hooks/UseApi"; -import type { StatusPageResponse } from "@/Types/StatusPage"; +import type { Monitor } from "@/Types/Monitor"; +import { resolveStatusPageTheme } from "@/Types/StatusPage"; +import { + PUBLIC_STATUS_PAGE_PREFIX, + type StatusPage, + type StatusPageResponse, + type StatusPageTheme, +} from "@/Types/StatusPage"; import { HeaderStatusPageControls } from "./Components/HeaderStatusPageControls"; +import { StatusPageThemeProvider } from "./themes/StatusPageThemeProvider"; +import { RefinedStatusPage } from "./themes/refined/RefinedStatusPage"; +import { ModernStatusPage } from "./themes/modern/ModernStatusPage"; +import { BoldStatusPage } from "./themes/bold/BoldStatusPage"; +import { EditorialStatusPage } from "./themes/editorial/EditorialStatusPage"; +import { BrowserFrame } from "./themes/BrowserFrame"; + +type ThemedRendererProps = { + statusPage: StatusPage; + monitors: (Monitor & { checks?: Monitor["recentChecks"] })[]; +}; + +const THEMED_RENDERERS: Record< + StatusPageTheme, + React.ComponentType +> = { + refined: RefinedStatusPage, + modern: ModernStatusPage, + bold: BoldStatusPage, + editorial: EditorialStatusPage, +}; const StatusPageView = () => { const theme = useTheme(); @@ -20,8 +45,8 @@ const StatusPageView = () => { const { url } = useParams(); const isAdmin = useIsAdmin(); const location = useLocation(); - const isSmall = useMediaQuery(theme.breakpoints.down("md")); - const isPublic = location.pathname.startsWith("/status/public"); + + const isPublic = location.pathname.startsWith(PUBLIC_STATUS_PAGE_PREFIX); const apiUrl = url ? `/status-page/${url}?type=uptime&type=infrastructure` : null; @@ -65,48 +90,47 @@ const StatusPageView = () => { ); } - let sx: React.CSSProperties = {}; + const ThemedRenderer = THEMED_RENDERERS[resolveStatusPageTheme(statusPage.theme)]; + const themedRenderer = ( + + ); + + // Public route: render directly on the viewport, themed background covers everything. if (isPublic) { - sx.paddingTop = theme.spacing(20); - sx.paddingLeft = isSmall ? "5vw" : "20vw"; - sx.paddingRight = isSmall ? "5vw" : "20vw"; + return ( + + {themedRenderer} + + ); } - const logoSrc = statusPage.logo?.data - ? `data:${statusPage.logo.contentType};base64,${statusPage.logo.data}` - : null; - + const publicUrl = `${window.location.origin}${PUBLIC_STATUS_PAGE_PREFIX}/${statusPage.url}`; return ( - {logoSrc && ( - - )} - - + + {themedRenderer} + ); }; diff --git a/client/src/Pages/StatusPage/Status/themes/BrowserFrame.tsx b/client/src/Pages/StatusPage/Status/themes/BrowserFrame.tsx new file mode 100644 index 000000000..b893aa85c --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/BrowserFrame.tsx @@ -0,0 +1,70 @@ +import type { ReactNode } from "react"; +import Box from "@mui/material/Box"; +import { useStatusPageTheme } from "./StatusPageThemeProvider"; + +interface Props { + url: string; + children: ReactNode; +} + +export const BrowserFrame = ({ url, children }: Props) => { + const { tokens } = useStatusPageTheme(); + + return ( + + + + + + + + + {url} + + + {children} + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/StatusPageThemeProvider.tsx b/client/src/Pages/StatusPage/Status/themes/StatusPageThemeProvider.tsx new file mode 100644 index 000000000..2b10b0d9a --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/StatusPageThemeProvider.tsx @@ -0,0 +1,142 @@ +import { + createContext, + useContext, + useEffect, + useMemo, + useState, + type ReactNode, +} from "react"; +import { + DEFAULT_STATUS_PAGE_THEME, + resolveStatusPageTheme, + resolveStatusPageThemeMode, + type StatusPageTheme, + type StatusPageThemeMode, +} from "@/Types/StatusPage"; +import { themeTokens, type StatusPageThemeTokens } from "./tokens"; + +type ResolvedMode = "light" | "dark"; + +interface StatusPageThemeContextValue { + theme: StatusPageTheme; + mode: ResolvedMode; + tokens: StatusPageThemeTokens; +} + +const StatusPageThemeContext = createContext(null); + +const resolveSystemMode = (): ResolvedMode => { + if (typeof window === "undefined" || !window.matchMedia) return "light"; + return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; +}; + +interface Props { + theme?: StatusPageTheme; + themeMode?: StatusPageThemeMode; + /** + * When true, paint the document body with the theme background so it + * covers beyond the provider's wrapper (useful on the public route + * where no admin shell sits behind). Defaults to false for admin + * previews that already have an app background. + */ + paintBody?: boolean; + /** + * When true, the provider's wrapper div does NOT paint its own + * background or set a min-height. Use this when the wrapper is + * inside a clipped container (e.g. BrowserFrame) that already sets + * the visible background, so the wrapper's bg doesn't bleed past the + * container's rounded corners. + */ + transparent?: boolean; + children: ReactNode; +} + +export const StatusPageThemeProvider = ({ + theme, + themeMode, + paintBody = false, + transparent = false, + children, +}: Props) => { + const resolvedTheme = resolveStatusPageTheme(theme); + const resolvedThemeMode = resolveStatusPageThemeMode(themeMode); + + const [systemMode, setSystemMode] = useState(resolveSystemMode); + + useEffect(() => { + if (resolvedThemeMode !== "auto") return; + if (typeof window === "undefined" || !window.matchMedia) return; + const mq = window.matchMedia("(prefers-color-scheme: dark)"); + // Reconcile on first paint whenever we (re-)enter auto mode — only + // when it disagrees with the stored value, so we don't trigger an + // extra render on the common hot path. + const next: ResolvedMode = mq.matches ? "dark" : "light"; + setSystemMode((prev) => (prev === next ? prev : next)); + const handler = (e: MediaQueryListEvent) => + setSystemMode(e.matches ? "dark" : "light"); + mq.addEventListener("change", handler); + return () => mq.removeEventListener("change", handler); + }, [resolvedThemeMode]); + + useEffect(() => { + if (!paintBody || typeof document === "undefined") return; + const html = document.documentElement; + const body = document.body; + const prev = { + htmlBg: html.style.background, + bodyBg: body.style.background, + bodyMargin: body.style.margin, + htmlColorScheme: html.style.colorScheme, + }; + const resolvedMode = resolvedThemeMode === "auto" ? systemMode : resolvedThemeMode; + const bg = themeTokens[resolvedTheme][resolvedMode].bg; + html.style.background = bg; + body.style.background = bg; + body.style.margin = "0"; + html.style.colorScheme = resolvedMode; + return () => { + html.style.background = prev.htmlBg; + body.style.background = prev.bodyBg; + body.style.margin = prev.bodyMargin; + html.style.colorScheme = prev.htmlColorScheme; + }; + }, [paintBody, resolvedTheme, resolvedThemeMode, systemMode]); + + const resolvedMode: ResolvedMode = + resolvedThemeMode === "auto" ? systemMode : resolvedThemeMode; + const tokens = themeTokens[resolvedTheme][resolvedMode]; + + const value = useMemo( + () => ({ theme: resolvedTheme, mode: resolvedMode, tokens }), + [resolvedTheme, resolvedMode, tokens] + ); + + return ( + +
+ {children} +
+
+ ); +}; + +export const useStatusPageTheme = (): StatusPageThemeContextValue => { + const ctx = useContext(StatusPageThemeContext); + if (!ctx) { + return { + theme: DEFAULT_STATUS_PAGE_THEME, + mode: resolveSystemMode(), + tokens: themeTokens[DEFAULT_STATUS_PAGE_THEME][resolveSystemMode()], + }; + } + return ctx; +}; diff --git a/client/src/Pages/StatusPage/Status/themes/bold/BoldStatusPage.tsx b/client/src/Pages/StatusPage/Status/themes/bold/BoldStatusPage.tsx new file mode 100644 index 000000000..32959a2ed --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/bold/BoldStatusPage.tsx @@ -0,0 +1,207 @@ +import { useMemo, useState } from "react"; +import Box from "@mui/material/Box"; +import Stack from "@mui/material/Stack"; +import { useTranslation } from "react-i18next"; +import type { Monitor } from "@/Types/Monitor"; +import type { StatusPage } from "@/Types/StatusPage"; +import { getMonitorTypeLabel } from "@/Types/StatusPage"; +import { ThemedHeatmap } from "../shared/ThemedHeatmap"; +import { ThemedHistogram } from "../shared/ThemedHistogram"; +import { ThemedInfrastructure } from "../shared/ThemedInfrastructure"; +import { + monitorBadgeTone, + monoFirstChar, + resolveOverallStatus, + statusBadgeKey, +} from "../shared/overallStatus"; +import { useStatusPageTheme } from "../StatusPageThemeProvider"; +import { boldStyles } from "./styles"; + +type StatusPageMonitor = Monitor & { checks?: Monitor["recentChecks"] }; + +interface Props { + statusPage: StatusPage; + monitors: StatusPageMonitor[]; +} + +export const BoldStatusPage = ({ statusPage, monitors }: Props) => { + const { t } = useTranslation(); + const { tokens, mode } = useStatusPageTheme(); + const styles = useMemo(() => boldStyles(tokens, mode === "dark"), [tokens, mode]); + const [chartMode, setChartMode] = useState<"heatmap" | "histogram">("heatmap"); + + const overall = resolveOverallStatus(monitors, t, { iconSize: 18 }); + const logoSrc = statusPage.logo?.data + ? `data:${statusPage.logo.contentType};base64,${statusPage.logo.data}` + : null; + + return ( + + + + {logoSrc ? ( + + ) : ( + {monoFirstChar(statusPage.companyName)} + )} + {statusPage.companyName} + + + + + + + {overall.icon} + + {overall.message} + + + {t("pages.statusPages.statusBar.monitoringSummary", { + count: monitors.length, + })} + + + + {statusPage.showCharts && ( + + + setChartMode("heatmap")} + sx={styles.chartSwitchButton(chartMode === "heatmap")} + > + {t("pages.statusPages.monitorsList.chartTypeHeatmap")} + + setChartMode("histogram")} + sx={styles.chartSwitchButton(chartMode === "histogram")} + > + {t("pages.statusPages.monitorsList.chartTypeHistogram")} + + + + )} + + + {monitors.map((monitor) => { + const isHardware = monitor.type === "hardware"; + const showInfra = isHardware && statusPage.showInfrastructure !== false; + const showChart = !isHardware && statusPage.showCharts !== false; + const badgeTone = monitorBadgeTone(monitor.status); + + return ( + + + + {monitor.name} + + + {getMonitorTypeLabel(monitor.type, t)} + + {monitor.url && ( + + {monitor.url} + + )} + + + + {t(statusBadgeKey[monitor.status])} + + + + {showInfra && ( + + )} + {showChart && + (chartMode === "heatmap" ? ( + + ) : ( + + ))} + + ); + })} + + + + {t("pages.statusPages.footer.poweredBy")}{" "} + + Checkmate + + + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/bold/styles.ts b/client/src/Pages/StatusPage/Status/themes/bold/styles.ts new file mode 100644 index 000000000..ac2eac9c0 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/bold/styles.ts @@ -0,0 +1,404 @@ +import type { SxProps, Theme } from "@mui/material/styles"; +import type { StatusPageThemeTokens } from "../tokens"; +import { type OverallTone, toneColor, toneSoft } from "../shared/overallStatus"; +import { BOLD_SANS_STACK, MONO_STACK } from "../shared/fontStacks"; + +export type BoldHeatCell = "fast" | "med" | "slow" | "down" | "empty"; +export type BoldBarKind = "up" | "down" | "empty"; +export type BoldGaugeFill = "ok" | "warm" | "hot"; + +export interface BoldStyles { + page: SxProps; + top: SxProps; + brand: SxProps; + logoConic: SxProps; + logoImg: SxProps; + hero: SxProps; + heroTitle: SxProps; + heroCheck: (tone: OverallTone) => SxProps; + heroSub: SxProps; + chartSwitchWrap: SxProps; + chartSwitch: SxProps; + chartSwitchButton: (active: boolean) => SxProps; + monitorList: SxProps; + card: SxProps; + cardRow: SxProps; + cardLeft: SxProps; + monitorName: SxProps; + monitorMeta: SxProps; + pill: SxProps; + pillHardware: SxProps; + monitorUrl: SxProps; + badge: (tone: OverallTone) => SxProps; + heatmap: SxProps; + heatmapCell: (kind: BoldHeatCell) => SxProps; + histogram: SxProps; + bar: (kind: BoldBarKind, heightPct: number) => SxProps; + chartStats: SxProps; + infra: SxProps; + infraEmpty: SxProps; + gauge: SxProps; + gaugeLabel: SxProps; + gaugeValue: SxProps; + gaugeBar: SxProps; + gaugeFill: (level: BoldGaugeFill, widthPct: number) => SxProps; + gaugeSub: SxProps; + footer: SxProps; +} + +export const boldStyles = ( + tokens: StatusPageThemeTokens, + isDark: boolean +): BoldStyles => { + const heatCellBg: Record = { + fast: tokens.up, + med: `color-mix(in srgb, ${tokens.up} 70%, #ffffff 30%)`, + slow: tokens.warn, + down: tokens.down, + empty: tokens.border, + }; + const heatCellShadow: Record = { + fast: `0 0 6px color-mix(in srgb, ${tokens.up} 18%, transparent)`, + med: `0 0 6px color-mix(in srgb, ${tokens.up} 18%, transparent)`, + slow: `0 0 6px color-mix(in srgb, ${tokens.warn} 20%, transparent)`, + down: `0 0 6px color-mix(in srgb, ${tokens.down} 20%, transparent)`, + empty: "none", + }; + + const barBg: Record = { + up: tokens.up, + down: tokens.down, + empty: tokens.border, + }; + + const gaugeFillBg: Record = { + ok: `linear-gradient(90deg, ${tokens.up}, color-mix(in srgb, ${tokens.up} 70%, #ffffff 30%))`, + warm: `linear-gradient(90deg, ${tokens.warn}, #fbbf24)`, + hot: `linear-gradient(90deg, ${tokens.down}, #fb7185)`, + }; + + const heroBgLight = `linear-gradient(135deg, color-mix(in srgb, ${tokens.up} 8%, transparent), transparent 60%), ${tokens.surface}`; + const heroBgDark = `linear-gradient(135deg, color-mix(in srgb, ${tokens.up} 16%, transparent), transparent 60%), ${tokens.surface}`; + + const heroGlowLight = `radial-gradient(400px 200px at 20% 30%, color-mix(in srgb, ${tokens.up} 14%, transparent), transparent 60%), radial-gradient(300px 200px at 90% 80%, color-mix(in srgb, ${tokens.upStrong} 10%, transparent), transparent 60%)`; + const heroGlowDark = `radial-gradient(400px 200px at 20% 30%, color-mix(in srgb, ${tokens.up} 32%, transparent), transparent 60%), radial-gradient(300px 200px at 90% 80%, color-mix(in srgb, ${tokens.upStrong} 22%, transparent), transparent 60%)`; + + return { + page: { + flex: "1 0 auto", + maxWidth: 1040, + width: "100%", + mx: "auto", + p: "56px 24px 96px", + fontFamily: BOLD_SANS_STACK, + fontSize: 14, + lineHeight: 1.55, + color: tokens.text, + WebkitFontSmoothing: "antialiased", + }, + + top: { + display: "flex", + alignItems: "center", + justifyContent: "space-between", + mb: "36px", + }, + brand: { + display: "flex", + alignItems: "center", + gap: "14px", + fontWeight: 700, + fontSize: 16, + letterSpacing: "-0.01em", + color: tokens.text, + }, + logoConic: { + width: 36, + height: 36, + borderRadius: "12px", + background: `conic-gradient(from 140deg, ${tokens.up}, ${tokens.upStrong}, #0f766e, ${tokens.up})`, + display: "grid", + placeItems: "center", + color: "#05070a", + fontWeight: 900, + fontSize: 14, + boxShadow: `0 8px 24px color-mix(in srgb, ${tokens.up} 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.2)`, + }, + logoImg: { maxHeight: 36, maxWidth: 140, objectFit: "contain" }, + + hero: { + position: "relative", + borderRadius: "22px", + padding: "36px 36px 32px", + mb: "28px", + background: isDark ? heroBgDark : heroBgLight, + border: `1px solid ${tokens.border}`, + overflow: "hidden", + "&::before": { + content: '""', + position: "absolute", + inset: 0, + background: isDark ? heroGlowDark : heroGlowLight, + pointerEvents: "none", + opacity: 0.8, + zIndex: 0, + ...(isDark ? { mixBlendMode: "screen" } : {}), + }, + "& > *": { position: "relative", zIndex: 1 }, + }, + heroTitle: { + m: 0, + fontSize: 34, + fontWeight: 800, + letterSpacing: "-0.02em", + lineHeight: 1.1, + color: tokens.text, + display: "flex", + alignItems: "center", + gap: "10px", + }, + heroCheck: (tone) => ({ + display: "inline-grid", + placeItems: "center", + width: 32, + height: 32, + borderRadius: "50%", + background: toneColor(tone, tokens), + color: tone === "down" ? "#fff" : "#05070a", + flexShrink: 0, + boxShadow: `0 0 0 6px ${toneSoft(tone, tokens)}`, + }), + heroSub: { mt: "10px", mb: 0, color: tokens.textMuted, fontSize: 14 }, + + chartSwitchWrap: { display: "flex", justifyContent: "flex-end", mb: "16px" }, + chartSwitch: { + display: "inline-flex", + border: `1px solid ${tokens.border}`, + borderRadius: "999px", + background: tokens.surface, + p: "3px", + gap: "2px", + }, + chartSwitchButton: (active) => ({ + border: 0, + background: active ? tokens.upSoft : "transparent", + fontFamily: "inherit", + fontSize: 11, + padding: "8px 18px", + cursor: "pointer", + color: active ? tokens.up : tokens.textMuted, + fontWeight: 700, + textTransform: "uppercase", + letterSpacing: "0.12em", + transition: "background 0.2s, color 0.2s", + borderRadius: "999px", + "&:hover": { color: active ? tokens.up : tokens.text }, + }), + + monitorList: { + listStyle: "none", + m: 0, + p: 0, + display: "flex", + flexDirection: "column", + gap: "14px", + }, + card: { + background: tokens.surface, + border: `1px solid ${tokens.border}`, + borderRadius: "18px", + overflow: "hidden", + transition: "transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s", + "&:hover": { + transform: "translateY(-3px)", + borderColor: `color-mix(in srgb, ${tokens.up} 40%, ${tokens.border})`, + }, + }, + cardRow: { + display: "grid", + gridTemplateColumns: "1fr auto", + alignItems: "center", + gap: "24px", + p: "22px 28px", + }, + cardLeft: { minWidth: 0 }, + monitorName: { + fontWeight: 700, + fontSize: 17, + letterSpacing: "-0.01em", + color: tokens.text, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + }, + monitorMeta: { + display: "flex", + gap: "10px", + alignItems: "center", + mt: "6px", + flexWrap: "wrap", + }, + pill: { + fontSize: 10, + textTransform: "uppercase", + letterSpacing: "0.1em", + color: tokens.textMuted, + background: `color-mix(in srgb, ${tokens.surface} 80%, ${tokens.bg})`, + border: `1px solid ${tokens.border}`, + padding: "3px 10px", + borderRadius: "999px", + fontWeight: 700, + }, + pillHardware: { + fontSize: 10, + textTransform: "uppercase", + letterSpacing: "0.1em", + padding: "3px 10px", + borderRadius: "999px", + fontWeight: 700, + color: tokens.up, + borderColor: `color-mix(in srgb, ${tokens.up} 40%, transparent)`, + border: `1px solid color-mix(in srgb, ${tokens.up} 40%, transparent)`, + background: tokens.upSoft, + }, + monitorUrl: { + fontSize: 12, + color: tokens.textMuted, + fontFamily: MONO_STACK, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + maxWidth: 300, + }, + + badge: (tone) => ({ + fontSize: 11, + fontWeight: 800, + padding: "6px 14px", + borderRadius: "999px", + display: "inline-flex", + alignItems: "center", + gap: "7px", + textTransform: "uppercase", + letterSpacing: "0.08em", + whiteSpace: "nowrap", + background: toneSoft(tone, tokens), + color: toneColor(tone, tokens), + "&::before": { + content: '""', + width: 6, + height: 6, + borderRadius: "50%", + background: "currentColor", + boxShadow: "0 0 8px currentColor", + }, + }), + + heatmap: { + padding: "0 28px 22px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "3px", + height: 48, + }, + heatmapCell: (kind) => ({ + borderRadius: "3px", + background: heatCellBg[kind], + boxShadow: heatCellShadow[kind], + opacity: kind === "empty" ? 0.4 : 1, + transition: "transform 0.15s", + "&:hover": { transform: "scaleY(1.2)" }, + }), + + histogram: { + padding: "0 28px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "3px", + alignItems: "flex-end", + height: 48, + }, + bar: (kind, heightPct) => ({ + background: barBg[kind], + borderRadius: "3px", + minHeight: 4, + opacity: kind === "empty" ? 0.4 : 1, + height: `${heightPct}%`, + }), + chartStats: { + padding: "0 28px 22px", + fontSize: 11, + color: tokens.textMuted, + fontVariantNumeric: "tabular-nums", + fontWeight: 700, + letterSpacing: "0.05em", + }, + + infra: { + padding: "18px 28px 26px", + display: "grid", + gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, + gap: "16px", + }, + infraEmpty: { + padding: "18px 28px 26px", + color: tokens.textMuted, + fontSize: 13, + }, + gauge: { + border: `1px solid ${tokens.border}`, + borderRadius: "16px", + p: "16px 18px", + background: `color-mix(in srgb, ${tokens.surface} 80%, ${tokens.bg})`, + }, + gaugeLabel: { + fontSize: 10, + color: tokens.textMuted, + textTransform: "uppercase", + letterSpacing: "0.12em", + fontWeight: 700, + }, + gaugeValue: { + fontSize: 30, + fontWeight: 800, + letterSpacing: "-0.02em", + mt: "6px", + fontVariantNumeric: "tabular-nums", + color: tokens.text, + }, + gaugeBar: { + height: 6, + background: tokens.border, + borderRadius: "3px", + overflow: "hidden", + mt: "12px", + }, + gaugeFill: (level, widthPct) => ({ + display: "block", + height: "100%", + background: gaugeFillBg[level], + borderRadius: "3px", + transition: "width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1)", + width: `${Math.max(0, Math.min(100, widthPct))}%`, + }), + gaugeSub: { + fontSize: 11, + color: tokens.textMuted, + mt: "10px", + fontVariantNumeric: "tabular-nums", + }, + + footer: { + textAlign: "center", + color: tokens.textMuted, + fontSize: 12, + mt: "52px", + "& a": { + color: tokens.up, + textDecoration: "underline", + textUnderlineOffset: "3px", + fontWeight: 800, + }, + }, + }; +}; diff --git a/client/src/Pages/StatusPage/Status/themes/editorial/EditorialStatusPage.tsx b/client/src/Pages/StatusPage/Status/themes/editorial/EditorialStatusPage.tsx new file mode 100644 index 000000000..ee8fa6f99 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/editorial/EditorialStatusPage.tsx @@ -0,0 +1,224 @@ +import { useMemo, useState } from "react"; +import Box from "@mui/material/Box"; +import Stack from "@mui/material/Stack"; +import { useTranslation } from "react-i18next"; +import type { Monitor } from "@/Types/Monitor"; +import type { StatusPage } from "@/Types/StatusPage"; +import { getMonitorTypeLabel } from "@/Types/StatusPage"; +import { ThemedHeatmap } from "../shared/ThemedHeatmap"; +import { ThemedHistogram } from "../shared/ThemedHistogram"; +import { ThemedInfrastructure } from "../shared/ThemedInfrastructure"; +import { + monitorBadgeTone, + resolveOverallStatus, + statusBadgeKey, +} from "../shared/overallStatus"; +import { useStatusPageTheme } from "../StatusPageThemeProvider"; +import { editorialStyles } from "./styles"; + +type StatusPageMonitor = Monitor & { checks?: Monitor["recentChecks"] }; + +interface Props { + statusPage: StatusPage; + monitors: StatusPageMonitor[]; +} + +export const EditorialStatusPage = ({ statusPage, monitors }: Props) => { + const { t } = useTranslation(); + const { tokens } = useStatusPageTheme(); + const styles = useMemo(() => editorialStyles(tokens), [tokens]); + const [chartMode, setChartMode] = useState<"heatmap" | "histogram">("heatmap"); + + const todayLabel = useMemo( + () => + new Date().toLocaleDateString(undefined, { + year: "numeric", + month: "long", + day: "numeric", + }), + [] + ); + + const overall = resolveOverallStatus(monitors, t, { + allUpKey: "pages.statusPages.editorial.allUp", + }); + const logoSrc = statusPage.logo?.data + ? `data:${statusPage.logo.contentType};base64,${statusPage.logo.data}` + : null; + + return ( + + + + {logoSrc && ( + + )} + + {statusPage.companyName} + + + {t("pages.statusPages.editorial.reportTitle")} + + + + + + + {overall.message} + + + {todayLabel} ·{" "} + {t("pages.statusPages.statusBar.monitoringSummary", { + count: monitors.length, + })} + + + {statusPage.showCharts && ( + + + setChartMode("heatmap")} + sx={styles.chartSwitchButton(chartMode === "heatmap")} + > + {t("pages.statusPages.monitorsList.chartTypeHeatmap")} + + setChartMode("histogram")} + sx={styles.chartSwitchButton(chartMode === "histogram")} + > + {t("pages.statusPages.monitorsList.chartTypeHistogram")} + + + + )} + + + {monitors.map((monitor) => { + const isHardware = monitor.type === "hardware"; + const showInfra = isHardware && statusPage.showInfrastructure !== false; + const showChart = !isHardware && statusPage.showCharts !== false; + const badgeTone = monitorBadgeTone(monitor.status); + + return ( + + + + {monitor.name} + + + {getMonitorTypeLabel(monitor.type, t)} + + {monitor.url && ( + + {monitor.url} + + )} + + + + {t(statusBadgeKey[monitor.status])} + + + + {showInfra && ( + + )} + {showChart && + (chartMode === "heatmap" ? ( + + ) : ( + + ))} + + ); + })} + + + + {t("pages.statusPages.footer.poweredBy")}{" "} + + Checkmate + + + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/editorial/styles.ts b/client/src/Pages/StatusPage/Status/themes/editorial/styles.ts new file mode 100644 index 000000000..bed3e72aa --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/editorial/styles.ts @@ -0,0 +1,337 @@ +import type { SxProps, Theme } from "@mui/material/styles"; +import type { StatusPageThemeTokens } from "../tokens"; +import { type OverallTone, toneColor, toneSoft } from "../shared/overallStatus"; +import { + EDITORIAL_SECONDARY_SANS_STACK, + MONO_STACK, + SERIF_STACK, +} from "../shared/fontStacks"; + +export type EditorialHeatCell = "fast" | "med" | "slow" | "down" | "empty"; +export type EditorialBarKind = "up" | "down" | "empty"; +export type EditorialGaugeFill = "ok" | "warm" | "hot"; + +export interface EditorialStyles { + page: SxProps; + top: SxProps; + brandWrap: SxProps; + logoImg: SxProps; + brandEyebrow: SxProps; + brandTitle: SxProps; + statusLine: SxProps; + statusDot: (tone: OverallTone) => SxProps; + dateline: SxProps; + chartSwitchWrap: SxProps; + chartSwitch: SxProps; + chartSwitchButton: (active: boolean) => SxProps; + monitorList: SxProps; + card: SxProps; + cardRow: SxProps; + cardLeft: SxProps; + monitorName: SxProps; + monitorMeta: SxProps; + pill: SxProps; + pillHardware: SxProps; + monitorUrl: SxProps; + badge: (tone: OverallTone) => SxProps; + heatmap: SxProps; + heatmapCell: (kind: EditorialHeatCell) => SxProps; + histogram: SxProps; + bar: (kind: EditorialBarKind, heightPct: number) => SxProps; + chartStats: SxProps; + infra: SxProps; + infraEmpty: SxProps; + gauge: SxProps; + gaugeLabel: SxProps; + gaugeValue: SxProps; + gaugeBar: SxProps; + gaugeFill: (level: EditorialGaugeFill, widthPct: number) => SxProps; + gaugeSub: SxProps; + footer: SxProps; +} + +export const editorialStyles = (tokens: StatusPageThemeTokens): EditorialStyles => { + const heatCellBg: Record = { + fast: tokens.up, + med: `color-mix(in srgb, ${tokens.up} 60%, ${tokens.bg})`, + slow: tokens.warn, + down: tokens.down, + empty: tokens.border, + }; + + const barBg: Record = { + up: tokens.up, + down: tokens.down, + empty: tokens.border, + }; + + const gaugeFillBg: Record = { + ok: tokens.up, + warm: tokens.warn, + hot: tokens.down, + }; + + return { + page: { + flex: "1 0 auto", + maxWidth: 760, + width: "100%", + mx: "auto", + p: "64px 24px 96px", + fontFamily: SERIF_STACK, + fontSize: 15, + lineHeight: 1.6, + color: tokens.text, + WebkitFontSmoothing: "antialiased", + }, + + top: { + display: "flex", + alignItems: "flex-end", + justifyContent: "space-between", + mb: "48px", + borderBottom: `2px solid ${tokens.text}`, + pb: "18px", + }, + brandWrap: { display: "flex", flexDirection: "column" }, + logoImg: { maxHeight: 48, maxWidth: 160, objectFit: "contain", mb: "8px" }, + brandEyebrow: { + m: 0, + fontSize: 11, + textTransform: "uppercase", + letterSpacing: "0.3em", + fontWeight: 700, + color: tokens.textMuted, + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + }, + brandTitle: { + mt: "6px", + mb: 0, + fontSize: 40, + fontWeight: 700, + letterSpacing: "-0.02em", + lineHeight: 1, + color: tokens.text, + }, + + statusLine: { + fontSize: 22, + fontWeight: 400, + m: 0, + mb: "8px", + letterSpacing: "-0.01em", + lineHeight: 1.35, + color: tokens.text, + fontFamily: SERIF_STACK, + }, + statusDot: (tone) => ({ + display: "inline-block", + width: 10, + height: 10, + borderRadius: "50%", + background: toneColor(tone, tokens), + mr: "10px", + verticalAlign: "middle", + }), + dateline: { + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + fontSize: 11, + textTransform: "uppercase", + letterSpacing: "0.12em", + color: tokens.textMuted, + m: 0, + mb: "56px", + }, + + chartSwitchWrap: { + display: "flex", + justifyContent: "flex-end", + mb: "20px", + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + }, + chartSwitch: { + display: "inline-flex", + border: `1px solid ${tokens.text}`, + "& > button + button": { borderLeft: `1px solid ${tokens.text}` }, + }, + chartSwitchButton: (active) => ({ + fontFamily: "inherit", + fontSize: 10, + textTransform: "uppercase", + letterSpacing: "0.2em", + padding: "6px 14px", + border: 0, + background: active ? tokens.text : "transparent", + color: active ? tokens.bg : tokens.text, + cursor: "pointer", + fontWeight: 700, + }), + + monitorList: { + listStyle: "none", + m: 0, + p: 0, + display: "flex", + flexDirection: "column", + }, + card: { + background: "transparent", + border: 0, + borderBottom: `1px solid ${tokens.border}`, + mb: 0, + py: "20px", + "&:last-of-type": { borderBottom: 0 }, + }, + cardRow: { + display: "grid", + gridTemplateColumns: "1fr auto", + alignItems: "baseline", + gap: "20px", + }, + cardLeft: { minWidth: 0 }, + monitorName: { + fontSize: 20, + fontWeight: 700, + letterSpacing: "-0.015em", + color: tokens.text, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + }, + monitorMeta: { + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + fontSize: 12, + color: tokens.textMuted, + mt: "6px", + display: "flex", + gap: "12px", + flexWrap: "wrap", + alignItems: "center", + }, + pill: { + textTransform: "uppercase", + letterSpacing: "0.12em", + fontWeight: 700, + color: tokens.textMuted, + }, + pillHardware: { + textTransform: "uppercase", + letterSpacing: "0.12em", + fontWeight: 700, + color: tokens.up, + }, + monitorUrl: { + fontFamily: MONO_STACK, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + maxWidth: 280, + fontSize: 12, + }, + + badge: (tone) => ({ + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + fontSize: 10, + fontWeight: 700, + padding: "4px 10px", + borderRadius: 0, + textTransform: "uppercase", + letterSpacing: "0.15em", + whiteSpace: "nowrap", + background: toneSoft(tone, tokens), + color: toneColor(tone, tokens), + }), + + heatmap: { + mt: "16px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "2px", + height: 40, + }, + heatmapCell: (kind) => ({ + background: heatCellBg[kind], + opacity: kind === "empty" ? 0.5 : 1, + }), + + histogram: { + mt: "16px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "2px", + alignItems: "flex-end", + height: 40, + }, + bar: (kind, heightPct) => ({ + background: barBg[kind], + minHeight: 3, + opacity: kind === "empty" ? 0.5 : 1, + height: `${heightPct}%`, + }), + chartStats: { + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + fontSize: 11, + color: tokens.textMuted, + fontVariantNumeric: "tabular-nums", + textTransform: "uppercase", + letterSpacing: "0.1em", + }, + + infra: { + display: "grid", + gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, + gap: "24px", + mt: "20px", + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + }, + infraEmpty: { mt: "20px", color: tokens.textMuted, fontSize: 13 }, + gauge: {}, + gaugeLabel: { + fontSize: 10, + color: tokens.textMuted, + textTransform: "uppercase", + letterSpacing: "0.18em", + fontWeight: 700, + }, + gaugeValue: { + fontSize: 28, + fontWeight: 700, + letterSpacing: "-0.02em", + mt: "4px", + fontVariantNumeric: "tabular-nums", + fontFamily: SERIF_STACK, + color: tokens.text, + }, + gaugeBar: { height: 2, background: tokens.border, mt: "10px" }, + gaugeFill: (level, widthPct) => ({ + display: "block", + height: "100%", + background: gaugeFillBg[level], + transition: "width 0.8s", + width: `${Math.max(0, Math.min(100, widthPct))}%`, + }), + gaugeSub: { + fontSize: 11, + color: tokens.textMuted, + mt: "8px", + fontVariantNumeric: "tabular-nums", + }, + + footer: { + textAlign: "center", + color: tokens.textMuted, + fontSize: 11, + mt: "56px", + textTransform: "uppercase", + letterSpacing: "0.2em", + fontFamily: EDITORIAL_SECONDARY_SANS_STACK, + "& a": { + color: tokens.text, + textDecoration: "none", + borderBottom: `1px solid ${tokens.text}`, + pb: "2px", + fontWeight: 700, + }, + }, + }; +}; diff --git a/client/src/Pages/StatusPage/Status/themes/modern/ModernStatusPage.tsx b/client/src/Pages/StatusPage/Status/themes/modern/ModernStatusPage.tsx new file mode 100644 index 000000000..461c5e0f5 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/modern/ModernStatusPage.tsx @@ -0,0 +1,205 @@ +import { useMemo, useState } from "react"; +import Box from "@mui/material/Box"; +import Stack from "@mui/material/Stack"; +import { useTranslation } from "react-i18next"; +import type { Monitor } from "@/Types/Monitor"; +import type { StatusPage } from "@/Types/StatusPage"; +import { getMonitorTypeLabel } from "@/Types/StatusPage"; +import { ThemedHeatmap } from "../shared/ThemedHeatmap"; +import { ThemedHistogram } from "../shared/ThemedHistogram"; +import { ThemedInfrastructure } from "../shared/ThemedInfrastructure"; +import { + monitorBadgeTone, + monoFirstChar, + resolveOverallStatus, + statusBadgeKey, +} from "../shared/overallStatus"; +import { useStatusPageTheme } from "../StatusPageThemeProvider"; +import { modernStyles } from "./styles"; + +type StatusPageMonitor = Monitor & { checks?: Monitor["recentChecks"] }; + +interface Props { + statusPage: StatusPage; + monitors: StatusPageMonitor[]; +} + +export const ModernStatusPage = ({ statusPage, monitors }: Props) => { + const { t } = useTranslation(); + const { tokens, mode } = useStatusPageTheme(); + const styles = useMemo(() => modernStyles(tokens, mode === "dark"), [tokens, mode]); + const [chartMode, setChartMode] = useState<"heatmap" | "histogram">("heatmap"); + + const overall = resolveOverallStatus(monitors, t, { iconSize: 20 }); + const logoSrc = statusPage.logo?.data + ? `data:${statusPage.logo.contentType};base64,${statusPage.logo.data}` + : null; + + return ( + + + + {logoSrc ? ( + + ) : ( + {monoFirstChar(statusPage.companyName)} + )} + {statusPage.companyName} + + + + + + + + {overall.message} + + + {t("pages.statusPages.statusBar.monitoringSummary", { + count: monitors.length, + })} + + + {overall.icon} + + + {statusPage.showCharts && ( + + + setChartMode("heatmap")} + sx={styles.chartSwitchButton(chartMode === "heatmap")} + > + {t("pages.statusPages.monitorsList.chartTypeHeatmap")} + + setChartMode("histogram")} + sx={styles.chartSwitchButton(chartMode === "histogram")} + > + {t("pages.statusPages.monitorsList.chartTypeHistogram")} + + + + )} + + + {monitors.map((monitor) => { + const isHardware = monitor.type === "hardware"; + const showInfra = isHardware && statusPage.showInfrastructure !== false; + const showChart = !isHardware && statusPage.showCharts !== false; + const badgeTone = monitorBadgeTone(monitor.status); + + return ( + + + + {monitor.name} + + + {getMonitorTypeLabel(monitor.type, t)} + + {monitor.url && ( + + {monitor.url} + + )} + + + + {t(statusBadgeKey[monitor.status])} + + + + {showInfra && ( + + )} + {showChart && + (chartMode === "heatmap" ? ( + + ) : ( + + ))} + + ); + })} + + + + {t("pages.statusPages.footer.poweredBy")}{" "} + + Checkmate + + + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/modern/styles.ts b/client/src/Pages/StatusPage/Status/themes/modern/styles.ts new file mode 100644 index 000000000..ad7356451 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/modern/styles.ts @@ -0,0 +1,428 @@ +import type { SxProps, Theme } from "@mui/material/styles"; +import { keyframes } from "@mui/system"; +import type { StatusPageThemeTokens } from "../tokens"; +import { type OverallTone, toneColor, toneSoft } from "../shared/overallStatus"; +import { MONO_STACK, SANS_STACK } from "../shared/fontStacks"; + +export type ModernHeatCell = "fast" | "med" | "slow" | "down" | "empty"; +export type ModernBarKind = "up" | "down" | "empty"; +export type ModernGaugeFill = "ok" | "warm" | "hot"; + +export interface ModernStyles { + page: SxProps; + top: SxProps; + brand: SxProps; + logoGrad: SxProps; + logoImg: SxProps; + hero: SxProps; + pulse: (tone: OverallTone) => SxProps; + statusCopy: SxProps; + heroTitle: SxProps; + heroSub: SxProps; + heroIcon: (tone: OverallTone) => SxProps; + chartSwitchWrap: SxProps; + chartSwitch: SxProps; + chartSwitchButton: (active: boolean) => SxProps; + monitorList: SxProps; + card: SxProps; + cardRow: SxProps; + cardLeft: SxProps; + monitorName: SxProps; + monitorMeta: SxProps; + pill: SxProps; + pillHardware: SxProps; + monitorUrl: SxProps; + badge: (tone: OverallTone) => SxProps; + heatmap: SxProps; + heatmapCell: (kind: ModernHeatCell) => SxProps; + histogram: SxProps; + bar: (kind: ModernBarKind, heightPct: number) => SxProps; + chartStats: SxProps; + infra: SxProps; + infraEmpty: SxProps; + gauge: SxProps; + gaugeLabel: SxProps; + gaugeValue: SxProps; + gaugeBar: SxProps; + gaugeFill: (level: ModernGaugeFill, widthPct: number) => SxProps; + gaugeSub: SxProps; + footer: SxProps; +} + +const lightShadow = + "0 2px 4px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.06)"; +const darkShadow = "0 2px 6px rgba(0, 0, 0, 0.5), 0 20px 40px rgba(0, 0, 0, 0.4)"; +const lightShadowHover = + "0 4px 8px rgba(16, 24, 40, 0.05), 0 16px 40px rgba(16, 24, 40, 0.08)"; +const darkShadowHover = "0 4px 10px rgba(0, 0, 0, 0.55), 0 24px 48px rgba(0, 0, 0, 0.45)"; + +const pillBase = { + fontSize: 10, + textTransform: "uppercase" as const, + letterSpacing: "0.08em", + padding: "3px 9px", + borderRadius: "999px", + fontWeight: 600, +}; + +const pulseKeyframes = keyframes` + 0% { transform: scale(1); opacity: 0.5; } + 100% { transform: scale(2.4); opacity: 0; } +`; + +const fadeInKeyframes = keyframes` + to { opacity: 1; transform: translateY(0); } +`; + +export const modernStyles = ( + tokens: StatusPageThemeTokens, + isDark: boolean +): ModernStyles => { + const cardShadow = isDark ? darkShadow : lightShadow; + const cardHoverShadow = isDark ? darkShadowHover : lightShadowHover; + + const heatCellBg: Record = { + fast: `linear-gradient(180deg, ${tokens.up}, ${tokens.upStrong})`, + med: `linear-gradient(180deg, color-mix(in srgb, ${tokens.up} 70%, #ffffff 30%), ${tokens.up})`, + slow: `linear-gradient(180deg, ${tokens.warn}, ${tokens.degraded})`, + down: `linear-gradient(180deg, ${tokens.down}, color-mix(in srgb, ${tokens.down} 70%, #000000 30%))`, + empty: tokens.border, + }; + + const barBg: Record = { + up: tokens.up, + down: tokens.down, + empty: tokens.border, + }; + + const gaugeFillBg: Record = { + ok: `linear-gradient(90deg, ${tokens.up}, ${tokens.upStrong})`, + warm: `linear-gradient(90deg, ${tokens.warn}, ${tokens.degraded})`, + hot: `linear-gradient(90deg, ${tokens.down}, color-mix(in srgb, ${tokens.down} 70%, #000000 30%))`, + }; + + return { + page: { + flex: "1 0 auto", + maxWidth: 980, + width: "100%", + mx: "auto", + p: "56px 20px 80px", + fontFamily: SANS_STACK, + fontSize: 14, + lineHeight: 1.5, + color: tokens.text, + WebkitFontSmoothing: "antialiased", + }, + + top: { + display: "flex", + alignItems: "center", + justifyContent: "space-between", + mb: "32px", + }, + brand: { + display: "flex", + alignItems: "center", + gap: "12px", + fontWeight: 700, + fontSize: 15, + letterSpacing: "-0.01em", + color: tokens.text, + }, + logoGrad: { + width: 32, + height: 32, + borderRadius: "10px", + background: `linear-gradient(135deg, ${tokens.up}, ${tokens.upStrong})`, + display: "grid", + placeItems: "center", + color: "#fff", + fontWeight: 700, + fontSize: 14, + boxShadow: `0 4px 10px color-mix(in srgb, ${tokens.up} 40%, transparent)`, + }, + logoImg: { maxHeight: 32, maxWidth: 120, objectFit: "contain" }, + + hero: { + position: "relative", + borderRadius: "20px", + padding: "28px 32px", + mb: "24px", + display: "flex", + alignItems: "center", + gap: "20px", + background: tokens.surface, + border: `1px solid ${tokens.border}`, + boxShadow: cardShadow, + }, + pulse: (tone) => { + const c = toneColor(tone, tokens); + return { + position: "relative", + width: 14, + height: 14, + borderRadius: "50%", + background: c, + color: c, + flexShrink: 0, + "&::before, &::after": { + content: '""', + position: "absolute", + inset: 0, + borderRadius: "50%", + background: "currentColor", + opacity: 0.5, + animation: `${pulseKeyframes} 2s ease-out infinite`, + }, + "&::after": { animationDelay: "1s" }, + "@media (prefers-reduced-motion: reduce)": { + "&::before, &::after": { animation: "none" }, + }, + }; + }, + statusCopy: { flex: 1, minWidth: 0 }, + heroTitle: { + m: 0, + mb: "4px", + fontSize: 22, + fontWeight: 700, + letterSpacing: "-0.02em", + color: tokens.text, + }, + heroSub: { m: 0, color: tokens.textMuted, fontSize: 13 }, + heroIcon: (tone) => ({ + color: toneColor(tone, tokens), + display: "flex", + alignItems: "center", + }), + + chartSwitchWrap: { display: "flex", justifyContent: "flex-end", mb: "14px" }, + chartSwitch: { + display: "inline-flex", + border: `1px solid ${tokens.border}`, + borderRadius: "999px", + background: tokens.surface, + p: "3px", + gap: "2px", + }, + chartSwitchButton: (active) => ({ + border: 0, + background: active ? tokens.upSoft : "transparent", + fontFamily: "inherit", + fontSize: 11, + padding: "6px 16px", + cursor: "pointer", + color: active ? tokens.up : tokens.textMuted, + fontWeight: 600, + textTransform: "uppercase", + letterSpacing: "0.08em", + transition: "background 0.2s, color 0.2s", + borderRadius: "999px", + "&:hover": { color: active ? tokens.up : tokens.text }, + }), + + monitorList: { + listStyle: "none", + m: 0, + p: 0, + display: "flex", + flexDirection: "column", + gap: "14px", + }, + card: { + background: tokens.surface, + border: `1px solid ${tokens.border}`, + borderRadius: "16px", + boxShadow: cardShadow, + overflow: "hidden", + transition: "transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s", + opacity: 0, + transform: "translateY(8px)", + animation: `${fadeInKeyframes} 0.5s forwards`, + "&:nth-of-type(1)": { animationDelay: "0.05s" }, + "&:nth-of-type(2)": { animationDelay: "0.1s" }, + "&:nth-of-type(3)": { animationDelay: "0.15s" }, + "&:nth-of-type(4)": { animationDelay: "0.2s" }, + "&:nth-of-type(5)": { animationDelay: "0.25s" }, + "&:nth-of-type(n+6)": { animationDelay: "0.3s" }, + "&:hover": { transform: "translateY(-2px)", boxShadow: cardHoverShadow }, + "@media (prefers-reduced-motion: reduce)": { + animation: "none", + opacity: 1, + transform: "none", + }, + }, + cardRow: { + display: "grid", + gridTemplateColumns: "1fr auto", + alignItems: "center", + gap: "20px", + p: "18px 24px", + }, + cardLeft: { minWidth: 0 }, + monitorName: { + fontWeight: 600, + fontSize: 15, + letterSpacing: "-0.005em", + color: tokens.text, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + }, + monitorMeta: { + display: "flex", + gap: "10px", + alignItems: "center", + mt: "6px", + flexWrap: "wrap", + }, + pill: { + ...pillBase, + color: tokens.textMuted, + background: tokens.bg, + }, + pillHardware: { + ...pillBase, + color: tokens.up, + background: tokens.upSoft, + }, + monitorUrl: { + fontSize: 12, + color: tokens.textMuted, + fontFamily: MONO_STACK, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + maxWidth: 280, + }, + + badge: (tone) => ({ + fontSize: 11, + fontWeight: 700, + padding: "5px 12px", + borderRadius: "999px", + display: "inline-flex", + alignItems: "center", + gap: "6px", + whiteSpace: "nowrap", + background: toneSoft(tone, tokens), + color: toneColor(tone, tokens), + "&::before": { + content: '""', + width: 6, + height: 6, + borderRadius: "50%", + background: "currentColor", + }, + }), + + heatmap: { + padding: "0 24px 20px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "3px", + height: 46, + }, + heatmapCell: (kind) => ({ + borderRadius: "3px", + background: heatCellBg[kind], + opacity: kind === "empty" ? 0.4 : 1, + transition: "transform 0.15s", + "&:hover": { transform: "scaleY(1.2)" }, + }), + + histogram: { + padding: "0 24px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "3px", + alignItems: "flex-end", + height: 46, + }, + bar: (kind, heightPct) => ({ + background: barBg[kind], + borderRadius: "3px", + minHeight: 4, + opacity: kind === "empty" ? 0.4 : 1, + height: `${heightPct}%`, + transition: "transform 0.15s", + "&:hover": { transform: "scaleY(1.08)" }, + }), + chartStats: { + padding: "0 24px 20px", + fontSize: 11, + color: tokens.textMuted, + fontVariantNumeric: "tabular-nums", + fontWeight: 600, + }, + + infra: { + padding: "16px 24px 22px", + display: "grid", + gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, + gap: "14px", + }, + infraEmpty: { + padding: "16px 24px 22px", + color: tokens.textMuted, + fontSize: 13, + }, + gauge: { + border: `1px solid ${tokens.border}`, + borderRadius: "14px", + p: "14px 16px", + background: `linear-gradient(135deg, ${tokens.bg}, ${tokens.surface})`, + }, + gaugeLabel: { + fontSize: 10, + color: tokens.textMuted, + textTransform: "uppercase", + letterSpacing: "0.1em", + fontWeight: 700, + }, + gaugeValue: { + fontSize: 26, + fontWeight: 700, + letterSpacing: "-0.02em", + mt: "4px", + fontVariantNumeric: "tabular-nums", + color: tokens.text, + }, + gaugeBar: { + height: 6, + background: tokens.border, + borderRadius: "3px", + overflow: "hidden", + mt: "10px", + }, + gaugeFill: (level, widthPct) => ({ + display: "block", + height: "100%", + background: gaugeFillBg[level], + borderRadius: "3px", + transition: "width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1)", + width: `${Math.max(0, Math.min(100, widthPct))}%`, + }), + gaugeSub: { + fontSize: 11, + color: tokens.textMuted, + mt: "8px", + fontVariantNumeric: "tabular-nums", + }, + + footer: { + textAlign: "center", + color: tokens.textMuted, + fontSize: 12, + mt: "48px", + "& a": { + color: tokens.up, + textDecoration: "underline", + textUnderlineOffset: "3px", + fontWeight: 700, + "&:hover": { color: tokens.upStrong }, + }, + }, + }; +}; diff --git a/client/src/Pages/StatusPage/Status/themes/refined/RefinedStatusPage.tsx b/client/src/Pages/StatusPage/Status/themes/refined/RefinedStatusPage.tsx new file mode 100644 index 000000000..5c5055b4c --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/refined/RefinedStatusPage.tsx @@ -0,0 +1,210 @@ +import { useMemo, useState } from "react"; +import Box from "@mui/material/Box"; +import Stack from "@mui/material/Stack"; +import { useTranslation } from "react-i18next"; +import type { Monitor } from "@/Types/Monitor"; +import type { StatusPage } from "@/Types/StatusPage"; +import { getMonitorTypeLabel } from "@/Types/StatusPage"; +import { ThemedHeatmap } from "../shared/ThemedHeatmap"; +import { ThemedHistogram } from "../shared/ThemedHistogram"; +import { ThemedInfrastructure } from "../shared/ThemedInfrastructure"; +import { + monitorBadgeTone, + monoFirstChar, + resolveOverallStatus, + statusBadgeKey, +} from "../shared/overallStatus"; +import { useStatusPageTheme } from "../StatusPageThemeProvider"; +import { refinedStyles } from "./styles"; + +type StatusPageMonitor = Monitor & { checks?: Monitor["recentChecks"] }; + +interface Props { + statusPage: StatusPage; + monitors: StatusPageMonitor[]; +} + +export const RefinedStatusPage = ({ statusPage, monitors }: Props) => { + const { t } = useTranslation(); + const { tokens } = useStatusPageTheme(); + const styles = useMemo(() => refinedStyles(tokens), [tokens]); + const [chartMode, setChartMode] = useState<"heatmap" | "histogram">("heatmap"); + + const overall = resolveOverallStatus(monitors, t); + const logoSrc = statusPage.logo?.data + ? `data:${statusPage.logo.contentType};base64,${statusPage.logo.data}` + : null; + + return ( + + + + {logoSrc ? ( + + ) : ( + {monoFirstChar(statusPage.companyName)} + )} + + {statusPage.companyName} + + + + + + + + + {overall.message} + + + {t("pages.statusPages.statusBar.monitoringSummary", { + count: monitors.length, + })} + + + {overall.icon} + + + {statusPage.showCharts && ( + + + setChartMode("heatmap")} + sx={styles.chartSwitchButton(chartMode === "heatmap")} + > + {t("pages.statusPages.monitorsList.chartTypeHeatmap")} + + setChartMode("histogram")} + sx={styles.chartSwitchButton(chartMode === "histogram")} + > + {t("pages.statusPages.monitorsList.chartTypeHistogram")} + + + + )} + + + {monitors.map((monitor) => { + const isHardware = monitor.type === "hardware"; + const showInfra = isHardware && statusPage.showInfrastructure !== false; + const showChart = !isHardware && statusPage.showCharts !== false; + const badgeTone = monitorBadgeTone(monitor.status); + + return ( + + + + {monitor.name} + + + {getMonitorTypeLabel(monitor.type, t)} + + {monitor.url && ( + + {monitor.url} + + )} + + + + {t(statusBadgeKey[monitor.status])} + + + + {showInfra && ( + + )} + {showChart && + (chartMode === "heatmap" ? ( + + ) : ( + + ))} + + ); + })} + + + + {t("pages.statusPages.footer.poweredBy")}{" "} + + Checkmate + + + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/refined/styles.ts b/client/src/Pages/StatusPage/Status/themes/refined/styles.ts new file mode 100644 index 000000000..52626b20c --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/refined/styles.ts @@ -0,0 +1,364 @@ +import type { SxProps, Theme } from "@mui/material/styles"; +import type { StatusPageThemeTokens } from "../tokens"; +import { type OverallTone, toneColor, toneSoft } from "../shared/overallStatus"; +import { MONO_STACK, SANS_STACK } from "../shared/fontStacks"; + +export type RefinedHeatCell = "fast" | "med" | "slow" | "down" | "empty"; +export type RefinedBarKind = "up" | "down" | "empty"; +export type RefinedGaugeFill = "ok" | "warm" | "hot"; + +export interface RefinedStyles { + page: SxProps; + top: SxProps; + brand: SxProps; + logoMono: SxProps; + logoImg: SxProps; + company: SxProps; + hero: SxProps; + statusDot: (tone: OverallTone) => SxProps; + statusCopy: SxProps; + heroTitle: SxProps; + heroSub: SxProps; + heroIcon: (tone: OverallTone) => SxProps; + chartSwitchWrap: SxProps; + chartSwitch: SxProps; + chartSwitchButton: (active: boolean) => SxProps; + monitorList: SxProps; + card: SxProps; + cardRow: SxProps; + cardLeft: SxProps; + monitorName: SxProps; + monitorMeta: SxProps; + pill: SxProps; + pillHardware: SxProps; + monitorUrl: SxProps; + badge: (tone: OverallTone) => SxProps; + heatmap: SxProps; + heatmapCell: (kind: RefinedHeatCell) => SxProps; + histogram: SxProps; + bar: (kind: RefinedBarKind, heightPct: number) => SxProps; + chartStats: SxProps; + infra: SxProps; + infraEmpty: SxProps; + gauge: SxProps; + gaugeLabel: SxProps; + gaugeValue: SxProps; + gaugeBar: SxProps; + gaugeFill: (level: RefinedGaugeFill, widthPct: number) => SxProps; + gaugeSub: SxProps; + footer: SxProps; +} + +const cardShadow = "0 1px 2px rgba(10, 16, 32, 0.06), 0 6px 18px rgba(10, 16, 32, 0.08)"; +const cardShadowHover = + "0 2px 4px rgba(16, 24, 40, 0.06), 0 10px 24px rgba(16, 24, 40, 0.06)"; + +const pillBase = { + fontSize: 10, + textTransform: "uppercase" as const, + letterSpacing: "0.08em", + padding: "2px 8px", + borderRadius: "999px", + fontWeight: 600, +}; + +export const refinedStyles = (tokens: StatusPageThemeTokens): RefinedStyles => { + const heatCellBg: Record = { + fast: tokens.up, + med: `color-mix(in srgb, ${tokens.up} 60%, #ffffff 40%)`, + slow: tokens.warn, + down: tokens.down, + empty: tokens.border, + }; + + const barBg: Record = { + up: tokens.up, + down: tokens.down, + empty: tokens.border, + }; + + const gaugeFillBg: Record = { + ok: tokens.up, + warm: tokens.warn, + hot: tokens.down, + }; + + return { + page: { + flex: "1 0 auto", + maxWidth: 960, + width: "100%", + mx: "auto", + p: "48px 20px 80px", + fontFamily: SANS_STACK, + fontSize: 14, + lineHeight: 1.5, + color: tokens.text, + WebkitFontSmoothing: "antialiased", + }, + + top: { + display: "flex", + alignItems: "center", + justifyContent: "space-between", + mb: "28px", + }, + brand: { + display: "flex", + alignItems: "center", + gap: "10px", + fontWeight: 600, + letterSpacing: "-0.01em", + color: tokens.text, + }, + logoMono: { + width: 28, + height: 28, + borderRadius: "8px", + background: tokens.up, + display: "grid", + placeItems: "center", + color: "#fff", + fontWeight: 700, + fontSize: 13, + }, + logoImg: { maxHeight: 32, maxWidth: 120, objectFit: "contain" }, + company: { fontSize: 14 }, + + hero: { + background: tokens.surface, + border: `1px solid ${tokens.border}`, + borderRadius: tokens.radius, + padding: "22px 24px", + display: "flex", + alignItems: "center", + gap: "16px", + boxShadow: cardShadow, + mb: "20px", + }, + statusDot: (tone) => ({ + width: 10, + height: 10, + borderRadius: "50%", + background: toneColor(tone, tokens), + boxShadow: `0 0 0 4px ${toneSoft(tone, tokens)}`, + flexShrink: 0, + }), + statusCopy: { flex: 1, minWidth: 0 }, + heroTitle: { + m: 0, + mb: "2px", + fontSize: 17, + fontWeight: 600, + letterSpacing: "-0.01em", + color: tokens.text, + }, + heroSub: { m: 0, color: tokens.textMuted, fontSize: 13 }, + heroIcon: (tone) => ({ + color: toneColor(tone, tokens), + display: "flex", + alignItems: "center", + }), + + chartSwitchWrap: { display: "flex", justifyContent: "flex-end", mb: "12px" }, + chartSwitch: { + display: "inline-flex", + border: `1px solid ${tokens.border}`, + borderRadius: "8px", + background: tokens.surface, + p: "3px", + gap: "2px", + }, + chartSwitchButton: (active) => ({ + border: 0, + background: active ? tokens.upSoft : "transparent", + fontFamily: "inherit", + fontSize: 11, + padding: "5px 14px", + cursor: "pointer", + color: active ? tokens.up : tokens.textMuted, + borderRadius: "5px", + transition: "background 0.15s ease, color 0.15s ease", + fontWeight: active ? 600 : 500, + "&:hover": { color: active ? tokens.up : tokens.text }, + }), + + monitorList: { + listStyle: "none", + m: 0, + p: 0, + display: "flex", + flexDirection: "column", + gap: "12px", + }, + card: { + background: tokens.surface, + border: `1px solid ${tokens.border}`, + borderRadius: tokens.radius, + boxShadow: cardShadow, + overflow: "hidden", + position: "relative", + transition: "transform 0.15s, box-shadow 0.15s", + "&:hover": { transform: "translateY(-1px)", boxShadow: cardShadowHover }, + }, + cardRow: { + display: "grid", + gridTemplateColumns: "1fr auto", + alignItems: "center", + gap: "16px", + p: "16px 20px", + }, + cardLeft: { minWidth: 0 }, + monitorName: { + fontWeight: 600, + fontSize: 14, + letterSpacing: "-0.005em", + color: tokens.text, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + }, + monitorMeta: { + display: "flex", + gap: "10px", + alignItems: "center", + mt: "4px", + flexWrap: "wrap", + }, + pill: { + ...pillBase, + color: tokens.textMuted, + border: `1px solid ${tokens.border}`, + }, + pillHardware: { + ...pillBase, + color: tokens.up, + border: `1px solid ${tokens.border}`, + background: tokens.upSoft, + }, + monitorUrl: { + fontSize: 12, + color: tokens.textMuted, + fontFamily: MONO_STACK, + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + maxWidth: 280, + }, + + badge: (tone) => ({ + fontSize: 11, + fontWeight: 600, + padding: "4px 10px", + borderRadius: "999px", + whiteSpace: "nowrap", + background: toneSoft(tone, tokens), + color: toneColor(tone, tokens), + }), + + heatmap: { + padding: "0 20px 16px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "3px", + height: 42, + }, + heatmapCell: (kind) => ({ + borderRadius: "2px", + background: heatCellBg[kind], + opacity: kind === "empty" ? 0.4 : 1, + transition: "transform 0.15s", + "&:hover": { transform: "scaleY(1.15)" }, + }), + + histogram: { + padding: "0 20px", + display: "grid", + gridTemplateColumns: "repeat(25, 1fr)", + gap: "3px", + alignItems: "flex-end", + height: 42, + }, + bar: (kind, heightPct) => ({ + background: barBg[kind], + borderRadius: "2px", + minHeight: 3, + opacity: kind === "empty" ? 0.4 : 1, + height: `${heightPct}%`, + }), + chartStats: { + padding: "0 20px 16px", + fontSize: 11, + color: tokens.textMuted, + fontVariantNumeric: "tabular-nums", + }, + + infra: { + padding: "14px 20px 18px", + display: "grid", + gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" }, + gap: "12px", + }, + infraEmpty: { + padding: "14px 20px 18px", + color: tokens.textMuted, + fontSize: 13, + }, + gauge: { + border: `1px solid ${tokens.border}`, + borderRadius: "10px", + p: "12px 14px", + background: tokens.bg, + }, + gaugeLabel: { + fontSize: 11, + color: tokens.textMuted, + textTransform: "uppercase", + letterSpacing: "0.08em", + fontWeight: 600, + }, + gaugeValue: { + fontSize: 20, + fontWeight: 600, + letterSpacing: "-0.01em", + mt: "2px", + fontVariantNumeric: "tabular-nums", + color: tokens.text, + }, + gaugeBar: { + height: 4, + background: tokens.border, + borderRadius: "2px", + overflow: "hidden", + mt: "8px", + }, + gaugeFill: (level, widthPct) => ({ + display: "block", + height: "100%", + background: gaugeFillBg[level], + borderRadius: "2px", + transition: "width 0.6s", + width: `${Math.max(0, Math.min(100, widthPct))}%`, + }), + gaugeSub: { + fontSize: 11, + color: tokens.textMuted, + mt: "6px", + fontVariantNumeric: "tabular-nums", + }, + + footer: { + textAlign: "center", + color: tokens.textMuted, + fontSize: 12, + mt: "40px", + "& a": { + color: tokens.up, + textDecoration: "underline", + textUnderlineOffset: "3px", + fontWeight: 600, + "&:hover": { color: tokens.upStrong || tokens.up }, + }, + }, + }; +}; diff --git a/client/src/Pages/StatusPage/Status/themes/shared/ThemedHeatmap.tsx b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHeatmap.tsx new file mode 100644 index 000000000..8e34dff36 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHeatmap.tsx @@ -0,0 +1,94 @@ +import Tooltip from "@mui/material/Tooltip"; +import Box from "@mui/material/Box"; +import Stack from "@mui/material/Stack"; +import Typography from "@mui/material/Typography"; +import type { SxProps, Theme } from "@mui/material/styles"; +import { useTranslation } from "react-i18next"; +import { useSelector } from "react-redux"; +import type { RootState } from "@/store"; +import type { CheckSnapshot } from "@/Types/Check"; +import { formatDateWithTz } from "@/Utils/TimeUtils"; + +const CELLS = 25; + +export type HeatCellKind = "fast" | "med" | "slow" | "down" | "empty"; + +interface Props { + checks: CheckSnapshot[]; + containerSx: SxProps; + cellSx: (kind: HeatCellKind) => SxProps; +} + +const classify = (check: CheckSnapshot): Exclude => { + if (!check.status) return "down"; + const rt = check.responseTime ?? 0; + if (rt > 500) return "slow"; + if (rt > 250) return "med"; + return "fast"; +}; + +export const ThemedHeatmap = ({ checks, containerSx, cellSx }: Props) => { + const { t } = useTranslation(); + const uiTimezone = useSelector((state: RootState) => state.ui.timezone); + + const source = checks.slice(0, CELLS).reverse(); + const padded: (CheckSnapshot | null)[] = [ + ...Array.from({ length: Math.max(0, CELLS - source.length) }, () => null), + ...source, + ]; + + return ( + + {padded.map((check, i) => { + if (!check) { + return ( + + ); + } + const kind = classify(check); + const tooltipContent = ( + + + {check.status + ? `${check.responseTime} ms` + : t("pages.statusPages.monitorsList.chart.downTooltip")} + + + {formatDateWithTz( + check.createdAt, + "ddd, MMMM D, YYYY, HH:mm A", + uiTimezone + )} + + + ); + return ( + + + + ); + })} + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/shared/ThemedHistogram.tsx b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHistogram.tsx new file mode 100644 index 000000000..54036ebfd --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHistogram.tsx @@ -0,0 +1,116 @@ +import { useMemo } from "react"; +import Tooltip from "@mui/material/Tooltip"; +import Box from "@mui/material/Box"; +import Stack from "@mui/material/Stack"; +import Typography from "@mui/material/Typography"; +import type { SxProps, Theme } from "@mui/material/styles"; +import { useTranslation } from "react-i18next"; +import { useSelector } from "react-redux"; +import type { RootState } from "@/store"; +import type { CheckSnapshot } from "@/Types/Check"; +import { formatDateWithTz } from "@/Utils/TimeUtils"; + +const CELLS = 25; +const MIN_HEIGHT_PCT = 6; + +export type BarKind = "up" | "down" | "empty"; + +interface Props { + checks: CheckSnapshot[]; + containerSx: SxProps; + barSx: (kind: BarKind, heightPct: number) => SxProps; + statsSx: SxProps; + statsGap?: number; +} + +const tone = (check: CheckSnapshot): Exclude => + check.status ? "up" : "down"; + +export const ThemedHistogram = ({ + checks, + containerSx, + barSx, + statsSx, + statsGap = 1, +}: Props) => { + const { t } = useTranslation(); + const uiTimezone = useSelector((state: RootState) => state.ui.timezone); + + const { padded, max, avg, peak } = useMemo(() => { + const source = checks.slice(0, CELLS).reverse(); + const out: (CheckSnapshot | null)[] = [ + ...Array.from({ length: Math.max(0, CELLS - source.length) }, () => null), + ...source, + ]; + const valid = out.filter((c): c is CheckSnapshot => c !== null && c.responseTime > 0); + const maxRt = valid.length ? Math.max(...valid.map((c) => c.responseTime)) : 1; + const avgRt = valid.length + ? Math.round(valid.reduce((s, c) => s + c.responseTime, 0) / valid.length) + : 0; + return { padded: out, max: maxRt, avg: avgRt, peak: valid.length ? maxRt : 0 }; + }, [checks]); + + return ( + + + {padded.map((check, i) => { + if (!check) { + return ( + + ); + } + const height = Math.max( + MIN_HEIGHT_PCT, + Math.round((check.responseTime / max) * 100) + ); + const tooltipContent = ( + + + {check.status + ? `${check.responseTime} ms` + : t("pages.statusPages.monitorsList.chart.downTooltip")} + + + {formatDateWithTz( + check.createdAt, + "ddd, MMMM D, YYYY, HH:mm A", + uiTimezone + )} + + + ); + return ( + + + + ); + })} + + + {t("pages.statusPages.monitorsList.chart.avg", { value: avg })} + {t("pages.statusPages.monitorsList.chart.max", { value: peak })} + + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/shared/ThemedInfrastructure.tsx b/client/src/Pages/StatusPage/Status/themes/shared/ThemedInfrastructure.tsx new file mode 100644 index 000000000..01804a322 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/shared/ThemedInfrastructure.tsx @@ -0,0 +1,105 @@ +import Box from "@mui/material/Box"; +import prettyBytes from "pretty-bytes"; +import type { SxProps, Theme } from "@mui/material/styles"; +import { useTranslation } from "react-i18next"; +import type { Monitor } from "@/Types/Monitor"; + +export type GaugeFillLevel = "ok" | "warm" | "hot"; + +export interface InfraSx { + containerSx: SxProps; + emptySx: SxProps; + gaugeSx: SxProps; + gaugeLabelSx: SxProps; + gaugeValueSx: SxProps; + gaugeBarSx: SxProps; + gaugeFillSx: (level: GaugeFillLevel, widthPct: number) => SxProps; + gaugeSubSx: SxProps; +} + +interface Props { + monitor: Monitor & { checks?: Monitor["recentChecks"] }; + sxApi: InfraSx; +} + +interface Gauge { + key: string; + label: string; + value: number; + sub: string; +} + +const PCT = 100; + +const heatLevel = (value: number): GaugeFillLevel => + value > 85 ? "hot" : value > 70 ? "warm" : "ok"; + +export const ThemedInfrastructure = ({ monitor, sxApi }: Props) => { + const { t } = useTranslation(); + const latest = monitor.recentChecks?.[0] ?? monitor.checks?.[0]; + + const renderEmpty = () => ( + {t("pages.statusPages.monitorsList.noData")} + ); + + if (!latest) return renderEmpty(); + + const gauges: Gauge[] = []; + + if (typeof latest.cpu?.usage_percent === "number") { + const pct = latest.cpu.usage_percent * PCT; + gauges.push({ + key: "cpu", + label: t("pages.statusPages.monitorsList.infrastructure.cpu"), + value: pct, + sub: `${pct.toFixed(0)}%`, + }); + } + + if ( + typeof latest.memory?.usage_percent === "number" && + typeof latest.memory?.used_bytes === "number" && + typeof latest.memory?.total_bytes === "number" + ) { + gauges.push({ + key: "memory", + label: t("pages.statusPages.monitorsList.infrastructure.memory"), + value: latest.memory.usage_percent * PCT, + sub: `${prettyBytes(latest.memory.used_bytes)} / ${prettyBytes(latest.memory.total_bytes)}`, + }); + } + + if (latest.disk && latest.disk.length > 0) { + const disks = latest.disk; + const avg = + (disks.reduce((acc, d) => acc + (d?.usage_percent ?? 0), 0) / disks.length) * PCT; + const used = disks.reduce((acc, d) => acc + (d?.used_bytes ?? 0), 0); + const total = disks.reduce((acc, d) => acc + (d?.total_bytes ?? 0), 0); + gauges.push({ + key: "disk", + label: t("pages.statusPages.monitorsList.infrastructure.disk"), + value: avg, + sub: `${prettyBytes(used)} / ${prettyBytes(total)}`, + }); + } + + if (gauges.length === 0) return renderEmpty(); + + return ( + + {gauges.map((g) => ( + + {g.label} + {g.value.toFixed(0)}% + + + + {g.sub} + + ))} + + ); +}; diff --git a/client/src/Pages/StatusPage/Status/themes/shared/fontStacks.ts b/client/src/Pages/StatusPage/Status/themes/shared/fontStacks.ts new file mode 100644 index 000000000..2ad63fd07 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/shared/fontStacks.ts @@ -0,0 +1,11 @@ +export const SANS_STACK = + '-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif'; + +export const BOLD_SANS_STACK = `ui-sans-serif, ${SANS_STACK}`; + +export const SERIF_STACK = 'Georgia, "Iowan Old Style", "Palatino Linotype", serif'; + +export const EDITORIAL_SECONDARY_SANS_STACK = + '-apple-system, "Helvetica Neue", Arial, sans-serif'; + +export const MONO_STACK = "ui-monospace, Menlo, monospace"; diff --git a/client/src/Pages/StatusPage/Status/themes/shared/overallStatus.tsx b/client/src/Pages/StatusPage/Status/themes/shared/overallStatus.tsx new file mode 100644 index 000000000..51681bd79 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/shared/overallStatus.tsx @@ -0,0 +1,167 @@ +import type { ReactNode } from "react"; +import { + AlertTriangle, + CircleCheck, + CircleX, + Loader, + PauseCircle, + ShieldAlert, + Wrench, +} from "lucide-react"; +import type { Monitor, MonitorStatus } from "@/Types/Monitor"; +import type { StatusPageThemeTokens } from "../tokens"; + +export type OverallTone = "up" | "warn" | "down"; + +export const toneColor = (tone: OverallTone, t: StatusPageThemeTokens): string => + tone === "down" ? t.down : tone === "warn" ? t.warn : t.up; + +export const toneSoft = (tone: OverallTone, t: StatusPageThemeTokens): string => + tone === "down" ? t.downSoft : tone === "warn" ? t.warnSoft : t.upSoft; + +export interface OverallStatus { + tone: OverallTone; + message: string; + icon: ReactNode; +} + +type StatusPageMonitor = Pick; + +interface Options { + iconSize?: number; + // Optional override for the `allUp` message key (editorial uses a more + // formal sentence). + allUpKey?: string; +} + +export const resolveOverallStatus = ( + monitors: StatusPageMonitor[], + t: (key: string) => string, + options: Options = {} +): OverallStatus => { + const size = options.iconSize ?? 18; + const allUpMessage = t(options.allUpKey ?? "pages.statusPages.statusBar.allUp"); + + if (monitors.length === 0) { + return { + tone: "warn", + message: t("pages.statusPages.statusBar.noMonitors"), + icon: , + }; + } + + const allOf = (...statuses: MonitorStatus[]) => + monitors.every((m) => statuses.includes(m.status)); + const someOf = (...statuses: MonitorStatus[]) => + monitors.some((m) => statuses.includes(m.status)); + const noneOf = (...statuses: MonitorStatus[]) => + monitors.every((m) => !statuses.includes(m.status)); + + if (allOf("up")) { + return { tone: "up", message: allUpMessage, icon: }; + } + if (allOf("breached")) { + return { + tone: "down", + message: t("pages.statusPages.statusBar.allBreached"), + icon: , + }; + } + if (allOf("maintenance")) { + return { + tone: "warn", + message: t("pages.statusPages.statusBar.allMaintenance"), + icon: , + }; + } + if (allOf("down")) { + return { + tone: "down", + message: t("pages.statusPages.statusBar.allDown"), + icon: , + }; + } + if (allOf("paused")) { + return { + tone: "warn", + message: t("pages.statusPages.statusBar.allPaused"), + icon: , + }; + } + if (allOf("initializing")) { + return { + tone: "warn", + message: t("pages.statusPages.statusBar.allInitializing"), + icon: , + }; + } + if (someOf("breached") && someOf("down")) { + return { + tone: "down", + message: t("pages.statusPages.statusBar.breachedAndDown"), + icon: , + }; + } + if (someOf("breached")) { + return { + tone: "down", + message: t("pages.statusPages.statusBar.breached"), + icon: , + }; + } + if (someOf("maintenance") && someOf("down")) { + return { + tone: "down", + message: t("pages.statusPages.statusBar.maintenanceAndDown"), + icon: , + }; + } + if (someOf("maintenance") && noneOf("down")) { + return { + tone: "warn", + message: t("pages.statusPages.statusBar.maintenance"), + icon: , + }; + } + if (someOf("down")) { + return { + tone: "warn", + message: t("pages.statusPages.statusBar.degraded"), + icon: , + }; + } + if (someOf("paused")) { + return { + tone: "warn", + message: t("pages.statusPages.statusBar.partiallyPaused"), + icon: , + }; + } + if (someOf("initializing")) { + return { + tone: "up", + message: t("pages.statusPages.statusBar.initializing"), + icon: , + }; + } + return { + tone: "warn", + message: t("pages.statusPages.statusBar.unknown"), + icon: , + }; +}; + +export const statusBadgeKey: Record = { + up: "pages.statusPages.monitorsList.status.up", + down: "pages.statusPages.monitorsList.status.down", + breached: "pages.statusPages.monitorsList.status.breached", + maintenance: "pages.statusPages.monitorsList.status.maintenance", + paused: "pages.statusPages.monitorsList.status.paused", + initializing: "pages.statusPages.monitorsList.status.initializing", +}; + +export const monoFirstChar = (s?: string): string => + (s?.trim().charAt(0) || "?").toUpperCase(); + +export const monitorBadgeTone = (status: MonitorStatus): OverallTone => + status === "up" ? "up" : status === "down" || status === "breached" ? "down" : "warn"; diff --git a/client/src/Pages/StatusPage/Status/themes/tokens.ts b/client/src/Pages/StatusPage/Status/themes/tokens.ts new file mode 100644 index 000000000..f84b6f100 --- /dev/null +++ b/client/src/Pages/StatusPage/Status/themes/tokens.ts @@ -0,0 +1,199 @@ +import type { StatusPageTheme } from "@/Types/StatusPage"; + +export interface StatusPageThemeTokens { + bg: string; + surface: string; + border: string; + text: string; + textMuted: string; + up: string; + upStrong: string; + upSoft: string; + degraded: string; + degradedSoft: string; + down: string; + downSoft: string; + warn: string; + warnSoft: string; + radius: string; + fontFamily?: string; + headingFontFamily?: string; + headingWeight?: number; + headingLetterSpacing?: string; + chartBarRadius?: string; + pulseStatusDot?: boolean; + staggeredCardFadeIn?: boolean; + conicLogo?: boolean; + heroSize?: "default" | "large"; + cardStyle?: "card" | "hairline"; +} + +type ThemeVariants = { light: StatusPageThemeTokens; dark: StatusPageThemeTokens }; + +const refined: ThemeVariants = { + light: { + bg: "#f4f6fa", + surface: "#ffffff", + border: "#dce1ea", + text: "#0a1020", + textMuted: "#4b5768", + up: "#0f8a6d", + upStrong: "#0c7359", + upSoft: "#d6f1e6", + degraded: "#c2630a", + degradedSoft: "#fde7bf", + down: "#d11f2f", + downSoft: "#fdd9dc", + warn: "#e08a0b", + warnSoft: "#fdebc5", + radius: "12px", + }, + dark: { + bg: "#070b11", + surface: "#131a24", + border: "#253142", + text: "#f1f5fb", + textMuted: "#9aa7bd", + up: "#2fd7a2", + upStrong: "#1fb487", + upSoft: "rgba(47,215,162,0.15)", + degraded: "#e69138", + degradedSoft: "rgba(230,145,56,0.18)", + down: "#ff5b6b", + downSoft: "rgba(255,91,107,0.18)", + warn: "#f0a837", + warnSoft: "rgba(240,168,55,0.18)", + radius: "12px", + }, +}; + +const modern: ThemeVariants = { + light: { + bg: "#fafbfc", + surface: "#ffffff", + border: "#eceef2", + text: "#0b1220", + textMuted: "#6b7280", + up: "#10a37f", + upStrong: "#0b8a6a", + upSoft: "#d7f3e9", + degraded: "#d97706", + degradedSoft: "#fef3c7", + down: "#dc2626", + downSoft: "#fee2e2", + warn: "#f59e0b", + warnSoft: "#fef3c7", + radius: "16px", + pulseStatusDot: true, + staggeredCardFadeIn: true, + }, + dark: { + bg: "#0a0d12", + surface: "#10151c", + border: "#1b2430", + text: "#e8edf5", + textMuted: "#8a95a8", + up: "#10a37f", + upStrong: "#0b8a6a", + upSoft: "rgba(16,163,127,0.18)", + degraded: "#d97706", + degradedSoft: "rgba(217,119,6,0.22)", + down: "#dc2626", + downSoft: "rgba(220,38,38,0.22)", + warn: "#f59e0b", + warnSoft: "rgba(245,158,11,0.2)", + radius: "16px", + pulseStatusDot: true, + staggeredCardFadeIn: true, + }, +}; + +const bold: ThemeVariants = { + light: { + bg: "#f5f6f9", + surface: "#ffffff", + border: "#e6e8ee", + text: "#0b1220", + textMuted: "#6b7280", + up: "#10a37f", + upStrong: "#0b8a6a", + upSoft: "rgba(16,163,127,0.12)", + degraded: "#f59e0b", + degradedSoft: "rgba(245,158,11,0.14)", + down: "#f43f5e", + downSoft: "rgba(244,63,94,0.12)", + warn: "#f59e0b", + warnSoft: "rgba(245,158,11,0.14)", + radius: "18px", + heroSize: "large", + conicLogo: true, + }, + dark: { + bg: "#05070a", + surface: "#0c1117", + border: "#1a2330", + text: "#eef2f7", + textMuted: "#7a8699", + up: "#22d3a6", + upStrong: "#10a37f", + upSoft: "rgba(34,211,166,0.14)", + degraded: "#f59e0b", + degradedSoft: "rgba(245,158,11,0.14)", + down: "#f43f5e", + downSoft: "rgba(244,63,94,0.16)", + warn: "#f59e0b", + warnSoft: "rgba(245,158,11,0.14)", + radius: "18px", + heroSize: "large", + conicLogo: true, + }, +}; + +const editorial: ThemeVariants = { + light: { + bg: "#fbfaf7", + surface: "#ffffff", + // Darkened from mockup's #e9e4d8 (~1.3:1 on #fbfaf7) to pass WCAG AA 3:1 for UI borders. + border: "#d4cdb8", + text: "#1a1a1a", + textMuted: "#6b675e", + up: "#2c6a4f", + upStrong: "#205239", + upSoft: "#dfeee4", + degraded: "#a46200", + degradedSoft: "#f7ecd4", + down: "#9a2a2a", + downSoft: "#f5dede", + warn: "#a46200", + warnSoft: "#f7ecd4", + radius: "6px", + headingFontFamily: 'Georgia, "Iowan Old Style", "Palatino Linotype", serif', + cardStyle: "hairline", + }, + dark: { + bg: "#141310", + surface: "#1c1a15", + border: "#3a352b", + text: "#f0ece3", + textMuted: "#9e988a", + up: "#6fbf96", + upStrong: "#4fa37a", + upSoft: "rgba(44,106,79,0.22)", + degraded: "#d79a3b", + degradedSoft: "rgba(164,98,0,0.22)", + down: "#d87a7a", + downSoft: "rgba(154,42,42,0.22)", + warn: "#d79a3b", + warnSoft: "rgba(164,98,0,0.22)", + radius: "6px", + headingFontFamily: 'Georgia, "Iowan Old Style", "Palatino Linotype", serif', + cardStyle: "hairline", + }, +}; + +export const themeTokens: Record = { + refined, + modern, + bold, + editorial, +}; diff --git a/client/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable.tsx b/client/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable.tsx index 8f72931d6..fccf6105b 100644 --- a/client/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable.tsx +++ b/client/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable.tsx @@ -2,14 +2,16 @@ import Box from "@mui/material/Box"; import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; import { Table, type Header, ValueLabel } from "@/Components/design-elements"; +import { Pagination } from "@/Components/design-elements/Table"; import { ActionsMenu, type ActionMenuItem } from "@/Components/actions-menu"; +import { useClientPagination } from "@/Hooks/useClientPagination"; import { ExternalLink } from "lucide-react"; import { useTranslation } from "react-i18next"; import { useTheme } from "@mui/material/styles"; import { useNavigate } from "react-router-dom"; -import type { StatusPage } from "@/Types/StatusPage"; +import { PUBLIC_STATUS_PAGE_PREFIX, type StatusPage } from "@/Types/StatusPage"; interface StatusPagesTableProps { data: StatusPage[]; @@ -23,6 +25,7 @@ export const StatusPagesTable = ({ const { t } = useTranslation(); const theme = useTheme(); const navigate = useNavigate(); + const { pagedRows, paginationProps } = useClientPagination(data); const getActions = (row: StatusPage): ActionMenuItem[] => { return [ @@ -50,7 +53,7 @@ export const StatusPagesTable = ({ const handleUrlClick = (e: React.MouseEvent, row: StatusPage) => { if (row.isPublished) { e.stopPropagation(); - const url = `/status/public/${row.url}`; + const url = `${PUBLIC_STATUS_PAGE_PREFIX}/${row.url}`; window.open(url, "_blank", "noopener,noreferrer"); } }; @@ -133,10 +136,11 @@ export const StatusPagesTable = ({
+ {data.length > 0 && } ); }; diff --git a/client/src/Pages/StatusPage/StatusPages/index.tsx b/client/src/Pages/StatusPage/StatusPages/index.tsx index 9468b7e12..d5ae42766 100644 --- a/client/src/Pages/StatusPage/StatusPages/index.tsx +++ b/client/src/Pages/StatusPage/StatusPages/index.tsx @@ -37,11 +37,10 @@ const StatusPages = () => { return ( { + if (monitor.type !== "http" && monitor.type !== "pagespeed") return false; + return /^https?:\/\//i.test(monitor.url ?? ""); + }; + const getActions = (monitor: Monitor): ActionMenuItem[] => { - return [ - { + const actions: ActionMenuItem[] = []; + if (isBrowserOpenable(monitor)) { + actions.push({ id: 1, label: t("pages.common.monitors.actions.openSite"), action: () => { window.open(monitor.url, "_blank", "noreferrer"); }, closeMenu: true, - }, + }); + } + actions.push( { id: 2, label: t("pages.common.monitors.actions.details"), @@ -130,8 +138,9 @@ export const MonitorTable = ({ ), action: () => setSelectedMonitor(monitor), closeMenu: true, - }, - ]; + } + ); + return actions; }; const getHeaders = (chartType: string) => { diff --git a/client/src/Pages/Uptime/Monitors/index.tsx b/client/src/Pages/Uptime/Monitors/index.tsx index 792e0fd78..bfe244746 100644 --- a/client/src/Pages/Uptime/Monitors/index.tsx +++ b/client/src/Pages/Uptime/Monitors/index.tsx @@ -140,6 +140,7 @@ const UptimeMonitorsPage = () => { return ( + STATUS_PAGE_THEMES.find((t) => t === value) ?? DEFAULT_STATUS_PAGE_THEME; + +export const resolveStatusPageThemeMode = ( + value: string | null | undefined +): StatusPageThemeMode => + STATUS_PAGE_THEME_MODES.find((m) => m === value) ?? DEFAULT_STATUS_PAGE_THEME_MODE; +export const PUBLIC_STATUS_PAGE_PREFIX = "/status/public"; + export interface StatusPage { id: string; userId: string; @@ -43,6 +62,8 @@ export interface StatusPage { showAdminLoginLink: boolean; showInfrastructure: boolean; customCSS: string; + theme: StatusPageTheme; + themeMode: StatusPageThemeMode; createdAt: string; updatedAt: string; } diff --git a/client/src/Utils/DataUtils.ts b/client/src/Utils/DataUtils.ts index c0bbb2d2a..40bbd1b8b 100644 --- a/client/src/Utils/DataUtils.ts +++ b/client/src/Utils/DataUtils.ts @@ -56,10 +56,12 @@ export const getResponseColor = ( // 0–300ms: interpolate start (good) -> mid (warning) // 300–600ms: interpolate mid (warning) -> end (error) // >600ms: solid end (error) + // MUI default success/warning/error.main values, used only when the caller + // fails to pass theme colors (defensive — keeps the gradient meaningful). const safe = { ...colors }; - if (!safe.start) safe.start = "#4caf50"; // fallback green - if (!safe.mid) safe.mid = "#ff9800"; // fallback orange - if (!safe.end) safe.end = "#f44336"; // fallback red + if (!safe.start) safe.start = "#4caf50"; + if (!safe.mid) safe.mid = "#ff9800"; + if (!safe.end) safe.end = "#f44336"; const toHex = (c: number) => c.toString(16).padStart(2, "0"); const clamp = (n: number) => Math.min(255, Math.max(0, Math.round(n))); diff --git a/client/src/Utils/Theme/Palette.ts b/client/src/Utils/Theme/Palette.ts index 9c19f0cbf..92c08cd2f 100644 --- a/client/src/Utils/Theme/Palette.ts +++ b/client/src/Utils/Theme/Palette.ts @@ -1,12 +1,13 @@ const typographyBase = 13; export const typographyLevels = { - base: typographyBase, - xs: `${(typographyBase - 4) / 16}rem`, - s: `${(typographyBase - 2) / 16}rem`, - m: `${typographyBase / 16}rem`, - l: `${(typographyBase + 2) / 16}rem`, - xl: `${(typographyBase + 10) / 16}rem`, + base: typographyBase, // 13px + xs: `${(typographyBase - 4) / 16}rem`, // 9px + s: `${(typographyBase - 2) / 16}rem`, // 11px + m: `${typographyBase / 16}rem`, // 13px + l: `${(typographyBase + 2) / 16}rem`, // 15px + xl: `${(typographyBase + 5) / 16}rem`, // 18px + xxl: `${(typographyBase + 10) / 16}rem`, // 23px }; export const colors = { @@ -14,21 +15,25 @@ export const colors = { gray700: "#313131", gray900: "#151518", gray850: "#1c1c21", - blueBlueWave: "#1570EF", + brandGreen: "#13715B", + brandGreenLight: "#4DAF94", }; export const lightPalette = { primary: { - main: colors.blueBlueWave, + main: colors.brandGreen, }, secondary: { main: colors.gray200, }, + sidebar: { + accent: colors.brandGreen, + }, }; export const darkPalette = { primary: { - main: colors.blueBlueWave, + main: colors.brandGreen, }, secondary: { main: colors.gray700, @@ -37,4 +42,7 @@ export const darkPalette = { default: colors.gray900, paper: colors.gray850, }, + sidebar: { + accent: colors.brandGreenLight, + }, }; diff --git a/client/src/Utils/Theme/Theme.ts b/client/src/Utils/Theme/Theme.ts index 49c1636ec..7c712d66d 100644 --- a/client/src/Utils/Theme/Theme.ts +++ b/client/src/Utils/Theme/Theme.ts @@ -2,12 +2,38 @@ import { createTheme } from "@mui/material"; import { lightPalette, darkPalette, typographyLevels } from "@/Utils/Theme/Palette"; import type { Theme } from "@mui/material/styles"; +import type {} from "@mui/material/styles"; + +declare module "@mui/material/styles" { + interface TypographyVariants { + eyebrow: React.CSSProperties; + fontFamilyMonospace: string; + } + interface TypographyVariantsOptions { + eyebrow?: React.CSSProperties; + fontFamilyMonospace?: string; + } + interface Palette { + sidebar: { accent: string }; + } + interface PaletteOptions { + sidebar?: { accent: string }; + } +} + +declare module "@mui/material/Typography" { + interface TypographyPropsVariantOverrides { + eyebrow: true; + } +} export type PaletteKey = { [K in keyof Theme["palette"]]: Theme["palette"][K] extends { main: any } ? K : never; }[keyof Theme["palette"]]; const fontFamilyPrimary = "system-ui, sans-serif"; +const fontFamilyMonospace = + 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'; const shadow = "0px 4px 24px -4px rgba(16, 24, 40, 0.08), 0px 3px 3px -3px rgba(16, 24, 40, 0.03)"; @@ -29,9 +55,10 @@ export const theme = (mode: string, palette: any) => }, typography: { fontFamily: fontFamilyPrimary, + fontFamilyMonospace, fontSize: typographyLevels.base, h1: { - fontSize: typographyLevels.xl, + fontSize: typographyLevels.xxl, fontWeight: 500, }, h2: { @@ -46,6 +73,13 @@ export const theme = (mode: string, palette: any) => fontSize: typographyLevels.s, fontWeight: 400, }, + eyebrow: { + fontSize: 13, + fontWeight: 500, + textTransform: "uppercase", + letterSpacing: "0.08em", + lineHeight: 1.4, + }, }, components: { @@ -120,11 +154,17 @@ export const theme = (mode: string, palette: any) => MuiOutlinedInput: { styleOverrides: { - root: { + root: ({ theme }) => ({ + "&:hover .MuiOutlinedInput-notchedOutline": { + borderColor: + theme.palette.mode === "dark" + ? "rgba(255, 255, 255, 0.23)" + : theme.palette.text.primary, + }, "&.Mui-focused .MuiOutlinedInput-notchedOutline": { borderColor: palette.primary.main, }, - }, + }), }, }, @@ -145,6 +185,113 @@ export const theme = (mode: string, palette: any) => }, }, }, + + MuiSwitch: { + defaultProps: { disableRipple: true }, + styleOverrides: { + root: { + width: 36, + height: 20, + padding: "0 6px 0 0", + boxSizing: "content-box", + overflow: "visible", + }, + switchBase: ({ theme }) => ({ + padding: 2, + "&.Mui-checked": { + transform: "translateX(16px)", + color: "#fff", + "& + .MuiSwitch-track": { + backgroundColor: theme.palette.primary.main, + opacity: 1, + border: 0, + }, + }, + }), + thumb: { + width: 16, + height: 16, + boxShadow: "0 1px 2px rgba(16, 24, 40, 0.1)", + }, + track: ({ theme }) => ({ + borderRadius: 999, + backgroundColor: + theme.palette.mode === "dark" + ? "rgba(255,255,255,0.16)" + : theme.palette.action.disabledBackground, + opacity: 1, + }), + }, + }, + + MuiRadio: { + defaultProps: { disableRipple: true }, + styleOverrides: { + root: ({ theme }) => ({ + padding: theme.spacing(2), + color: theme.palette.divider, + "& .MuiSvgIcon-root": { + fontSize: 20, + transition: "none", + }, + "&.Mui-checked": { + color: theme.palette.primary.main, + }, + "&.Mui-checked .MuiSvgIcon-root:last-of-type": { + transform: "scale(0.6)", + }, + }), + }, + }, + + MuiSlider: { + styleOverrides: { + root: ({ theme }) => ({ + height: 4, + padding: "13px 0", + color: theme.palette.primary.main, + }), + rail: ({ theme }) => ({ + height: 4, + borderRadius: 999, + opacity: 1, + backgroundColor: + theme.palette.mode === "dark" + ? "rgba(255,255,255,0.16)" + : theme.palette.action.disabledBackground, + }), + track: { + height: 4, + borderRadius: 999, + border: "none", + }, + thumb: ({ theme }) => ({ + width: 18, + height: 18, + backgroundColor: theme.palette.background.paper, + border: `2px solid ${theme.palette.primary.main}`, + boxShadow: "0 1px 2px rgba(16, 24, 40, 0.1)", + "&:hover, &.Mui-focusVisible": { + boxShadow: `0 0 0 6px ${theme.palette.primary.main}1f`, + }, + "&.Mui-active": { + boxShadow: `0 0 0 8px ${theme.palette.primary.main}29`, + }, + "&::before": { display: "none" }, + }), + mark: ({ theme }) => ({ + width: 2, + height: 2, + borderRadius: 999, + backgroundColor: theme.palette.text.disabled, + opacity: 0.5, + }), + markActive: ({ theme }) => ({ + backgroundColor: theme.palette.primary.main, + opacity: 0.5, + }), + }, + }, }, shape: { borderRadius: 2, diff --git a/client/src/Utils/Theme/constants.ts b/client/src/Utils/Theme/constants.ts index 8b045f9f6..d718d61dc 100644 --- a/client/src/Utils/Theme/constants.ts +++ b/client/src/Utils/Theme/constants.ts @@ -8,6 +8,7 @@ export const SPACING = { } as const; export const LAYOUT = { + XXS: 2, XS: 4, SM: 6, MD: 8, @@ -15,3 +16,7 @@ export const LAYOUT = { XL: 12, XXL: 16, } as const; + +export const HOVER = { + DARKEN: 0.06, // This is a coefficient for darkening function +} as const; diff --git a/client/src/Validation/statusPage.ts b/client/src/Validation/statusPage.ts index 43d7198f0..8b41b7780 100644 --- a/client/src/Validation/statusPage.ts +++ b/client/src/Validation/statusPage.ts @@ -1,4 +1,5 @@ import { z } from "zod"; +import { STATUS_PAGE_THEMES, STATUS_PAGE_THEME_MODES } from "@/Types/StatusPage"; export const statusPageSchema = z.object({ companyName: z @@ -25,6 +26,8 @@ export const statusPageSchema = z.object({ showAdminLoginLink: z.boolean(), showInfrastructure: z.boolean(), customCSS: z.string().optional(), + theme: z.enum(STATUS_PAGE_THEMES).optional(), + themeMode: z.enum(STATUS_PAGE_THEME_MODES).optional(), logo: z .object({ data: z.string(), diff --git a/client/src/assets/icons/checkmate-icon.svg b/client/src/assets/icons/checkmate-icon.svg index e0e6bf6f4..e1701573a 100644 --- a/client/src/assets/icons/checkmate-icon.svg +++ b/client/src/assets/icons/checkmate-icon.svg @@ -1,49 +1,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Checkmate + King silhouette adapted from Cburnett's chess set (Wikimedia Commons, CC BY-SA 3.0). + + + + + + diff --git a/client/src/locales/ar.json b/client/src/locales/ar.json index 28624c469..11fa81309 100644 --- a/client/src/locales/ar.json +++ b/client/src/locales/ar.json @@ -13,7 +13,7 @@ "content": "تحذير: لم تقم بإضافة مفتاح Google PageSpeed API بعد. قم بزيارة الإعدادات لإضافته. بدونه، لن تعمل مراقبة PageSpeed." } }, - "appName": "", + "appName": "Checkmate", "breadcrumbs": { "details": "التفاصيل", "home": "الرئيسية" @@ -35,11 +35,11 @@ "sendInvite": "إرسال دعوة", "test": "اختبار", "testNotifications": "اختبار الإشعارات", - "toggleTheme": "", + "toggleTheme": "تبديل الوضع الفاتح والداكن", "flushQueue": "تفريغ قائمة الانتظار", "notFound": "الانتقال إلى لوحة التحكم الرئيسية", - "resetPassword": "", - "reset": "", + "resetPassword": "إعادة تعيين كلمة المرور", + "reset": "إعادة تعيين", "clear": "مسح", "addDemo": "إضافة مراقبات تجريبية", "removeMonitors": "إزالة المراقبات", @@ -53,8 +53,8 @@ "labels": { "averageResponseTime": "متوسط وقت الاستجابة", "downtime": "وقت التوقف", - "high": "", - "low": "", + "high": "مرتفع", + "low": "منخفض", "uptime": "وقت التشغيل" }, "histogram": { @@ -86,12 +86,12 @@ "name": { "option": { "firstName": { - "label": "", - "placeholder": "" + "label": "الاسم الأول", + "placeholder": "أدخل اسمك الأول" }, "lastName": { - "label": "", - "placeholder": "" + "label": "اسم العائلة", + "placeholder": "أدخل اسم عائلتك" } } }, @@ -107,14 +107,14 @@ "table": { "empty": "لا يوجد شيء هنا", "headers": { - "actions": "", + "actions": "إجراءات", "dateTime": "التاريخ والوقت", "message": "الرسالة", "monitor": "المراقب", "monitorId": "معرّف المراقب", "name": "الاسم", "status": "الحالة", - "type": "", + "type": "النوع", "url": "الرابط", "interval": "الفاصل الزمني", "active": "نشط", @@ -125,17 +125,17 @@ "components": { "imageUpload": { "clickToUpload": "انقر للرفع", - "dragAndDrop": "", - "supportedFormats": "", - "maxSize": "", + "dragAndDrop": "أو اسحب وأسقط", + "supportedFormats": "الصيغ المدعومة", + "maxSize": "الحجم الأقصى", "orDragAndDrop": "أو اسحب وأفلت", "errors": { - "invalidFileSize": "", - "invalidFileFormat": "" + "invalidFileSize": "حجم الملف كبير جدًا!", + "invalidFileFormat": "تنسيق الملف غير مدعوم!" } }, "headerStatusPageControls": { - "publicLink": "" + "publicLink": "رابط عام" }, "headerTimeRange": { "labels": { @@ -155,26 +155,26 @@ "serverUnreachable": "تعذر الوصول إلى الخادم", "retry": "إعادة المحاولة", "retrying": "جارٍ إعادة المحاولة...", - "reconnected": "" + "reconnected": "تمت استعادة الاتصال" }, "sidebar": { "menu": { - "uptime": "", - "pagespeed": "", - "infrastructure": "", - "notifications": "", + "uptime": "وقت التشغيل", + "pagespeed": "Pagespeed", + "infrastructure": "البنية التحتية", + "notifications": "الإشعارات", "checks": "الفحوصات", - "incidents": "", - "statusPages": "", - "maintenance": "", - "logs": "", - "settings": "" + "incidents": "الحوادث", + "statusPages": "صفحات الحالة", + "maintenance": "الصيانة", + "logs": "السجلات", + "settings": "الإعدادات" }, "bottomMenu": { - "support": "", - "discussions": "", - "docs": "", - "changelog": "" + "support": "الدعم", + "discussions": "المناقشات", + "docs": "الوثائق", + "changelog": "سجل التغييرات" }, "accountMenu": { "profile": "الملف الشخصي", @@ -186,19 +186,27 @@ "description": "اطلع على أحدث الإصدارات وساعد في تنمية المجتمع على GitHub" }, "authFooter": { - "navControls": "", - "logOut": "", + "navControls": "عناصر التحكم", + "logOut": "تسجيل الخروج", "roles": { "superAdmin": "مسؤول أعلى", "admin": "مسؤول", "user": "مستخدم", - "demoUser": "" + "demoUser": "مستخدم تجريبي" } } }, "starPrompt": { "title": "أضف نجمة لـ Checkmate", "description": "اطلع على أحدث الإصدارات وساعد في تنمية المجتمع على GitHub" + }, + "pageHeader": { + "links": { + "support": "الدعم", + "discussions": "المناقشات", + "docs": "التوثيق", + "changelog": "سجل التغييرات" + } } }, "pages": { @@ -251,15 +259,15 @@ "team": { "filter": { "placeholder": "تصفية حسب الدور", - "all": "", + "all": "كل الأدوار", "admin": "مسؤول", - "member": "" + "member": "عضو" }, "table": { "headers": { "email": "البريد الإلكتروني", "role": "الدور", - "created": "" + "created": "تم الإنشاء في" } }, "addMember": { @@ -278,10 +286,23 @@ "placeholder": "اختر دوراً" }, "linkLabel": "رابط الدعوة" + }, + "fallback": { + "title": "لا يوجد بعد أعضاء فريق", + "description": "ادعُ زملاءك عبر البريد الإلكتروني أو أضفهم مباشرة. بمجرد انضمامهم، سيظهرون هنا مع دورهم." } + }, + "header": { + "title": "الحساب", + "description": "إدارة ملفك الشخصي وكلمة المرور والفريق وتفضيلات مساحة العمل." } }, "auth": { + "brandPanel": { + "eyebrow": "المراقبة المفتوحة المصدر للبنية التحتية", + "tagline": "راقب كل خطوة تقوم بها خوادمك.", + "description": "تتبع حالة التشغيل وأوقات الاستجابة والحوادث في الوقت الفعلي - ذاتية الاستضافة وتبقى لك." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "مرحباً بعودتك إلى Checkmate!", "subtitle": "سجّل للبدء", - "submit": "تسجيل" + "submit": "تسجيل", + "setupNotice": "هذه الصفحة متاحة فقط أثناء الإعداد الأولي. بمجرد تسجيل المسؤول الأعلى، يمكن دعوة مستخدمين إضافيين من إعدادات الفريق." }, "forgotPassword": { "title": "نسيت كلمة المرور؟", @@ -378,6 +400,14 @@ "statusCode": "رمز الحالة", "location": "الموقع" } + }, + "fallback": { + "title": "لا توجد فحوصات بعد", + "description": "بمجرد إنشاء جهاز مراقبة، ستظهر هنا كل عملية فحص حالة ووقت استجابة كفحص." + }, + "header": { + "title": "الفحوصات", + "description": "كل فحص يجريه Checkmate على مراقبيك يظهر هنا برمز الحالة ووقت الاستجابة." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "نشط منذ", "certificateExpiry": "انتهاء الشهادة", "lastCheck": "آخر فحص", - "lastResponseTime": "آخر وقت استجابة" + "lastResponseTime": "آخر وقت استجابة", + "serviceIsDown": "الخدمة معطلة" }, "status": { "down": "متوقف", @@ -511,7 +542,7 @@ "ping": "", "port": "", "docker": "", - "game": "", + "game": "أدخل عنوان IP أو اسم المضيف ورقم المنفذ للاختبار (مثل 192.168.1.100 أو example.com) واختر نوع اللعبة. تتطلب بعض الألعاب تفعيل استعلامات الخادم في ملف الإعدادات الخاص بها — يُرجى مراجعة وثائق خادم اللعبة. اطّلع على قائمة الألعاب المدعومة لمعرفة تفاصيل البروتوكول.", "pagespeed": "تتبع أداء تحميل الصفحة ومؤشرات Core Web Vitals ودرجات التحسين لموقعك.", "grpc": "أدخل اسم المضيف ومنفذ خادم gRPC، وحدد اختيارياً اسم خدمة لفحص الصحة، وأضف اسم عرض.", "websocket": "أدخل رابط WebSocket للمراقبة (مثال: wss://example.com/socket) وأضف اسم عرض.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "لا حوادث — جميع الأنظمة سليمة", + "description": "عندما يتعطل جهاز مراقبة أو يتعافى، سيظهر الحادث هنا مع الأوقات وتفاصيل الجهاز وسجل الحل." + }, "dialog": { "resolveIncident": { "title": "حل الحادثة", @@ -720,6 +755,10 @@ "active": "نشط", "resolved": "تم الحل" } + }, + "header": { + "title": "الحوادث", + "description": "عندما يتعطل جهاز مراقبة أو يتعافى، تظهر الحوادث هنا مع الأوقات وتفاصيل الجهاز وسجل الحل." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "استخدام الذاكرة", "netBytesRecv": "{{name}} - البايتات المستلمة", "netBytesSent": "{{name}} - البايتات المرسلة", + "netNoTraffic": "Capture يبلغ عن عدم وجود حركة بيانات على أي واجهة. هذا أمر طبيعي عندما يعمل Capture داخل حاوية لا ترى سوى واجهات الاسترجاع — قم بتشغيل Capture مباشرة على المضيف لرؤية نشاط الشبكة الحقيقي.", "temp": "الحرارة" } }, @@ -774,21 +814,31 @@ }, "fallback": { "actionButton": "أنشئ مراقباً!", - "checks": "تتبع أداء خوادمك,تحديد الاختناقات وتحسين الاستخدام,ضمان الموثوقية من خلال المراقبة في الوقت الفعلي", - "title": "يُستخدم مراقب البنية التحتية من أجل:" + "title": "لا توجد بعد أجهزة مراقبة للبنية التحتية", + "description": "تتبّع أداء الخوادم وحدد الاختناقات واضمن الموثوقية مع مراقبة البنية التحتية في الوقت الفعلي." + }, + "header": { + "title": "مراقبات البنية التحتية", + "description": "تتبّع أداء الخوادم وحدد الاختناقات واضمن الموثوقية مع مراقبة البنية التحتية في الوقت الفعلي." } }, "logs": { + "fallback": { + "title": "لا توجد سجلات بعد", + "description": "ستظهر هنا نشاط الخادم والتحذيرات والأخطاء أثناء تشغيل Checkmate." + }, "tabs": { - "diagnostics": "", - "logs": "", - "queue": "" + "diagnostics": "التشخيص", + "logs": "السجلات", + "queue": "قائمة المهام" }, "logLevelSelect": { "label": "مستوى السجل" }, "jobQueue": "قائمة المهام", + "jobQueueExplainer": "الصفوف المميزة هي المهام التي تتم معالجتها حالياً بواسطة عامل.", "failedJobs": "المهام الفاشلة", + "failedJobsExplainer": "حالات الفشل الأخيرة حسب المراقب — وقت آخر فشل، وعدد مرات الفشل، والسبب.", "noLogs": "لم يتم العثور على سجلات", "metrics": { "jobs": "المهام", @@ -815,6 +865,16 @@ "usedSPercentage": "% من 1 ثانية مستخدمة بواسطة CPU", "total": "الإجمالي", "used": "مستخدم" + }, + "sections": { + "runtimeStats": { + "title": "إحصائيات التشغيل", + "description": "لقطة لعملية Node.js والجهاز المضيف. يتم التحديث كل 5 ثوانٍ." + }, + "memoryCpu": { + "title": "الذاكرة والمعالج", + "description": "كيف تستخدم العملية الذاكرة المخصصة لها ومعالج الجهاز المضيف." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "آخر فشل في", "failReason": "سبب الفشل" } + }, + "queueFallback": { + "title": "لا توجد مهام في قائمة الانتظار", + "description": "ستظهر هنا فحوصات أجهزة المراقبة المجدولة أو قيد التشغيل. قائمة الانتظار الفارغة تعني أن كل شيء محدّث." + }, + "header": { + "title": "السجلات وقائمة الانتظار", + "description": "افحص سجلات الخادم وقائمة انتظار مهام المراقبة وتشخيصات وقت التشغيل في مكان واحد." } }, "maintenanceWindow": { "fallback": { "actionButton": "أنشئ نافذة صيانة!", - "checks": "تحديد فترات الصيانة,التخلص من أي سوء فهم,إيقاف إرسال التنبيهات أثناء نوافذ الصيانة", - "title": "تُستخدم نافذة الصيانة من أجل:" + "title": "لا توجد نوافذ صيانة مجدولة", + "description": "حدد مواعيد التوقف المخطط لها لإيقاف التنبيهات وإعلام فريقك ومستخدميك بما يتوقعونه." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "نوافذ الصيانة", + "description": "حدد مواعيد التوقف المخطط لها لإيقاف التنبيهات وإعلام فريقك ومستخدميك بما يتوقعونه." } }, "notifications": { "fallback": { "actionButton": "إنشاء قناة", - "checks": "تنبيه الفرق حول التوقف أو مشكلات الأداء,إعلام المهندسين عند حدوث الحوادث,إبقاء المسؤولين على اطلاع بتغييرات النظام", - "title": "تُستخدم قنوات الإشعارات من أجل:" + "title": "لا توجد بعد قنوات إشعار", + "description": "اربط Slack وDiscord والبريد الإلكتروني وWebhooks والمزيد ليعلم الأشخاص المناسبون بالحوادث فور حدوثها." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "معرّف المحادثة", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "إعدادات Pushover", + "description": "أدخل رمز التطبيق ومفتاح المستخدم في Pushover.", + "optionAppToken": "رمز التطبيق", + "placeholderAppToken": "أدخل رمز التطبيق", + "optionUserKey": "مفتاح المستخدم", + "placeholderUserKey": "أدخل مفتاح المستخدم" + }, + "twilio": { + "title": "إعدادات Twilio", + "description": "أدخل بيانات اعتماد حساب Twilio لإرسال الرسائل النصية.", + "optionAccountSid": "معرف الحساب (SID)", + "placeholderAccountSid": "أدخل معرف الحساب", + "optionAuthToken": "رمز المصادقة", + "placeholderAuthToken": "أدخل رمز المصادقة", + "optionFromNumber": "من الرقم", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "إلى الرقم", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "الوجهة" } + }, + "header": { + "title": "الإشعارات", + "description": "اربط Slack وDiscord والبريد الإلكتروني وWebhooks والمزيد ليعلم الأشخاص المناسبون بالحوادث فور حدوثها." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "أنشئ مراقباً!", - "checks": "تقديم تقرير عن تجربة المستخدم للصفحة,المساعدة في تحليل سرعة الصفحة,تقديم اقتراحات لتحسين الصفحة", - "title": "يُستخدم مراقب PageSpeed من أجل:" + "title": "لا توجد بعد أجهزة مراقبة PageSpeed", + "description": "تابع Core Web Vitals ودرجات Lighthouse عبر الزمن لاكتشاف التراجع قبل أن يلاحظه المستخدمون." + }, + "header": { + "title": "مراقبات PageSpeed", + "description": "تابع Core Web Vitals ودرجات Lighthouse عبر الزمن لاكتشاف التراجع قبل أن يلاحظه المستخدمون." } }, "settings": { @@ -1137,11 +1237,12 @@ "description": "إضافة مراقبات نموذجية لأغراض العرض التوضيحي." }, "removeMonitors": { - "title": "إعادة تعيين النظام", + "title": "إعادة ضبط النظام", "description": "إزالة جميع المراقبات من نظامك.", "dialog": { "title": "إزالة جميع المراقبات؟", - "description": "لا يمكن التراجع عن هذا." + "description": "لا يمكن التراجع عن هذا الإجراء.", + "paragraph": "سيتم أيضًا إزالة جميع سجلات الفحص والحوادث ونوافذ الصيانة المجدولة وأي صفحات حالة كانت تعتمد على هذه المراقبات. صدّر المراقبات أولًا للاحتفاظ بنسخة احتياطية من بياناتها." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "يرجى إصلاح أخطاء التحقق التالية:" } + }, + "header": { + "title": "الإعدادات", + "description": "تكوين SMTP والتكاملات والاحتفاظ والسلوك العام للتطبيق." } }, "statusPages": { "deleteSuccess": "تم حذف صفحة الحالة بنجاح", "fallback": { - "title": "تُستخدم صفحة الحالة من أجل:", - "checks": "إيصال حالة النظام للمستخدمين وأصحاب المصلحة,عرض معلومات وقت التشغيل في الوقت الفعلي للعامة,بناء الثقة من خلال مراقبة الخدمة الشفافة,تقليل طلبات الدعم أثناء الحوادث", - "actionButton": "أنشئ صفحة حالة!" + "title": "لا توجد بعد صفحات حالة", + "actionButton": "أنشئ صفحة حالة!", + "description": "انشر صفحة عامة تُظهر للعملاء وأصحاب المصلحة وقت التشغيل الفعلي وتاريخ الحوادث." }, "monitorsList": { "chartTypeHeatmap": "خريطة حرارية", @@ -1190,7 +1295,18 @@ "allDown": "جميع الأنظمة متوقفة", "allUp": "جميع الأنظمة تعمل بشكل طبيعي", "degraded": "بعض الأنظمة تواجه مشكلات", - "unknown": "تعذر تحديد حالة النظام" + "unknown": "تعذر تحديد حالة النظام", + "allBreached": "تجاوزت جميع الأنظمة الحدود", + "allMaintenance": "جميع الأنظمة قيد الصيانة", + "allPaused": "جميع الأنظمة متوقفة مؤقتًا", + "allInitializing": "جميع الأنظمة قيد التهيئة", + "breachedAndDown": "تجاوزت بعض الأنظمة الحدود وهي معطلة", + "breached": "تجاوزت بعض الأنظمة الحدود", + "maintenanceAndDown": "بعض الأنظمة معطلة أثناء الصيانة", + "maintenance": "بعض الأنظمة قيد الصيانة", + "partiallyPaused": "بعض الأنظمة متوقفة مؤقتًا", + "initializing": "بعض الأنظمة قيد التهيئة", + "noMonitors": "لم يتم تكوين أي شاشة" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "صفحات الحالة", + "description": "انشر صفحات عامة تُظهر للعملاء وأصحاب المصلحة وقت التشغيل الفعلي وتاريخ الحوادث." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "أنشئ مراقباً!", - "checks": "التحقق مما إذا كانت المواقع أو الخوادم متصلة ومتجاوبة,تنبيه الفرق حول التوقف أو مشكلات الأداء,مراقبة نقاط نهاية HTTP والـ Ping والحاويات والمنافذ,تتبع اتجاهات وقت التشغيل والموثوقية التاريخية", - "title": "يُستخدم مراقب وقت التشغيل من أجل:" + "title": "لا توجد بعد أجهزة مراقبة وقت التشغيل", + "description": "راقب نقاط نهاية HTTP وعمليات Ping والحاويات والمنافذ — احصل على تنبيه فور حدوث عطل." + }, + "header": { + "title": "مراقبات وقت التشغيل", + "description": "راقب نقاط نهاية HTTP وعمليات Ping والحاويات والمنافذ — احصل على تنبيه فور حدوث عطل." } } } diff --git a/client/src/locales/cs.json b/client/src/locales/cs.json index 780a7a723..454f0b673 100644 --- a/client/src/locales/cs.json +++ b/client/src/locales/cs.json @@ -39,7 +39,7 @@ "flushQueue": "Vyprázdnit frontu", "notFound": "Přejít na hlavní přehled", "resetPassword": "Obnovit heslo", - "reset": "", + "reset": "Resetovat", "clear": "Vymazat", "addDemo": "Přidat ukázkové monitory", "removeMonitors": "Odebrat monitory", @@ -53,8 +53,8 @@ "labels": { "averageResponseTime": "Průměrná doba odezvy", "downtime": "Výpadek", - "high": "", - "low": "", + "high": "Vysoké", + "low": "Nízké", "uptime": "Dostupnost" }, "histogram": { @@ -107,14 +107,14 @@ "table": { "empty": "Zde nic není", "headers": { - "actions": "", + "actions": "Akce", "dateTime": "Datum a čas", "message": "Zpráva", "monitor": "Monitor", "monitorId": "ID monitoru", "name": "Název", "status": "Stav", - "type": "", + "type": "Typ", "url": "URL", "interval": "Interval", "active": "Aktivní", @@ -125,17 +125,17 @@ "components": { "imageUpload": { "clickToUpload": "Klikněte pro nahrání", - "dragAndDrop": "", - "supportedFormats": "", - "maxSize": "", + "dragAndDrop": "nebo přetáhněte", + "supportedFormats": "Podporované formáty", + "maxSize": "Max. velikost", "orDragAndDrop": "nebo přetáhněte soubor", "errors": { - "invalidFileSize": "", - "invalidFileFormat": "" + "invalidFileSize": "Soubor je příliš velký!", + "invalidFileFormat": "Nepodporovaný formát souboru!" } }, "headerStatusPageControls": { - "publicLink": "" + "publicLink": "Veřejný odkaz" }, "headerTimeRange": { "labels": { @@ -159,22 +159,22 @@ }, "sidebar": { "menu": { - "uptime": "", - "pagespeed": "", - "infrastructure": "", - "notifications": "", + "uptime": "Dostupnost", + "pagespeed": "Pagespeed", + "infrastructure": "Infrastruktura", + "notifications": "Oznámení", "checks": "Kontroly", - "incidents": "", - "statusPages": "", - "maintenance": "", - "logs": "", - "settings": "" + "incidents": "Incidenty", + "statusPages": "Stavové stránky", + "maintenance": "Údržba", + "logs": "Záznamy", + "settings": "Nastavení" }, "bottomMenu": { - "support": "", - "discussions": "", - "docs": "", - "changelog": "" + "support": "Podpora", + "discussions": "Diskuze", + "docs": "Dokumentace", + "changelog": "Záznam změn" }, "accountMenu": { "profile": "Profil", @@ -186,19 +186,27 @@ "description": "Sledujte nejnovější vydání a pomozte rozšířit komunitu na GitHubu" }, "authFooter": { - "navControls": "", - "logOut": "", + "navControls": "Ovládací prvky", + "logOut": "Odhlásit se", "roles": { "superAdmin": "Superadministrátor", "admin": "Administrátor", "user": "Uživatel", - "demoUser": "" + "demoUser": "Demo uživatel" } } }, "starPrompt": { "title": "Ohodnoťte Checkmate", "description": "Sledujte nejnovější vydání a pomozte rozšířit komunitu na GitHubu" + }, + "pageHeader": { + "links": { + "support": "Podpora", + "discussions": "Diskuze", + "docs": "Dokumentace", + "changelog": "Seznam změn" + } } }, "pages": { @@ -251,15 +259,15 @@ "team": { "filter": { "placeholder": "Filtrovat podle role", - "all": "", + "all": "Všechny role", "admin": "Administrátor", - "member": "" + "member": "Člen" }, "table": { "headers": { "email": "Email", "role": "Role", - "created": "" + "created": "Vytvořeno" } }, "addMember": { @@ -278,10 +286,23 @@ "placeholder": "Vyberte roli" }, "linkLabel": "Odkaz pro pozvánku" + }, + "fallback": { + "title": "Zatím žádní členové týmu", + "description": "Pozvěte kolegy e-mailem nebo je přidejte přímo. Jakmile se připojí, objeví se zde se svou rolí." } + }, + "header": { + "title": "Účet", + "description": "Spravujte profil, heslo, tým a předvolby pracovního prostoru." } }, "auth": { + "brandPanel": { + "eyebrow": "Open-source monitoring infrastruktury", + "tagline": "Sledujte každý krok vašich serverů.", + "description": "Monitorování dostupnosti, doby odezvy a incidentů v reálném čase - self-hosted a vaše." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Vítejte v Checkmate!", "subtitle": "Zaregistrujte se a začněte", - "submit": "Registrovat" + "submit": "Registrovat", + "setupNotice": "Tato stránka je k dispozici pouze během počátečního nastavení. Po zaregistrování super administrátora lze pozvat další uživatele z nastavení týmu." }, "forgotPassword": { "title": "Zapomněli jste heslo?", @@ -378,6 +400,14 @@ "statusCode": "Stavový kód", "location": "Umístění" } + }, + "fallback": { + "title": "Zatím žádné kontroly", + "description": "Jakmile vytvoříte monitor, každá kontrola stavu a doba odezvy se zde zobrazí jako kontrola." + }, + "header": { + "title": "Kontroly", + "description": "Každá sonda, kterou Checkmate spustí proti vašim monitorům, se zde objeví se stavovým kódem a dobou odezvy." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Aktivní po dobu", "certificateExpiry": "Expirace certifikátu", "lastCheck": "Poslední kontrola", - "lastResponseTime": "Poslední doba odezvy" + "lastResponseTime": "Poslední doba odezvy", + "serviceIsDown": "Služba je nedostupná" }, "status": { "down": "nedostupný", @@ -511,7 +542,7 @@ "ping": "", "port": "", "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 seznamu podporovaných her.", "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.", "websocket": "Zadejte WebSocket URL ke sledování (např. wss://example.com/socket) a přidejte zobrazovaný název.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Žádné incidenty — všechny systémy v pořádku", + "description": "Když monitor vypadne nebo se zotaví, incident se zobrazí zde spolu s časem, detaily monitoru a historií řešení." + }, "dialog": { "resolveIncident": { "title": "Vyřešit incident", @@ -720,6 +755,10 @@ "active": "Aktivní", "resolved": "Vyřešeno" } + }, + "header": { + "title": "Incidenty", + "description": "Když monitor vypadne nebo se zotaví, incidenty se zobrazí zde spolu s časem, detaily monitoru a historií řešení." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Využití paměti", "netBytesRecv": "{{name}} - přijaté 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" } }, @@ -774,21 +814,31 @@ }, "fallback": { "actionButton": "Vytvořte monitor!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Monitor infrastruktury slouží k:" + "title": "Zatím žádné monitory infrastruktury", + "description": "Sledujte výkon serverů, identifikujte úzká místa a zajistěte spolehlivost pomocí monitoringu infrastruktury v reálném čase." + }, + "header": { + "title": "Monitory infrastruktury", + "description": "Sledujte výkon serverů, identifikujte úzká místa a zajistěte spolehlivost pomocí monitoringu infrastruktury v reálném čase." } }, "logs": { + "fallback": { + "title": "Zatím žádné protokoly", + "description": "Aktivita serveru, varování a chyby se zobrazí zde, jak Checkmate běží." + }, "tabs": { - "diagnostics": "", - "logs": "", - "queue": "" + "diagnostics": "Diagnostika", + "logs": "Záznamy", + "queue": "Fronta úloh" }, "logLevelSelect": { "label": "Úroveň logování" }, "jobQueue": "Fronta úloh", + "jobQueueExplainer": "Zvýrazněné řádky jsou úlohy, které právě zpracovává worker.", "failedJobs": "Neúspěšné úlohy", + "failedJobsExplainer": "Nedávná selhání podle monitoru — čas posledního selhání, počet selhání a důvod.", "noLogs": "Žádné logy nebyly nalezeny", "metrics": { "jobs": "Úlohy", @@ -815,6 +865,16 @@ "usedSPercentage": "% z 1s využito CPU", "total": "Celkem", "used": "Použité" + }, + "sections": { + "runtimeStats": { + "title": "Statistiky běhu", + "description": "Snímek procesu Node.js a hostitelského počítače. Aktualizuje se každých 5 sekund." + }, + "memoryCpu": { + "title": "Paměť a CPU", + "description": "Jak proces využívá přidělenou paměť a CPU hostitele." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Poslední selhání", "failReason": "Důvod selhání" } + }, + "queueFallback": { + "title": "Žádné úlohy ve frontě", + "description": "Naplánované nebo běžící kontroly monitorů se objeví zde. Prázdná fronta znamená, že je vše aktuální." + }, + "header": { + "title": "Protokoly a fronta", + "description": "Zkontrolujte serverové protokoly, frontu úloh monitoru a diagnostiku v jednom místě." } }, "maintenanceWindow": { "fallback": { "actionButton": "Vytvořte okno údržby!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Okno údržby slouží k:" + "title": "Žádná naplánovaná okna údržby", + "description": "Naplánujte plánované odstávky, aby byly výstrahy potlačeny a váš tým i uživatelé věděli, co očekávat." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Okna údržby", + "description": "Naplánujte plánované odstávky, aby byly výstrahy potlačeny a váš tým i uživatelé věděli, co očekávat." } }, "notifications": { "fallback": { "actionButton": "Vytvořit kanál", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Kanály oznámení slouží k:" + "title": "Zatím žádné notifikační kanály", + "description": "Připojte Slack, Discord, e-mail, webhooky a další, aby se ti správní lidé dozvěděli o incidentech v okamžiku, kdy nastanou." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "ID chatu", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Konfigurace Pushover", + "description": "Zadejte token aplikace a uživatelský klíč Pushover.", + "optionAppToken": "Token aplikace", + "placeholderAppToken": "Zadejte token aplikace", + "optionUserKey": "Uživatelský klíč", + "placeholderUserKey": "Zadejte uživatelský klíč" + }, + "twilio": { + "title": "Konfigurace Twilio", + "description": "Zadejte přihlašovací údaje účtu Twilio pro odesílání SMS.", + "optionAccountSid": "SID účtu", + "placeholderAccountSid": "Zadejte SID účtu", + "optionAuthToken": "Autentizační token", + "placeholderAuthToken": "Zadejte autentizační token", + "optionFromNumber": "Z čísla", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Na číslo", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Cíl" } + }, + "header": { + "title": "Notifikace", + "description": "Připojte Slack, Discord, e-mail, webhooky a další, aby se ti správní lidé dozvěděli o incidentech v okamžiku, kdy nastanou." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Vytvořte monitor!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Monitor PageSpeed slouží k:" + "title": "Zatím žádné PageSpeed monitory", + "description": "Sledujte Core Web Vitals a skóre Lighthouse v čase a zachyťte regrese dříve než vaši uživatelé." + }, + "header": { + "title": "Monitory PageSpeed", + "description": "Sledujte Core Web Vitals a skóre Lighthouse v čase a zachyťte regrese dříve než vaši uživatelé." } }, "settings": { @@ -1137,11 +1237,12 @@ "description": "Přidejte ukázkové monitory pro demonstrační účely." }, "removeMonitors": { - "title": "Obnovení systému", - "description": "Odeberte všechny monitory z vašeho systému.", + "title": "Reset systému", + "description": "Odstranit všechny monitory ze systému.", "dialog": { "title": "Odebrat všechny monitory?", - "description": "Tuto akci nelze vrátit zpět." + "description": "Tuto akci nelze vrátit zpět.", + "paragraph": "Smaže se také veškerá historie kontrol, incidenty, naplánovaná údržbová okna a stavové stránky, které tyto monitory používaly. Pokud si chcete data zachovat, nejprve monitory exportujte." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Opravte prosím následující chyby validace:" } + }, + "header": { + "title": "Nastavení", + "description": "Nakonfigurujte SMTP, integrace, uchovávání a globální chování aplikace." } }, "statusPages": { "deleteSuccess": "Stavová stránka byla úspěšně smazána", "fallback": { - "title": "Stavová stránka slouží k:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Vytvořte stavovou stránku!" + "title": "Zatím žádné stavové stránky", + "actionButton": "Vytvořte stavovou stránku!", + "description": "Publikujte veřejnou stránku, která zákazníkům a zúčastněným stranám zobrazuje dostupnost v reálném čase a historii incidentů." }, "monitorsList": { "chartTypeHeatmap": "Heatmapa", @@ -1190,7 +1295,18 @@ "allDown": "Všechny systémy jsou nedostupné", "allUp": "Všechny systémy fungují", "degraded": "Některé systémy mají problémy", - "unknown": "Nelze určit stav systému" + "unknown": "Nelze určit stav systému", + "allBreached": "Všechny systémy překročily prahové hodnoty", + "allMaintenance": "Všechny systémy jsou v údržbě", + "allPaused": "Všechny systémy jsou pozastavené", + "allInitializing": "Všechny systémy se inicializují", + "breachedAndDown": "Některé systémy překročily prahové hodnoty a jsou nedostupné", + "breached": "Některé systémy překročily prahové hodnoty", + "maintenanceAndDown": "Některé systémy jsou nedostupné během údržby", + "maintenance": "Některé systémy jsou v údržbě", + "partiallyPaused": "Některé systémy jsou pozastavené", + "initializing": "Některé systémy se inicializují", + "noMonitors": "Nebyly nakonfigurovány žádné monitory" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Stavové stránky", + "description": "Publikujte veřejné stránky, které zákazníkům a zúčastněným stranám zobrazují dostupnost v reálném čase a historii incidentů." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Vytvořte monitor!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Monitor dostupnosti slouží k:" + "title": "Zatím žádné monitory dostupnosti", + "description": "Sledujte HTTP koncové body, pingy, kontejnery a porty — buďte upozorněni v okamžiku, kdy něco vypadne." + }, + "header": { + "title": "Monitory dostupnosti", + "description": "Sledujte HTTP koncové body, pingy, kontejnery a porty — buďte upozorněni v okamžiku, kdy něco vypadne." } } } diff --git a/client/src/locales/de.json b/client/src/locales/de.json index 34755aaba..8090aa5f3 100644 --- a/client/src/locales/de.json +++ b/client/src/locales/de.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "Checkmate bewerten", "description": "Entdecken Sie die neuesten Versionen und helfen Sie der Community auf GitHub" + }, + "pageHeader": { + "links": { + "support": "Support", + "discussions": "Diskussionen", + "docs": "Dokumentation", + "changelog": "Änderungsverlauf" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "Rolle auswählen" }, "linkLabel": "Einladungslink" + }, + "fallback": { + "title": "Noch keine Teammitglieder", + "description": "Laden Sie Teammitglieder per E-Mail ein oder fügen Sie sie direkt hinzu. Sobald sie beitreten, erscheinen sie hier mit ihrer Rolle." } + }, + "header": { + "title": "Konto", + "description": "Verwalten Sie Profil, Passwort, Team und Workspace-Einstellungen." } }, "auth": { + "brandPanel": { + "eyebrow": "Open-Source-Infrastruktur-Monitoring", + "tagline": "Beobachten Sie jeden Zug Ihrer Server.", + "description": "Echtzeit-Überwachung von Verfügbarkeit, Antwortzeiten und Vorfällen - selbst gehostet und in Ihrer Hand." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Willkommen bei Checkmate!", "subtitle": "Registrieren Sie sich, um loszulegen", - "submit": "Registrieren" + "submit": "Registrieren", + "setupNotice": "Diese Seite ist nur während der Ersteinrichtung verfügbar. Sobald ein Super-Admin registriert ist, können weitere Benutzer in den Team-Einstellungen eingeladen werden." }, "forgotPassword": { "title": "Passwort vergessen?", @@ -378,6 +400,14 @@ "statusCode": "Statuscode", "location": "Standort" } + }, + "fallback": { + "title": "Noch keine Prüfungen", + "description": "Sobald Sie einen Monitor erstellen, erscheinen jede Statusprüfung und Antwortzeit hier als Prüfung." + }, + "header": { + "title": "Prüfungen", + "description": "Jede Sondierung, die Checkmate gegen Ihre Monitore ausführt, erscheint hier mit Statuscode und Antwortzeit." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Aktiv seit", "certificateExpiry": "Zertifikatablauf", "lastCheck": "Letzter Check", - "lastResponseTime": "Letzte Antwortzeit" + "lastResponseTime": "Letzte Antwortzeit", + "serviceIsDown": "Dienst ist nicht erreichbar" }, "status": { "down": "ausgefallen", @@ -511,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.", "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 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 Liste unterstützter Spiele findest du Protokolldetails.", "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.", "websocket": "Geben Sie die zu überwachende WebSocket-URL ein (z. B. wss://example.com/socket) und fügen Sie einen Anzeigenamen hinzu.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Keine Vorfälle — alle Systeme funktionieren", + "description": "Wenn ein Monitor ausfällt oder wiederhergestellt wird, erscheint der Vorfall hier mit Zeitangaben, Monitordetails und Lösungsverlauf." + }, "dialog": { "resolveIncident": { "title": "Vorfall lösen", @@ -720,6 +755,10 @@ "active": "Aktiv", "resolved": "Gelöst" } + }, + "header": { + "title": "Vorfälle", + "description": "Wenn ein Monitor ausfällt oder wiederhergestellt wird, erscheinen Vorfälle hier mit Zeitangaben, Monitordetails und Lösungsverlauf." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Arbeitsspeicherauslastung", "netBytesRecv": "{{name}} - Empfangene 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." } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "Monitor erstellen!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Ein Infrastruktur-Monitor wird verwendet, um:" + "title": "Noch keine Infrastruktur-Monitore", + "description": "Verfolgen Sie die Serverleistung, identifizieren Sie Engpässe und gewährleisten Sie Zuverlässigkeit mit Echtzeit-Infrastrukturüberwachung." + }, + "header": { + "title": "Infrastruktur-Monitore", + "description": "Verfolgen Sie die Serverleistung, identifizieren Sie Engpässe und gewährleisten Sie Zuverlässigkeit mit Echtzeit-Infrastrukturüberwachung." } }, "logs": { + "fallback": { + "title": "Noch keine Protokolle", + "description": "Serveraktivitäten, Warnungen und Fehler werden hier angezeigt, während Checkmate läuft." + }, "tabs": { "diagnostics": "Diagnose", "logs": "Server logs", @@ -788,7 +836,9 @@ "label": "Log-Level" }, "jobQueue": "Job-Warteschlange", + "jobQueueExplainer": "Hervorgehobene Zeilen sind Jobs, die derzeit von einem Worker verarbeitet werden.", "failedJobs": "Fehlgeschlagene Jobs", + "failedJobsExplainer": "Aktuelle Fehler nach Monitor — Zeit des letzten Fehlers, Fehleranzahl und Grund.", "noLogs": "Keine Protokolle gefunden", "metrics": { "jobs": "Jobs", @@ -815,6 +865,16 @@ "usedSPercentage": "% von 1s durch CPU genutzt", "total": "Gesamt", "used": "Belegt" + }, + "sections": { + "runtimeStats": { + "title": "Laufzeitstatistiken", + "description": "Snapshot des Node.js-Prozesses und Host-Rechners. Wird alle 5 Sekunden aktualisiert." + }, + "memoryCpu": { + "title": "Speicher & CPU", + "description": "Wie der Prozess seinen zugewiesenen Speicher und die Host-CPU nutzt." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Letzter Fehler am", "failReason": "Fehlergrund" } + }, + "queueFallback": { + "title": "Keine Aufträge in der Warteschlange", + "description": "Geplante oder laufende Monitorprüfungen erscheinen hier. Eine leere Warteschlange bedeutet, dass alles aktuell ist." + }, + "header": { + "title": "Protokolle & Warteschlange", + "description": "Serverprotokolle, Monitor-Warteschlange und Laufzeitdiagnosen an einem Ort." } }, "maintenanceWindow": { "fallback": { "actionButton": "Wartungsfenster erstellen!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Ein Wartungsfenster wird verwendet, um:" + "title": "Keine Wartungsfenster geplant", + "description": "Planen Sie Wartungsausfälle, damit Warnungen unterdrückt werden und Team und Nutzer wissen, was sie erwartet." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Wartungsfenster", + "description": "Planen Sie Wartungsausfälle, damit Warnungen unterdrückt werden und Team und Nutzer wissen, was sie erwartet." } }, "notifications": { "fallback": { "actionButton": "Kanal erstellen", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Benachrichtigungskanäle werden verwendet, um:" + "title": "Noch keine Benachrichtigungskanäle", + "description": "Verbinden Sie Slack, Discord, E-Mail, Webhooks und mehr, damit die richtigen Personen sofort von Vorfällen erfahren." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "Chat-ID", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Pushover-Konfiguration", + "description": "Geben Sie Ihr Anwendungstoken und Ihren Benutzerschlüssel von Pushover ein.", + "optionAppToken": "Anwendungstoken", + "placeholderAppToken": "Anwendungstoken eingeben", + "optionUserKey": "Benutzerschlüssel", + "placeholderUserKey": "Benutzerschlüssel eingeben" + }, + "twilio": { + "title": "Twilio-Konfiguration", + "description": "Geben Sie Ihre Twilio-Kontoanmeldeinformationen ein, um SMS zu senden.", + "optionAccountSid": "Account-SID", + "placeholderAccountSid": "Account-SID eingeben", + "optionAuthToken": "Auth-Token", + "placeholderAuthToken": "Auth-Token eingeben", + "optionFromNumber": "Absendernummer", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Empfängernummer", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Ziel" } + }, + "header": { + "title": "Benachrichtigungen", + "description": "Verbinden Sie Slack, Discord, E-Mail, Webhooks und mehr, damit die richtigen Personen sofort von Vorfällen erfahren." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Monitor erstellen!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Ein PageSpeed-Monitor wird verwendet, um:" + "title": "Noch keine PageSpeed-Monitore", + "description": "Verfolgen Sie Core Web Vitals und Lighthouse-Werte im Zeitverlauf, um Regressionen zu erkennen, bevor Nutzer es tun." + }, + "header": { + "title": "PageSpeed-Monitore", + "description": "Verfolgen Sie Core Web Vitals und Lighthouse-Werte im Zeitverlauf, um Regressionen zu erkennen, bevor Nutzer es tun." } }, "settings": { @@ -1138,10 +1238,11 @@ }, "removeMonitors": { "title": "System zurücksetzen", - "description": "Alle Monitore aus Ihrem System entfernen.", + "description": "Alle Monitore aus dem System entfernen.", "dialog": { "title": "Alle Monitore entfernen?", - "description": "Dies kann nicht rückgängig gemacht werden." + "description": "Diese Aktion kann nicht rückgängig gemacht werden.", + "paragraph": "Dabei werden auch der gesamte Prüfverlauf, alle Vorfälle, geplante Wartungsfenster sowie Statusseiten entfernt, die diese Monitore verwenden. Exportiere die Monitore zuerst, wenn du eine Sicherung der Daten behalten möchtest." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Bitte beheben Sie die folgenden Validierungsfehler:" } + }, + "header": { + "title": "Einstellungen", + "description": "Konfigurieren Sie SMTP, Integrationen, Aufbewahrung und globales App-Verhalten." } }, "statusPages": { "deleteSuccess": "Statusseite erfolgreich gelöscht", "fallback": { - "title": "Eine Statusseite wird verwendet, um:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Statusseite erstellen!" + "title": "Noch keine Statusseiten", + "actionButton": "Statusseite erstellen!", + "description": "Veröffentlichen Sie eine öffentliche Seite, die Kunden und Stakeholdern Echtzeit-Verfügbarkeit und Vorfallsverlauf zeigt." }, "monitorsList": { "chartTypeHeatmap": "Heatmap", @@ -1190,7 +1295,18 @@ "allDown": "Alle Systeme sind ausgefallen", "allUp": "Alle Systeme funktionsfähig", "degraded": "Einige Systeme haben Probleme", - "unknown": "Systemstatus kann nicht ermittelt werden" + "unknown": "Systemstatus kann nicht ermittelt werden", + "allBreached": "Alle Systeme haben Schwellenwerte überschritten", + "allMaintenance": "Alle Systeme befinden sich in Wartung", + "allPaused": "Alle Systeme sind pausiert", + "allInitializing": "Alle Systeme werden initialisiert", + "breachedAndDown": "Einige Systeme haben Schwellenwerte überschritten und sind ausgefallen", + "breached": "Einige Systeme haben Schwellenwerte überschritten", + "maintenanceAndDown": "Einige Systeme sind während der Wartung ausgefallen", + "maintenance": "Einige Systeme befinden sich in Wartung", + "partiallyPaused": "Einige Systeme sind pausiert", + "initializing": "Einige Systeme werden initialisiert", + "noMonitors": "Es wurden keine Monitore konfiguriert" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Statusseiten", + "description": "Veröffentlichen Sie öffentliche Seiten, die Kunden und Stakeholdern Echtzeit-Verfügbarkeit und Vorfallsverlauf zeigen." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Monitor erstellen!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Ein Verfügbarkeitsmonitor wird verwendet, um:" + "title": "Noch keine Uptime-Monitore", + "description": "Überwachen Sie HTTP-Endpunkte, Pings, Container und Ports und werden Sie sofort benachrichtigt, wenn etwas ausfällt." + }, + "header": { + "title": "Uptime-Monitore", + "description": "Überwachen Sie HTTP-Endpunkte, Pings, Container und Ports und werden Sie sofort benachrichtigt, wenn etwas ausfällt." } } } diff --git a/client/src/locales/en.json b/client/src/locales/en.json index eb9a34339..3c632ef96 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -105,7 +105,7 @@ } }, "table": { - "empty": "Nothing here", + "empty": "Nothing to show yet", "headers": { "actions": "Actions", "dateTime": "Date & time", @@ -123,6 +123,14 @@ } }, "components": { + "pageHeader": { + "links": { + "support": "Support", + "discussions": "Discussions", + "docs": "Documentation", + "changelog": "Changelog" + } + }, "imageUpload": { "clickToUpload": "Click to upload", "dragAndDrop": "or drag and drop", @@ -249,6 +257,10 @@ } }, "team": { + "fallback": { + "title": "No team members yet", + "description": "Invite teammates by email or add them directly. Once they join, they'll appear here with their role." + }, "filter": { "placeholder": "Filter by role", "all": "All roles", @@ -279,9 +291,18 @@ }, "linkLabel": "Invite link" } + }, + "header": { + "title": "Account", + "description": "Manage your profile, password, team, and workspace preferences." } }, "auth": { + "brandPanel": { + "eyebrow": "Open-source infrastructure monitoring", + "tagline": "Watch every move your servers make.", + "description": "Real-time uptime, response time and incident tracking - self-hosted and yours to keep." + }, "common": { "passwordRules": { "length": { @@ -363,6 +384,10 @@ } }, "checks": { + "fallback": { + "title": "No checks yet", + "description": "Once you create a monitor, every status probe and response time will appear here as a check." + }, "selects": { "monitor": { "all": "All monitors" @@ -379,6 +404,10 @@ "statusCode": "Status code", "location": "Location" } + }, + "header": { + "title": "Checks", + "description": "Every probe Checkmate runs against your monitors lands here, with status code and response time." } }, "common": { @@ -513,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.", "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).", - "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 supported games list for protocol details.", "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.", "websocket": "Enter the WebSocket URL to monitor (e.g., wss://example.com/socket) and add a display name.", @@ -642,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "No incidents — all systems healthy", + "description": "When a monitor goes down or recovers, the incident will appear here with timing, monitor details, and resolution history." + }, "dialog": { "resolveIncident": { "title": "Resolve incident", @@ -722,6 +755,10 @@ "active": "Active", "resolved": "Resolved" } + }, + "header": { + "title": "Incidents", + "description": "When monitors go down or recover, incidents appear here with timing, monitor details and resolution history." } }, "infrastructure": { @@ -732,6 +769,7 @@ "memory": "Memory usage", "netBytesRecv": "{{name}} - Bytes Received", "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" } }, @@ -775,16 +813,24 @@ } }, "fallback": { - "actionButton": "Create a monitor!", - "checks": [ - "Track the performance of your servers", - "Identify bottlenecks and optimize usage", - "Ensure reliability with real-time monitoring" - ], - "title": "An infrastructure monitor is used to:" + "actionButton": "Create a monitor", + "description": "Track server performance, identify bottlenecks, and ensure reliability with real-time infrastructure monitoring.", + "title": "No infrastructure monitors yet" + }, + "header": { + "title": "Infrastructure monitors", + "description": "Track server performance, identify bottlenecks, and ensure reliability with real-time infrastructure monitoring." } }, "logs": { + "fallback": { + "title": "No logs yet", + "description": "Server activity, warnings, and errors will appear here as Checkmate runs." + }, + "queueFallback": { + "title": "No jobs in the queue", + "description": "Monitor checks that are scheduled or running will appear here. An empty queue means everything is up to date." + }, "tabs": { "diagnostics": "Diagnostics", "logs": "Logs", @@ -794,7 +840,9 @@ "label": "Log level" }, "jobQueue": "Job queue", + "jobQueueExplainer": "Highlighted rows are jobs currently being processed by a worker.", "failedJobs": "Failed jobs", + "failedJobsExplainer": "Recent failures by monitor — last failure time, fail count, and the reason.", "noLogs": "No logs found", "metrics": { "jobs": "Jobs", @@ -804,6 +852,16 @@ "totalFailures": "Total failures" }, "diagnostics": { + "sections": { + "runtimeStats": { + "title": "Runtime stats", + "description": "Snapshot of the Node.js process and host machine. Updates every 5 seconds." + }, + "memoryCpu": { + "title": "Memory & CPU", + "description": "How the process is using its allocated memory and host CPU." + } + }, "stats": { "eventLoopDelay": "Event loop delay", "uptime": "Uptime", @@ -812,7 +870,7 @@ "osMemoryLimit": "OS memory limit" }, "gauges": { - "heapAllocation": "Heap allocaton", + "heapAllocation": "Heap allocation", "heapUsage": "Heap usage", "heapUtilization": "Heap utilization", "instantCpuUsage": "Instant CPU usage", @@ -831,25 +889,25 @@ "method": "Method", "monitorId": "Monitor ID", "runCount": "Run count", - "failCount": "Fail count", + "failCount": "Count", "lastRunAt": "Last run at", "lockedAt": "Locked at", "lastFinishedAt": "Last finished at", "lastRunTook": "Last run took", - "lastFailedAt": "Last failed at", + "lastFailedAt": "Last failed", "failReason": "Fail reason" } + }, + "header": { + "title": "Logs & queue", + "description": "Inspect server logs, the monitor job queue, and runtime diagnostics in one place." } }, "maintenanceWindow": { "fallback": { - "actionButton": "Create a maintenance window!", - "checks": [ - "Mark your maintenance periods", - "Eliminate any misunderstandings", - "Stop sending alerts in maintenance windows" - ], - "title": "A maintenance window is used to:" + "actionButton": "Create a maintenance window", + "description": "Schedule planned downtime so alerts are suppressed and your team and users know what to expect.", + "title": "No maintenance windows scheduled" }, "table": { "headers": { @@ -901,17 +959,17 @@ } } } + }, + "header": { + "title": "Maintenance windows", + "description": "Schedule planned downtime so alerts are suppressed and your team and users know what to expect." } }, "notifications": { "fallback": { "actionButton": "Create a channel", - "checks": [ - "Alert teams about downtime or performance issues", - "Let engineers know when incidents happen", - "Keep administrators informed of system changes" - ], - "title": "Notification channles are used to:" + "description": "Connect Slack, Discord, email, webhooks and more so the right people hear about incidents the moment they happen.", + "title": "No notification channels yet" }, "form": { "accessToken": { @@ -987,6 +1045,10 @@ "headers": { "destination": "Destination" } + }, + "header": { + "title": "Notifications", + "description": "Connect Slack, Discord, email, webhooks and more so the right people hear about incidents the moment they happen." } }, "pageSpeed": { @@ -1012,13 +1074,13 @@ } }, "fallback": { - "actionButton": "Create a monitor!", - "checks": [ - "Report on the user experience of a page", - "Help analyze webpage speed", - "Give suggestions on how the page can be improved" - ], - "title": "A PageSpeed monitor is used to:" + "actionButton": "Create a monitor", + "description": "Track Core Web Vitals and Lighthouse scores over time so you can spot regressions before users do.", + "title": "No PageSpeed monitors yet" + }, + "header": { + "title": "PageSpeed monitors", + "description": "Track Core Web Vitals and Lighthouse scores over time so you can spot regressions before users do." } }, "settings": { @@ -1179,7 +1241,8 @@ "description": "Remove all monitors from your system.", "dialog": { "title": "Remove all monitors?", - "description": "This cannot be undone." + "description": "This cannot be undone.", + "paragraph": "All check history, incidents, scheduled maintenance windows, and any status pages that referenced these monitors will be removed too. Export your monitors first to keep a backup of their data." } }, "exportMonitors": { @@ -1196,24 +1259,37 @@ "validation": { "errorMessage": "Please fix the following validation errors:" } + }, + "header": { + "title": "Settings", + "description": "Configure SMTP, integrations, retention, and global app behavior." } }, "statusPages": { "deleteSuccess": "Status page deleted successfully", "fallback": { - "title": "A status page is used to:", - "checks": [ - "Communicate system status to users and stakeholders", - "Display real-time uptime information publicly", - "Build trust with transparent service monitoring", - "Reduce support requests during incidents" - ], - "actionButton": "Create a status page!" + "title": "No status pages yet", + "description": "Publish a public page that shows real-time uptime and incident history to your customers and stakeholders.", + "actionButton": "Create a status page" }, "monitorsList": { "chartTypeHeatmap": "Heatmap", "chartTypeHistogram": "Histogram", "noData": "No data available", + "status": { + "up": "Operational", + "down": "Down", + "breached": "Threshold exceeded", + "maintenance": "Maintenance", + "paused": "Paused", + "initializing": "Initializing" + }, + "chart": { + "avg": "avg {{value}}ms", + "max": "max {{value}}ms", + "downTooltip": "Down", + "heatmapAria": "Response time heatmap" + }, "infrastructure": { "title": "Infrastructure", "cpu": "CPU", @@ -1230,6 +1306,8 @@ } }, "statusBar": { + "monitoringSummary": "Monitoring {{count}} service · Updates every 10 seconds", + "monitoringSummary_other": "Monitoring {{count}} services · Updates every 10 seconds", "allUp": "All systems operational", "allBreached": "All systems have exceeded thresholds", "allMaintenance": "All systems are under maintenance", @@ -1261,6 +1339,13 @@ "addMonitor": "Add a monitor to get started" } }, + "footer": { + "poweredBy": "Powered by" + }, + "editorial": { + "reportTitle": "Service Report", + "allUp": "All systems are operating normally." + }, "form": { "access": { "title": "Access", @@ -1318,6 +1403,35 @@ } } }, + "theme": { + "title": "Page theme", + "description": "Choose the visual style for your public status page.", + "label": "Theme", + "options": { + "refined": { + "name": "Refined", + "description": "Clean, professional, close to the classic Checkmate look." + }, + "modern": { + "name": "Modern", + "description": "SaaS-grade with a pulsing status dot and softly fading cards." + }, + "bold": { + "name": "Bold", + "description": "Large type and confident spacing. Great for brand-forward pages." + }, + "editorial": { + "name": "Editorial", + "description": "Serif headings and hairline dividers. Distinctive and calm." + } + } + }, + "themeMode": { + "label": "Theme mode", + "auto": "Auto (follow visitor's device)", + "light": "Light only", + "dark": "Dark only" + }, "features": { "title": "Features", "description": "Configure what information is displayed on your status page.", @@ -1336,6 +1450,10 @@ } } } + }, + "header": { + "title": "Status pages", + "description": "Publish public pages that show real-time uptime and incident history to your customers and stakeholders." } }, "uptime": { @@ -1350,14 +1468,13 @@ } }, "fallback": { - "actionButton": "Create a monitor!", - "checks": [ - "Check if websites or servers are online & responsive", - "Alert teams about downtime or performance issues", - "Monitor HTTP endpoints, pings, containers & ports", - "Track historical uptime and reliability trends" - ], - "title": "An uptime monitor is used to:" + "actionButton": "Create a monitor", + "description": "Watch HTTP endpoints, pings, containers, and ports — and get alerted the moment something goes down.", + "title": "No uptime monitors yet" + }, + "header": { + "title": "Uptime monitors", + "description": "Watch HTTP endpoints, pings, containers, and ports — and get alerted the moment something goes down." } } } diff --git a/client/src/locales/es.json b/client/src/locales/es.json index 2006e1cea..506c317e3 100644 --- a/client/src/locales/es.json +++ b/client/src/locales/es.json @@ -13,7 +13,7 @@ "content": "Advertencia: Aún no ha agregado una clave de API de Google PageSpeed. Visite Configuración para agregar una. Sin ella, el monitor de PageSpeed no funcionará." } }, - "appName": "", + "appName": "Checkmate", "breadcrumbs": { "details": "Detalles", "home": "Inicio" @@ -35,11 +35,11 @@ "sendInvite": "Enviar invitación", "test": "Probar", "testNotifications": "Probar notificaciones", - "toggleTheme": "", + "toggleTheme": "Cambiar tema claro / oscuro", "flushQueue": "Vaciar cola", "notFound": "Ir al panel principal", - "resetPassword": "", - "reset": "", + "resetPassword": "Restablecer contraseña", + "reset": "Restablecer", "clear": "Limpiar", "addDemo": "Agregar monitores de demostración", "removeMonitors": "Eliminar monitores", @@ -47,7 +47,14 @@ "exportToJSON": "Exportar a JSON", "importFromJSON": "Importar desde JSON", "clearFilters": "Limpiar filtros", - "removeUser": "Eliminar usuario" + "removeUser": "Eliminar usuario", + "testNotification": "Probar notificación", + "invite": "Invitar", + "copyLink": "Copiar enlace", + "regenerateToken": "Regenerar token", + "copyToken": "Copiar token", + "exportLogs": "Exportar registros", + "refresh": "Actualizar" }, "charts": { "labels": { @@ -86,12 +93,12 @@ "name": { "option": { "firstName": { - "label": "", - "placeholder": "" + "label": "Nombre", + "placeholder": "Introduce tu nombre" }, "lastName": { - "label": "", - "placeholder": "" + "label": "Apellidos", + "placeholder": "Introduce tus apellidos" } } }, @@ -99,7 +106,7 @@ "option": { "email": { "label": "Correo electrónico", - "placeholder": "you@example.com" + "placeholder": "tu@ejemplo.com" } } } @@ -107,14 +114,14 @@ "table": { "empty": "No hay nada aquí", "headers": { - "actions": "", + "actions": "Acciones", "dateTime": "Fecha y hora", "message": "Mensaje", "monitor": "Monitor", "monitorId": "ID de monitor", "name": "Nombre", "status": "Estado", - "type": "", + "type": "Tipo", "url": "URL", "interval": "Intervalo", "active": "Activo", @@ -125,17 +132,17 @@ "components": { "imageUpload": { "clickToUpload": "Haga clic para subir", - "dragAndDrop": "", - "supportedFormats": "", - "maxSize": "", + "dragAndDrop": "o arrastra y suelta", + "supportedFormats": "Formatos admitidos", + "maxSize": "Tamaño máximo", "orDragAndDrop": "o arrastre y suelte", "errors": { - "invalidFileSize": "", - "invalidFileFormat": "" + "invalidFileSize": "¡El archivo es demasiado grande!", + "invalidFileFormat": "¡Formato de archivo no admitido!" } }, "headerStatusPageControls": { - "publicLink": "" + "publicLink": "Enlace público" }, "headerTimeRange": { "labels": { @@ -155,26 +162,26 @@ "serverUnreachable": "No se puede conectar al servidor", "retry": "Reintentar", "retrying": "Reintentando...", - "reconnected": "" + "reconnected": "Conexión restablecida" }, "sidebar": { "menu": { - "uptime": "", - "pagespeed": "", - "infrastructure": "", - "notifications": "", + "uptime": "Disponibilidad", + "pagespeed": "Pagespeed", + "infrastructure": "Infraestructura", + "notifications": "Notificaciones", "checks": "Verificaciones", - "incidents": "", - "statusPages": "", - "maintenance": "", - "logs": "", - "settings": "" + "incidents": "Incidentes", + "statusPages": "Páginas de estado", + "maintenance": "Mantenimiento", + "logs": "Registros", + "settings": "Configuración" }, "bottomMenu": { - "support": "", - "discussions": "", - "docs": "", - "changelog": "" + "support": "Soporte", + "discussions": "Discusiones", + "docs": "Documentación", + "changelog": "Registro de cambios" }, "accountMenu": { "profile": "Perfil", @@ -186,19 +193,27 @@ "description": "Vea las últimas versiones y ayude a crecer la comunidad en GitHub" }, "authFooter": { - "navControls": "", - "logOut": "", + "navControls": "Controles", + "logOut": "Cerrar sesión", "roles": { "superAdmin": "Superadministrador", "admin": "Administrador", "user": "Usuario", - "demoUser": "" + "demoUser": "Usuario demo" } } }, "starPrompt": { "title": "Dale estrella a Checkmate", "description": "Vea las últimas versiones y ayude a crecer la comunidad en GitHub" + }, + "pageHeader": { + "links": { + "support": "Soporte", + "discussions": "Discusiones", + "docs": "Documentación", + "changelog": "Registro de cambios" + } } }, "pages": { @@ -251,15 +266,15 @@ "team": { "filter": { "placeholder": "Filtrar por rol", - "all": "", + "all": "Todos los roles", "admin": "Administrador", - "member": "" + "member": "Miembro" }, "table": { "headers": { "email": "Correo electrónico", "role": "Rol", - "created": "" + "created": "Creado el" } }, "addMember": { @@ -278,42 +293,55 @@ "placeholder": "Seleccione un rol" }, "linkLabel": "Enlace de invitación" + }, + "fallback": { + "title": "Aún no hay miembros del equipo", + "description": "Invita a tus compañeros por correo o añádelos directamente. Una vez que se unan, aparecerán aquí con su rol." } + }, + "header": { + "title": "Cuenta", + "description": "Administra tu perfil, contraseña, equipo y preferencias del espacio de trabajo." } }, "auth": { + "brandPanel": { + "eyebrow": "Monitorización de infraestructura de código abierto", + "tagline": "Vigila cada movimiento de tus servidores.", + "description": "Monitorización en tiempo real de disponibilidad, tiempo de respuesta e incidentes - autoalojada y tuya." + }, "common": { "passwordRules": { "length": { - "beginning": "", - "highlighted": "" + "beginning": "Debe tener al menos", + "highlighted": "8 caracteres" }, "lowercase": { - "beginning": "", - "highlighted": "" + "beginning": "Debe contener al menos", + "highlighted": "una letra minúscula" }, "match": { - "beginning": "", - "highlighted": "" + "beginning": "Las contraseñas", + "highlighted": "deben coincidir" }, "number": { - "beginning": "", - "highlighted": "" + "beginning": "Debe contener al menos", + "highlighted": "un número" }, "special": { - "beginning": "", - "highlighted": "" + "beginning": "Debe contener al menos", + "highlighted": "un carácter especial (!?@#$%^&*()-_=+[]{}|;:'\",./\\~`)" }, "uppercase": { - "beginning": "", - "highlighted": "" + "beginning": "Debe contener al menos", + "highlighted": "una letra mayúscula" } }, "form": { "option": { "email": { "label": "Correo electrónico", - "placeholder": "me@example.com" + "placeholder": "yo@ejemplo.com" }, "password": { "label": "Contraseña", @@ -343,7 +371,8 @@ "register": { "title": "¡Bienvenido de nuevo a Checkmate!", "subtitle": "Regístrese para comenzar", - "submit": "Registrarse" + "submit": "Registrarse", + "setupNotice": "Esta página solo está disponible durante la configuración inicial. Una vez que se haya registrado un super administrador, se podrá invitar a usuarios adicionales desde la configuración del equipo." }, "forgotPassword": { "title": "¿Olvidó su contraseña?", @@ -378,6 +407,14 @@ "statusCode": "Código de estado", "location": "Ubicación" } + }, + "fallback": { + "title": "Aún no hay comprobaciones", + "description": "Una vez que crees un monitor, cada sonda de estado y tiempo de respuesta aparecerá aquí como una comprobación." + }, + "header": { + "title": "Comprobaciones", + "description": "Cada sonda que Checkmate ejecuta contra tus monitores aparece aquí con código de estado y tiempo de respuesta." } }, "common": { @@ -397,7 +434,8 @@ "activeFor": "Activo desde hace", "certificateExpiry": "Vencimiento del certificado", "lastCheck": "Última verificación", - "lastResponseTime": "Último tiempo de respuesta" + "lastResponseTime": "Último tiempo de respuesta", + "serviceIsDown": "El servicio está caído" }, "status": { "down": "caído", @@ -438,9 +476,9 @@ }, "matchMethod": { "label": "Método de coincidencia", - "equal": "", - "include": "", - "regex": "" + "equal": "Igual", + "include": "Contiene", + "regex": "Regex" } }, "title": "Configuración avanzada" @@ -452,15 +490,15 @@ "label": "Frecuencia de verificación", "value": { "fifteenMinutes": "15 minutos", - "fifteenSeconds": "", + "fifteenSeconds": "15 segundos", "fiveMinutes": "5 minutos", - "fourMinutes": "", - "oneMinute": "", + "fourMinutes": "4 minutos", + "oneMinute": "1 minuto", "tenMinutes": "10 minutos", "thirtyMinutes": "30 minutos", - "thirtySeconds": "", - "threeMinutes": "", - "twoMinutes": "" + "thirtySeconds": "30 segundos", + "threeMinutes": "3 minutos", + "twoMinutes": "2 minutos" } } }, @@ -489,8 +527,8 @@ "placeholder": "https://www.google.com" }, "game": { - "label": "", - "placeholder": "" + "label": "Elige el juego", + "placeholder": "Selecciona un juego" }, "port": { "label": "Puerto a monitorear", @@ -508,10 +546,10 @@ "title": "Configuración general", "description": { "http": "Ingrese la URL o IP a monitorear (p. ej., https://example.com/ o 192.168.1.100) y agregue un nombre para mostrar que aparecerá en el panel.", - "ping": "", - "port": "", - "docker": "", - "game": "", + "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.", + "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. Algunos juegos requieren habilitar consultas del servidor en su archivo de configuración — consulta la documentación de tu servidor. Consulta la lista de juegos compatibles 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.", "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.", @@ -640,6 +678,10 @@ } }, "incidents": { + "fallback": { + "title": "Sin incidentes — todos los sistemas saludables", + "description": "Cuando un monitor falla o se recupera, el incidente aparecerá aquí con los tiempos, los detalles del monitor y el historial de resolución." + }, "dialog": { "resolveIncident": { "title": "Resolver incidente", @@ -712,7 +754,7 @@ "headers": { "endTime": "Hora de fin", "resolutionType": "Tipo de resolución", - "startTime": "", + "startTime": "Hora de inicio", "statusCode": "Código de estado" }, "resolvedIncidents": "Incidentes resueltos", @@ -720,6 +762,10 @@ "active": "Activo", "resolved": "Resuelto" } + }, + "header": { + "title": "Incidentes", + "description": "Cuando un monitor falla o se recupera, los incidentes aparecen aquí con los tiempos, los detalles del monitor y el historial de resolución." } }, "infrastructure": { @@ -730,6 +776,7 @@ "memory": "Uso de memoria", "netBytesRecv": "{{name}} - Bytes recibidos", "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" } }, @@ -751,10 +798,10 @@ } }, "statBoxes": { - "avgCpuTemperature": "", - "cpuFrequency": "", - "cpuLogical": "", - "cpuPhysical": "", + "avgCpuTemperature": "Temperatura media de la CPU", + "cpuFrequency": "Frecuencia de la CPU", + "cpuLogical": "CPU (lógicas)", + "cpuPhysical": "CPU (físicas)", "disk": "Disco", "memory": "Memoria", "os": "SO" @@ -768,27 +815,37 @@ }, "tabs": { "labels": { - "network": "", + "network": "Red", "overview": "Resumen" } }, "fallback": { "actionButton": "¡Cree un monitor!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Un monitor de infraestructura se usa para:" + "title": "Aún no hay monitores de infraestructura", + "description": "Rastrea el rendimiento de los servidores, identifica cuellos de botella y garantiza la fiabilidad con monitoreo en tiempo real." + }, + "header": { + "title": "Monitores de infraestructura", + "description": "Rastrea el rendimiento de los servidores, identifica cuellos de botella y garantiza la fiabilidad con monitoreo en tiempo real." } }, "logs": { + "fallback": { + "title": "Aún no hay registros", + "description": "La actividad del servidor, advertencias y errores aparecerán aquí mientras Checkmate se ejecuta." + }, "tabs": { - "diagnostics": "", - "logs": "", - "queue": "" + "diagnostics": "Diagnóstico", + "logs": "Registros", + "queue": "Cola de trabajos" }, "logLevelSelect": { "label": "Nivel de registro" }, "jobQueue": "Cola de trabajos", + "jobQueueExplainer": "Las filas resaltadas son los trabajos que un worker está procesando actualmente.", "failedJobs": "Trabajos fallidos", + "failedJobsExplainer": "Fallos recientes por monitor — hora del último fallo, número de fallos y motivo.", "noLogs": "No se encontraron registros", "metrics": { "jobs": "Trabajos", @@ -815,6 +872,16 @@ "usedSPercentage": "% de 1s usado por CPU", "total": "Total", "used": "Usado" + }, + "sections": { + "runtimeStats": { + "title": "Estadísticas de tiempo de ejecución", + "description": "Instantánea del proceso Node.js y la máquina anfitriona. Se actualiza cada 5 segundos." + }, + "memoryCpu": { + "title": "Memoria y CPU", + "description": "Cómo el proceso utiliza la memoria asignada y la CPU del host." + } } }, "table": { @@ -833,18 +900,26 @@ "lastFailedAt": "Última falla", "failReason": "Razón de falla" } + }, + "queueFallback": { + "title": "No hay trabajos en la cola", + "description": "Las comprobaciones de monitores programadas o en ejecución aparecerán aquí. Una cola vacía significa que todo está al día." + }, + "header": { + "title": "Registros y cola", + "description": "Inspecciona registros del servidor, la cola de trabajos del monitor y los diagnósticos de runtime en un solo lugar." } }, "maintenanceWindow": { "fallback": { "actionButton": "¡Cree una ventana de mantenimiento!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Una ventana de mantenimiento se usa para:" + "title": "No hay ventanas de mantenimiento programadas", + "description": "Programa interrupciones planificadas para silenciar las alertas y que tu equipo y usuarios sepan qué esperar." }, "table": { "headers": { - "nextWindow": "", - "repeat": "" + "nextWindow": "Próxima ventana", + "repeat": "Repetición" } }, "form": { @@ -891,13 +966,17 @@ } } } + }, + "header": { + "title": "Ventanas de mantenimiento", + "description": "Programa interrupciones planificadas para silenciar las alertas y que tu equipo y usuarios sepan qué esperar." } }, "notifications": { "fallback": { "actionButton": "Crear un canal", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Los canales de notificación se usan para:" + "title": "Aún no hay canales de notificación", + "description": "Conecta Slack, Discord, correo electrónico, webhooks y más para que las personas adecuadas se enteren de los incidentes en cuanto ocurran." }, "form": { "accessToken": { @@ -947,12 +1026,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "ID de chat", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Configuración de Pushover", + "description": "Introduce tu token de aplicación y la clave de usuario de Pushover.", + "optionAppToken": "Token de aplicación", + "placeholderAppToken": "Introduce el token de aplicación", + "optionUserKey": "Clave de usuario", + "placeholderUserKey": "Introduce la clave de usuario" + }, + "twilio": { + "title": "Configuración de Twilio", + "description": "Introduce las credenciales de tu cuenta de Twilio para enviar SMS.", + "optionAccountSid": "SID de la cuenta", + "placeholderAccountSid": "Introduce el SID de la cuenta", + "optionAuthToken": "Token de autenticación", + "placeholderAuthToken": "Introduce el token de autenticación", + "optionFromNumber": "Número de origen", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Número de destino", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Destino" } + }, + "header": { + "title": "Notificaciones", + "description": "Conecta Slack, Discord, correo electrónico, webhooks y más para que las personas adecuadas se enteren de los incidentes en cuanto ocurran." } }, "pageSpeed": { @@ -979,8 +1082,12 @@ }, "fallback": { "actionButton": "¡Cree un monitor!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Un monitor de PageSpeed se usa para:" + "title": "Aún no hay monitores de PageSpeed", + "description": "Sigue las Core Web Vitals y las puntuaciones de Lighthouse a lo largo del tiempo para detectar regresiones antes que tus usuarios." + }, + "header": { + "title": "Monitores de PageSpeed", + "description": "Sigue las Core Web Vitals y las puntuaciones de Lighthouse a lo largo del tiempo para detectar regresiones antes que tus usuarios." } }, "settings": { @@ -1083,7 +1190,7 @@ "email": { "title": "Configuración de correo electrónico", "description": "Configure los ajustes de correo electrónico de su sistema. Se usa para enviar notificaciones y alertas.", - "descriptionTransport": "", + "descriptionTransport": "Esto crea un transporte SMTP para NodeMailer", "descriptionTransportLink": "Ver especificaciones aquí", "option": { "host": { @@ -1137,11 +1244,12 @@ "description": "Agregue monitores de ejemplo con fines demostrativos." }, "removeMonitors": { - "title": "Reinicio del sistema", - "description": "Elimine todos los monitores de su sistema.", + "title": "Reiniciar sistema", + "description": "Eliminar todos los monitores del sistema.", "dialog": { "title": "¿Eliminar todos los monitores?", - "description": "Esto no se puede deshacer." + "description": "Esta acción no se puede deshacer.", + "paragraph": "También se eliminarán todo el historial de comprobaciones, los incidentes, las ventanas de mantenimiento programadas y las páginas de estado que usaban estos monitores. Exporta los monitores primero si quieres conservar una copia de seguridad de sus datos." } }, "exportMonitors": { @@ -1158,14 +1266,18 @@ "validation": { "errorMessage": "Corrija los siguientes errores de validación:" } + }, + "header": { + "title": "Configuración", + "description": "Configura SMTP, integraciones, retención y comportamiento global de la app." } }, "statusPages": { "deleteSuccess": "Página de estado eliminada exitosamente", "fallback": { - "title": "Una página de estado se usa para:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "¡Cree una página de estado!" + "title": "Aún no hay páginas de estado", + "actionButton": "¡Cree una página de estado!", + "description": "Publica una página pública que muestre a tus clientes y partes interesadas la disponibilidad en tiempo real y el historial de incidentes." }, "monitorsList": { "chartTypeHeatmap": "Mapa de calor", @@ -1190,7 +1302,18 @@ "allDown": "Todos los sistemas están caídos", "allUp": "Todos los sistemas operativos", "degraded": "Algunos sistemas están experimentando problemas", - "unknown": "No se puede determinar el estado del sistema" + "unknown": "No se puede determinar el estado del sistema", + "allBreached": "Todos los sistemas han superado los umbrales", + "allMaintenance": "Todos los sistemas están en mantenimiento", + "allPaused": "Todos los sistemas están en pausa", + "allInitializing": "Todos los sistemas se están inicializando", + "breachedAndDown": "Algunos sistemas han superado los umbrales y están caídos", + "breached": "Algunos sistemas han superado los umbrales", + "maintenanceAndDown": "Algunos sistemas están caídos durante el mantenimiento", + "maintenance": "Algunos sistemas están en mantenimiento", + "partiallyPaused": "Algunos sistemas están en pausa", + "initializing": "Algunos sistemas se están inicializando", + "noMonitors": "No se ha configurado ningún monitor" }, "table": { "headers": { @@ -1282,6 +1405,17 @@ } } } + }, + "header": { + "title": "Páginas de estado", + "description": "Publica páginas públicas que muestren a tus clientes y partes interesadas la disponibilidad en tiempo real y el historial de incidentes." + }, + "publicPage": { + "maintenance": { + "upcoming": "Mantenimiento programado", + "inProgress": "Mantenimiento en curso", + "completed": "Mantenimiento completado" + } } }, "uptime": { @@ -1297,8 +1431,12 @@ }, "fallback": { "actionButton": "¡Cree un monitor!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Un monitor de tiempo de actividad se usa para:" + "title": "Aún no hay monitores de uptime", + "description": "Observa endpoints HTTP, pings, contenedores y puertos — recibe alertas en el momento en que algo falla." + }, + "header": { + "title": "Monitores de uptime", + "description": "Observa endpoints HTTP, pings, contenedores y puertos — recibe alertas en el momento en que algo falla." } } } diff --git a/client/src/locales/fi.json b/client/src/locales/fi.json index d56cb5bda..6238837f2 100644 --- a/client/src/locales/fi.json +++ b/client/src/locales/fi.json @@ -13,7 +13,7 @@ "content": "Varoitus: Et ole vielä lisännyt Google PageSpeed API -avainta. Siirry Asetuksiin lisätäksesi sellainen. Ilman sitä PageSpeed-monitorointi ei toimi." } }, - "appName": "", + "appName": "Checkmate", "breadcrumbs": { "details": "Tiedot", "home": "Etusivu" @@ -35,10 +35,10 @@ "sendInvite": "Lähetä kutsu", "test": "Testaa", "testNotifications": "Testaa ilmoitukset", - "toggleTheme": "", + "toggleTheme": "Vaihda vaalea / tumma", "flushQueue": "Tyhjennä jono", "notFound": "Siirry pääsivulle", - "resetPassword": "", + "resetPassword": "Nollaa salasana", "reset": "Palauta", "clear": "Tyhjennä", "addDemo": "Lisää demomonitorit", @@ -53,8 +53,8 @@ "labels": { "averageResponseTime": "Keskimääräinen vasteaika", "downtime": "Käyttökatko", - "high": "", - "low": "", + "high": "Korkea", + "low": "Matala", "uptime": "Käytettävyys" }, "histogram": { @@ -86,12 +86,12 @@ "name": { "option": { "firstName": { - "label": "", - "placeholder": "" + "label": "Etunimi", + "placeholder": "Anna etunimesi" }, "lastName": { - "label": "", - "placeholder": "" + "label": "Sukunimi", + "placeholder": "Anna sukunimesi" } } }, @@ -107,14 +107,14 @@ "table": { "empty": "Täällä ei ole mitään", "headers": { - "actions": "", + "actions": "Toiminnot", "dateTime": "Päivämäärä ja aika", "message": "Viesti", "monitor": "Monitori", "monitorId": "Monitorin tunnus", "name": "Nimi", "status": "Tila", - "type": "", + "type": "Tyyppi", "url": "Osoite", "interval": "Aikaväli", "active": "Aktiivinen", @@ -131,7 +131,7 @@ "orDragAndDrop": "tai vedä ja pudota", "errors": { "invalidFileSize": "Tiedoston koko on liian suuri!", - "invalidFileFormat": "" + "invalidFileFormat": "Tiedostomuotoa ei tueta!" } }, "headerStatusPageControls": { @@ -155,19 +155,19 @@ "serverUnreachable": "Palvelimeen ei saada yhteyttä", "retry": "Yritä uudelleen", "retrying": "Yritetään uudelleen...", - "reconnected": "" + "reconnected": "Yhteys palautettu" }, "sidebar": { "menu": { - "uptime": "", - "pagespeed": "", + "uptime": "Käytettävyys", + "pagespeed": "Pagespeed", "infrastructure": "Infrastruktuuri", - "notifications": "", + "notifications": "Ilmoitukset", "checks": "Tarkistukset", - "incidents": "", + "incidents": "Häiriöt", "statusPages": "Tilasivut", "maintenance": "Huolto", - "logs": "", + "logs": "Lokit", "settings": "Asetukset" }, "bottomMenu": { @@ -199,6 +199,14 @@ "starPrompt": { "title": "Lisää Checkmate suosikkeihin", "description": "Katso uusimmat julkaisut ja auta kasvattamaan yhteisöä GitHubissa" + }, + "pageHeader": { + "links": { + "support": "Tuki", + "discussions": "Keskustelut", + "docs": "Dokumentaatio", + "changelog": "Muutosloki" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "Valitse rooli" }, "linkLabel": "Kutsulinkki" + }, + "fallback": { + "title": "Ei vielä tiimin jäseniä", + "description": "Kutsu tiimin jäsenet sähköpostitse tai lisää heidät suoraan. Kun he liittyvät, he näkyvät tässä roolinsa kanssa." } + }, + "header": { + "title": "Tili", + "description": "Hallitse profiilia, salasanaa, tiimiä ja työtilan asetuksia." } }, "auth": { + "brandPanel": { + "eyebrow": "Avoimen lähdekoodin infrastruktuurin valvonta", + "tagline": "Seuraa palvelimiesi jokaista liikettä.", + "description": "Reaaliaikainen käytettävyyden, vasteajan ja häiriöiden valvonta - itse isännöity ja sinun." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Tervetuloa takaisin Checkmateen!", "subtitle": "Rekisteröidy aloittaaksesi", - "submit": "Rekisteröidy" + "submit": "Rekisteröidy", + "setupNotice": "Tämä sivu on käytettävissä vain alkuasennuksen aikana. Kun super-admin on rekisteröity, lisäkäyttäjiä voi kutsua tiimiasetuksista." }, "forgotPassword": { "title": "Unohditko salasanasi?", @@ -378,6 +400,14 @@ "statusCode": "Tilakoodi", "location": "Sijainti" } + }, + "fallback": { + "title": "Ei vielä tarkistuksia", + "description": "Kun luot monitorin, jokainen tilatarkistus ja vasteaika näkyy täällä tarkistuksena." + }, + "header": { + "title": "Tarkistukset", + "description": "Jokainen tarkistus, jonka Checkmate suorittaa monitoreitasi vastaan, näkyy täällä tilakoodin ja vasteajan kanssa." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Aktiivinen", "certificateExpiry": "Varmenteen vanheneminen", "lastCheck": "Viimeisin tarkistus", - "lastResponseTime": "Viimeisin vasteaika" + "lastResponseTime": "Viimeisin vasteaika", + "serviceIsDown": "Palvelu ei ole käytettävissä" }, "status": { "down": "alhaalla", @@ -511,7 +542,7 @@ "ping": "", "port": "", "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 tuettujen pelien luettelosta.", "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.", "websocket": "Syötä monitoroitava WebSocket URL (esim. wss://example.com/socket) ja lisää näyttönimi.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Ei tapauksia — kaikki järjestelmät ovat kunnossa", + "description": "Kun monitori kaatuu tai palautuu, tapaus tulee näkyviin ajoituksen, monitorin tietojen ja ratkaisuhistorian kanssa." + }, "dialog": { "resolveIncident": { "title": "Ratkaise häiriö", @@ -720,6 +755,10 @@ "active": "Aktiivinen", "resolved": "Ratkaistu" } + }, + "header": { + "title": "Tapaukset", + "description": "Kun monitori kaatuu tai palautuu, tapaukset näkyvät täällä ajoituksen, monitorin tietojen ja ratkaisuhistorian kanssa." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Muistin käyttö", "netBytesRecv": "{{name}} - tavua vastaanotettu", "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ö" } }, @@ -774,21 +814,31 @@ }, "fallback": { "actionButton": "Luo monitori!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Infrastruktuurimonitorilla voit:" + "title": "Ei vielä infrastruktuurimonitoreita", + "description": "Seuraa palvelinten suorituskykyä, tunnista pullonkauloja ja varmista luotettavuus reaaliaikaisella valvonnalla." + }, + "header": { + "title": "Infrastruktuurimonitorit", + "description": "Seuraa palvelinten suorituskykyä, tunnista pullonkauloja ja varmista luotettavuus reaaliaikaisella valvonnalla." } }, "logs": { + "fallback": { + "title": "Ei vielä lokeja", + "description": "Palvelimen toiminta, varoitukset ja virheet näkyvät täällä Checkmaten toimiessa." + }, "tabs": { - "diagnostics": "", - "logs": "", - "queue": "" + "diagnostics": "Diagnostiikka", + "logs": "Lokit", + "queue": "Työjono" }, "logLevelSelect": { "label": "Lokitaso" }, "jobQueue": "Työnojono", + "jobQueueExplainer": "Korostetut rivit ovat työt, joita työntekijä käsittelee parhaillaan.", "failedJobs": "Epäonnistuneet työt", + "failedJobsExplainer": "Viimeisimmät epäonnistumiset valvojan mukaan — viimeisin epäonnistumisaika, epäonnistumismäärä ja syy.", "noLogs": "Lokeja ei löytynyt", "metrics": { "jobs": "Työt", @@ -815,6 +865,16 @@ "usedSPercentage": "% sekunnista CPU:n käytössä", "total": "Yhteensä", "used": "Käytetty" + }, + "sections": { + "runtimeStats": { + "title": "Suoritusajan tilastot", + "description": "Node.js-prosessin ja isäntäkoneen tilannekuva. Päivittyy 5 sekunnin välein." + }, + "memoryCpu": { + "title": "Muisti ja CPU", + "description": "Miten prosessi käyttää sille varattua muistia ja isännän CPU:ta." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Viimeisin epäonnistuminen", "failReason": "Epäonnistumisen syy" } + }, + "queueFallback": { + "title": "Jonossa ei ole töitä", + "description": "Aikataulutetut tai käynnissä olevat monitoritarkistukset näkyvät täällä. Tyhjä jono tarkoittaa, että kaikki on ajan tasalla." + }, + "header": { + "title": "Lokit ja jono", + "description": "Tarkasta palvelinlokit, monitorin työjono ja ajonaikaiset diagnostiikat yhdestä paikasta." } }, "maintenanceWindow": { "fallback": { "actionButton": "Luo huoltoikkuna!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Huoltoikkunalla voit:" + "title": "Ei suunniteltuja huoltokatkoja", + "description": "Aikatauluta suunnitellut katkot, jotta hälytykset vaimennetaan ja tiimisi sekä käyttäjät tietävät mitä odottaa." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Huoltoikkunat", + "description": "Aikatauluta suunnitellut katkot, jotta hälytykset vaimennetaan ja tiimisi sekä käyttäjät tietävät mitä odottaa." } }, "notifications": { "fallback": { "actionButton": "Luo kanava", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Ilmoituskanavia käytetään:" + "title": "Ei vielä ilmoituskanavia", + "description": "Yhdistä Slack, Discord, sähköposti, webhookit ja muut, jotta oikeat ihmiset kuulevat tapauksista heti." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "Chat-tunnus", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Pushover-määritys", + "description": "Anna Pushover-sovellustunnus ja käyttäjäavain.", + "optionAppToken": "Sovellustunnus", + "placeholderAppToken": "Anna sovellustunnus", + "optionUserKey": "Käyttäjäavain", + "placeholderUserKey": "Anna käyttäjäavain" + }, + "twilio": { + "title": "Twilio-määritys", + "description": "Anna Twilio-tilin tunnistetiedot tekstiviestien lähettämistä varten.", + "optionAccountSid": "Tilin SID", + "placeholderAccountSid": "Anna tilin SID", + "optionAuthToken": "Todennustunnus", + "placeholderAuthToken": "Anna todennustunnus", + "optionFromNumber": "Lähettäjän numero", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Vastaanottajan numero", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Kohde" } + }, + "header": { + "title": "Ilmoitukset", + "description": "Yhdistä Slack, Discord, sähköposti, webhookit ja muut, jotta oikeat ihmiset kuulevat tapauksista heti." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Luo monitori!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "PageSpeed-monitorilla voit:" + "title": "Ei vielä PageSpeed-monitoreita", + "description": "Seuraa Core Web Vitals -mittareita ja Lighthouse-pisteitä ajan mittaan ja huomaa heikennykset ennen käyttäjiä." + }, + "header": { + "title": "PageSpeed-monitorit", + "description": "Seuraa Core Web Vitals -mittareita ja Lighthouse-pisteitä ajan mittaan ja huomaa heikennykset ennen käyttäjiä." } }, "settings": { @@ -1137,11 +1237,12 @@ "description": "Lisää esimerkkimonitoreja esittelytarkoituksiin." }, "removeMonitors": { - "title": "Järjestelmän nollaus", + "title": "Järjestelmän palautus", "description": "Poista kaikki monitorit järjestelmästäsi.", "dialog": { "title": "Poistetaanko kaikki monitorit?", - "description": "Tätä ei voi kumota." + "description": "Tätä toimintoa ei voi kumota.", + "paragraph": "Mukana poistuvat myös kaikki tarkistushistoria, häiriöt, ajoitetut huoltoikkunat sekä tilasivut, jotka käyttivät näitä monitoreja. Vie monitorit ensin, jos haluat säilyttää varmuuskopion niiden tiedoista." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Korjaa seuraavat vahvistusvirheet:" } + }, + "header": { + "title": "Asetukset", + "description": "Määritä SMTP, integraatiot, säilytys ja sovelluksen yleinen käyttäytyminen." } }, "statusPages": { "deleteSuccess": "Tilasivu poistettu onnistuneesti", "fallback": { - "title": "Tilasivulla voit:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Luo tilasivu!" + "title": "Ei vielä tilasivuja", + "actionButton": "Luo tilasivu!", + "description": "Julkaise julkinen sivu, joka näyttää asiakkaille ja sidosryhmille reaaliaikaisen käytettävyyden ja tapaushistorian." }, "monitorsList": { "chartTypeHeatmap": "Lämpökartta", @@ -1190,7 +1295,18 @@ "allDown": "Kaikki järjestelmät ovat alhaalla", "allUp": "Kaikki järjestelmät toiminnassa", "degraded": "Joissakin järjestelmissä on ongelmia", - "unknown": "Järjestelmän tilaa ei voida määrittää" + "unknown": "Järjestelmän tilaa ei voida määrittää", + "allBreached": "Kaikki järjestelmät ovat ylittäneet kynnysarvot", + "allMaintenance": "Kaikki järjestelmät ovat huollossa", + "allPaused": "Kaikki järjestelmät on keskeytetty", + "allInitializing": "Kaikki järjestelmät alustuvat", + "breachedAndDown": "Jotkin järjestelmät ovat ylittäneet kynnysarvot ja ovat alhaalla", + "breached": "Jotkin järjestelmät ovat ylittäneet kynnysarvot", + "maintenanceAndDown": "Jotkin järjestelmät ovat alhaalla huollon aikana", + "maintenance": "Jotkin järjestelmät ovat huollossa", + "partiallyPaused": "Jotkin järjestelmät on keskeytetty", + "initializing": "Jotkin järjestelmät alustuvat", + "noMonitors": "Yhtään monitoria ei ole määritetty" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Tilasivut", + "description": "Julkaise julkisia sivuja, jotka näyttävät asiakkaille ja sidosryhmille reaaliaikaisen käytettävyyden ja tapaushistorian." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Luo monitori!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Käytettävyysmonitorilla voit:" + "title": "Ei vielä käytettävyysmonitoreita", + "description": "Tarkkaile HTTP-päätepisteitä, pingejä, kontteja ja portteja — saat hälytyksen heti, kun jokin kaatuu." + }, + "header": { + "title": "Käytettävyysmonitorit", + "description": "Tarkkaile HTTP-päätepisteitä, pingejä, kontteja ja portteja — saat hälytyksen heti, kun jokin kaatuu." } } } diff --git a/client/src/locales/fr.json b/client/src/locales/fr.json index 9b7ec03f9..306a2bd61 100644 --- a/client/src/locales/fr.json +++ b/client/src/locales/fr.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "Star Checkmate", "description": "Consultez les dernières versions et aidez la communauté à grandir sur GitHub" + }, + "pageHeader": { + "links": { + "support": "Assistance", + "discussions": "Discussions", + "docs": "Documentation", + "changelog": "Journal des modifications" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "Sélectionnez un rôle" }, "linkLabel": "Lien d'invitation" + }, + "fallback": { + "title": "Aucun membre d'équipe pour le moment", + "description": "Invitez vos coéquipiers par e-mail ou ajoutez-les directement. Une fois qu'ils auront rejoint, ils apparaîtront ici avec leur rôle." } + }, + "header": { + "title": "Compte", + "description": "Gérez votre profil, mot de passe, équipe et préférences d'espace de travail." } }, "auth": { + "brandPanel": { + "eyebrow": "Surveillance d'infrastructure open source", + "tagline": "Surveillez chaque mouvement de vos serveurs.", + "description": "Suivi en temps réel de la disponibilité, du temps de réponse et des incidents - auto-hébergé et à vous." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Bienvenue sur Checkmate !", "subtitle": "Inscrivez-vous pour commencer", - "submit": "S'inscrire" + "submit": "S'inscrire", + "setupNotice": "Cette page n'est disponible que lors de la configuration initiale. Une fois qu'un super administrateur est enregistré, des utilisateurs supplémentaires peuvent être invités depuis les paramètres de l'équipe." }, "forgotPassword": { "title": "Mot de passe oublié ?", @@ -378,6 +400,14 @@ "statusCode": "Code de statut", "location": "Emplacement" } + }, + "fallback": { + "title": "Aucune vérification pour le moment", + "description": "Une fois que vous aurez créé un moniteur, chaque sonde d'état et temps de réponse apparaîtra ici sous forme de vérification." + }, + "header": { + "title": "Vérifications", + "description": "Chaque sonde que Checkmate exécute contre vos moniteurs apparaît ici avec le code d'état et le temps de réponse." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Actif depuis", "certificateExpiry": "Expiration du certificat", "lastCheck": "Dernière vérification", - "lastResponseTime": "Dernier temps de réponse" + "lastResponseTime": "Dernier temps de réponse", + "serviceIsDown": "Le service est indisponible" }, "status": { "down": "hors ligne", @@ -511,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.", "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 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 liste des jeux pris en charge 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.", "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.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Aucun incident — tous les systèmes sont sains", + "description": "Lorsqu'un moniteur tombe en panne ou se rétablit, l'incident apparaîtra ici avec l'horodatage, les détails du moniteur et l'historique de résolution." + }, "dialog": { "resolveIncident": { "title": "Résoudre l'incident", @@ -720,6 +755,10 @@ "active": "Actif", "resolved": "Résolu" } + }, + "header": { + "title": "Incidents", + "description": "Lorsqu'un moniteur tombe en panne ou se rétablit, les incidents apparaissent ici avec l'horodatage, les détails du moniteur et l'historique de résolution." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Utilisation mémoire", "netBytesRecv": "{{name}} - Octets reçus", "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." } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "Créer un moniteur !", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Un moniteur d'infrastructure sert à :" + "title": "Aucun moniteur d'infrastructure", + "description": "Suivez les performances des serveurs, identifiez les goulots d'étranglement et garantissez la fiabilité avec une surveillance en temps réel." + }, + "header": { + "title": "Moniteurs d'infrastructure", + "description": "Suivez les performances des serveurs, identifiez les goulots d'étranglement et garantissez la fiabilité avec une surveillance en temps réel." } }, "logs": { + "fallback": { + "title": "Aucun journal pour le moment", + "description": "L'activité du serveur, les avertissements et les erreurs apparaîtront ici pendant l'exécution de Checkmate." + }, "tabs": { "diagnostics": "Diagnostic", "logs": "Journaux des serveurs", @@ -788,7 +836,9 @@ "label": "Niveau de log" }, "jobQueue": "File d'attente des tâches", + "jobQueueExplainer": "Les lignes mises en évidence sont les tâches actuellement traitées par un worker.", "failedJobs": "Tâches échouées", + "failedJobsExplainer": "Échecs récents par moniteur — heure du dernier échec, nombre d'échecs et raison.", "noLogs": "Aucun log trouvé", "metrics": { "jobs": "Tâches", @@ -815,6 +865,16 @@ "usedSPercentage": "% de 1s utilisé par le CPU", "total": "Total", "used": "Utilisé" + }, + "sections": { + "runtimeStats": { + "title": "Statistiques d'exécution", + "description": "Aperçu du processus Node.js et de la machine hôte. Mis à jour toutes les 5 secondes." + }, + "memoryCpu": { + "title": "Mémoire et CPU", + "description": "Comment le processus utilise sa mémoire allouée et le CPU de l'hôte." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Dernier échec", "failReason": "Raison de l'échec" } + }, + "queueFallback": { + "title": "Aucun travail dans la file", + "description": "Les vérifications de moniteurs planifiées ou en cours apparaîtront ici. Une file vide signifie que tout est à jour." + }, + "header": { + "title": "Journaux et file", + "description": "Inspectez les journaux serveur, la file des tâches de moniteur et les diagnostics d'exécution au même endroit." } }, "maintenanceWindow": { "fallback": { "actionButton": "Créer une fenêtre de maintenance !", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Une fenêtre de maintenance sert à :" + "title": "Aucune fenêtre de maintenance planifiée", + "description": "Planifiez les interruptions afin que les alertes soient supprimées et que votre équipe et vos utilisateurs sachent à quoi s'attendre." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Fenêtres de maintenance", + "description": "Planifiez les interruptions afin que les alertes soient supprimées et que votre équipe et vos utilisateurs sachent à quoi s'attendre." } }, "notifications": { "fallback": { "actionButton": "Créer un canal", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Les canaux de notification servent à :" + "title": "Aucun canal de notification", + "description": "Connectez Slack, Discord, e-mail, webhooks et plus encore pour que les bonnes personnes soient prévenues dès qu'un incident survient." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "ID du chat", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Configuration Pushover", + "description": "Entrez votre jeton d'application et votre clé utilisateur Pushover.", + "optionAppToken": "Jeton d'application", + "placeholderAppToken": "Entrez le jeton d'application", + "optionUserKey": "Clé utilisateur", + "placeholderUserKey": "Entrez la clé utilisateur" + }, + "twilio": { + "title": "Configuration Twilio", + "description": "Entrez les identifiants de votre compte Twilio pour envoyer des SMS.", + "optionAccountSid": "SID du compte", + "placeholderAccountSid": "Entrez le SID du compte", + "optionAuthToken": "Jeton d'authentification", + "placeholderAuthToken": "Entrez le jeton d'authentification", + "optionFromNumber": "Numéro d'origine", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Numéro de destination", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Destination" } + }, + "header": { + "title": "Notifications", + "description": "Connectez Slack, Discord, e-mail, webhooks et plus encore pour que les bonnes personnes soient prévenues dès qu'un incident survient." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Créer un moniteur !", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Un moniteur PageSpeed sert à :" + "title": "Aucun moniteur PageSpeed", + "description": "Suivez les Core Web Vitals et les scores Lighthouse au fil du temps pour détecter les régressions avant vos utilisateurs." + }, + "header": { + "title": "Moniteurs PageSpeed", + "description": "Suivez les Core Web Vitals et les scores Lighthouse au fil du temps pour détecter les régressions avant vos utilisateurs." } }, "settings": { @@ -1137,11 +1237,12 @@ "description": "Ajoutez des moniteurs d'exemple à des fins de démonstration." }, "removeMonitors": { - "title": "Réinitialisation du système", - "description": "Supprimez tous les moniteurs de votre système.", + "title": "Réinitialiser le système", + "description": "Supprimer tous les moniteurs de votre système.", "dialog": { "title": "Supprimer tous les moniteurs ?", - "description": "Cette action est irréversible." + "description": "Cette action est irréversible.", + "paragraph": "L'historique des vérifications, les incidents, les fenêtres de maintenance planifiées et les pages de statut qui utilisaient ces moniteurs seront également supprimés. Exportez d'abord les moniteurs si vous souhaitez conserver une sauvegarde de leurs données." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Veuillez corriger les erreurs de validation suivantes :" } + }, + "header": { + "title": "Paramètres", + "description": "Configurez SMTP, intégrations, rétention et comportement global de l'application." } }, "statusPages": { "deleteSuccess": "Page de statut supprimée avec succès", "fallback": { - "title": "Une page de statut sert à :", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Créer une page de statut !" + "title": "Aucune page de statut", + "actionButton": "Créer une page de statut !", + "description": "Publiez une page publique qui montre à vos clients et parties prenantes la disponibilité en temps réel et l'historique des incidents." }, "monitorsList": { "chartTypeHeatmap": "Carte thermique", @@ -1190,7 +1295,18 @@ "allDown": "Tous les systèmes sont hors service", "allUp": "Tous les systèmes sont opérationnels", "degraded": "Certains systèmes rencontrent des problèmes", - "unknown": "Impossible de déterminer le statut du système" + "unknown": "Impossible de déterminer le statut du système", + "allBreached": "Tous les systèmes ont dépassé les seuils", + "allMaintenance": "Tous les systèmes sont en maintenance", + "allPaused": "Tous les systèmes sont en pause", + "allInitializing": "Tous les systèmes sont en cours d'initialisation", + "breachedAndDown": "Certains systèmes ont dépassé les seuils et sont hors ligne", + "breached": "Certains systèmes ont dépassé les seuils", + "maintenanceAndDown": "Certains systèmes sont hors ligne pendant la maintenance", + "maintenance": "Certains systèmes sont en maintenance", + "partiallyPaused": "Certains systèmes sont en pause", + "initializing": "Certains systèmes sont en cours d'initialisation", + "noMonitors": "Aucun moniteur n'a été configuré" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Pages de statut", + "description": "Publiez des pages publiques montrant à vos clients et parties prenantes la disponibilité en temps réel et l'historique des incidents." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Créer un moniteur !", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Un moniteur de disponibilité sert à :" + "title": "Aucun moniteur de disponibilité", + "description": "Surveillez les points de terminaison HTTP, les pings, les conteneurs et les ports — soyez alerté dès qu'une panne survient." + }, + "header": { + "title": "Moniteurs de disponibilité", + "description": "Surveillez les points de terminaison HTTP, les pings, les conteneurs et les ports — soyez alerté dès qu'une panne survient." } } } diff --git a/client/src/locales/ja.json b/client/src/locales/ja.json index 7dae6c9e0..923213a46 100644 --- a/client/src/locales/ja.json +++ b/client/src/locales/ja.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "Checkmateにスターを付ける", "description": "GitHubで最新リリースを確認し、コミュニティの成長に貢献しましょう" + }, + "pageHeader": { + "links": { + "support": "サポート", + "discussions": "ディスカッション", + "docs": "ドキュメント", + "changelog": "変更履歴" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "ロールを選択" }, "linkLabel": "招待リンク" + }, + "fallback": { + "title": "チームメンバーがまだいません", + "description": "メールでチームメイトを招待するか、直接追加してください。参加すると、役割とともにここに表示されます。" } + }, + "header": { + "title": "アカウント", + "description": "プロファイル、パスワード、チーム、ワークスペースの設定を管理します。" } }, "auth": { + "brandPanel": { + "eyebrow": "オープンソースのインフラ監視", + "tagline": "サーバーのすべての動きを見守ろう。", + "description": "稼働状況、応答時間、インシデントをリアルタイムで追跡 - セルフホスト型で完全にあなたのもの。" + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Checkmateへようこそ!", "subtitle": "サインアップして始めましょう", - "submit": "登録" + "submit": "登録", + "setupNotice": "このページは初期セットアップ中のみ利用できます。スーパー管理者が登録されると、追加のユーザーはチーム設定から招待できます。" }, "forgotPassword": { "title": "パスワードをお忘れですか?", @@ -378,6 +400,14 @@ "statusCode": "ステータスコード", "location": "ロケーション" } + }, + "fallback": { + "title": "チェックがまだありません", + "description": "モニターを作成すると、すべてのステータスプローブと応答時間がここにチェックとして表示されます。" + }, + "header": { + "title": "チェック", + "description": "Checkmateがモニターに対して実行するすべてのプローブが、ステータスコードと応答時間とともにここに表示されます。" } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "稼働期間", "certificateExpiry": "証明書の有効期限", "lastCheck": "最終チェック", - "lastResponseTime": "最終応答時間" + "lastResponseTime": "最終応答時間", + "serviceIsDown": "サービスがダウンしています" }, "status": { "down": "ダウン", @@ -511,7 +542,7 @@ "ping": "pingするIPアドレスまたはホスト名を入力(例: 192.168.1.100 または example.com)し、ダッシュボードに表示される明確な表示名を追加。", "port": "サーバーのURLまたはIP、ポート番号、ダッシュボードに表示される明確な表示名を入力。", "docker": "コンテナのDocker IDを入力。Docker IDは64文字のフルDocker IDである必要があります。docker inspect を実行してフルコンテナIDを取得できます。", - "game": "", + "game": "Ping を実行する IP アドレスまたはホスト名とポート番号(例: 192.168.1.100 や example.com)を入力し、ゲームタイプを選択してください。一部のゲームでは設定ファイルでサーバークエリを有効にする必要があります — ゲームサーバーのドキュメントを確認してください。プロトコルの詳細はサポートされているゲームの一覧をご覧ください。", "pagespeed": "Webサイトのページ読み込みパフォーマンス、Core Web Vitals、最適化スコアを追跡します。", "grpc": "gRPCサーバーのホスト名とポートを入力し、必要に応じてヘルスチェック用のサービス名を指定し、表示名を追加してください。", "websocket": "監視するWebSocket URLを入力し(例: wss://example.com/socket)、表示名を追加してください。", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "インシデントなし — すべてのシステムが正常です", + "description": "モニターがダウンまたは復旧すると、タイミング、モニターの詳細、解決履歴とともにここに表示されます。" + }, "dialog": { "resolveIncident": { "title": "インシデントを解決", @@ -720,6 +755,10 @@ "active": "アクティブ", "resolved": "解決済み" } + }, + "header": { + "title": "インシデント", + "description": "モニターがダウンまたは復旧すると、インシデントがタイミング、モニターの詳細、解決履歴とともにここに表示されます。" } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "メモリ使用率", "netBytesRecv": "{{name}} - 受信バイト数", "netBytesSent": "{{name}} - 送信バイト数", + "netNoTraffic": "Capture はすべてのインターフェイスでゼロのトラフィックを報告しています。これは Capture がループバックインターフェイスのみを認識できるコンテナ内で実行されている場合に正常です — 実際のネットワークアクティビティを表示するには、ホスト上で Capture を直接実行してください。", "temp": "温度" } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "モニターを作成!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "インフラストラクチャモニターの用途:" + "title": "インフラモニターがまだありません", + "description": "サーバーのパフォーマンスを追跡し、ボトルネックを特定し、リアルタイムのインフラ監視で信頼性を確保します。" + }, + "header": { + "title": "インフラ監視", + "description": "サーバーのパフォーマンスを追跡し、ボトルネックを特定し、リアルタイムのインフラ監視で信頼性を確保します。" } }, "logs": { + "fallback": { + "title": "ログがまだありません", + "description": "サーバーのアクティビティ、警告、エラーがCheckmateの実行中にここに表示されます。" + }, "tabs": { "diagnostics": "診断", "logs": "サーバーログ", @@ -788,7 +836,9 @@ "label": "ログレベル" }, "jobQueue": "ジョブキュー", + "jobQueueExplainer": "ハイライトされた行は、現在ワーカーによって処理中のジョブです。", "failedJobs": "失敗したジョブ", + "failedJobsExplainer": "モニター別の最近の失敗 — 最終失敗時刻、失敗回数、および理由。", "noLogs": "ログが見つかりません", "metrics": { "jobs": "ジョブ", @@ -815,6 +865,16 @@ "usedSPercentage": "CPUによる1秒あたりの使用%", "total": "合計", "used": "使用済み" + }, + "sections": { + "runtimeStats": { + "title": "ランタイム統計", + "description": "Node.jsプロセスとホストマシンのスナップショット。5秒ごとに更新されます。" + }, + "memoryCpu": { + "title": "メモリとCPU", + "description": "プロセスが割り当てられたメモリとホストCPUをどのように使用しているか。" + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "最終失敗日時", "failReason": "失敗理由" } + }, + "queueFallback": { + "title": "キューにジョブがありません", + "description": "スケジュールされたモニターチェックや実行中のチェックがここに表示されます。空のキューはすべてが最新であることを意味します。" + }, + "header": { + "title": "ログとキュー", + "description": "サーバーログ、モニタージョブキュー、ランタイム診断を一か所で確認できます。" } }, "maintenanceWindow": { "fallback": { "actionButton": "メンテナンスウィンドウを作成!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "メンテナンスウィンドウの用途:" + "title": "予定されているメンテナンスウィンドウはありません", + "description": "計画されたダウンタイムをスケジュールしてアラートを抑制し、チームとユーザーに事前に知らせます。" }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "メンテナンスウィンドウ", + "description": "計画されたダウンタイムをスケジュールしてアラートを抑制し、チームとユーザーに事前に知らせます。" } }, "notifications": { "fallback": { "actionButton": "チャンネルを作成", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "通知チャンネルの用途:" + "title": "通知チャンネルがまだありません", + "description": "Slack、Discord、メール、Webhookなどを接続して、インシデント発生時に適切な担当者に通知します。" }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "チャットID", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Pushover の設定", + "description": "Pushover のアプリケーショントークンとユーザーキーを入力してください。", + "optionAppToken": "アプリトークン", + "placeholderAppToken": "アプリトークンを入力", + "optionUserKey": "ユーザーキー", + "placeholderUserKey": "ユーザーキーを入力" + }, + "twilio": { + "title": "Twilio の設定", + "description": "SMS を送信するための Twilio アカウント認証情報を入力してください。", + "optionAccountSid": "アカウント SID", + "placeholderAccountSid": "アカウント SID を入力", + "optionAuthToken": "認証トークン", + "placeholderAuthToken": "認証トークンを入力", + "optionFromNumber": "送信元番号", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "送信先番号", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "送信先" } + }, + "header": { + "title": "通知", + "description": "Slack、Discord、メール、Webhookなどを接続して、インシデント発生時に適切な担当者に通知します。" } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "モニターを作成!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "PageSpeedモニターの用途:" + "title": "PageSpeedモニターがまだありません", + "description": "Core Web VitalsとLighthouseスコアを継続的に追跡し、ユーザーが気付く前に劣化を発見します。" + }, + "header": { + "title": "PageSpeed監視", + "description": "Core Web VitalsとLighthouseスコアを継続的に追跡し、ユーザーが気付く前に劣化を発見します。" } }, "settings": { @@ -1141,7 +1241,8 @@ "description": "システムからすべてのモニターを削除します。", "dialog": { "title": "すべてのモニターを削除しますか?", - "description": "この操作は元に戻せません。" + "description": "この操作は元に戻せません。", + "paragraph": "これらのモニターに関連するチェック履歴、インシデント、予定されたメンテナンスウィンドウ、ステータスページもすべて削除されます。データのバックアップを残したい場合は、先にモニターをエクスポートしてください。" } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "以下のバリデーションエラーを修正してください:" } + }, + "header": { + "title": "設定", + "description": "SMTP、統合、保持、グローバルアプリの動作を設定します。" } }, "statusPages": { "deleteSuccess": "ステータスページが正常に削除されました", "fallback": { - "title": "ステータスページの用途:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "ステータスページを作成!" + "title": "ステータスページがまだありません", + "actionButton": "ステータスページを作成!", + "description": "顧客と関係者にリアルタイムの稼働状況とインシデント履歴を表示する公開ページを公開します。" }, "monitorsList": { "chartTypeHeatmap": "ヒートマップ", @@ -1190,7 +1295,18 @@ "allDown": "すべてのシステムがダウンしています", "allUp": "すべてのシステムが正常に稼働しています", "degraded": "一部のシステムに問題が発生しています", - "unknown": "システムステータスを判定できません" + "unknown": "システムステータスを判定できません", + "allBreached": "すべてのシステムがしきい値を超えました", + "allMaintenance": "すべてのシステムがメンテナンス中です", + "allPaused": "すべてのシステムが一時停止中です", + "allInitializing": "すべてのシステムが初期化中です", + "breachedAndDown": "一部のシステムがしきい値を超えてダウンしています", + "breached": "一部のシステムがしきい値を超えています", + "maintenanceAndDown": "一部のシステムがメンテナンス中にダウンしています", + "maintenance": "一部のシステムがメンテナンス中です", + "partiallyPaused": "一部のシステムが一時停止中です", + "initializing": "一部のシステムが初期化中です", + "noMonitors": "モニターが設定されていません" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "ステータスページ", + "description": "顧客と関係者にリアルタイムの稼働状況とインシデント履歴を表示する公開ページを公開します。" } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "モニターを作成!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "稼働時間モニターの用途:" + "title": "アップタイムモニターがまだありません", + "description": "HTTPエンドポイント、Ping、コンテナ、ポートを監視し、ダウンした瞬間に通知を受け取ります。" + }, + "header": { + "title": "稼働監視", + "description": "HTTPエンドポイント、Ping、コンテナ、ポートを監視し、ダウンした瞬間に通知を受け取ります。" } } } diff --git a/client/src/locales/pt-BR.json b/client/src/locales/pt-BR.json index 9b292dd68..f7b7c4cbc 100644 --- a/client/src/locales/pt-BR.json +++ b/client/src/locales/pt-BR.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "Avalie o Checkmate", "description": "Veja os últimos lançamentos e ajude a comunidade a crescer no GitHub" + }, + "pageHeader": { + "links": { + "support": "Suporte", + "discussions": "Discussões", + "docs": "Documentação", + "changelog": "Notas de versão" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "Selecione uma função" }, "linkLabel": "Link de convite" + }, + "fallback": { + "title": "Ainda não há membros na equipe", + "description": "Convide colegas por e-mail ou adicione-os diretamente. Assim que entrarem, aparecerão aqui com sua função." } + }, + "header": { + "title": "Conta", + "description": "Gerencie seu perfil, senha, equipe e preferências de workspace." } }, "auth": { + "brandPanel": { + "eyebrow": "Monitoramento de infraestrutura open-source", + "tagline": "Acompanhe cada passo dos seus servidores.", + "description": "Monitoramento em tempo real de disponibilidade, tempo de resposta e incidentes - auto-hospedado e seu." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Bem-vindo ao Checkmate!", "subtitle": "Cadastre-se para começar", - "submit": "Cadastrar" + "submit": "Cadastrar", + "setupNotice": "Esta página está disponível apenas durante a configuração inicial. Após o registro de um super administrador, usuários adicionais podem ser convidados a partir das configurações da equipe." }, "forgotPassword": { "title": "Esqueceu sua senha?", @@ -378,6 +400,14 @@ "statusCode": "Código de status", "location": "Localização" } + }, + "fallback": { + "title": "Ainda não há verificações", + "description": "Assim que você criar um monitor, cada sondagem de status e tempo de resposta aparecerá aqui como uma verificação." + }, + "header": { + "title": "Verificações", + "description": "Cada sonda que o Checkmate executa contra seus monitores aparece aqui com código de status e tempo de resposta." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Ativo há", "certificateExpiry": "Validade do certificado", "lastCheck": "Última verificação", - "lastResponseTime": "Último tempo de resposta" + "lastResponseTime": "Último tempo de resposta", + "serviceIsDown": "O serviço está fora do ar" }, "status": { "down": "fora do ar", @@ -511,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.", "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 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 lista de jogos suportados 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.", "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.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Sem incidentes — todos os sistemas saudáveis", + "description": "Quando um monitor falha ou se recupera, o incidente aparecerá aqui com horários, detalhes do monitor e histórico de resolução." + }, "dialog": { "resolveIncident": { "title": "Resolver incidente", @@ -720,6 +755,10 @@ "active": "Ativo", "resolved": "Resolvido" } + }, + "header": { + "title": "Incidentes", + "description": "Quando um monitor falha ou se recupera, os incidentes aparecem aqui com horários, detalhes do monitor e histórico de resolução." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Uso de memória", "netBytesRecv": "{{name}} - Bytes recebidos", "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" } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "Criar um monitor!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Um monitor de infraestrutura é usado para:" + "title": "Ainda não há monitores de infraestrutura", + "description": "Acompanhe o desempenho dos servidores, identifique gargalos e garanta confiabilidade com monitoramento em tempo real." + }, + "header": { + "title": "Monitores de infraestrutura", + "description": "Acompanhe o desempenho dos servidores, identifique gargalos e garanta confiabilidade com monitoramento em tempo real." } }, "logs": { + "fallback": { + "title": "Ainda não há logs", + "description": "Atividade do servidor, avisos e erros aparecerão aqui enquanto o Checkmate roda." + }, "tabs": { "diagnostics": "Diagnóstico", "logs": "Logs do servidor", @@ -788,7 +836,9 @@ "label": "Nível de log" }, "jobQueue": "Fila de tarefas", + "jobQueueExplainer": "As linhas destacadas são as tarefas que estão sendo processadas atualmente por um worker.", "failedJobs": "Tarefas com falha", + "failedJobsExplainer": "Falhas recentes por monitor — horário da última falha, contagem de falhas e o motivo.", "noLogs": "Nenhum log encontrado", "metrics": { "jobs": "Tarefas", @@ -815,6 +865,16 @@ "usedSPercentage": "% de 1s usado pela CPU", "total": "Total", "used": "Usado" + }, + "sections": { + "runtimeStats": { + "title": "Estatísticas de execução", + "description": "Snapshot do processo Node.js e da máquina host. Atualiza a cada 5 segundos." + }, + "memoryCpu": { + "title": "Memória e CPU", + "description": "Como o processo está usando a memória alocada e a CPU do host." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Última falha em", "failReason": "Motivo da falha" } + }, + "queueFallback": { + "title": "Sem tarefas na fila", + "description": "Verificações de monitores agendadas ou em execução aparecerão aqui. Uma fila vazia significa que tudo está em dia." + }, + "header": { + "title": "Logs e fila", + "description": "Inspecione logs do servidor, fila de tarefas de monitor e diagnósticos de runtime em um só lugar." } }, "maintenanceWindow": { "fallback": { "actionButton": "Criar uma janela de manutenção!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Uma janela de manutenção é usada para:" + "title": "Nenhuma janela de manutenção agendada", + "description": "Programe paradas planejadas para que os alertas sejam suprimidos e sua equipe e usuários saibam o que esperar." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Janelas de manutenção", + "description": "Programe paradas planejadas para que os alertas sejam suprimidos e sua equipe e usuários saibam o que esperar." } }, "notifications": { "fallback": { "actionButton": "Criar um canal", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Canais de notificação são usados para:" + "title": "Ainda não há canais de notificação", + "description": "Conecte Slack, Discord, e-mail, webhooks e outros para que as pessoas certas saibam dos incidentes assim que acontecerem." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "ID do chat", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Configuração do Pushover", + "description": "Insira o token de aplicação e a chave de usuário do Pushover.", + "optionAppToken": "Token de aplicação", + "placeholderAppToken": "Insira o token de aplicação", + "optionUserKey": "Chave de usuário", + "placeholderUserKey": "Insira a chave de usuário" + }, + "twilio": { + "title": "Configuração do Twilio", + "description": "Insira as credenciais da conta Twilio para enviar SMS.", + "optionAccountSid": "SID da conta", + "placeholderAccountSid": "Insira o SID da conta", + "optionAuthToken": "Token de autenticação", + "placeholderAuthToken": "Insira o token de autenticação", + "optionFromNumber": "Número de origem", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Número de destino", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Destino" } + }, + "header": { + "title": "Notificações", + "description": "Conecte Slack, Discord, e-mail, webhooks e outros para que as pessoas certas saibam dos incidentes assim que acontecerem." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Criar um monitor!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Um monitor PageSpeed é usado para:" + "title": "Ainda não há monitores PageSpeed", + "description": "Acompanhe Core Web Vitals e pontuações do Lighthouse ao longo do tempo para detectar regressões antes dos seus usuários." + }, + "header": { + "title": "Monitores PageSpeed", + "description": "Acompanhe Core Web Vitals e pontuações do Lighthouse ao longo do tempo para detectar regressões antes dos seus usuários." } }, "settings": { @@ -1137,11 +1237,12 @@ "description": "Adicione monitores de exemplo para fins de demonstração." }, "removeMonitors": { - "title": "Redefinição do sistema", - "description": "Remova todos os monitores do seu sistema.", + "title": "Redefinir sistema", + "description": "Remover todos os monitores do seu sistema.", "dialog": { "title": "Remover todos os monitores?", - "description": "Isso não pode ser desfeito." + "description": "Esta ação não pode ser desfeita.", + "paragraph": "Todo o histórico de verificações, incidentes, janelas de manutenção agendadas e páginas de status que usavam esses monitores também serão removidos. Exporte os monitores antes se quiser manter uma cópia de segurança dos dados." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Por favor, corrija os seguintes erros de validação:" } + }, + "header": { + "title": "Configurações", + "description": "Configure SMTP, integrações, retenção e comportamento global do app." } }, "statusPages": { "deleteSuccess": "Página de status excluída com sucesso", "fallback": { - "title": "Uma página de status é usada para:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Criar uma página de status!" + "title": "Ainda não há páginas de status", + "actionButton": "Criar uma página de status!", + "description": "Publique uma página pública que mostre aos seus clientes e partes interessadas o tempo de atividade em tempo real e o histórico de incidentes." }, "monitorsList": { "chartTypeHeatmap": "Mapa de calor", @@ -1190,7 +1295,18 @@ "allDown": "Todos os sistemas estão fora do ar", "allUp": "Todos os sistemas operacionais", "degraded": "Alguns sistemas estão com problemas", - "unknown": "Não foi possível determinar o status do sistema" + "unknown": "Não foi possível determinar o status do sistema", + "allBreached": "Todos os sistemas excederam os limites", + "allMaintenance": "Todos os sistemas estão em manutenção", + "allPaused": "Todos os sistemas estão pausados", + "allInitializing": "Todos os sistemas estão inicializando", + "breachedAndDown": "Alguns sistemas excederam os limites e estão fora do ar", + "breached": "Alguns sistemas excederam os limites", + "maintenanceAndDown": "Alguns sistemas estão fora do ar durante a manutenção", + "maintenance": "Alguns sistemas estão em manutenção", + "partiallyPaused": "Alguns sistemas estão pausados", + "initializing": "Alguns sistemas estão inicializando", + "noMonitors": "Nenhum monitor foi configurado" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Páginas de status", + "description": "Publique páginas públicas que mostram aos seus clientes e partes interessadas o tempo de atividade em tempo real e o histórico de incidentes." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Criar um monitor!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Um monitor de uptime é usado para:" + "title": "Ainda não há monitores de uptime", + "description": "Acompanhe endpoints HTTP, pings, contêineres e portas — receba alertas no momento em que algo falhar." + }, + "header": { + "title": "Monitores de uptime", + "description": "Acompanhe endpoints HTTP, pings, contêineres e portas — receba alertas no momento em que algo falhar." } } } diff --git a/client/src/locales/ru.json b/client/src/locales/ru.json index 461187454..1a5d12452 100644 --- a/client/src/locales/ru.json +++ b/client/src/locales/ru.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "Star Checkmate", "description": "Следите за последними релизами и помогайте развивать сообщество на GitHub" + }, + "pageHeader": { + "links": { + "support": "Поддержка", + "discussions": "Обсуждения", + "docs": "Документация", + "changelog": "Журнал изменений" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "Выберите роль" }, "linkLabel": "Ссылка-приглашение" + }, + "fallback": { + "title": "Пока нет участников команды", + "description": "Пригласите коллег по электронной почте или добавьте их напрямую. Как только они присоединятся, они появятся здесь со своей ролью." } + }, + "header": { + "title": "Учётная запись", + "description": "Управляйте профилем, паролем, командой и настройками рабочего пространства." } }, "auth": { + "brandPanel": { + "eyebrow": "Мониторинг инфраструктуры с открытым исходным кодом", + "tagline": "Следите за каждым шагом ваших серверов.", + "description": "Мониторинг доступности, времени отклика и инцидентов в реальном времени - self-hosted и принадлежит вам." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "С возвращением в Checkmate!", "subtitle": "Зарегистрируйтесь, чтобы начать", - "submit": "Регистрация" + "submit": "Регистрация", + "setupNotice": "Эта страница доступна только во время первоначальной настройки. После регистрации суперадминистратора дополнительных пользователей можно пригласить из настроек команды." }, "forgotPassword": { "title": "Забыли пароль?", @@ -378,6 +400,14 @@ "statusCode": "Код статуса", "location": "Расположение" } + }, + "fallback": { + "title": "Пока нет проверок", + "description": "Как только вы создадите монитор, каждая проверка состояния и время отклика появятся здесь." + }, + "header": { + "title": "Проверки", + "description": "Каждый зонд, который Checkmate выполняет к вашим мониторам, появится здесь с кодом состояния и временем отклика." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Активен", "certificateExpiry": "Истечение сертификата", "lastCheck": "Последняя проверка", - "lastResponseTime": "Последнее время ответа" + "lastResponseTime": "Последнее время ответа", + "serviceIsDown": "Сервис недоступен" }, "status": { "down": "недоступен", @@ -511,7 +542,7 @@ "ping": "Ведите IP-адрес или имя хоста для пинга (например, 192.168.1.100 или example.com) и добавьте понятное имя, которое будет отображаться на панели инструментов.", "port": "Введите URL-адрес или IP-адрес сервера, номер порта и понятное имя, которое будет отображаться на панели инструментов.", "docker": "Введите Docker ID вашего контейнера. Docker ID должен быть полным 64-символьным Docker ID. Вы можете запустить docker inspect , чтобы получить полный ID контейнера.", - "game": "Введите IP-адрес или имя хоста и номер порта для пинга (например, 192.168.1.100 или example.com) и выберите тип игры.", + "game": "Введите IP-адрес или имя хоста и номер порта для пинга (например, 192.168.1.100 или example.com) и выберите тип игры. Некоторым играм требуется включить серверные запросы в файле конфигурации — проверьте документацию вашего игрового сервера. См. список поддерживаемых игр для деталей протокола.", "pagespeed": "Отслеживайте производительность загрузки, Core Web Vitals и показатели оптимизации для Вашего сайта.", "grpc": "Введите имя хоста и порт gRPC-сервера, при необходимости укажите имя сервиса для проверки состояния и добавьте отображаемое имя.", "websocket": "Введите WebSocket URL для мониторинга (напр., wss://example.com/socket) и добавьте отображаемое имя.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Инцидентов нет — все системы исправны", + "description": "Когда монитор перестаёт работать или восстанавливается, инцидент появится здесь со временем, деталями монитора и историей решения." + }, "dialog": { "resolveIncident": { "title": "Решить инцидент", @@ -720,6 +755,10 @@ "active": "Активный", "resolved": "Решён" } + }, + "header": { + "title": "Инциденты", + "description": "Когда монитор перестаёт работать или восстанавливается, инцидент появляется здесь со временем, деталями монитора и историей решения." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Использование памяти", "netBytesRecv": "{{name}} - байт получено", "netBytesSent": "{{name}} - байт отправлено", + "netNoTraffic": "Capture сообщает о нулевом трафике на всех интерфейсах. Это нормально, когда Capture работает внутри контейнера, который видит только loopback-интерфейсы — запустите Capture непосредственно на хосте, чтобы увидеть реальную сетевую активность.", "temp": "Температура" } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "Создать монитор!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Монитор инфраструктуры используется для:" + "title": "Пока нет инфраструктурных мониторов", + "description": "Отслеживайте производительность серверов, выявляйте узкие места и обеспечивайте надёжность с мониторингом в реальном времени." + }, + "header": { + "title": "Инфраструктурные мониторы", + "description": "Отслеживайте производительность серверов, выявляйте узкие места и обеспечивайте надёжность с мониторингом в реальном времени." } }, "logs": { + "fallback": { + "title": "Пока нет журналов", + "description": "Активность сервера, предупреждения и ошибки появятся здесь во время работы Checkmate." + }, "tabs": { "diagnostics": "Диагностика", "logs": "Серверные логи", @@ -788,7 +836,9 @@ "label": "Уровень логов" }, "jobQueue": "Очередь заданий", + "jobQueueExplainer": "Выделенные строки — это задания, которые в данный момент обрабатываются воркером.", "failedJobs": "Неудачные задания", + "failedJobsExplainer": "Недавние сбои по мониторам — время последнего сбоя, количество сбоев и причина.", "noLogs": "Логи не найдены", "metrics": { "jobs": "Задания", @@ -815,6 +865,16 @@ "usedSPercentage": "% 1с использовано CPU", "total": "Всего", "used": "Использовано" + }, + "sections": { + "runtimeStats": { + "title": "Статистика выполнения", + "description": "Снимок процесса Node.js и хост-машины. Обновляется каждые 5 секунд." + }, + "memoryCpu": { + "title": "Память и ЦП", + "description": "Как процесс использует выделенную память и ЦП хоста." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Последняя ошибка", "failReason": "Причина ошибки" } + }, + "queueFallback": { + "title": "В очереди нет заданий", + "description": "Запланированные или выполняемые проверки мониторов будут отображаться здесь. Пустая очередь означает, что всё актуально." + }, + "header": { + "title": "Журналы и очередь", + "description": "Изучайте журналы сервера, очередь заданий мониторов и диагностику в одном месте." } }, "maintenanceWindow": { "fallback": { "actionButton": "Создать окно обслуживания!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Окно обслуживания используется для:" + "title": "Нет запланированных окон обслуживания", + "description": "Планируйте плановые простои, чтобы оповещения были подавлены, а команда и пользователи знали, чего ожидать." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Окна обслуживания", + "description": "Планируйте плановые простои, чтобы оповещения были подавлены, а команда и пользователи знали, чего ожидать." } }, "notifications": { "fallback": { "actionButton": "Создать канал", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Каналы уведомлений используются для:" + "title": "Пока нет каналов уведомлений", + "description": "Подключите Slack, Discord, email, вебхуки и другое, чтобы нужные люди узнавали об инцидентах сразу же." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "ID чата", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Настройка Pushover", + "description": "Введите токен приложения и ключ пользователя Pushover.", + "optionAppToken": "Токен приложения", + "placeholderAppToken": "Введите токен приложения", + "optionUserKey": "Ключ пользователя", + "placeholderUserKey": "Введите ключ пользователя" + }, + "twilio": { + "title": "Настройка Twilio", + "description": "Введите учётные данные аккаунта Twilio для отправки SMS.", + "optionAccountSid": "SID аккаунта", + "placeholderAccountSid": "Введите SID аккаунта", + "optionAuthToken": "Токен аутентификации", + "placeholderAuthToken": "Введите токен аутентификации", + "optionFromNumber": "Номер отправителя", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Номер получателя", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Назначение" } + }, + "header": { + "title": "Уведомления", + "description": "Подключите Slack, Discord, email, вебхуки и другое, чтобы нужные люди узнавали об инцидентах сразу же." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Создать монитор!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Монитор PageSpeed используется для:" + "title": "Пока нет мониторов PageSpeed", + "description": "Отслеживайте Core Web Vitals и оценки Lighthouse во времени, чтобы заметить регрессии раньше пользователей." + }, + "header": { + "title": "Мониторы PageSpeed", + "description": "Отслеживайте Core Web Vitals и оценки Lighthouse во времени, чтобы заметить регрессии раньше пользователей." } }, "settings": { @@ -1138,10 +1238,11 @@ }, "removeMonitors": { "title": "Сброс системы", - "description": "Удалить все мониторы из Вашей системы.", + "description": "Удалить все мониторы из вашей системы.", "dialog": { "title": "Удалить все мониторы?", - "description": "Это действие нельзя отменить." + "description": "Это действие нельзя отменить.", + "paragraph": "Также будут удалены вся история проверок, инциденты, запланированные окна обслуживания и страницы состояния, использовавшие эти мониторы. Сначала экспортируйте мониторы, если хотите сохранить резервную копию их данных." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Пожалуйста, исправьте следующие ошибки валидации:" } + }, + "header": { + "title": "Настройки", + "description": "Настройте SMTP, интеграции, сроки хранения и общее поведение приложения." } }, "statusPages": { "deleteSuccess": "Страница статуса успешно удалена", "fallback": { - "title": "Страница статуса используется для:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Создать страницу статуса!" + "title": "Пока нет страниц состояния", + "actionButton": "Создать страницу статуса!", + "description": "Опубликуйте публичную страницу, показывающую клиентам и заинтересованным сторонам реальное время работы и историю инцидентов." }, "monitorsList": { "chartTypeHeatmap": "Тепловая карта", @@ -1190,7 +1295,18 @@ "allDown": "Все системы недоступны", "allUp": "Все системы работают", "degraded": "Некоторые системы испытывают проблемы", - "unknown": "Не удаётся определить статус системы" + "unknown": "Не удаётся определить статус системы", + "allBreached": "Все системы превысили пороговые значения", + "allMaintenance": "Все системы на техническом обслуживании", + "allPaused": "Все системы приостановлены", + "allInitializing": "Все системы инициализируются", + "breachedAndDown": "Некоторые системы превысили пороги и недоступны", + "breached": "Некоторые системы превысили пороги", + "maintenanceAndDown": "Некоторые системы недоступны во время техобслуживания", + "maintenance": "Некоторые системы на техобслуживании", + "partiallyPaused": "Некоторые системы приостановлены", + "initializing": "Некоторые системы инициализируются", + "noMonitors": "Мониторы не настроены" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Страницы состояния", + "description": "Публикуйте публичные страницы со временем работы и историей инцидентов для клиентов и заинтересованных сторон." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Создать монитор!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Монитор аптайма используется для:" + "title": "Пока нет мониторов работоспособности", + "description": "Наблюдайте за HTTP-конечными точками, пингами, контейнерами и портами — получайте уведомления в момент отказа." + }, + "header": { + "title": "Мониторы работоспособности", + "description": "Наблюдайте за HTTP-конечными точками, пингами, контейнерами и портами — получайте уведомления в момент отказа." } } } diff --git a/client/src/locales/th.json b/client/src/locales/th.json index cf92d999f..433ee10cd 100644 --- a/client/src/locales/th.json +++ b/client/src/locales/th.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "ให้ดาว Checkmate", "description": "ดูรุ่นล่าสุดและช่วยเติบโตชุมชนบน GitHub" + }, + "pageHeader": { + "links": { + "support": "ฝ่ายสนับสนุน", + "discussions": "การสนทนา", + "docs": "เอกสาร", + "changelog": "บันทึกการเปลี่ยนแปลง" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "เลือกบทบาท" }, "linkLabel": "ลิงก์เชิญ" + }, + "fallback": { + "title": "ยังไม่มีสมาชิกทีม", + "description": "เชิญเพื่อนร่วมทีมทางอีเมลหรือเพิ่มพวกเขาโดยตรง เมื่อพวกเขาเข้าร่วม พวกเขาจะปรากฏที่นี่พร้อมบทบาทของพวกเขา" } + }, + "header": { + "title": "บัญชี", + "description": "จัดการโปรไฟล์ รหัสผ่าน ทีม และการตั้งค่าพื้นที่ทำงานของคุณ" } }, "auth": { + "brandPanel": { + "eyebrow": "การมอนิเตอร์โครงสร้างพื้นฐานโอเพนซอร์ส", + "tagline": "คอยจับตาดูทุกการเคลื่อนไหวของเซิร์ฟเวอร์ของคุณ", + "description": "ติดตามสถานะ เวลาตอบสนอง และเหตุการณ์ผิดปกติแบบเรียลไทม์ - โฮสต์เองและเป็นของคุณ" + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "ยินดีต้อนรับกลับสู่ Checkmate!", "subtitle": "สมัครสมาชิกเพื่อเริ่มต้น", - "submit": "ลงทะเบียน" + "submit": "ลงทะเบียน", + "setupNotice": "หน้านี้พร้อมใช้งานเฉพาะระหว่างการตั้งค่าเริ่มต้นเท่านั้น เมื่อลงทะเบียนผู้ดูแลระบบสูงสุดแล้ว สามารถเชิญผู้ใช้เพิ่มเติมได้จากการตั้งค่าทีม" }, "forgotPassword": { "title": "ลืมรหัสผ่านใช่ไหม?", @@ -378,6 +400,14 @@ "statusCode": "รหัสสถานะ", "location": "ตำแหน่ง" } + }, + "fallback": { + "title": "ยังไม่มีการตรวจสอบ", + "description": "เมื่อคุณสร้างตัวตรวจสอบ การตรวจสอบสถานะและเวลาตอบสนองทุกครั้งจะปรากฏที่นี่เป็นการตรวจสอบ" + }, + "header": { + "title": "การตรวจสอบ", + "description": "การตรวจสอบทุกครั้งที่ Checkmate ทำกับตัวตรวจสอบของคุณจะปรากฏที่นี่พร้อมรหัสสถานะและเวลาตอบสนอง" } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "ทำงานมาแล้ว", "certificateExpiry": "วันหมดอายุใบรับรอง", "lastCheck": "ตรวจสอบล่าสุด", - "lastResponseTime": "เวลาตอบสนองล่าสุด" + "lastResponseTime": "เวลาตอบสนองล่าสุด", + "serviceIsDown": "บริการขัดข้อง" }, "status": { "down": "ล่ม", @@ -511,7 +542,7 @@ "ping": "กรอกที่อยู่ IP หรือชื่อโฮสต์ที่ต้องการ ping (เช่น 192.168.1.100 หรือ example.com) และตั้งชื่อที่ชัดเจนให้แสดงบนแดชบอร์ด", "port": "กรอก URL หรือ IP ของเซิร์ฟเวอร์ หมายเลขพอร์ต และตั้งชื่อที่ชัดเจนให้แสดงบนแดชบอร์ด", "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) และเลือกประเภทเกม เกมบางเกมต้องเปิดใช้งานการสอบถามเซิร์ฟเวอร์ในไฟล์การตั้งค่า — โปรดดูเอกสารของเซิร์ฟเวอร์เกมของคุณ ดูรายการเกมที่รองรับสำหรับรายละเอียดของโปรโตคอล", "pagespeed": "ติดตามประสิทธิภาพการโหลดหน้า Core Web Vitals และคะแนนการเพิ่มประสิทธิภาพของเว็บไซต์", "grpc": "กรอกชื่อโฮสต์และพอร์ตของเซิร์ฟเวอร์ gRPC ระบุชื่อบริการสำหรับ health check (ไม่บังคับ) และตั้งชื่อที่แสดง", "websocket": "กรอก URL ของ WebSocket ที่ต้องการตรวจสอบ (เช่น wss://example.com/socket) และตั้งชื่อที่แสดง", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "ไม่มีเหตุการณ์ — ระบบทั้งหมดทำงานปกติ", + "description": "เมื่อตัวตรวจสอบล่มหรือฟื้นตัว เหตุการณ์จะปรากฏที่นี่พร้อมเวลา รายละเอียดตัวตรวจสอบ และประวัติการแก้ไข" + }, "dialog": { "resolveIncident": { "title": "แก้ไขเหตุการณ์", @@ -720,6 +755,10 @@ "active": "ใช้งานอยู่", "resolved": "แก้ไขแล้ว" } + }, + "header": { + "title": "เหตุการณ์", + "description": "เมื่อตัวตรวจสอบล่มหรือฟื้นตัว เหตุการณ์จะปรากฏที่นี่พร้อมเวลา รายละเอียดตัวตรวจสอบ และประวัติการแก้ไข" } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "การใช้งานหน่วยความจำ", "netBytesRecv": "{{name}} - ไบต์ที่รับ", "netBytesSent": "{{name}} - ไบต์ที่ส่ง", + "netNoTraffic": "Capture รายงานว่าไม่มีการรับส่งข้อมูลบนอินเทอร์เฟซใดๆ เลย ซึ่งเป็นเรื่องปกติเมื่อ Capture ทำงานอยู่ในคอนเทนเนอร์ที่มองเห็นเพียงอินเทอร์เฟซ loopback เท่านั้น — รัน Capture บนโฮสต์โดยตรงเพื่อดูกิจกรรมเครือข่ายจริง", "temp": "อุณหภูมิ" } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "สร้างมอนิเตอร์!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "มอนิเตอร์โครงสร้างพื้นฐานใช้เพื่อ:" + "title": "ยังไม่มีตัวตรวจสอบโครงสร้างพื้นฐาน", + "description": "ติดตามประสิทธิภาพเซิร์ฟเวอร์ ระบุคอขวด และมั่นใจในความน่าเชื่อถือด้วยการตรวจสอบโครงสร้างพื้นฐานแบบเรียลไทม์" + }, + "header": { + "title": "ตัวตรวจสอบโครงสร้างพื้นฐาน", + "description": "ติดตามประสิทธิภาพเซิร์ฟเวอร์ ระบุคอขวด และมั่นใจในความน่าเชื่อถือด้วยการตรวจสอบโครงสร้างพื้นฐานแบบเรียลไทม์" } }, "logs": { + "fallback": { + "title": "ยังไม่มีบันทึก", + "description": "กิจกรรมเซิร์ฟเวอร์ คำเตือน และข้อผิดพลาดจะปรากฏที่นี่ในขณะที่ Checkmate ทำงาน" + }, "tabs": { "diagnostics": "วินิจฉัย", "logs": "Logs เซิร์ฟเวอร์", @@ -788,7 +836,9 @@ "label": "ระดับบันทึก" }, "jobQueue": "คิวงาน", + "jobQueueExplainer": "แถวที่ไฮไลต์ คืองานที่กำลังถูกประมวลผลโดยเวิร์กเกอร์อยู่ในขณะนี้", "failedJobs": "งานที่ล้มเหลว", + "failedJobsExplainer": "ความล้มเหลวล่าสุดตามมอนิเตอร์ — เวลาที่ล้มเหลวล่าสุด จำนวนครั้งที่ล้มเหลว และเหตุผล", "noLogs": "ไม่พบบันทึก", "metrics": { "jobs": "งาน", @@ -815,6 +865,16 @@ "usedSPercentage": "% ของ 1 วินาทีที่ CPU ใช้", "total": "ทั้งหมด", "used": "ใช้แล้ว" + }, + "sections": { + "runtimeStats": { + "title": "สถิติรันไทม์", + "description": "ภาพรวมของโปรเซส Node.js และเครื่องโฮสต์ อัปเดตทุก 5 วินาที" + }, + "memoryCpu": { + "title": "หน่วยความจำและ CPU", + "description": "กระบวนการใช้หน่วยความจำที่จัดสรรและ CPU ของโฮสต์อย่างไร" + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "ล้มเหลวล่าสุดเมื่อ", "failReason": "สาเหตุที่ล้มเหลว" } + }, + "queueFallback": { + "title": "ไม่มีงานในคิว", + "description": "การตรวจสอบตัวตรวจสอบที่กำหนดเวลาหรือกำลังทำงานจะปรากฏที่นี่ คิวที่ว่างหมายความว่าทุกอย่างเป็นปัจจุบัน" + }, + "header": { + "title": "บันทึกและคิว", + "description": "ตรวจสอบบันทึกเซิร์ฟเวอร์ คิวงานตัวตรวจสอบ และการวินิจฉัยรันไทม์ในที่เดียว" } }, "maintenanceWindow": { "fallback": { "actionButton": "สร้างช่วงเวลาบำรุงรักษา!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "ช่วงเวลาบำรุงรักษาใช้เพื่อ:" + "title": "ไม่มีช่วงเวลาบำรุงรักษาที่กำหนด", + "description": "กำหนดเวลาหยุดทำงานเพื่อระงับการแจ้งเตือน และให้ทีมและผู้ใช้รู้ถึงสิ่งที่จะเกิดขึ้น" }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "ช่วงเวลาบำรุงรักษา", + "description": "กำหนดเวลาหยุดทำงานเพื่อระงับการแจ้งเตือน และให้ทีมและผู้ใช้รู้ถึงสิ่งที่จะเกิดขึ้น" } }, "notifications": { "fallback": { "actionButton": "สร้างช่องทาง", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "ช่องทางการแจ้งเตือนใช้เพื่อ:" + "title": "ยังไม่มีช่องทางการแจ้งเตือน", + "description": "เชื่อมต่อ Slack, Discord, อีเมล, webhooks และอื่น ๆ เพื่อให้คนที่ถูกต้องรู้เกี่ยวกับเหตุการณ์ทันทีที่เกิดขึ้น" }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "Chat ID", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "การตั้งค่า Pushover", + "description": "ป้อนโทเค็นแอปและคีย์ผู้ใช้ Pushover ของคุณ", + "optionAppToken": "โทเค็นแอป", + "placeholderAppToken": "ป้อนโทเค็นแอป", + "optionUserKey": "คีย์ผู้ใช้", + "placeholderUserKey": "ป้อนคีย์ผู้ใช้" + }, + "twilio": { + "title": "การตั้งค่า Twilio", + "description": "ป้อนข้อมูลรับรองบัญชี Twilio เพื่อส่ง SMS", + "optionAccountSid": "SID บัญชี", + "placeholderAccountSid": "ป้อน SID บัญชี", + "optionAuthToken": "โทเค็นการรับรอง", + "placeholderAuthToken": "ป้อนโทเค็นการรับรอง", + "optionFromNumber": "หมายเลขผู้ส่ง", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "หมายเลขผู้รับ", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "ปลายทาง" } + }, + "header": { + "title": "การแจ้งเตือน", + "description": "เชื่อมต่อ Slack, Discord, อีเมล, webhooks และอื่น ๆ เพื่อให้คนที่ถูกต้องรู้เกี่ยวกับเหตุการณ์ทันทีที่เกิดขึ้น" } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "สร้างมอนิเตอร์!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "มอนิเตอร์ PageSpeed ใช้เพื่อ:" + "title": "ยังไม่มีตัวตรวจสอบ PageSpeed", + "description": "ติดตาม Core Web Vitals และคะแนน Lighthouse เพื่อจับความถดถอยก่อนที่ผู้ใช้จะสังเกตเห็น" + }, + "header": { + "title": "ตัวตรวจสอบ PageSpeed", + "description": "ติดตาม Core Web Vitals และคะแนน Lighthouse เพื่อจับความถดถอยก่อนที่ผู้ใช้จะสังเกตเห็น" } }, "settings": { @@ -1138,10 +1238,11 @@ }, "removeMonitors": { "title": "รีเซ็ตระบบ", - "description": "ลบมอนิเตอร์ทั้งหมดออกจากระบบ", + "description": "ลบมอนิเตอร์ทั้งหมดจากระบบของคุณ", "dialog": { "title": "ลบมอนิเตอร์ทั้งหมด?", - "description": "ไม่สามารถย้อนกลับได้" + "description": "การกระทำนี้ไม่สามารถย้อนกลับได้", + "paragraph": "ประวัติการตรวจสอบทั้งหมด เหตุการณ์ ช่วงเวลาบำรุงรักษาที่กำหนดไว้ และหน้าสถานะที่ใช้มอนิเตอร์เหล่านี้จะถูกลบไปด้วย ส่งออกมอนิเตอร์ก่อนหากต้องการเก็บสำเนาข้อมูลสำรองไว้" } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "กรุณาแก้ไขข้อผิดพลาดการตรวจสอบต่อไปนี้:" } + }, + "header": { + "title": "การตั้งค่า", + "description": "กำหนดค่า SMTP, การผสานรวม, การเก็บรักษา และพฤติกรรมแอปทั่วโลก" } }, "statusPages": { "deleteSuccess": "ลบหน้าสถานะสำเร็จ", "fallback": { - "title": "หน้าสถานะใช้เพื่อ:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "สร้างหน้าสถานะ!" + "title": "ยังไม่มีหน้าสถานะ", + "actionButton": "สร้างหน้าสถานะ!", + "description": "เผยแพร่หน้าสาธารณะที่แสดง uptime แบบเรียลไทม์และประวัติเหตุการณ์ให้กับลูกค้าและผู้มีส่วนได้ส่วนเสีย" }, "monitorsList": { "chartTypeHeatmap": "แผนที่ความร้อน", @@ -1190,7 +1295,18 @@ "allDown": "ระบบทั้งหมดล่ม", "allUp": "ระบบทั้งหมดทำงานปกติ", "degraded": "บางระบบกำลังประสบปัญหา", - "unknown": "ไม่สามารถระบุสถานะระบบได้" + "unknown": "ไม่สามารถระบุสถานะระบบได้", + "allBreached": "ทุกระบบเกินขีดจำกัด", + "allMaintenance": "ทุกระบบอยู่ระหว่างการบำรุงรักษา", + "allPaused": "ทุกระบบถูกหยุดชั่วคราว", + "allInitializing": "ทุกระบบกำลังเริ่มต้น", + "breachedAndDown": "บางระบบเกินขีดจำกัดและขัดข้อง", + "breached": "บางระบบเกินขีดจำกัด", + "maintenanceAndDown": "บางระบบขัดข้องระหว่างการบำรุงรักษา", + "maintenance": "บางระบบอยู่ระหว่างการบำรุงรักษา", + "partiallyPaused": "บางระบบถูกหยุดชั่วคราว", + "initializing": "บางระบบกำลังเริ่มต้น", + "noMonitors": "ยังไม่มีการกำหนดค่ามอนิเตอร์" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "หน้าสถานะ", + "description": "เผยแพร่หน้าสาธารณะที่แสดง uptime แบบเรียลไทม์และประวัติเหตุการณ์ให้กับลูกค้าและผู้มีส่วนได้ส่วนเสีย" } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "สร้างมอนิเตอร์!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "มอนิเตอร์อัปไทม์ใช้เพื่อ:" + "title": "ยังไม่มีตัวตรวจสอบ uptime", + "description": "ติดตาม HTTP endpoints, ping, คอนเทนเนอร์ และพอร์ต — รับการแจ้งเตือนทันทีที่บางอย่างล่ม" + }, + "header": { + "title": "ตัวตรวจสอบ uptime", + "description": "ติดตาม HTTP endpoints, ping, คอนเทนเนอร์ และพอร์ต — รับการแจ้งเตือนทันทีที่บางอย่างล่ม" } } } diff --git a/client/src/locales/tr.json b/client/src/locales/tr.json index 43f0a8041..a77dd8eb3 100644 --- a/client/src/locales/tr.json +++ b/client/src/locales/tr.json @@ -35,7 +35,7 @@ "sendInvite": "Davet gönder", "test": "Test", "testNotifications": "Bildirimleri test et", - "toggleTheme": "", + "toggleTheme": "Açık / koyu temayı değiştir", "flushQueue": "Kuyruğu temizle", "notFound": "Ana panele git", "resetPassword": "Parolayı sıfırla", @@ -86,7 +86,7 @@ "name": { "option": { "firstName": { - "label": "", + "label": "Ad", "placeholder": "Jordan" }, "lastName": { @@ -155,13 +155,13 @@ "serverUnreachable": "Sunucuya ulaşılamıyor", "retry": "Tekrar dene", "retrying": "Yeniden deneniyor...", - "reconnected": "" + "reconnected": "Bağlantı yeniden kuruldu" }, "sidebar": { "menu": { - "uptime": "", + "uptime": "Çalışma süresi", "pagespeed": "Sayfa hızı", - "infrastructure": "", + "infrastructure": "Altyapı", "notifications": "Bildirimler", "checks": "Kontroller", "incidents": "Olaylar", @@ -199,6 +199,14 @@ "starPrompt": { "title": "Checkmate'e yıldız verin", "description": "En son sürümleri görün ve GitHub'da topluluğun büyümesine katkıda bulunun" + }, + "pageHeader": { + "links": { + "support": "Destek", + "discussions": "Tartışmalar", + "docs": "Dokümantasyon", + "changelog": "Değişiklik günlüğü" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "Bir rol seçin" }, "linkLabel": "Davet bağlantısı" + }, + "fallback": { + "title": "Henüz takım üyesi yok", + "description": "Ekip arkadaşlarınızı e-posta ile davet edin veya doğrudan ekleyin. Katıldıklarında, rolleriyle birlikte burada görünecekler." } + }, + "header": { + "title": "Hesap", + "description": "Profilinizi, parolanızı, ekibinizi ve çalışma alanı tercihlerinizi yönetin." } }, "auth": { + "brandPanel": { + "eyebrow": "Açık kaynaklı altyapı izleme", + "tagline": "Sunucularınızın her hareketini izleyin.", + "description": "Sistemlerinizin çalışma süresini, yanıt hızını ve yaşanan kesintileri tek bir panelden anlık takip edin. Kendi sunucunuzda çalışır, verileriniz sizde kalır." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Checkmate'e tekrar hoş geldiniz!", "subtitle": "Başlamak için kaydolun", - "submit": "Kaydol" + "submit": "Kaydol", + "setupNotice": "Bu sayfa yalnızca ilk kurulum sırasında kullanılabilir. Süper yönetici kaydedildikten sonra, ek kullanıcılar takım ayarlarından davet edilebilir." }, "forgotPassword": { "title": "Parolanızı mı unuttunuz?", @@ -378,6 +400,14 @@ "statusCode": "Durum kodu", "location": "Konum" } + }, + "fallback": { + "title": "Henüz kontrol yok", + "description": "Bir izleyici oluşturduğunuzda, her durum kontrolü ve yanıt süresi burada bir kontrol olarak görünecek." + }, + "header": { + "title": "Kontroller", + "description": "Checkmate'in izleyicilerinize karşı çalıştırdığı her sondaj, durum kodu ve yanıt süresiyle birlikte burada görünür." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Aktif süresi", "certificateExpiry": "Sertifika bitiş tarihi", "lastCheck": "Son kontrol", - "lastResponseTime": "Son yanıt süresi" + "lastResponseTime": "Son yanıt süresi", + "serviceIsDown": "Servis çalışmıyor" }, "status": { "down": "çevrimdışı", @@ -511,7 +542,7 @@ "ping": "", "port": "", "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 desteklenen oyunlar listesine bakın.", "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.", "websocket": "İzlenecek WebSocket URL'sini girin (örn. wss://example.com/socket) ve bir görünen ad ekleyin.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Olay yok — tüm sistemler sağlıklı", + "description": "Bir izleyici devre dışı kaldığında veya kurtarıldığında, olay zamanlama, izleyici detayları ve çözüm geçmişiyle birlikte burada görünecek." + }, "dialog": { "resolveIncident": { "title": "Olayı çöz", @@ -720,6 +755,10 @@ "active": "Aktif", "resolved": "Çözüldü" } + }, + "header": { + "title": "Olaylar", + "description": "Bir izleyici devre dışı kaldığında veya kurtarıldığında, olaylar zamanlama, izleyici detayları ve çözüm geçmişiyle birlikte burada görünür." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Bellek kullanımı", "netBytesRecv": "{{name}} - Alınan 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" } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "Monitör oluşturun!", - "checks": "Sunucularınızın performansını takip edin,Darboğazları belirleyin ve kullanımı optimize edin,Gerçek zamanlı izleme ile güvenilirliği sağlayın", - "title": "Bir altyapı monitörü şunlar için kullanılır:" + "title": "Henüz altyapı izleyicisi yok", + "description": "Sunucu performansını izleyin, darboğazları belirleyin ve gerçek zamanlı altyapı izleme ile güvenilirliği sağlayın." + }, + "header": { + "title": "Altyapı izleyicileri", + "description": "Sunucu performansını izleyin, darboğazları belirleyin ve gerçek zamanlı altyapı izleme ile güvenilirliği sağlayın." } }, "logs": { + "fallback": { + "title": "Henüz günlük yok", + "description": "Sunucu etkinliği, uyarılar ve hatalar Checkmate çalıştıkça burada görünecek." + }, "tabs": { "diagnostics": "Teşhis", "logs": "Sunucu günlükleri", @@ -788,7 +836,9 @@ "label": "Günlük seviyesi" }, "jobQueue": "İş kuyruğu", + "jobQueueExplainer": "Vurgulanan satırlar şu anda bir işçi tarafından işlenmekte olan işlerdir.", "failedJobs": "Başarısız işler", + "failedJobsExplainer": "Monitöre göre son başarısızlıklar — son başarısızlık zamanı, başarısızlık sayısı ve nedeni.", "noLogs": "Günlük bulunamadı", "metrics": { "jobs": "İşler", @@ -815,6 +865,16 @@ "usedSPercentage": "% CPU tarafından kullanılan (1s)", "total": "Toplam", "used": "Kullanılan" + }, + "sections": { + "runtimeStats": { + "title": "Çalışma istatistikleri", + "description": "Node.js süreci ve ana makinenin anlık görüntüsü. 5 saniyede bir güncellenir." + }, + "memoryCpu": { + "title": "Bellek ve CPU", + "description": "Sürecin ayrılmış belleğini ve ana makinenin CPU'sunu nasıl kullandığı." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Son başarısızlık zamanı", "failReason": "Başarısızlık nedeni" } + }, + "queueFallback": { + "title": "Kuyrukta iş yok", + "description": "Zamanlanmış veya çalışan izleyici kontrolleri burada görünür. Boş bir kuyruk her şeyin güncel olduğu anlamına gelir." + }, + "header": { + "title": "Günlükler ve kuyruk", + "description": "Sunucu günlüklerini, izleyici iş kuyruğunu ve çalışma zamanı tanılarını tek bir yerde inceleyin." } }, "maintenanceWindow": { "fallback": { "actionButton": "Bakım penceresi oluşturun!", - "checks": "Bakım dönemlerinizi işaretleyin,Yanlış anlamaları ortadan kaldırın,Bakım pencerelerinde uyarı göndermeyi durdurun", - "title": "Bakım penceresi şunlar için kullanılır:" + "title": "Planlanmış bakım penceresi yok", + "description": "Planlı kesintileri zamanlayın; uyarılar bastırılsın, ekibiniz ve kullanıcılarınız ne bekleyeceklerini bilsin." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Bakım pencereleri", + "description": "Planlı kesintileri zamanlayın; uyarılar bastırılsın, ekibiniz ve kullanıcılarınız ne bekleyeceklerini bilsin." } }, "notifications": { "fallback": { "actionButton": "Kanal oluştur", - "checks": "Kesinti veya performans sorunları hakkında ekipleri uyarın,Olaylar meydana geldiğinde mühendisleri bilgilendirin,Yöneticileri sistem değişiklikleri hakkında haberdar edin", - "title": "Bildirim kanalları şunlar için kullanılır:" + "title": "Henüz bildirim kanalı yok", + "description": "Slack, Discord, e-posta, webhook ve daha fazlasını bağlayın — olaylar olur olmaz doğru kişilere haber verilir." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "Sohbet ID", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Pushover yapılandırması", + "description": "Pushover uygulama belirtecinizi ve kullanıcı anahtarınızı girin.", + "optionAppToken": "Uygulama belirteci", + "placeholderAppToken": "Uygulama belirtecini girin", + "optionUserKey": "Kullanıcı anahtarı", + "placeholderUserKey": "Kullanıcı anahtarını girin" + }, + "twilio": { + "title": "Twilio yapılandırması", + "description": "SMS göndermek için Twilio hesap kimlik bilgilerinizi girin.", + "optionAccountSid": "Hesap SID", + "placeholderAccountSid": "Hesap SID girin", + "optionAuthToken": "Kimlik doğrulama belirteci", + "placeholderAuthToken": "Kimlik doğrulama belirtecini girin", + "optionFromNumber": "Gönderen numara", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Alıcı numara", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Hedef" } + }, + "header": { + "title": "Bildirimler", + "description": "Slack, Discord, e-posta, webhook ve daha fazlasını bağlayın — olaylar olur olmaz doğru kişilere haber verilir." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Monitör oluşturun!", - "checks": "Bir sayfanın kullanıcı deneyimini raporlayın,Web sayfası hızını analiz etmeye yardımcı olun,Sayfanın nasıl iyileştirilebileceğine dair öneriler sunun", - "title": "Bir PageSpeed monitörü şunlar için kullanılır:" + "title": "Henüz PageSpeed izleyicisi yok", + "description": "Core Web Vitals ve Lighthouse puanlarını zaman içinde izleyerek kullanıcılarınız fark etmeden gerilemeleri yakalayın." + }, + "header": { + "title": "PageSpeed izleyicileri", + "description": "Core Web Vitals ve Lighthouse puanlarını zaman içinde izleyerek kullanıcılarınız fark etmeden gerilemeleri yakalayın." } }, "settings": { @@ -1137,11 +1237,12 @@ "description": "Gösterim amaçlı örnek monitörler ekleyin." }, "removeMonitors": { - "title": "Sistem sıfırlama", - "description": "Sisteminizdeki tüm monitörleri kaldırın.", + "title": "Sistemi sıfırla", + "description": "Sistemdeki tüm monitörleri kaldır.", "dialog": { "title": "Tüm monitörler kaldırılsın mı?", - "description": "Bu işlem geri alınamaz." + "description": "Bu işlem geri alınamaz.", + "paragraph": "Tüm kontrol geçmişi, olaylar, planlanmış bakım pencereleri ve bu monitörleri kullanan durum sayfaları da kaldırılacaktır. Verilerin yedeğini saklamak istiyorsanız, önce monitörleri dışa aktarın." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Lütfen aşağıdaki doğrulama hatalarını düzeltin:" } + }, + "header": { + "title": "Ayarlar", + "description": "SMTP, entegrasyonlar, saklama ve genel uygulama davranışını yapılandırın." } }, "statusPages": { "deleteSuccess": "Durum sayfası başarıyla silindi", "fallback": { - "title": "Bir durum sayfası şunlar için kullanılır:", - "checks": "Kullanıcılara ve paydaşlara sistem durumunu iletin,Gerçek zamanlı çalışma süresi bilgilerini herkese açık olarak görüntüleyin,Şeffaf hizmet izleme ile güven oluşturun,Olaylar sırasında destek taleplerini azaltın", - "actionButton": "Durum sayfası oluşturun!" + "title": "Henüz durum sayfası yok", + "actionButton": "Durum sayfası oluşturun!", + "description": "Müşterilerinize ve paydaşlarınıza gerçek zamanlı çalışma süresi ve olay geçmişini gösteren herkese açık bir sayfa yayınlayın." }, "monitorsList": { "chartTypeHeatmap": "Isı haritası", @@ -1190,7 +1295,18 @@ "allDown": "Tüm sistemler çevrimdışı", "allUp": "Tüm sistemler çalışıyor", "degraded": "Bazı sistemlerde sorun yaşanıyor", - "unknown": "Sistem durumu belirlenemiyor" + "unknown": "Sistem durumu belirlenemiyor", + "allBreached": "Tüm sistemler eşik değerlerini aştı", + "allMaintenance": "Tüm sistemler bakımda", + "allPaused": "Tüm sistemler duraklatıldı", + "allInitializing": "Tüm sistemler başlatılıyor", + "breachedAndDown": "Bazı sistemler eşik değerlerini aştı ve çalışmıyor", + "breached": "Bazı sistemler eşik değerlerini aştı", + "maintenanceAndDown": "Bazı sistemler bakım sırasında çalışmıyor", + "maintenance": "Bazı sistemler bakımda", + "partiallyPaused": "Bazı sistemler duraklatıldı", + "initializing": "Bazı sistemler başlatılıyor", + "noMonitors": "Hiç monitör yapılandırılmadı" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Durum sayfaları", + "description": "Müşterilerinize ve paydaşlarınıza gerçek zamanlı çalışma süresi ve olay geçmişini gösteren herkese açık sayfalar yayınlayın." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Monitör oluşturun!", - "checks": "Web sitelerinin veya sunucuların çevrimiçi ve yanıt verip vermediğini kontrol edin,Kesinti veya performans sorunları hakkında ekipleri uyarın,HTTP uç noktalarını, ping'leri, container'ları ve portları izleyin,Geçmiş çalışma süresi ve güvenilirlik trendlerini takip edin", - "title": "Bir çalışma süresi monitörü şunlar için kullanılır:" + "title": "Henüz çalışma süresi izleyicisi yok", + "description": "HTTP uç noktalarını, ping'leri, konteynerleri ve portları izleyin — bir şey kapandığında anında uyarı alın." + }, + "header": { + "title": "Çalışma süresi izleyicileri", + "description": "HTTP uç noktalarını, ping'leri, konteynerleri ve portları izleyin — bir şey kapandığında anında uyarı alın." } } } diff --git a/client/src/locales/uk.json b/client/src/locales/uk.json index 3872638aa..5b467e4b4 100644 --- a/client/src/locales/uk.json +++ b/client/src/locales/uk.json @@ -13,7 +13,7 @@ "content": "Увага: Ви ще не додали ключ API Google PageSpeed. Перейдіть у Налаштування, щоб додати його. Без нього моніторинг PageSpeed не працюватиме." } }, - "appName": "", + "appName": "Checkmate", "breadcrumbs": { "details": "Деталі", "home": "Головна" @@ -31,15 +31,15 @@ "inviteMember": "Запросити учасника", "pause": "Призупинити", "resume": "Відновити", - "save": "", + "save": "Зберегти", "sendInvite": "Надіслати запрошення", "test": "Тест", "testNotifications": "Тестові сповіщення", - "toggleTheme": "", + "toggleTheme": "Перемкнути світлу / темну", "flushQueue": "Очистити чергу", "notFound": "Перейти на головну панель", - "resetPassword": "", - "reset": "", + "resetPassword": "Скинути пароль", + "reset": "Скинути", "clear": "Очистити", "addDemo": "Додати демо-монітори", "removeMonitors": "Видалити монітори", @@ -53,8 +53,8 @@ "labels": { "averageResponseTime": "Середній час відповіді", "downtime": "Час простою", - "high": "", - "low": "", + "high": "Високий", + "low": "Низький", "uptime": "Час роботи" }, "histogram": { @@ -86,12 +86,12 @@ "name": { "option": { "firstName": { - "label": "", - "placeholder": "" + "label": "Ім'я", + "placeholder": "Введіть ім'я" }, "lastName": { - "label": "", - "placeholder": "" + "label": "Прізвище", + "placeholder": "Введіть прізвище" } } }, @@ -107,14 +107,14 @@ "table": { "empty": "Тут нічого немає", "headers": { - "actions": "", + "actions": "Дії", "dateTime": "Дата і час", "message": "Повідомлення", "monitor": "Монітор", "monitorId": "ID монітора", "name": "Ім'я", "status": "Статус", - "type": "", + "type": "Тип", "url": "URL", "interval": "Інтервал", "active": "Активний", @@ -125,17 +125,17 @@ "components": { "imageUpload": { "clickToUpload": "Натисніть, щоб завантажити", - "dragAndDrop": "", - "supportedFormats": "", - "maxSize": "", + "dragAndDrop": "або перетягніть", + "supportedFormats": "Підтримувані формати", + "maxSize": "Макс. розмір", "orDragAndDrop": "або перетягніть файл", "errors": { - "invalidFileSize": "", - "invalidFileFormat": "" + "invalidFileSize": "Розмір файлу занадто великий!", + "invalidFileFormat": "Непідтримуваний формат файлу!" } }, "headerStatusPageControls": { - "publicLink": "" + "publicLink": "Публічне посилання" }, "headerTimeRange": { "labels": { @@ -155,26 +155,26 @@ "serverUnreachable": "Не вдається з'єднатися з сервером", "retry": "Повторити", "retrying": "Повторна спроба...", - "reconnected": "" + "reconnected": "З'єднання відновлено" }, "sidebar": { "menu": { - "uptime": "", - "pagespeed": "", - "infrastructure": "", - "notifications": "", + "uptime": "Доступність", + "pagespeed": "Pagespeed", + "infrastructure": "Інфраструктура", + "notifications": "Сповіщення", "checks": "Перевірки", - "incidents": "", - "statusPages": "", - "maintenance": "", - "logs": "", - "settings": "" + "incidents": "Інциденти", + "statusPages": "Сторінки статусу", + "maintenance": "Обслуговування", + "logs": "Журнали", + "settings": "Налаштування" }, "bottomMenu": { - "support": "", - "discussions": "", - "docs": "", - "changelog": "" + "support": "Підтримка", + "discussions": "Обговорення", + "docs": "Документація", + "changelog": "Журнал змін" }, "accountMenu": { "profile": "Профіль", @@ -186,19 +186,27 @@ "description": "Переглядайте останні оновлення та допомагайте розвивати спільноту на GitHub" }, "authFooter": { - "navControls": "", - "logOut": "", + "navControls": "Керування", + "logOut": "Вийти", "roles": { "superAdmin": "Суперадміністратор", "admin": "Адміністратор", "user": "Користувач", - "demoUser": "" + "demoUser": "Демо-користувач" } } }, "starPrompt": { "title": "Оцінити Checkmate", "description": "Переглядайте останні оновлення та допомагайте розвивати спільноту на GitHub" + }, + "pageHeader": { + "links": { + "support": "Підтримка", + "discussions": "Обговорення", + "docs": "Документація", + "changelog": "Журнал змін" + } } }, "pages": { @@ -251,15 +259,15 @@ "team": { "filter": { "placeholder": "Фільтрувати за роллю", - "all": "", + "all": "Усі ролі", "admin": "Адміністратор", - "member": "" + "member": "Учасник" }, "table": { "headers": { "email": "Електронна пошта", - "role": "", - "created": "" + "role": "Роль", + "created": "Створено" } }, "addMember": { @@ -278,10 +286,23 @@ "placeholder": "Оберіть роль" }, "linkLabel": "Посилання для запрошення" + }, + "fallback": { + "title": "Поки що немає учасників команди", + "description": "Запросіть колег електронною поштою або додайте їх безпосередньо. Як тільки вони приєднаються, вони з'являться тут зі своєю роллю." } + }, + "header": { + "title": "Обліковий запис", + "description": "Керуйте профілем, паролем, командою та налаштуваннями робочого простору." } }, "auth": { + "brandPanel": { + "eyebrow": "Моніторинг інфраструктури з відкритим кодом", + "tagline": "Слідкуйте за кожним кроком ваших серверів.", + "description": "Моніторинг доступності, часу відгуку та інцидентів у реальному часі - self-hosted і належить вам." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Ласкаво просимо до Checkmate!", "subtitle": "Зареєструйтесь, щоб розпочати", - "submit": "Зареєструватися" + "submit": "Зареєструватися", + "setupNotice": "Ця сторінка доступна лише під час початкового налаштування. Після реєстрації суперадміністратора додаткових користувачів можна запросити з налаштувань команди." }, "forgotPassword": { "title": "Забули пароль?", @@ -378,6 +400,14 @@ "statusCode": "Код статусу", "location": "Розташування" } + }, + "fallback": { + "title": "Перевірок ще немає", + "description": "Як тільки ви створите монітор, кожна перевірка статусу та час відповіді з’являться тут." + }, + "header": { + "title": "Перевірки", + "description": "Кожне зондування, яке Checkmate виконує проти ваших моніторів, з'явиться тут з кодом статусу та часом відповіді." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Активний протягом", "certificateExpiry": "Закінчення сертифіката", "lastCheck": "Остання перевірка", - "lastResponseTime": "Останній час відповіді" + "lastResponseTime": "Останній час відповіді", + "serviceIsDown": "Сервіс недоступний" }, "status": { "down": "недоступний", @@ -511,7 +542,7 @@ "ping": "", "port": "", "docker": "", - "game": "", + "game": "Введіть IP-адресу або ім'я хоста та номер порту для пінгу (наприклад, 192.168.1.100 або example.com) і виберіть тип гри. Деяким іграм потрібно ввімкнути серверні запити у файлі конфігурації — перевірте документацію вашого ігрового сервера. Деталі протоколу див. у списку підтримуваних ігор.", "pagespeed": "Відстежуйте швидкість завантаження сторінки, показники Core Web Vitals та оцінки оптимізації Вашого сайту.", "grpc": "Введіть ім'я хоста та порт gRPC-сервера, за бажанням вкажіть назву сервісу для перевірки стану та додайте відображуване ім'я.", "websocket": "Введіть WebSocket URL для моніторингу (напр., wss://example.com/socket) та додайте відображуване ім'я.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Інцидентів немає — усі системи справні", + "description": "Коли монітор виходить з ладу або відновлюється, інцидент з’явиться тут з часом, деталями монітора та історією вирішення." + }, "dialog": { "resolveIncident": { "title": "Вирішити інцидент", @@ -720,6 +755,10 @@ "active": "Активний", "resolved": "Вирішено" } + }, + "header": { + "title": "Інциденти", + "description": "Коли монітор виходить з ладу або відновлюється, інциденти з'являються тут з часом, деталями монітора та історією вирішення." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Використання пам'яті", "netBytesRecv": "{{name}} - Отримано байтів", "netBytesSent": "{{name}} - Надіслано байтів", + "netNoTraffic": "Capture повідомляє про нульовий трафік на всіх інтерфейсах. Це нормально, коли Capture працює всередині контейнера, який бачить лише loopback-інтерфейси — запустіть Capture безпосередньо на хості, щоб побачити реальну мережеву активність.", "temp": "Темп." } }, @@ -774,21 +814,31 @@ }, "fallback": { "actionButton": "Створити монітор!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Монітор інфраструктури використовується для:" + "title": "Ще немає моніторів інфраструктури", + "description": "Відстежуйте продуктивність серверів, виявляйте вузькі місця та забезпечуйте надійність з моніторингом у реальному часі." + }, + "header": { + "title": "Монітори інфраструктури", + "description": "Відстежуйте продуктивність серверів, виявляйте вузькі місця та забезпечуйте надійність з моніторингом у реальному часі." } }, "logs": { + "fallback": { + "title": "Поки що немає журналів", + "description": "Активність сервера, попередження та помилки з’являться тут під час роботи Checkmate." + }, "tabs": { "diagnostics": "Діагностика", - "logs": "", - "queue": "" + "logs": "Журнали", + "queue": "Черга завдань" }, "logLevelSelect": { "label": "Рівень логів" }, "jobQueue": "Черга завдань", + "jobQueueExplainer": "Виділені рядки — це завдання, які наразі обробляються воркером.", "failedJobs": "Невдалі завдання", + "failedJobsExplainer": "Останні збої за моніторами — час останнього збою, кількість збоїв і причина.", "noLogs": "Логи не знайдено", "metrics": { "jobs": "Завдання", @@ -815,6 +865,16 @@ "usedSPercentage": "% від 1с використано CPU", "total": "Усього", "used": "Використано" + }, + "sections": { + "runtimeStats": { + "title": "Статистика виконання", + "description": "Знімок процесу Node.js і хост-машини. Оновлюється кожні 5 секунд." + }, + "memoryCpu": { + "title": "Пам'ять і ЦП", + "description": "Як процес використовує виділену пам'ять і ЦП хоста." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Остання помилка", "failReason": "Причина помилки" } + }, + "queueFallback": { + "title": "У черзі немає завдань", + "description": "Заплановані або виконувані перевірки моніторів з’являться тут. Порожня черга означає, що все актуально." + }, + "header": { + "title": "Журнали та черга", + "description": "Перевіряйте серверні журнали, чергу завдань моніторів і діагностику в одному місці." } }, "maintenanceWindow": { "fallback": { "actionButton": "Створити вікно обслуговування!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Вікно обслуговування використовується для:" + "title": "Немає запланованих вікон обслуговування", + "description": "Плануйте планові простої, щоб сповіщення було пригнічено, а команда та користувачі знали, чого очікувати." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Вікна обслуговування", + "description": "Плануйте планові простої, щоб сповіщення було пригнічено, а команда та користувачі знали, чого очікувати." } }, "notifications": { "fallback": { "actionButton": "Створити канал", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Канали сповіщень використовуються для:" + "title": "Ще немає каналів сповіщень", + "description": "Підключіть Slack, Discord, електронну пошту, вебхуки та інше, щоб потрібні люди дізнавалися про інциденти одразу." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "ID чату", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Налаштування Pushover", + "description": "Введіть токен застосунку та ключ користувача Pushover.", + "optionAppToken": "Токен застосунку", + "placeholderAppToken": "Введіть токен застосунку", + "optionUserKey": "Ключ користувача", + "placeholderUserKey": "Введіть ключ користувача" + }, + "twilio": { + "title": "Налаштування Twilio", + "description": "Введіть облікові дані Twilio для надсилання SMS.", + "optionAccountSid": "SID акаунта", + "placeholderAccountSid": "Введіть SID акаунта", + "optionAuthToken": "Токен автентифікації", + "placeholderAuthToken": "Введіть токен автентифікації", + "optionFromNumber": "Номер відправника", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Номер отримувача", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Призначення" } + }, + "header": { + "title": "Сповіщення", + "description": "Підключіть Slack, Discord, електронну пошту, вебхуки та інше, щоб потрібні люди дізнавалися про інциденти одразу." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Створити монітор!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Монітор PageSpeed використовується для:" + "title": "Ще немає моніторів PageSpeed", + "description": "Відстежуйте Core Web Vitals і оцінки Lighthouse у часі, щоб помітити регресії раніше за користувачів." + }, + "header": { + "title": "Монітори PageSpeed", + "description": "Відстежуйте Core Web Vitals і оцінки Lighthouse у часі, щоб помітити регресії раніше за користувачів." } }, "settings": { @@ -1138,10 +1238,11 @@ }, "removeMonitors": { "title": "Скидання системи", - "description": "Видалити всі монітори з Вашої системи.", + "description": "Видалити всі монітори з вашої системи.", "dialog": { "title": "Видалити всі монітори?", - "description": "Це не можна скасувати." + "description": "Цю дію не можна скасувати.", + "paragraph": "Також будуть видалені вся історія перевірок, інциденти, заплановані вікна обслуговування та сторінки статусу, які використовували ці монітори. Спочатку експортуйте монітори, якщо хочете зберегти резервну копію їхніх даних." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Будь ласка, виправте такі помилки валідації:" } + }, + "header": { + "title": "Налаштування", + "description": "Налаштуйте SMTP, інтеграції, зберігання та загальну поведінку додатку." } }, "statusPages": { "deleteSuccess": "Сторінку статусу успішно видалено", "fallback": { - "title": "Сторінка статусу використовується для:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Створити сторінку статусу!" + "title": "Ще немає сторінок статусу", + "actionButton": "Створити сторінку статусу!", + "description": "Опублікуйте публічну сторінку, що показує клієнтам і зацікавленим сторонам час роботи в реальному часі та історію інцидентів." }, "monitorsList": { "chartTypeHeatmap": "Теплова карта", @@ -1190,7 +1295,18 @@ "allDown": "Усі системи недоступні", "allUp": "Усі системи працюють", "degraded": "Деякі системи мають проблеми", - "unknown": "Неможливо визначити стан системи" + "unknown": "Неможливо визначити стан системи", + "allBreached": "Усі системи перевищили порогові значення", + "allMaintenance": "Усі системи на технічному обслуговуванні", + "allPaused": "Усі системи призупинено", + "allInitializing": "Усі системи ініціалізуються", + "breachedAndDown": "Деякі системи перевищили пороги та недоступні", + "breached": "Деякі системи перевищили пороги", + "maintenanceAndDown": "Деякі системи недоступні під час техобслуговування", + "maintenance": "Деякі системи на техобслуговуванні", + "partiallyPaused": "Деякі системи призупинено", + "initializing": "Деякі системи ініціалізуються", + "noMonitors": "Не налаштовано жодного монітора" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Сторінки статусу", + "description": "Публікуйте публічні сторінки з часом роботи в реальному часі та історією інцидентів для клієнтів і зацікавлених сторін." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Створити монітор!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Монітор доступності використовується для:" + "title": "Ще немає моніторів працездатності", + "description": "Спостерігайте за HTTP-кінцевими точками, пінгами, контейнерами та портами — отримуйте сповіщення в момент відмови." + }, + "header": { + "title": "Монітори працездатності", + "description": "Спостерігайте за HTTP-кінцевими точками, пінгами, контейнерами та портами — отримуйте сповіщення в момент відмови." } } } diff --git a/client/src/locales/vi.json b/client/src/locales/vi.json index f9963958b..dc3e804de 100644 --- a/client/src/locales/vi.json +++ b/client/src/locales/vi.json @@ -13,7 +13,7 @@ "content": "Cảnh báo: Bạn chưa thêm khóa API Google PageSpeed. Truy cập Cài đặt để thêm. Nếu không có khóa này, trình giám sát PageSpeed sẽ không hoạt động." } }, - "appName": "", + "appName": "Checkmate", "breadcrumbs": { "details": "Chi tiết", "home": "Trang chủ" @@ -31,15 +31,15 @@ "inviteMember": "Mời thành viên", "pause": "Tạm dừng", "resume": "Tiếp tục", - "save": "", + "save": "Lưu", "sendInvite": "Gửi lời mời", "test": "Kiểm tra", "testNotifications": "Kiểm tra thông báo", - "toggleTheme": "", + "toggleTheme": "Chuyển sáng / tối", "flushQueue": "Xóa hàng đợi", "notFound": "Về bảng điều khiển chính", - "resetPassword": "", - "reset": "", + "resetPassword": "Đặt lại mật khẩu", + "reset": "Đặt lại", "clear": "Xóa", "addDemo": "Thêm trình giám sát mẫu", "removeMonitors": "Xóa trình giám sát", @@ -53,8 +53,8 @@ "labels": { "averageResponseTime": "Thời gian phản hồi trung bình", "downtime": "Thời gian ngừng hoạt động", - "high": "", - "low": "", + "high": "Cao", + "low": "Thấp", "uptime": "Thời gian hoạt động" }, "histogram": { @@ -86,12 +86,12 @@ "name": { "option": { "firstName": { - "label": "", - "placeholder": "" + "label": "Tên", + "placeholder": "Nhập tên của bạn" }, "lastName": { - "label": "", - "placeholder": "" + "label": "Họ", + "placeholder": "Nhập họ của bạn" } } }, @@ -107,14 +107,14 @@ "table": { "empty": "Không có dữ liệu", "headers": { - "actions": "", + "actions": "Hành động", "dateTime": "Ngày & giờ", "message": "Tin nhắn", "monitor": "Trình giám sát", "monitorId": "ID trình giám sát", "name": "Tên", "status": "Trạng thái", - "type": "", + "type": "Loại", "url": "Url", "interval": "Khoảng thời gian", "active": "Đang hoạt động", @@ -125,17 +125,17 @@ "components": { "imageUpload": { "clickToUpload": "Nhấn để tải lên", - "dragAndDrop": "", - "supportedFormats": "", - "maxSize": "", + "dragAndDrop": "hoặc kéo và thả", + "supportedFormats": "Định dạng hỗ trợ", + "maxSize": "Kích thước tối đa", "orDragAndDrop": "hoặc kéo và thả", "errors": { - "invalidFileSize": "", - "invalidFileFormat": "" + "invalidFileSize": "Tệp quá lớn!", + "invalidFileFormat": "Định dạng tệp không được hỗ trợ!" } }, "headerStatusPageControls": { - "publicLink": "" + "publicLink": "Liên kết công khai" }, "headerTimeRange": { "labels": { @@ -155,26 +155,26 @@ "serverUnreachable": "Không thể kết nối đến máy chủ", "retry": "Thử lại", "retrying": "Đang thử lại...", - "reconnected": "" + "reconnected": "Đã khôi phục kết nối" }, "sidebar": { "menu": { - "uptime": "", - "pagespeed": "", - "infrastructure": "", - "notifications": "", + "uptime": "Thời gian hoạt động", + "pagespeed": "Pagespeed", + "infrastructure": "Hạ tầng", + "notifications": "Thông báo", "checks": "Kiểm tra", - "incidents": "", - "statusPages": "", - "maintenance": "", - "logs": "", - "settings": "" + "incidents": "Sự cố", + "statusPages": "Trang trạng thái", + "maintenance": "Bảo trì", + "logs": "Nhật ký", + "settings": "Cài đặt" }, "bottomMenu": { - "support": "", - "discussions": "", - "docs": "", - "changelog": "" + "support": "Hỗ trợ", + "discussions": "Thảo luận", + "docs": "Tài liệu", + "changelog": "Nhật ký thay đổi" }, "accountMenu": { "profile": "Hồ sơ", @@ -186,19 +186,27 @@ "description": "Xem các bản phát hành mới nhất và giúp phát triển cộng đồng trên GitHub" }, "authFooter": { - "navControls": "", - "logOut": "", + "navControls": "Điều khiển", + "logOut": "Đăng xuất", "roles": { "superAdmin": "Quản trị viên cấp cao", "admin": "Quản trị viên", "user": "Người dùng", - "demoUser": "" + "demoUser": "Người dùng demo" } } }, "starPrompt": { "title": "Gắn sao Checkmate", "description": "Xem các bản phát hành mới nhất và giúp phát triển cộng đồng trên GitHub" + }, + "pageHeader": { + "links": { + "support": "Hỗ trợ", + "discussions": "Thảo luận", + "docs": "Tài liệu", + "changelog": "Nhật ký thay đổi" + } } }, "pages": { @@ -251,15 +259,15 @@ "team": { "filter": { "placeholder": "Lọc theo vai trò", - "all": "", + "all": "Tất cả vai trò", "admin": "Quản trị viên", - "member": "" + "member": "Thành viên" }, "table": { "headers": { "email": "Email", - "role": "", - "created": "" + "role": "Vai trò", + "created": "Đã tạo" } }, "addMember": { @@ -278,10 +286,23 @@ "placeholder": "Chọn vai trò" }, "linkLabel": "Liên kết mời" + }, + "fallback": { + "title": "Chưa có thành viên nhóm", + "description": "Mời đồng đội qua email hoặc thêm họ trực tiếp. Khi họ tham gia, họ sẽ xuất hiện tại đây với vai trò của họ." } + }, + "header": { + "title": "Tài khoản", + "description": "Quản lý hồ sơ, mật khẩu, đội ngũ và tùy chọn không gian làm việc." } }, "auth": { + "brandPanel": { + "eyebrow": "Giám sát hạ tầng mã nguồn mở", + "tagline": "Theo dõi mọi chuyển động của các máy chủ của bạn.", + "description": "Theo dõi thời gian hoạt động, thời gian phản hồi và sự cố theo thời gian thực - tự lưu trữ và thuộc về bạn." + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "Chào mừng bạn trở lại Checkmate!", "subtitle": "Đăng ký để bắt đầu", - "submit": "Đăng ký" + "submit": "Đăng ký", + "setupNotice": "Trang này chỉ khả dụng trong quá trình thiết lập ban đầu. Sau khi siêu quản trị viên được đăng ký, có thể mời thêm người dùng từ cài đặt nhóm." }, "forgotPassword": { "title": "Quên mật khẩu?", @@ -378,6 +400,14 @@ "statusCode": "Mã trạng thái", "location": "Vị trí" } + }, + "fallback": { + "title": "Chưa có kiểm tra nào", + "description": "Khi bạn tạo một trình giám sát, mỗi lần thăm dò trạng thái và thời gian phản hồi sẽ xuất hiện tại đây như một kiểm tra." + }, + "header": { + "title": "Kiểm tra", + "description": "Mỗi lần thăm dò mà Checkmate chạy trên trình giám sát của bạn sẽ xuất hiện tại đây với mã trạng thái và thời gian phản hồi." } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "Hoạt động từ", "certificateExpiry": "Hạn chứng chỉ", "lastCheck": "Lần kiểm tra cuối", - "lastResponseTime": "Thời gian phản hồi cuối" + "lastResponseTime": "Thời gian phản hồi cuối", + "serviceIsDown": "Dịch vụ đang ngừng hoạt động" }, "status": { "down": "ngừng hoạt động", @@ -511,7 +542,7 @@ "ping": "", "port": "", "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 danh sách các trò chơi được hỗ trợ để 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.", "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ị.", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "Không có sự cố — tất cả hệ thống đều khỏe mạnh", + "description": "Khi một trình giám sát ngừng hoạt động hoặc phục hồi, sự cố sẽ xuất hiện tại đây kèm thời gian, chi tiết trình giám sát và lịch sử giải quyết." + }, "dialog": { "resolveIncident": { "title": "Giải quyết sự cố", @@ -720,6 +755,10 @@ "active": "Đang hoạt động", "resolved": "Đã giải quyết" } + }, + "header": { + "title": "Sự cố", + "description": "Khi một trình giám sát ngừng hoạt động hoặc phục hồi, sự cố sẽ xuất hiện tại đây kèm thời gian, chi tiết trình giám sát và lịch sử giải quyết." } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "Sử dụng bộ nhớ", "netBytesRecv": "{{name}} - Byte nhận", "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 độ" } }, @@ -774,21 +814,31 @@ }, "fallback": { "actionButton": "Tạo trình giám sát!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "Trình giám sát hạ tầng dùng để:" + "title": "Chưa có trình giám sát hạ tầng", + "description": "Theo dõi hiệu suất máy chủ, xác định nút thắt cổ chai và đảm bảo độ tin cậy với giám sát hạ tầng theo thời gian thực." + }, + "header": { + "title": "Trình giám sát hạ tầng", + "description": "Theo dõi hiệu suất máy chủ, xác định nút thắt cổ chai và đảm bảo độ tin cậy với giám sát hạ tầng theo thời gian thực." } }, "logs": { + "fallback": { + "title": "Chưa có nhật ký", + "description": "Hoạt động máy chủ, cảnh báo và lỗi sẽ xuất hiện tại đây khi Checkmate đang chạy." + }, "tabs": { "diagnostics": "Chẩn đoán", - "logs": "", - "queue": "" + "logs": "Nhật ký", + "queue": "Hàng đợi tác vụ" }, "logLevelSelect": { "label": "Mức nhật ký" }, "jobQueue": "Hàng đợi công việc", + "jobQueueExplainer": "Các hàng được làm nổi bật là các công việc hiện đang được worker xử lý.", "failedJobs": "Công việc thất bại", + "failedJobsExplainer": "Các lần thất bại gần đây theo trình giám sát — thời gian thất bại gần nhất, số lần thất bại và lý do.", "noLogs": "Không tìm thấy nhật ký", "metrics": { "jobs": "Công việc", @@ -815,6 +865,16 @@ "usedSPercentage": "% của 1 giây CPU sử dụng", "total": "Tổng", "used": "Đã dùng" + }, + "sections": { + "runtimeStats": { + "title": "Thống kê thời gian chạy", + "description": "Ảnh chụp nhanh tiến trình Node.js và máy chủ. Cập nhật mỗi 5 giây." + }, + "memoryCpu": { + "title": "Bộ nhớ & CPU", + "description": "Cách tiến trình sử dụng bộ nhớ được cấp phát và CPU của máy chủ." + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "Lỗi lần cuối lúc", "failReason": "Lý do lỗi" } + }, + "queueFallback": { + "title": "Hàng đợi không có công việc", + "description": "Các kiểm tra trình giám sát đã lên lịch hoặc đang chạy sẽ xuất hiện tại đây. Một hàng đợi trống có nghĩa là mọi thứ đều cập nhật." + }, + "header": { + "title": "Nhật ký & hàng đợi", + "description": "Kiểm tra nhật ký máy chủ, hàng đợi công việc giám sát và chẩn đoán runtime tại một nơi." } }, "maintenanceWindow": { "fallback": { "actionButton": "Tạo cửa sổ bảo trì!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "Cửa sổ bảo trì dùng để:" + "title": "Chưa có cửa sổ bảo trì nào được lên lịch", + "description": "Lên lịch thời gian chết để các cảnh báo được tạm dừng và đội ngũ cũng như người dùng biết điều cần mong đợi." }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "Cửa sổ bảo trì", + "description": "Lên lịch thời gian chết để các cảnh báo được tạm dừng và đội ngũ cũng như người dùng biết điều cần mong đợi." } }, "notifications": { "fallback": { "actionButton": "Tạo kênh", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "Kênh thông báo dùng để:" + "title": "Chưa có kênh thông báo", + "description": "Kết nối Slack, Discord, email, webhook và nhiều hơn để đúng người nhận được thông báo ngay khi có sự cố." }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "ID cuộc trò chuyện", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Cấu hình Pushover", + "description": "Nhập mã thông báo ứng dụng và khóa người dùng Pushover của bạn.", + "optionAppToken": "Mã thông báo ứng dụng", + "placeholderAppToken": "Nhập mã thông báo ứng dụng", + "optionUserKey": "Khóa người dùng", + "placeholderUserKey": "Nhập khóa người dùng" + }, + "twilio": { + "title": "Cấu hình Twilio", + "description": "Nhập thông tin xác thực tài khoản Twilio để gửi SMS.", + "optionAccountSid": "SID tài khoản", + "placeholderAccountSid": "Nhập SID tài khoản", + "optionAuthToken": "Mã thông báo xác thực", + "placeholderAuthToken": "Nhập mã thông báo xác thực", + "optionFromNumber": "Số gửi", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "Số nhận", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "Đích đến" } + }, + "header": { + "title": "Thông báo", + "description": "Kết nối Slack, Discord, email, webhook và nhiều hơn để đúng người nhận được thông báo ngay khi có sự cố." } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "Tạo trình giám sát!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "Trình giám sát PageSpeed dùng để:" + "title": "Chưa có trình giám sát PageSpeed", + "description": "Theo dõi Core Web Vitals và điểm Lighthouse theo thời gian để phát hiện sự suy giảm trước khi người dùng nhận ra." + }, + "header": { + "title": "Trình giám sát PageSpeed", + "description": "Theo dõi Core Web Vitals và điểm Lighthouse theo thời gian để phát hiện sự suy giảm trước khi người dùng nhận ra." } }, "settings": { @@ -1138,10 +1238,11 @@ }, "removeMonitors": { "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": { "title": "Xóa tất cả trình giám sát?", - "description": "Không thể hoàn tác." + "description": "Hành động này không thể hoàn tác.", + "paragraph": "Toàn bộ lịch sử kiểm tra, sự cố, cửa sổ bảo trì đã lên lịch và các trang trạng thái sử dụng những trình giám sát này cũng sẽ bị xóa. Hãy xuất trình giám sát trước nếu bạn muốn giữ một bản sao lưu dữ liệu." } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "Vui lòng sửa các lỗi xác thực sau:" } + }, + "header": { + "title": "Cài đặt", + "description": "Cấu hình SMTP, tích hợp, lưu trữ và hành vi ứng dụng toàn cục." } }, "statusPages": { "deleteSuccess": "Đã xóa trang trạng thái thành công", "fallback": { - "title": "Trang trạng thái dùng để:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "Tạo trang trạng thái!" + "title": "Chưa có trang trạng thái", + "actionButton": "Tạo trang trạng thái!", + "description": "Công bố một trang công khai cho khách hàng và các bên liên quan thấy thời gian hoạt động theo thời gian thực và lịch sử sự cố." }, "monitorsList": { "chartTypeHeatmap": "Bản đồ nhiệt", @@ -1190,7 +1295,18 @@ "allDown": "Tất cả hệ thống đều ngừng hoạt động", "allUp": "Tất cả hệ thống đang hoạt động", "degraded": "Một số hệ thống đang gặp sự cố", - "unknown": "Không thể xác định trạng thái hệ thống" + "unknown": "Không thể xác định trạng thái hệ thống", + "allBreached": "Tất cả hệ thống đã vượt ngưỡng", + "allMaintenance": "Tất cả hệ thống đang bảo trì", + "allPaused": "Tất cả hệ thống đã tạm dừng", + "allInitializing": "Tất cả hệ thống đang khởi tạo", + "breachedAndDown": "Một số hệ thống đã vượt ngưỡng và đang ngừng hoạt động", + "breached": "Một số hệ thống đã vượt ngưỡng", + "maintenanceAndDown": "Một số hệ thống ngừng hoạt động trong quá trình bảo trì", + "maintenance": "Một số hệ thống đang bảo trì", + "partiallyPaused": "Một số hệ thống đã tạm dừng", + "initializing": "Một số hệ thống đang khởi tạo", + "noMonitors": "Chưa cấu hình màn hình giám sát nào" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "Trang trạng thái", + "description": "Công bố các trang công khai cho khách hàng và các bên liên quan thấy thời gian hoạt động theo thời gian thực và lịch sử sự cố." } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "Tạo trình giám sát!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "Trình giám sát hoạt động dùng để:" + "title": "Chưa có trình giám sát uptime", + "description": "Theo dõi các endpoint HTTP, ping, container và cổng — nhận cảnh báo ngay khi có sự cố." + }, + "header": { + "title": "Trình giám sát uptime", + "description": "Theo dõi các endpoint HTTP, ping, container và cổng — nhận cảnh báo ngay khi có sự cố." } } } diff --git a/client/src/locales/zh-CN.json b/client/src/locales/zh-CN.json index d6580e851..ed5e70c1e 100644 --- a/client/src/locales/zh-CN.json +++ b/client/src/locales/zh-CN.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "Star Checkmate", "description": "查看最新版本并在 GitHub 上帮助发展社区" + }, + "pageHeader": { + "links": { + "support": "支持", + "discussions": "讨论", + "docs": "文档", + "changelog": "更新日志" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "选择角色" }, "linkLabel": "邀请链接" + }, + "fallback": { + "title": "暂无团队成员", + "description": "通过电子邮件邀请队友或直接添加他们。一旦加入,他们将与角色一起显示在这里。" } + }, + "header": { + "title": "账户", + "description": "管理个人资料、密码、团队和工作区设置。" } }, "auth": { + "brandPanel": { + "eyebrow": "开源基础设施监控", + "tagline": "关注您服务器的每一步动作。", + "description": "实时跟踪运行状态、响应时间和事件 - 自托管,完全属于您。" + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "欢迎回到 Checkmate!", "subtitle": "注册以开始使用", - "submit": "注册" + "submit": "注册", + "setupNotice": "此页面仅在初始设置期间可用。注册超级管理员后,可以从团队设置中邀请更多用户。" }, "forgotPassword": { "title": "忘记密码了?", @@ -378,6 +400,14 @@ "statusCode": "状态码", "location": "位置" } + }, + "fallback": { + "title": "暂无检查", + "description": "创建监控器后,每次状态探测和响应时间都会以一次检查的形式显示在这里。" + }, + "header": { + "title": "检查", + "description": "Checkmate 对监控器执行的每次探测都会在此显示,包含状态码和响应时间。" } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "已活跃", "certificateExpiry": "证书到期", "lastCheck": "上次检查", - "lastResponseTime": "上次响应时间" + "lastResponseTime": "上次响应时间", + "serviceIsDown": "服务已停止" }, "status": { "down": "宕机", @@ -511,7 +542,7 @@ "ping": "输入要 ping 的 IP 地址或主机名(例如.. 192.168.1.100 或 example.com),并添加显示在仪表板上的清晰显示名称。", "port": "输入服务器的 URL 或 IP、端口号和仪表板上显示的清晰显示名称。", "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)并选择游戏类型。某些游戏需要在配置文件中启用服务器查询 — 请查阅你的游戏服务器文档。详见支持的游戏列表了解协议细节。", "pagespeed": "跟踪网站的页面加载性能、Core Web Vitals 和优化评分。", "grpc": "输入 gRPC 服务器的主机名和端口,可选指定健康检查的服务名称,并添加显示名称。", "websocket": "输入要监控的 WebSocket URL(例如 wss://example.com/socket),并添加显示名称。", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "无事件 — 所有系统正常", + "description": "当监控器宕机或恢复时,事件将连同时间、监控器详情和解决记录一起显示在这里。" + }, "dialog": { "resolveIncident": { "title": "解决事件", @@ -720,6 +755,10 @@ "active": "活跃", "resolved": "已解决" } + }, + "header": { + "title": "事件", + "description": "当监控器宕机或恢复时,事件将连同时间、监控器详情和解决记录一起显示在这里。" } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "内存使用率", "netBytesRecv": "{{name}} - 接收字节", "netBytesSent": "{{name}} - 发送字节", + "netNoTraffic": "Capture 报告所有接口的流量均为零。当 Capture 在只能看到回环接口的容器内运行时,这属于正常情况——请直接在主机上运行 Capture 才能看到真实的网络活动。", "temp": "温度" } }, @@ -774,11 +814,19 @@ }, "fallback": { "actionButton": "创建监控!", - "checks": "Track the performance of your servers,Identify bottlenecks and optimize usage,Ensure reliability with real-time monitoring", - "title": "基础设施监控用于:" + "title": "暂无基础设施监控器", + "description": "跟踪服务器性能、识别瓶颈,通过实时基础设施监控确保可靠性。" + }, + "header": { + "title": "基础设施监控器", + "description": "跟踪服务器性能、识别瓶颈,通过实时基础设施监控确保可靠性。" } }, "logs": { + "fallback": { + "title": "暂无日志", + "description": "Checkmate 运行时的服务器活动、警告和错误将显示在这里。" + }, "tabs": { "diagnostics": "诊断", "logs": "服务器日志", @@ -788,7 +836,9 @@ "label": "日志级别" }, "jobQueue": "作业队列", + "jobQueueExplainer": "高亮的行是当前正在被工作进程处理的作业。", "failedJobs": "失败作业", + "failedJobsExplainer": "按监控的最近失败 — 最近失败时间、失败次数及原因。", "noLogs": "未找到日志", "metrics": { "jobs": "作业", @@ -815,6 +865,16 @@ "usedSPercentage": "CPU 1 秒使用百分比", "total": "总计", "used": "已使用" + }, + "sections": { + "runtimeStats": { + "title": "运行时统计", + "description": "Node.js 进程和主机的快照。每 5 秒更新一次。" + }, + "memoryCpu": { + "title": "内存与 CPU", + "description": "进程如何使用其分配的内存和主机 CPU。" + } } }, "table": { @@ -833,13 +893,21 @@ "lastFailedAt": "上次失败于", "failReason": "失败原因" } + }, + "queueFallback": { + "title": "队列中没有任务", + "description": "已安排或正在运行的监控检查将显示在这里。空队列意味着一切都是最新的。" + }, + "header": { + "title": "日志与队列", + "description": "在一处查看服务器日志、监控器作业队列和运行时诊断。" } }, "maintenanceWindow": { "fallback": { "actionButton": "创建维护窗口!", - "checks": "Mark your maintenance periods,Eliminate any misunderstandings,Stop sending alerts in maintenance windows", - "title": "维护窗口用于:" + "title": "暂无计划维护窗口", + "description": "安排计划停机时间以抑制告警,让团队和用户知晓预期。" }, "table": { "headers": { @@ -891,13 +959,17 @@ } } } + }, + "header": { + "title": "维护窗口", + "description": "安排计划停机时间以抑制告警,让团队和用户知晓预期。" } }, "notifications": { "fallback": { "actionButton": "创建渠道", - "checks": "Alert teams about downtime or performance issues,Let engineers know when incidents happen,Keep administrators informed of system changes", - "title": "通知渠道用于:" + "title": "暂无通知渠道", + "description": "连接 Slack、Discord、邮件、Webhook 等,让事件发生时正确的人立即收到通知。" }, "form": { "accessToken": { @@ -947,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "聊天 ID", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Pushover 配置", + "description": "输入您的 Pushover 应用令牌和用户密钥。", + "optionAppToken": "应用令牌", + "placeholderAppToken": "输入应用令牌", + "optionUserKey": "用户密钥", + "placeholderUserKey": "输入用户密钥" + }, + "twilio": { + "title": "Twilio 配置", + "description": "输入 Twilio 帐户凭据以发送短信。", + "optionAccountSid": "帐户 SID", + "placeholderAccountSid": "输入帐户 SID", + "optionAuthToken": "认证令牌", + "placeholderAuthToken": "输入认证令牌", + "optionFromNumber": "发送号码", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "接收号码", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "目标" } + }, + "header": { + "title": "通知", + "description": "连接 Slack、Discord、邮件、Webhook 等,让事件发生时正确的人立即收到通知。" } }, "pageSpeed": { @@ -979,8 +1075,12 @@ }, "fallback": { "actionButton": "创建监控!", - "checks": "Report on the user experience of a page,Help analyze webpage speed,Give suggestions on how the page can be improved", - "title": "PageSpeed 监控用于:" + "title": "暂无 PageSpeed 监控器", + "description": "持续追踪 Core Web Vitals 和 Lighthouse 评分,在用户察觉之前发现性能回退。" + }, + "header": { + "title": "PageSpeed 监控器", + "description": "持续追踪 Core Web Vitals 和 Lighthouse 评分,在用户察觉之前发现性能回退。" } }, "settings": { @@ -1138,10 +1238,11 @@ }, "removeMonitors": { "title": "系统重置", - "description": "从系统中移除所有监控。", + "description": "从系统中移除所有监视器。", "dialog": { "title": "移除所有监控?", - "description": "此操作无法撤销。" + "description": "此操作无法撤销。", + "paragraph": "所有检查历史、事件、计划维护窗口以及使用这些监控的状态页面也将一并被移除。如需保留数据备份,请先导出监控。" } }, "exportMonitors": { @@ -1158,14 +1259,18 @@ "validation": { "errorMessage": "请修复以下验证错误:" } + }, + "header": { + "title": "设置", + "description": "配置 SMTP、集成、保留和全局应用行为。" } }, "statusPages": { "deleteSuccess": "状态页已成功删除", "fallback": { - "title": "状态页用于:", - "checks": "Communicate system status to users and stakeholders,Display real-time uptime information publicly,Build trust with transparent service monitoring,Reduce support requests during incidents", - "actionButton": "创建状态页!" + "title": "暂无状态页面", + "actionButton": "创建状态页!", + "description": "发布一个公开页面,向客户和利益相关者展示实时运行情况和事件历史。" }, "monitorsList": { "chartTypeHeatmap": "热力图", @@ -1190,7 +1295,18 @@ "allDown": "所有系统已宕机", "allUp": "所有系统运行正常", "degraded": "部分系统正在出现问题", - "unknown": "无法确定系统状态" + "unknown": "无法确定系统状态", + "allBreached": "所有系统已超过阈值", + "allMaintenance": "所有系统正在维护中", + "allPaused": "所有系统已暂停", + "allInitializing": "所有系统正在初始化", + "breachedAndDown": "部分系统超过阈值且已停止", + "breached": "部分系统超过阈值", + "maintenanceAndDown": "部分系统在维护期间停止", + "maintenance": "部分系统正在维护", + "partiallyPaused": "部分系统已暂停", + "initializing": "部分系统正在初始化", + "noMonitors": "尚未配置任何监控器" }, "table": { "headers": { @@ -1282,6 +1398,10 @@ } } } + }, + "header": { + "title": "状态页面", + "description": "发布公开页面,向客户和利益相关者展示实时运行情况和事件历史。" } }, "uptime": { @@ -1297,8 +1417,12 @@ }, "fallback": { "actionButton": "创建监控!", - "checks": "Check if websites or servers are online & responsive,Alert teams about downtime or performance issues,Monitor HTTP endpoints, pings, containers & ports,Track historical uptime and reliability trends", - "title": "正常运行时间监控用于:" + "title": "暂无运行时间监控器", + "description": "监控 HTTP 端点、Ping、容器和端口 — 一旦故障即刻收到提醒。" + }, + "header": { + "title": "运行时间监控器", + "description": "监控 HTTP 端点、Ping、容器和端口 — 一旦故障即刻收到提醒。" } } } diff --git a/client/src/locales/zh-TW.json b/client/src/locales/zh-TW.json index 16aca7ed8..ff6e9f6dd 100644 --- a/client/src/locales/zh-TW.json +++ b/client/src/locales/zh-TW.json @@ -199,6 +199,14 @@ "starPrompt": { "title": "為 Checkmate 加星", "description": "查看最新版本並在 GitHub 上幫助社群成長" + }, + "pageHeader": { + "links": { + "support": "支援", + "discussions": "討論", + "docs": "文件", + "changelog": "更新日誌" + } } }, "pages": { @@ -278,10 +286,23 @@ "placeholder": "選擇角色" }, "linkLabel": "邀請連結" + }, + "fallback": { + "title": "尚無團隊成員", + "description": "透過電子郵件邀請隊友或直接新增他們。一旦加入,他們將與角色一起顯示在此。" } + }, + "header": { + "title": "帳號", + "description": "管理個人資料、密碼、團隊和工作區設定。" } }, "auth": { + "brandPanel": { + "eyebrow": "開源基礎設施監控", + "tagline": "關注您伺服器的每一步動作。", + "description": "即時追蹤運行狀態、回應時間和事件 - 自主託管,完全屬於您。" + }, "common": { "passwordRules": { "length": { @@ -343,7 +364,8 @@ "register": { "title": "歡迎回到 Checkmate!", "subtitle": "註冊以開始使用", - "submit": "註冊" + "submit": "註冊", + "setupNotice": "此頁面僅在初始設定期間可用。註冊超級管理員後,可以從團隊設定中邀請更多使用者。" }, "forgotPassword": { "title": "忘記密碼了嗎?", @@ -378,6 +400,14 @@ "statusCode": "狀態碼", "location": "位置" } + }, + "fallback": { + "title": "尚無檢查", + "description": "建立監視器後,每次狀態探測與回應時間都會以一次檢查的形式顯示在此。" + }, + "header": { + "title": "檢查", + "description": "Checkmate 對您的監視器執行的每次探測都會在此顯示,包含狀態碼與回應時間。" } }, "common": { @@ -397,7 +427,8 @@ "activeFor": "已啟用", "certificateExpiry": "憑證到期", "lastCheck": "最後檢查", - "lastResponseTime": "最後回應時間" + "lastResponseTime": "最後回應時間", + "serviceIsDown": "服務已停止" }, "status": { "down": "離線", @@ -511,7 +542,7 @@ "ping": "輸入要 Ping 的 IP 位址或主機名稱(例如 192.168.1.100 或 example.com),並新增一個顯示在儀表板上的清晰顯示名稱。", "port": "輸入伺服器的 URL 或 IP、連接埠號碼,以及顯示在儀表板上的清晰顯示名稱。", "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),並選擇遊戲類型。部分遊戲需要在設定檔中啟用伺服器查詢 — 請參閱你的遊戲伺服器文件。詳見支援的遊戲清單了解協定細節。", "pagespeed": "追蹤您網站的頁面載入效能、Core Web Vitals 和最佳化分數。", "grpc": "輸入 gRPC 伺服器的主機名稱和連接埠,可選擇指定健康檢查的服務名稱,並新增一個顯示名稱。", "websocket": "輸入要監控的 WebSocket URL(例如 wss://example.com/socket),並新增一個顯示名稱。", @@ -640,6 +671,10 @@ } }, "incidents": { + "fallback": { + "title": "無事件 — 所有系統健康", + "description": "當監視器宕機或恢復時,事件將連同時間、監視器詳情與解決紀錄一起顯示在此。" + }, "dialog": { "resolveIncident": { "title": "解決事件", @@ -720,6 +755,10 @@ "active": "啟用中", "resolved": "已解決" } + }, + "header": { + "title": "事件", + "description": "當監視器宕機或恢復時,事件將連同時間、監視器詳情與解決紀錄一起顯示在此。" } }, "infrastructure": { @@ -730,6 +769,7 @@ "memory": "記憶體使用率", "netBytesRecv": "{{name}} - 接收位元組", "netBytesSent": "{{name}} - 發送位元組", + "netNoTraffic": "Capture 回報所有介面的流量皆為零。當 Capture 在只能看到回環介面的容器中執行時,這是正常情況——請直接在主機上執行 Capture 才能看到實際的網路活動。", "temp": "溫度" } }, @@ -774,15 +814,19 @@ }, "fallback": { "actionButton": "建立監控!", - "checks": [ - "追蹤您伺服器的效能", - "找出瓶頸並最佳化使用", - "透過即時監控確保可靠性" - ], - "title": "基礎架構監控用於:" + "title": "尚無基礎設施監視器", + "description": "追蹤伺服器效能、找出瓶頸,透過即時基礎設施監控確保可靠性。" + }, + "header": { + "title": "基礎設施監視器", + "description": "追蹤伺服器效能、找出瓶頸,透過即時基礎設施監控確保可靠性。" } }, "logs": { + "fallback": { + "title": "尚無日誌", + "description": "Checkmate 運行時的伺服器活動、警告與錯誤將顯示在此。" + }, "tabs": { "diagnostics": "診斷", "logs": "日誌", @@ -792,7 +836,9 @@ "label": "日誌等級" }, "jobQueue": "工作佇列", + "jobQueueExplainer": "反白的列是目前正由工作程序處理的工作。", "failedJobs": "失敗的工作", + "failedJobsExplainer": "依監控的最近失敗 — 最近失敗時間、失敗次數及原因。", "noLogs": "找不到日誌", "metrics": { "jobs": "工作", @@ -819,6 +865,16 @@ "usedSPercentage": "CPU 使用 1 秒百分比", "total": "總計", "used": "已使用" + }, + "sections": { + "runtimeStats": { + "title": "執行階段統計", + "description": "Node.js 程序和主機的快照。每 5 秒更新一次。" + }, + "memoryCpu": { + "title": "記憶體與 CPU", + "description": "程序如何使用其分配的記憶體和主機 CPU。" + } } }, "table": { @@ -837,13 +893,21 @@ "lastFailedAt": "最後失敗於", "failReason": "失敗原因" } + }, + "queueFallback": { + "title": "佇列中沒有任務", + "description": "已排定或正在執行的監視器檢查將顯示在此。空佇列代表一切都是最新狀態。" + }, + "header": { + "title": "日誌與佇列", + "description": "在一處查看伺服器日誌、監視器作業佇列和執行時診斷。" } }, "maintenanceWindow": { "fallback": { "actionButton": "建立維護時段!", - "checks": ["標記您的維護期間", "消除任何誤解", "在維護時段停止發送警報"], - "title": "維護時段用於:" + "title": "尚無排定的維護時段", + "description": "安排計畫性停機,抑制警報,並讓團隊和使用者知曉預期狀況。" }, "table": { "headers": { @@ -895,17 +959,17 @@ } } } + }, + "header": { + "title": "維護時段", + "description": "安排計畫性停機,抑制警報,並讓團隊和使用者知曉預期狀況。" } }, "notifications": { "fallback": { "actionButton": "建立頻道", - "checks": [ - "針對停機或效能問題通知團隊", - "在事件發生時通知工程師", - "讓管理員隨時了解系統變更" - ], - "title": "通知頻道用於:" + "title": "尚無通知頻道", + "description": "連接 Slack、Discord、電子郵件、Webhook 等,讓事件發生時正確的人立即收到通知。" }, "form": { "accessToken": { @@ -955,12 +1019,36 @@ "placeholderBotToken": "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ", "optionChatId": "聊天室 ID", "placeholderChatId": "-1001234567890" + }, + "pushover": { + "title": "Pushover 設定", + "description": "輸入您的 Pushover 應用程式權杖和使用者金鑰。", + "optionAppToken": "應用程式權杖", + "placeholderAppToken": "輸入應用程式權杖", + "optionUserKey": "使用者金鑰", + "placeholderUserKey": "輸入使用者金鑰" + }, + "twilio": { + "title": "Twilio 設定", + "description": "輸入 Twilio 帳戶憑證以傳送簡訊。", + "optionAccountSid": "帳戶 SID", + "placeholderAccountSid": "輸入帳戶 SID", + "optionAuthToken": "驗證權杖", + "placeholderAuthToken": "輸入驗證權杖", + "optionFromNumber": "發送號碼", + "placeholderFromNumber": "+1234567890", + "optionToNumber": "接收號碼", + "placeholderToNumber": "+1234567890" } }, "table": { "headers": { "destination": "目的地" } + }, + "header": { + "title": "通知", + "description": "連接 Slack、Discord、電子郵件、Webhook 等,讓事件發生時正確的人立即收到通知。" } }, "pageSpeed": { @@ -987,8 +1075,12 @@ }, "fallback": { "actionButton": "建立監控!", - "checks": ["報告頁面的使用者體驗", "協助分析網頁速度", "提供頁面改善建議"], - "title": "PageSpeed 監控用於:" + "title": "尚無 PageSpeed 監視器", + "description": "持續追蹤 Core Web Vitals 與 Lighthouse 評分,在使用者察覺前發現效能退化。" + }, + "header": { + "title": "PageSpeed 監視器", + "description": "持續追蹤 Core Web Vitals 與 Lighthouse 評分,在使用者察覺前發現效能退化。" } }, "settings": { @@ -1145,11 +1237,12 @@ "description": "新增範例監控以供示範用途。" }, "removeMonitors": { - "title": "系統重設", - "description": "從系統中移除所有監控。", + "title": "系統重置", + "description": "從系統中移除所有監視器。", "dialog": { "title": "移除所有監控?", - "description": "此操作無法復原。" + "description": "此操作無法復原。", + "paragraph": "所有檢查歷史、事件、排定的維護時段以及使用這些監控的狀態頁面也將一併被移除。如需保留資料備份,請先匯出監控。" } }, "exportMonitors": { @@ -1166,19 +1259,18 @@ "validation": { "errorMessage": "請修正以下驗證錯誤:" } + }, + "header": { + "title": "設定", + "description": "設定 SMTP、整合、保留與全域應用程式行為。" } }, "statusPages": { "deleteSuccess": "狀態頁面已成功刪除", "fallback": { - "title": "狀態頁面用於:", - "checks": [ - "向使用者和利害關係人傳達系統狀態", - "公開顯示即時正常運行時間資訊", - "透過透明的服務監控建立信任", - "在事件期間減少支援請求" - ], - "actionButton": "建立狀態頁面!" + "title": "尚無狀態頁面", + "actionButton": "建立狀態頁面!", + "description": "發佈一個公開頁面,向客戶和利害關係人顯示即時的運行狀態與事件歷史。" }, "monitorsList": { "chartTypeHeatmap": "熱力圖", @@ -1203,7 +1295,18 @@ "allDown": "所有系統已停機", "allUp": "所有系統運作正常", "degraded": "部分系統正在發生問題", - "unknown": "無法判斷系統狀態" + "unknown": "無法判斷系統狀態", + "allBreached": "所有系統已超過閾值", + "allMaintenance": "所有系統正在維護中", + "allPaused": "所有系統已暫停", + "allInitializing": "所有系統正在初始化", + "breachedAndDown": "部分系統超過閾值且已停止", + "breached": "部分系統超過閾值", + "maintenanceAndDown": "部分系統在維護期間停止", + "maintenance": "部分系統正在維護", + "partiallyPaused": "部分系統已暫停", + "initializing": "部分系統正在初始化", + "noMonitors": "尚未設定任何監視器" }, "table": { "headers": { @@ -1295,6 +1398,10 @@ } } } + }, + "header": { + "title": "狀態頁面", + "description": "發佈公開頁面,向客戶和利害關係人顯示即時的運行狀態與事件歷史。" } }, "uptime": { @@ -1310,13 +1417,12 @@ }, "fallback": { "actionButton": "建立監控!", - "checks": [ - "檢查網站或伺服器是否上線並回應", - "針對停機或效能問題通知團隊", - "監控 HTTP 端點、Ping、容器和連接埠", - "追蹤歷史正常運行時間和可靠性趨勢" - ], - "title": "正常運行時間監控用於:" + "title": "尚無運行時間監視器", + "description": "監控 HTTP 端點、Ping、容器和連接埠 — 一旦發生故障即刻收到提醒。" + }, + "header": { + "title": "運行時間監視器", + "description": "監控 HTTP 端點、Ping、容器和連接埠 — 一旦發生故障即刻收到提醒。" } } } diff --git a/client/vite.config.ts b/client/vite.config.ts index 075bc7a0b..f04ef8c45 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -3,17 +3,28 @@ import react from "@vitejs/plugin-react"; import svgr from "vite-plugin-svgr"; import path from "path"; import { fileURLToPath } from "url"; +import { readFileSync } from "fs"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); export default defineConfig(({}) => { - let version = "3.6.1"; + const pkg = JSON.parse(readFileSync(path.resolve(__dirname, "package.json"), "utf-8")); + const version = pkg.version; + + const allowedHosts = process.env.VITE_ALLOWED_HOSTS + ? process.env.VITE_ALLOWED_HOSTS.split(",").map((h) => h.trim()) + : true; return { base: "/", plugins: [svgr(), react()], server: { host: true, + allowedHosts, + }, + preview: { + host: true, + allowedHosts, }, resolve: { alias: { diff --git a/docs/README.md b/docs/README.md index dc245e21e..b8904d1f9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -35,4 +35,4 @@ If you find issues or want to improve the documentation: - [GitHub Discussions](https://github.com/bluewave-labs/checkmate/discussions) - [Discord Channel](https://discord.gg/NAb6H3UTjK) -- [Documentation Portal](https://docs.checkmate.so/) +- [Documentation Portal](https://checkmate.so/docs) diff --git a/docs/frontend-conventions.md b/docs/frontend-conventions.md new file mode 100644 index 000000000..4f14c555b --- /dev/null +++ b/docs/frontend-conventions.md @@ -0,0 +1,211 @@ +# Frontend conventions + +Style and structural rules the client codebase follows. These are extracted from review feedback on the PR series #3591–#3596 and are non-negotiable for new code. They exist to keep the codebase greppable, maintainable, and consistent with the existing theme. + +> If you're touching a file in `client/src`, every rule below applies. The "why" matters as much as the "what" — read the reasoning so you can judge edge cases. + +--- + +## 1. Prefer MUI native (system) props over `sx` + +MUI components accept layout, spacing, color, border, typography and sizing values as top-level props. Use those. Reach for `sx` only when no native prop exists for the value you need (e.g. `textDecoration`, pseudo-selectors, complex selectors, conditional CSS). + +**Why:** native props are easier to read in JSX, easier to grep, easier to refactor, and don't force the reader to mentally parse a nested object literal for things that are conceptually one attribute. A `sx` block also can't be split-line-edited cleanly when most of its keys are simple primitives. + +**How to apply:** any time you write `sx={{ … }}`, ask whether each key has a native equivalent. If yes, hoist it. + +### Canonical mappings + +| `sx` key | Native prop | +|---|---| +| `color` | `color` | +| `backgroundColor` | `bgcolor` | +| `borderRadius` | `borderRadius` | +| `border`, `borderTop`, … | `border`, `borderTop`, … | +| `width`, `height`, `minHeight`, `maxWidth` | same names as native | +| `p`, `pt`, `pb`, `px`, `py` | same names as native | +| `m`, `mt`, `mb`, `mx`, `my` | same names as native | +| `display` | `display` | +| `textAlign` | `textAlign` | +| `fontWeight`, `fontSize`, `lineHeight` | same names as native | +| `gap` (on Stack) | `gap` | + +### Examples + +```tsx +// BAD — everything inside sx + + +// GOOD — every key that has a native prop is hoisted + +``` + +```tsx +// BAD + + +// GOOD — hoist what you can; drop fontSize:13 because it's the body default + +``` + +### When `sx` is still correct + +Keep `sx` for things that don't have a native prop: + +```tsx + +``` + +Pseudo-selectors (`"&:hover"`), `transition`, `cursor`, `outline`, `overflow` (when not on Box/Stack), media queries, and conditional spread objects all stay in `sx`. + +--- + +## 2. Use the full theme path for colors, never the shorthand string + +Prop forms like `color="text.secondary"`, `color="primary.main"`, `bgcolor="background.paper"` work, but they are **forbidden in this codebase**. + +**Why:** the shorthand is invisible to grep. If a future change needs to find every place that consumes `theme.palette.text.secondary` — to retheme, to swap, to audit — the shorthand strings are missed. That is a maintenance trap. It's worth a few extra characters at every callsite to keep the codebase searchable. + +**How to apply:** always destructure or reference the theme value explicitly. + +```tsx +// BAD +… +… + +// GOOD +const theme = useTheme(); +… +… +``` + +This applies to every theme-aware string prop (`color`, `bgcolor`, `borderColor`, etc.), and inside `sx` if you really need it there. + +--- + +## 3. No hardcoded numeric or string literals — use tokens + +The theme exposes tokens for every kind of magic value. Use them. Reserve raw numbers for values that are genuinely one-off (and even then, push back on yourself first). + +**Why:** tokens are the single source of truth. A literal `2` in a `mt` prop is invisible — it could mean `LAYOUT.XXS`, a rounding correction, or a thinko. The reader can't tell. With a token, intent is in the name. + +**How to apply:** before writing a literal, check whether one of these tokens covers it. If it nearly does but not exactly, extend the token rather than hardcoding (Alex did exactly this — he added `LAYOUT.XXS = 2` rather than letting `mt: "2px"` stand). + +### Token sources + +- **Spacing / layout** — `client/src/Utils/Theme/constants.ts` + - `LAYOUT.XXS = 2` · `LAYOUT.XS = 4` · `LAYOUT.SM = 6` · `LAYOUT.MD = 8` · `LAYOUT.LG = 10` · `LAYOUT.XL = 12` · `LAYOUT.XXL = 16` + - `SPACING` for `theme.spacing(...)` multipliers +- **Typography sizes** — `client/src/Utils/Theme/Palette.ts` → `typographyLevels` + - `xs / s / m / l / xl / xxl` (rem values) +- **Hover / interaction** — `HOVER.DARKEN` etc. +- **Shape** — `theme.shape.borderRadius` (don't write `borderRadius: 1` or `borderRadius: 4`) +- **Colors** — `theme.palette.*` (rule 2 above) + +### Examples + +```tsx +// BAD + + + + + // 13 is the body default — drop the prop entirely + +// GOOD + + + + + // inherits 13px from theme +``` + +### Token naming gotcha + +`typographyLevels.xl` was historically used for both 18px and 23px callsites. Don't reuse a token for two different purposes — split it (`xl` = 18, `xxl` = 23) and update every callsite. If you find an ambiguous token while editing, fix it the same way. + +--- + +## 4. Use `useTheme()` inside components, don't import the theme module + +The `theme` object exported from `@/Utils/Theme/Theme` is the *factory output*, not a live, mode-aware instance. Importing it directly couples a component to the wrong reference and breaks dark-mode reactivity. It also breaks the build at import time in some module-graph configurations (this happened in PR #3596 and required a follow-up commit). + +**Why:** themes can change at runtime (mode toggle), and the hook is the only correct way to read the active theme. Imports also create circular-graph risk because `Theme.ts` itself depends on `Palette.ts`. + +**How to apply:** inside any component or component-helper that needs theme values: + +```tsx +// BAD +import { theme } from "@/Utils/Theme/Theme"; +const SectionHeading = ({ children }) => ( + {children} +); + +// GOOD +import { useTheme } from "@mui/material/styles"; +const SectionHeading = ({ children }) => { + const theme = useTheme(); + return {children}; +}; +``` + +Module-level utility files that don't render React (pure helpers) should accept `theme` as a parameter rather than importing it. + +--- + +## 5. Discriminated unions: pair the runtime list with the type + +When you have a closed set of string literals that's used both as a type and as runtime data (severities, statuses, kinds), declare the runtime tuple first and derive the type from it. Don't declare them as two parallel literals that can drift. + +**Why:** if the list and the type aren't tied to each other, adding a new value to one and forgetting the other compiles fine and breaks at runtime. Deriving the type from the tuple makes them inseparable. + +```tsx +// BAD +type Severity = "info" | "warning" | "error"; + +// GOOD +export const Severities = ["info", "warning", "error"] as const; +export type Severity = (typeof Severities)[number]; +``` + +Export both when callers need to iterate (e.g. for a Storybook stories matrix or a select dropdown). + +--- + +## Pre-PR checklist + +Before you open a PR, scan your diff for these: + +- [ ] Any `sx={{ … }}` block that contains keys with a native-prop equivalent (rule 1) +- [ ] Any `color="text.X"`, `bgcolor="background.X"`, or any short-string palette path (rule 2) +- [ ] Any raw number or px-string in spacing / margin / padding / fontSize / borderRadius props that should be a token (rule 3) +- [ ] Any `import { theme } from "@/Utils/Theme/Theme"` inside a component (rule 4) +- [ ] Any `type X = "a" | "b" | "c"` for a closed set used at runtime (rule 5) +- [ ] Run `npm run build` and `npm run format-check` in both `client/` and `server/` (per global instructions) + +A clean PR on these axes is a PR that ships without a normalize follow-up. diff --git a/docs/infrastructure-disk-selection.md b/docs/infrastructure-disk-selection.md index 500e3be1e..bcfca165b 100644 --- a/docs/infrastructure-disk-selection.md +++ b/docs/infrastructure-disk-selection.md @@ -70,5 +70,5 @@ When you select specific disks, the following elements are filtered: ## Related Documentation -- [Infrastructure Monitoring Setup](https://docs.checkmate.so/checkmate-2.1) +- [Infrastructure Monitoring Setup](https://checkmate.so/docs) - [Capture Agent Installation](https://github.com/bluewave-labs/capture) \ No newline at end of file diff --git a/server/.env.example b/server/.env.example index 1a05a6ff7..20c579f5c 100644 --- a/server/.env.example +++ b/server/.env.example @@ -24,3 +24,9 @@ CLIENT_HOST=http://localhost:5173 # Optional Configuration # ---------------------- ORIGIN=localhost + +# Feature Flags +# ------------- +# Set to "false" to disable the selectable theme feature on status pages. +# When disabled, all status pages render with the default "refined" theme. +STATUS_PAGE_THEMES_ENABLED=true diff --git a/server/openapi.json b/server/openapi.json index 35d109693..cfb1c5aa4 100644 --- a/server/openapi.json +++ b/server/openapi.json @@ -597,8 +597,79 @@ "schema": { "type": "integer", "minimum": 1, - "maximum": 50, - "default": 10 + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "description": "Zero-based page index for pagination", + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "rowsPerPage", + "in": "query", + "description": "Number of monitors per page", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "filter", + "in": "query", + "description": "Search filter value", + "schema": { + "type": "string" + } + }, + { + "name": "field", + "in": "query", + "description": "Field to sort by", + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "schema": { + "type": "string", + "enum": ["asc", "desc"] + } + }, + { + "name": "type", + "in": "query", + "description": "Filter by monitor type", + "schema": { + "oneOf": [ + { + "type": "string", + "enum": ["http", "ping", "pagespeed", "docker", "hardware", "port", "game", "grpc", "websocket"] + }, + { + "type": "array", + "items": { + "type": "string", + "enum": ["http", "ping", "pagespeed", "docker", "hardware", "port", "game", "grpc", "websocket"] + } + } + ] + } + }, + { + "name": "explain", + "in": "query", + "description": "Include MongoDB query explain output (debug)", + "schema": { + "type": "boolean" } } ], @@ -2807,6 +2878,12 @@ "url": { "type": "string", "description": "Custom URL for the status page" + }, + "theme": { + "$ref": "#/components/schemas/StatusPageTheme" + }, + "themeMode": { + "$ref": "#/components/schemas/StatusPageThemeMode" } } } @@ -2859,6 +2936,12 @@ "url": { "type": "string", "description": "Custom URL for the status page" + }, + "theme": { + "$ref": "#/components/schemas/StatusPageTheme" + }, + "themeMode": { + "$ref": "#/components/schemas/StatusPageThemeMode" } } } @@ -3339,6 +3422,18 @@ } }, "schemas": { + "StatusPageTheme": { + "type": "string", + "enum": ["refined", "modern", "bold", "editorial"], + "default": "refined", + "description": "Visual theme for the public status page. Defaults to 'refined'." + }, + "StatusPageThemeMode": { + "type": "string", + "enum": ["auto", "light", "dark"], + "default": "auto", + "description": "Forces a light/dark mode on the public page. 'auto' follows the visitor's OS preference. Defaults to 'auto'." + }, "SuccessResponse": { "type": "object", "required": ["success", "msg"], diff --git a/server/src/config/services.ts b/server/src/config/services.ts index c7e1a4469..b6cbb3a30 100644 --- a/server/src/config/services.ts +++ b/server/src/config/services.ts @@ -348,7 +348,7 @@ export const initializeServices = async ({ incidentsRepository, }); - const statusPageService = new StatusPageService(statusPagesRepository); + const statusPageService = new StatusPageService(statusPagesRepository, settingsService); const services = { settingsService, diff --git a/server/src/controllers/notificationController.ts b/server/src/controllers/notificationController.ts index 0a49cbdb1..301c15446 100644 --- a/server/src/controllers/notificationController.ts +++ b/server/src/controllers/notificationController.ts @@ -37,13 +37,9 @@ class NotificationController implements INotificationController { const notification = testNotificationBodyValidation.parse(req.body); const success = await this.notificationsService.sendTestNotification(notification); - if (!success) { - throw new AppError({ message: "Sending notification failed", status: 500 }); - } - return res.status(200).json({ - success: true, - msg: "Notification sent successfully", + success, + msg: success ? "Notification sent successfully" : "Notification could not be sent — check the destination details.", details: { service: SERVICE_NAME }, }); } catch (error) { diff --git a/server/src/controllers/statusPageController.ts b/server/src/controllers/statusPageController.ts index 0c73b6e3b..190c3a9fd 100644 --- a/server/src/controllers/statusPageController.ts +++ b/server/src/controllers/statusPageController.ts @@ -66,6 +66,7 @@ class StatusPageController implements IStatusPageController { if (req.file) { imageValidation.parse(req.file); } + const teamId = requireTeamId(req?.user?.teamId); const statusPageId = req.params.id as string; if (!statusPageId) { @@ -127,7 +128,10 @@ class StatusPageController implements IStatusPageController { return res.status(200).json({ success: true, msg: "Status page retrieved successfully", - data: { statusPage, monitors: normalizedMonitors }, + data: { + statusPage, + monitors: normalizedMonitors, + }, }); } catch (error) { next(error); diff --git a/server/src/controllers/statusPageThemeFlag.ts b/server/src/controllers/statusPageThemeFlag.ts new file mode 100644 index 000000000..bd65d5cb2 --- /dev/null +++ b/server/src/controllers/statusPageThemeFlag.ts @@ -0,0 +1,33 @@ +import { DEFAULT_STATUS_PAGE_THEME, DEFAULT_STATUS_PAGE_THEME_MODE, type StatusPage } from "@/types/statusPage.js"; + +/** + * When STATUS_PAGE_THEMES_ENABLED is false, the controller drops incoming + * theme fields before persisting so an admin client can't accidentally store + * a value the public page won't honour. Whatever a caller sends here for + * `theme` / `themeMode` is silently ignored — the rest of the body is + * preserved verbatim. + * + * The strip is silent (not a 400) because the kill switch is an ops-side + * concern: API clients should not have to know whether the operator has + * disabled themes today, only that their saved value won't take effect. + * If we later decide we'd rather fail loudly, change this to throw a + * 400 AppError; downstream consumers already handle it. + */ +export const withoutThemeFields = (body: Record): Record => { + const rest = { ...body }; + delete rest.theme; + delete rest.themeMode; + return rest; +}; + +/** + * When STATUS_PAGE_THEMES_ENABLED is false, callers reading a status page + * should see the canonical default theme / mode regardless of what's stored + * in Mongo. Whatever the user previously chose stays in the DB so flipping + * the flag back on resurfaces their selection. + */ +export const applyDefaultTheme = (statusPage: StatusPage): StatusPage => ({ + ...statusPage, + theme: DEFAULT_STATUS_PAGE_THEME, + themeMode: DEFAULT_STATUS_PAGE_THEME_MODE, +}); diff --git a/server/src/db/models/Check.ts b/server/src/db/models/Check.ts index 541abb4d9..964936af9 100644 --- a/server/src/db/models/Check.ts +++ b/server/src/db/models/Check.ts @@ -271,6 +271,7 @@ const CheckSchema = new Schema( { timestamps: true, strict: false, + suppressReservedKeysWarning: true, timeseries: { timeField: "createdAt", metaField: "metadata", diff --git a/server/src/db/models/StatusPage.ts b/server/src/db/models/StatusPage.ts index e9b5b59aa..0b6451492 100644 --- a/server/src/db/models/StatusPage.ts +++ b/server/src/db/models/StatusPage.ts @@ -1,6 +1,12 @@ import { Schema, model, type Types } from "mongoose"; import type { StatusPage, StatusPageLogoDocument } from "@/types/statusPage.js"; -import { StatusPageTypes } from "@/types/statusPage.js"; +import { + DEFAULT_STATUS_PAGE_THEME, + DEFAULT_STATUS_PAGE_THEME_MODE, + StatusPageThemeModes, + StatusPageThemes, + StatusPageTypes, +} from "@/types/statusPage.js"; type StatusPageDocumentBase = Omit< StatusPage, @@ -108,6 +114,16 @@ const StatusPageSchema = new Schema( type: String, default: "", }, + theme: { + type: String, + enum: StatusPageThemes, + default: DEFAULT_STATUS_PAGE_THEME, + }, + themeMode: { + type: String, + enum: StatusPageThemeModes, + default: DEFAULT_STATUS_PAGE_THEME_MODE, + }, }, { timestamps: true } ); diff --git a/server/src/repositories/status-pages/MongoStatusPagesRepository.ts b/server/src/repositories/status-pages/MongoStatusPagesRepository.ts index d8e942271..3f4630eb1 100644 --- a/server/src/repositories/status-pages/MongoStatusPagesRepository.ts +++ b/server/src/repositories/status-pages/MongoStatusPagesRepository.ts @@ -59,6 +59,8 @@ class MongoStatusPagesRepository implements IStatusPagesRepository { showAdminLoginLink: doc.showAdminLoginLink, showInfrastructure: doc.showInfrastructure, customCSS: doc.customCSS, + theme: doc.theme, + themeMode: doc.themeMode, createdAt: this.toDateString(doc.createdAt), updatedAt: this.toDateString(doc.updatedAt), }; diff --git a/server/src/service/business/statusPageService.ts b/server/src/service/business/statusPageService.ts index 971f6897f..179461f25 100644 --- a/server/src/service/business/statusPageService.ts +++ b/server/src/service/business/statusPageService.ts @@ -1,5 +1,7 @@ import { type IStatusPagesRepository } from "@/repositories/index.js"; -import { StatusPage } from "@/types/index.js"; +import { ISettingsService } from "@/service/system/settingsService.js"; +import { DEFAULT_STATUS_PAGE_THEME, DEFAULT_STATUS_PAGE_THEME_MODE, StatusPage } from "@/types/index.js"; + export interface IStatusPageService { createStatusPage(userId: string, teamId: string, image: Express.Multer.File | undefined, data: Partial): Promise; getStatusPageByUrl(url: string): Promise; @@ -11,29 +13,52 @@ export interface IStatusPageService { export class StatusPageService implements IStatusPageService { private statusPagesRepository: IStatusPagesRepository; - constructor(statusPagesRepository: IStatusPagesRepository) { + private settingsService: ISettingsService; + constructor(statusPagesRepository: IStatusPagesRepository, settingsService: ISettingsService) { this.statusPagesRepository = statusPagesRepository; + this.settingsService = settingsService; } + private withoutThemeFields = (data: Partial): Partial => { + const { theme: _theme, themeMode: _themeMode, ...rest } = data; + return rest; + }; + + private applyDefaultTheme = (statusPage: StatusPage): StatusPage => ({ + ...statusPage, + theme: DEFAULT_STATUS_PAGE_THEME, + themeMode: DEFAULT_STATUS_PAGE_THEME_MODE, + }); + + private normalizeTheme = (statusPage: StatusPage): StatusPage => + this.settingsService.areStatusPageThemesEnabled() ? statusPage : this.applyDefaultTheme(statusPage); + + private normalizeInput = (data: Partial): Partial => + this.settingsService.areStatusPageThemesEnabled() ? data : this.withoutThemeFields(data); + createStatusPage = async ( userId: string, teamId: string, image: Express.Multer.File | undefined, data: Partial ): Promise => { - return await this.statusPagesRepository.create(userId, teamId, image, data); + const created = await this.statusPagesRepository.create(userId, teamId, image, this.normalizeInput(data)); + return this.normalizeTheme(created); }; getStatusPageByUrl = async (url: string): Promise => { - return await this.statusPagesRepository.findByUrl(url); + const statusPage = await this.statusPagesRepository.findByUrl(url); + return this.normalizeTheme(statusPage); }; getStatusPagesByTeamId = async (teamId: string): Promise => { - return await this.statusPagesRepository.findByTeamId(teamId); + const statusPages = await this.statusPagesRepository.findByTeamId(teamId); + return statusPages.map((sp) => this.normalizeTheme(sp)); }; updateStatusPage = async (id: string, teamId: string, image: Express.Multer.File | undefined, data: Partial): Promise => { - return await this.statusPagesRepository.updateById(id, teamId, image, data); + const updated = await this.statusPagesRepository.updateById(id, teamId, image, this.normalizeInput(data)); + return this.normalizeTheme(updated); }; deleteStatusPage = async (statusPageId: string, teamId: string): Promise => { diff --git a/server/src/service/infrastructure/statusService.ts b/server/src/service/infrastructure/statusService.ts index a21fa293f..e18fe4aea 100755 --- a/server/src/service/infrastructure/statusService.ts +++ b/server/src/service/infrastructure/statusService.ts @@ -232,10 +232,17 @@ export class StatusService implements IStatusService { // Build the status patch — computed against the projected window const patch: Partial = {}; - // Not enough data points yet - if (projectedWindow.length < monitor.statusWindowSize) { - patch.status = status === true ? "up" : "down"; + // Resolve "initializing" up-front, incidents should be created on initialization && down + let newStatus: MonitorStatus = monitor.status; + 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( monitor.id, monitor.teamId, @@ -248,24 +255,13 @@ export class StatusService implements IStatusService { return { monitor: updated, - statusChanged: false, + statusChanged, prevStatus, code, 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 // and take precedence over hardware breaches. const reachabilityResult = this.computeReachability(newStatus, projectedWindow, monitor.statusWindowThreshold); diff --git a/server/src/service/system/settingsService.ts b/server/src/service/system/settingsService.ts index 6638bc493..32b95d261 100755 --- a/server/src/service/system/settingsService.ts +++ b/server/src/service/system/settingsService.ts @@ -13,12 +13,14 @@ export type EnvConfig = { clientHost: string; dbConnectionString: string; dbType: DbType; + statusPageThemesEnabled: boolean; }; export interface ISettingsService { readonly serviceName: string; loadSettings(): EnvConfig; getSettings(): EnvConfig; + areStatusPageThemesEnabled(): boolean; getDBSettings(): Promise; updateDbSettings(newSettings: SettingsUpdate): Promise; } @@ -37,6 +39,7 @@ export class SettingsService implements ISettingsService { clientHost: env.CLIENT_HOST, dbConnectionString: env.DB_CONNECTION_STRING, dbType: env.DB_TYPE, + statusPageThemesEnabled: env.STATUS_PAGE_THEMES_ENABLED, }; } @@ -56,6 +59,10 @@ export class SettingsService implements ISettingsService { return this.settings; } + areStatusPageThemesEnabled() { + return this.settings.statusPageThemesEnabled; + } + private getRepository(): ISettingsRepository { if (!this.settingsRepository) { throw new AppError({ diff --git a/server/src/types/statusPage.ts b/server/src/types/statusPage.ts index 0329f4e6f..0ef4d72a9 100644 --- a/server/src/types/statusPage.ts +++ b/server/src/types/statusPage.ts @@ -1,6 +1,14 @@ export const StatusPageTypes = ["uptime", "infrastructure"] as const; export type StatusPageType = (typeof StatusPageTypes)[number]; +export const StatusPageThemes = ["refined", "modern", "bold", "editorial"] as const; +export type StatusPageTheme = (typeof StatusPageThemes)[number]; +export const DEFAULT_STATUS_PAGE_THEME: StatusPageTheme = "refined"; + +export const StatusPageThemeModes = ["auto", "light", "dark"] as const; +export type StatusPageThemeMode = (typeof StatusPageThemeModes)[number]; +export const DEFAULT_STATUS_PAGE_THEME_MODE: StatusPageThemeMode = "auto"; + export interface StatusPageLogo { data: string; contentType: string; @@ -30,6 +38,8 @@ export interface StatusPage { showAdminLoginLink: boolean; showInfrastructure: boolean; customCSS: string; + theme: StatusPageTheme; + themeMode: StatusPageThemeMode; createdAt: string; updatedAt: string; } diff --git a/server/src/validation/envValidation.ts b/server/src/validation/envValidation.ts index 447748516..3adf4c90c 100644 --- a/server/src/validation/envValidation.ts +++ b/server/src/validation/envValidation.ts @@ -1,5 +1,6 @@ import { z } from "zod"; import { DbTypes } from "@/types/settings.js"; +import { booleanCoercion } from "./shared.js"; const envSchema = z.object({ // Server Configuration @@ -20,6 +21,9 @@ const envSchema = z.object({ // Optional ORIGIN: z.string().optional(), + + // Feature flags + STATUS_PAGE_THEMES_ENABLED: booleanCoercion.default(true), }); export type ValidatedEnv = z.infer; diff --git a/server/src/validation/statusPageValidation.ts b/server/src/validation/statusPageValidation.ts index 8b2ab3f20..6a42d340c 100644 --- a/server/src/validation/statusPageValidation.ts +++ b/server/src/validation/statusPageValidation.ts @@ -1,6 +1,6 @@ import { z } from "zod"; import { booleanCoercion } from "./shared.js"; -import { StatusPageTypes } from "@/types/statusPage.js"; +import { StatusPageTypes, StatusPageThemes, StatusPageThemeModes } from "@/types/statusPage.js"; //**************************************** // Status Page Validations @@ -33,6 +33,8 @@ export const createStatusPageBodyValidation = z showAdminLoginLink: booleanCoercion.optional(), showInfrastructure: booleanCoercion.optional(), removeLogo: z.union([z.literal("true"), z.literal("false")]).optional(), + theme: z.enum(StatusPageThemes).optional(), + themeMode: z.enum(StatusPageThemeModes).optional(), }) .strip(); diff --git a/server/test/helpers/makeStatusPage.ts b/server/test/helpers/makeStatusPage.ts new file mode 100644 index 000000000..23c13bca1 --- /dev/null +++ b/server/test/helpers/makeStatusPage.ts @@ -0,0 +1,14 @@ +import type { StatusPage } from "../../src/types/index.ts"; + +export const makeStatusPage = (overrides?: Partial): StatusPage => + ({ + id: "sp-1", + teamId: "team-1", + userId: "user-1", + url: "my-status-page", + companyName: "Test Co", + monitors: ["mon-1"], + createdAt: "2026-01-01T00:00:00Z", + updatedAt: "2026-01-01T00:00:00Z", + ...overrides, + }) as StatusPage; diff --git a/server/test/unit/controllers/statusPageThemeFlag.test.ts b/server/test/unit/controllers/statusPageThemeFlag.test.ts new file mode 100644 index 000000000..b4f9435a9 --- /dev/null +++ b/server/test/unit/controllers/statusPageThemeFlag.test.ts @@ -0,0 +1,91 @@ +import { describe, expect, it } from "@jest/globals"; +import { applyDefaultTheme, withoutThemeFields } from "../../../src/controllers/statusPageThemeFlag.ts"; +import { DEFAULT_STATUS_PAGE_THEME, DEFAULT_STATUS_PAGE_THEME_MODE } from "../../../src/types/statusPage.ts"; +import { makeStatusPage } from "../../helpers/makeStatusPage.ts"; + +describe("statusPageThemeFlag", () => { + describe("withoutThemeFields", () => { + it("removes theme and themeMode from a body that has them", () => { + const body = { companyName: "Co", theme: "modern", themeMode: "dark" }; + const result = withoutThemeFields(body); + expect(result).toEqual({ companyName: "Co" }); + }); + + it("is a no-op when neither field is present", () => { + const body = { companyName: "Co", url: "page" }; + const result = withoutThemeFields(body); + expect(result).toEqual({ companyName: "Co", url: "page" }); + }); + + it("removes only the theme fields when one is present", () => { + const body = { companyName: "Co", theme: "bold" }; + const result = withoutThemeFields(body); + expect(result).toEqual({ companyName: "Co" }); + }); + + it("does not mutate the input body", () => { + const body = { companyName: "Co", theme: "modern", themeMode: "dark" }; + withoutThemeFields(body); + expect(body).toEqual({ companyName: "Co", theme: "modern", themeMode: "dark" }); + }); + + it("preserves all other fields verbatim", () => { + const body = { + companyName: "Co", + monitors: ["m-1", "m-2"], + isPublished: true, + showCharts: false, + color: "#13715B", + theme: "editorial", + themeMode: "light", + }; + const result = withoutThemeFields(body); + expect(result).toEqual({ + companyName: "Co", + monitors: ["m-1", "m-2"], + isPublished: true, + showCharts: false, + color: "#13715B", + }); + }); + }); + + describe("applyDefaultTheme", () => { + it("overwrites theme and themeMode with the canonical defaults", () => { + const sp = makeStatusPage({ theme: "modern", themeMode: "dark" }); + const result = applyDefaultTheme(sp); + expect(result.theme).toBe(DEFAULT_STATUS_PAGE_THEME); + expect(result.themeMode).toBe(DEFAULT_STATUS_PAGE_THEME_MODE); + }); + + it("leaves all other fields untouched", () => { + const sp = makeStatusPage({ + companyName: "Test Co", + url: "my-page", + monitors: ["mon-1", "mon-2"], + isPublished: true, + color: "#13715B", + }); + const result = applyDefaultTheme(sp); + expect(result.companyName).toBe("Test Co"); + expect(result.url).toBe("my-page"); + expect(result.monitors).toEqual(["mon-1", "mon-2"]); + expect(result.isPublished).toBe(true); + expect(result.color).toBe("#13715B"); + }); + + it("does not mutate the input status page", () => { + const sp = makeStatusPage({ theme: "modern", themeMode: "dark" }); + applyDefaultTheme(sp); + expect(sp.theme).toBe("modern"); + expect(sp.themeMode).toBe("dark"); + }); + + it("works on a status page that has no theme set yet", () => { + const sp = makeStatusPage({ theme: undefined, themeMode: undefined }); + const result = applyDefaultTheme(sp); + expect(result.theme).toBe(DEFAULT_STATUS_PAGE_THEME); + expect(result.themeMode).toBe(DEFAULT_STATUS_PAGE_THEME_MODE); + }); + }); +}); diff --git a/server/test/unit/services/settingsService.test.ts b/server/test/unit/services/settingsService.test.ts index 5c4935deb..da75d3ee5 100644 --- a/server/test/unit/services/settingsService.test.ts +++ b/server/test/unit/services/settingsService.test.ts @@ -15,6 +15,7 @@ const makeEnv = (overrides?: Partial): ValidatedEnv => CLIENT_HOST: "http://localhost:5173", DB_CONNECTION_STRING: "mongodb://localhost:27017/test_db", DB_TYPE: "mongodb", + STATUS_PAGE_THEMES_ENABLED: false, ...overrides, }) as ValidatedEnv; @@ -81,6 +82,7 @@ describe("SettingsService", () => { clientHost: "http://localhost:5173", dbConnectionString: "mongodb://localhost:27017/test_db", dbType: "mongodb", + statusPageThemesEnabled: false, }); }); @@ -103,6 +105,22 @@ describe("SettingsService", () => { }); }); + // ── areStatusPageThemesEnabled ────────────────────────────────────────── + + describe("areStatusPageThemesEnabled", () => { + it("returns false when STATUS_PAGE_THEMES_ENABLED env is false", () => { + const { service } = createService({ STATUS_PAGE_THEMES_ENABLED: false }); + + expect(service.areStatusPageThemesEnabled()).toBe(false); + }); + + it("returns true when STATUS_PAGE_THEMES_ENABLED env is true", () => { + const { service } = createService({ STATUS_PAGE_THEMES_ENABLED: true }); + + expect(service.areStatusPageThemesEnabled()).toBe(true); + }); + }); + // ── setRepository ─────────────────────────────────────────────────────── describe("setRepository", () => { diff --git a/server/test/unit/services/statusPageService.test.ts b/server/test/unit/services/statusPageService.test.ts index 0728b4f80..2deac9897 100644 --- a/server/test/unit/services/statusPageService.test.ts +++ b/server/test/unit/services/statusPageService.test.ts @@ -1,7 +1,9 @@ import { describe, expect, it, jest } from "@jest/globals"; import { StatusPageService } from "../../../src/service/business/statusPageService.ts"; import type { IStatusPagesRepository } from "../../../src/repositories/status-pages/IStatusPagesRepository.ts"; +import type { ISettingsService } from "../../../src/service/system/settingsService.ts"; import type { StatusPage } from "../../../src/types/index.ts"; +import { DEFAULT_STATUS_PAGE_THEME, DEFAULT_STATUS_PAGE_THEME_MODE } from "../../../src/types/index.ts"; // ── Helpers ────────────────────────────────────────────────────────────────── @@ -13,6 +15,8 @@ const makeStatusPage = (overrides?: Partial): StatusPage => url: "my-status-page", companyName: "Test Co", monitors: ["mon-1"], + theme: "modern", + themeMode: "dark", createdAt: "2026-01-01T00:00:00Z", updatedAt: "2026-01-01T00:00:00Z", ...overrides, @@ -28,18 +32,24 @@ const createRepo = () => removeMonitorFromStatusPages: jest.fn().mockResolvedValue(1), }) as unknown as jest.Mocked; -const createService = () => { +const createSettingsService = (themesEnabled: boolean) => + ({ + areStatusPageThemesEnabled: jest.fn().mockReturnValue(themesEnabled), + }) as unknown as jest.Mocked; + +const createService = (themesEnabled = true) => { const repo = createRepo(); - const service = new StatusPageService(repo); - return { service, repo }; + const settingsService = createSettingsService(themesEnabled); + const service = new StatusPageService(repo, settingsService); + return { service, repo, settingsService }; }; // ── Tests ──────────────────────────────────────────────────────────────────── describe("StatusPageService", () => { describe("createStatusPage", () => { - it("delegates to repository with all parameters", async () => { - const { service, repo } = createService(); + it("delegates to repository with all parameters when themes enabled", async () => { + const { service, repo } = createService(true); const data = { companyName: "New Co" }; const file = { originalname: "logo.png" } as Express.Multer.File; @@ -50,39 +60,75 @@ describe("StatusPageService", () => { }); it("passes undefined image when not provided", async () => { - const { service, repo } = createService(); + const { service, repo } = createService(true); await service.createStatusPage("user-1", "team-1", undefined, {}); expect(repo.create).toHaveBeenCalledWith("user-1", "team-1", undefined, {}); }); + + it("strips theme fields from input and applies defaults to result when themes disabled", async () => { + const { service, repo } = createService(false); + const data = { companyName: "New Co", theme: "bold" as const, themeMode: "light" as const }; + + const result = await service.createStatusPage("user-1", "team-1", undefined, data); + + expect(repo.create).toHaveBeenCalledWith("user-1", "team-1", undefined, { companyName: "New Co" }); + expect(result.theme).toBe(DEFAULT_STATUS_PAGE_THEME); + expect(result.themeMode).toBe(DEFAULT_STATUS_PAGE_THEME_MODE); + }); }); describe("getStatusPageByUrl", () => { it("delegates to repository", async () => { - const { service, repo } = createService(); + const { service, repo } = createService(true); const result = await service.getStatusPageByUrl("my-status-page"); expect(repo.findByUrl).toHaveBeenCalledWith("my-status-page"); expect(result).toEqual(makeStatusPage()); }); + + it("applies default theme when themes disabled", async () => { + const { service } = createService(false); + + const result = await service.getStatusPageByUrl("my-status-page"); + + expect(result.theme).toBe(DEFAULT_STATUS_PAGE_THEME); + expect(result.themeMode).toBe(DEFAULT_STATUS_PAGE_THEME_MODE); + }); }); describe("getStatusPagesByTeamId", () => { it("delegates to repository", async () => { - const { service, repo } = createService(); + const { service, repo } = createService(true); const result = await service.getStatusPagesByTeamId("team-1"); expect(repo.findByTeamId).toHaveBeenCalledWith("team-1"); expect(result).toEqual([makeStatusPage()]); }); + + it("applies default theme to every result when themes disabled", async () => { + const { service, repo } = createService(false); + (repo.findByTeamId as jest.Mock).mockResolvedValue([ + makeStatusPage({ id: "sp-1", theme: "bold" }), + makeStatusPage({ id: "sp-2", theme: "editorial" }), + ]); + + const result = await service.getStatusPagesByTeamId("team-1"); + + expect(result).toHaveLength(2); + for (const sp of result) { + expect(sp.theme).toBe(DEFAULT_STATUS_PAGE_THEME); + expect(sp.themeMode).toBe(DEFAULT_STATUS_PAGE_THEME_MODE); + } + }); }); describe("updateStatusPage", () => { it("delegates to repository with all parameters", async () => { - const { service, repo } = createService(); + const { service, repo } = createService(true); const updated = makeStatusPage({ companyName: "Updated Co" }); (repo.updateById as jest.Mock).mockResolvedValue(updated); const file = { originalname: "new-logo.png" } as Express.Multer.File; @@ -92,11 +138,31 @@ describe("StatusPageService", () => { expect(repo.updateById).toHaveBeenCalledWith("sp-1", "team-1", file, { companyName: "Updated Co" }); expect(result).toBe(updated); }); + + it("passes theme and themeMode through to the repository when themes enabled", async () => { + const { service, repo } = createService(true); + const patch = { theme: "modern" as const, themeMode: "dark" as const }; + + await service.updateStatusPage("sp-1", "team-1", undefined, patch); + + expect(repo.updateById).toHaveBeenCalledWith("sp-1", "team-1", undefined, patch); + }); + + it("strips theme fields from input and applies defaults to result when themes disabled", async () => { + const { service, repo } = createService(false); + const patch = { companyName: "Updated Co", theme: "modern" as const, themeMode: "dark" as const }; + + const result = await service.updateStatusPage("sp-1", "team-1", undefined, patch); + + expect(repo.updateById).toHaveBeenCalledWith("sp-1", "team-1", undefined, { companyName: "Updated Co" }); + expect(result.theme).toBe(DEFAULT_STATUS_PAGE_THEME); + expect(result.themeMode).toBe(DEFAULT_STATUS_PAGE_THEME_MODE); + }); }); describe("deleteStatusPage", () => { it("delegates to repository and returns deleted page", async () => { - const { service, repo } = createService(); + const { service, repo } = createService(true); const result = await service.deleteStatusPage("sp-1", "team-1"); diff --git a/server/test/unit/services/statusService.test.ts b/server/test/unit/services/statusService.test.ts index 6bdfbe312..a17acbcd9 100644 --- a/server/test/unit/services/statusService.test.ts +++ b/server/test/unit/services/statusService.test.ts @@ -502,9 +502,12 @@ describe("StatusService", () => { expect(result.monitor.status).toBe("down"); }); - it("during warmup (window not full) the stored status tracks the raw check", async () => { - // Early-return branch: monitor.status is written to reflect the current check and - // no status-changed notification is emitted. This is the service's documented warmup behavior. + it("during warmup, sub-threshold raw checks no longer flip stored status (regression: down-during-init incident not resolving)", async () => { + // Once the monitor has left 'initializing', the warmup branch must NOT silently + // 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 { service, monitorsRepository } = createService(); (monitorsRepository.findById as jest.Mock).mockResolvedValue(monitor); @@ -513,10 +516,58 @@ describe("StatusService", () => { const result = await service.updateMonitorStatus(makeStatusResponse({ status: false }), makeCheck({ status: 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]); }); + 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 () => { const monitor = makeMonitor({ statusWindow: [true, true, true, true], statusWindowSize: 5, status: "up" }); const { service, logger, monitorsRepository, monitorStatsRepository } = createService();