Compare commits

...
Author SHA1 Message Date
Alexander Holliday c6461d2635 Revert "chore(i18n): close translation gaps across all 16 locales" 2026-04-27 10:14:01 -07:00
Gorkem Cetin 959e2ff7b8 Merge pull request #3585 from bluewave-labs/chore/locale-completeness
chore(i18n): close translation gaps across all 16 locales
2026-04-27 11:24:38 -04:00
gorkem-bwl 2f8765cf3e chore(i18n): close translation gaps across all 16 locales
- Seed the 29 keys that were missing in every non-English locale (Pushover/Twilio config, register setup notice, public status-page status-bar messages, "service is down")
- Fill core UI strings (sidebar menu, buttons, table headers, password rules, image upload, auth footer) where they were left as empty values in the original translations
- Bring Spanish to 100% net coverage with a hand pass over remaining empties and same-as-English entries

Coverage net of empty/missing keys:
- 6 locales now at 100% (de, es, ru, th, zh-CN, zh-TW)
- All locales above 94% (worst: ar/fi at 94.8%, was 85.1% / 87.9%)
- Zero missing keys in any locale (was 29 each)

Some keys are intentionally same-as-English (HTTP, gRPC, Pagespeed, Docker etc.). Long-form copy in createMonitor descriptions and a few infrastructure stat labels remain empty in the lower-coverage locales for native review.
2026-04-27 11:21:48 -04:00
gorkem-bwl 7342385729 fix(client): unblock the auth page build
Drop unused HeaderAuthControls/SPACING imports and switch the form-side wrapper from Stack to Box so the polymorphic component prop type-checks.
2026-04-26 02:29:23 -04:00
gorkem-bwl 671911dc1d feat(client): elevate auth pages with a two-column brand layout
- BaseAuthPage now renders a left form column and a right brand panel with eyebrow / tagline / description copy and a chess-board pattern over the brand green gradient
- Move the language selector and theme toggle to the page's top-right inside the form column so they read clearly in light and dark
- Every auth page (login, register, recovery, set new password) inherits the new layout
- Add brandPanel translations across all 16 locales; phrase the tagline as "your servers" instead of "stack" so it translates cleanly
2026-04-26 02:26:29 -04:00
gorkem-bwl 2ec55c6469 fix(client): replace lingering hardcoded colours with theme tokens
- Default status-page colour now uses the brand green instead of a royal-blue hex
- PageSpeed API-key alert pulls from theme.palette.warning + alpha for both modes instead of hand-rolled amber values
- Settings JSON preview block uses action.hover instead of the hand-rolled #1e1e1e/#f5f5f5 pair
- Drop the redundant #E0E0E0 thumb override on SwitchComponent so the theme MuiSwitch override actually wins
2026-04-26 01:59:09 -04:00
gorkem-bwl d678b3a304 fix(client): lighten the upload icon in ImageUpload
Match the rest of the icon system: 20px, 1.5 stroke, currentColor with 0.7 opacity instead of the lucide default heavy 24/2 stroke.
2026-04-26 01:56:28 -04:00
gorkem-bwl bf3bd50624 feat(client): unify card titles to the eyebrow style across uptime details
- StatBox titles now use the eyebrow variant (matches /uptime summary cards)
- BaseChart drops its leading icon block and renders the title via eyebrow so all chart cards share one header style
- Inside the average-response gauge, the qualitative label uses eyebrow with the status colour and the metric uses h1; the gauge track is a neutral disabled-action background so the active arc reads in light and dark
2026-04-26 01:56:22 -04:00
gorkem-bwl a4f69daae7 fix: surface notification test failures cleanly instead of as 500s
Server-side, return 200 with success: false and a friendly message when sendTestNotification reports failure (the underlying call already swallows the error); reserve real 500s for unexpected exceptions.

Client-side, teach usePost to honour the response body's success flag so success:false flips the toast to error without throwing through axios. Also tidy the toast container: drop icons, no wrapping, single-line ellipsis with a sensible max-width that hugs short messages.
2026-04-26 01:56:13 -04:00
gorkem-bwl 127ee5508a fix(client): truncate long notification destinations with a middle ellipsis
The destination column wrapped onto two lines for long webhook URLs. Cap the cell at 320px and use rtl + plaintext bidi so the start and end of the URL stay visible with an ellipsis in between; full address is in the title attribute.
2026-04-26 01:56:05 -04:00
gorkem-bwl d71fbf8c06 fix(client): bump dark-mode selected toggle background so it stands out
The 6% primary tint that read fine in light mode disappeared against dark backgrounds. Use a 22% tint in dark mode (30% on hover) and keep the lighter 6/10% in light mode.
2026-04-26 01:55:58 -04:00
gorkem-bwl aa3e72ec6d fix(client): make confirmation modals dismiss on ESC
Wire the dialog's onClose to onCancel for keyboard escape but ignore backdrop clicks so users can't lose work by clicking outside the modal.
2026-04-26 01:55:49 -04:00
gorkem-bwl 9d7f4929ad fix(client): use native language names in the settings dropdown too
Export the languageNames map and reuse it in the Settings page so EN/DE/TR turn into English/Deutsch/Türkçe alongside the auth-page selector.
2026-04-26 01:55:42 -04:00
gorkem-bwl 319f667028 feat(client): unify section headers on /logs and group titles with their tables
- Apply the eyebrow variant to "Runtime stats" and "Memory & CPU" so /logs sections share the same uppercase header style as Job queue
- Pair each section's heading + explainer with its table in a tighter sub-stack so the big gap only sits between sections, not under the explainer
- Restore the missing useTheme() call inside TableFailedJobs and TableLogs so the monospace token resolves
2026-04-26 01:55:33 -04:00
gorkem-bwl bcab1a0a4d fix(client): swap the sidebar logs icon from Database to ScrollText
ScrollText reads as logs/journal; Database read more like a storage admin tool.
2026-04-26 01:55:25 -04:00
gorkem-bwl 11ea7dcb3b feat(client): add a sidebar-specific accent colour for dark mode
The sidebar selected-icon colour was sharing primary.main, which read too dark in dark mode. Introduce palette.sidebar.accent (brand green in light mode, a lighter green in dark mode) and route NavItem through it so primary stays brand-green for buttons and the rest of the UI.
2026-04-26 01:55:17 -04:00
gorkem-bwl 1bff81c6bb fix(client): tighten the toast appearance
- Drop the per-type icon
- Lower min-height to 40px and tighten padding
- Thin both the active progress bar and its track to 2px and pin them to the same baseline so they sit on top of each other
2026-04-26 01:32:05 -04:00
gorkem-bwl 2016a208f2 fix(client): keep Chrome autofill background within the rounded input
The autofill inset shadow was bleeding past the rounded corners. Clip it via overflow: hidden on the outlined input root and bump the override rules to !important so they beat Chrome's user-agent styles.
2026-04-26 01:32:00 -04:00
gorkem-bwl dfc1b65e4b fix(client): restyle the register page setup notice
Drop the default MUI info-blue alert in favour of a neutral panel: theme-driven action.hover background, divider border, secondary text colour and no icon. Reads as a quiet aside instead of a status message.
2026-04-26 01:31:54 -04:00
gorkem-bwl f7629eb1be refactor(client): show native language names instead of country flags
Replace the flag + 2-letter code in the language selector with each language's native name (English, Deutsch, 日本語, ...) and drop the unused flag-icons dependency.
2026-04-26 01:31:47 -04:00
gorkem-bwl 72fc28c1fa fix(client): give auth pages a stable form width
The login/register form used percentage widths that collapsed to ~15% on wide screens, wrapping the "Forgot password" / "Reset password" links onto two lines. Switch to a fixed 400px max-width that just shrinks below it on small screens.
2026-04-26 01:31:41 -04:00
gorkem-bwl da70d07051 chore(client): document MUI default fallbacks in getResponseColor
Annotate the hex literals used when callers omit theme colours so the intent (defensive MUI default match) is obvious instead of looking like arbitrary values.
2026-04-26 01:22:06 -04:00
gorkem-bwl c6db7e6479 refactor(client): centralise monospace font through the theme
Add a fontFamilyMonospace token to theme.typography (ui-monospace stack with sensible fallbacks) and route the four ad-hoc fontFamily="monospace" call sites through it so the project has one source of truth.
2026-04-26 01:22:01 -04:00
gorkem-bwl 82ad40ac82 fix(client): replace hardcoded blue accents in tooltip and toast
- Tooltip backgrounds now pull from the theme's grey palette instead of a hand-rolled blue gradient (visible bug in dark mode)
- Toast progress bars use theme.palette.primary.main so they match the rest of the brand
2026-04-26 01:21:54 -04:00
gorkem-bwl 4fd9b2ecf5 feat(client): add eyebrow typography variant and lighter page titles
- Introduce a reusable eyebrow Typography variant in the theme (13px, 500 weight, uppercase, 0.08em tracking) for section headings
- Apply it to ConfigBox titles in /settings and to "Job queue" / "Failed jobs" in /logs
- Drop the page header weight from 600 to 400 with tighter tracking so titles read lighter and more refined
2026-04-26 01:21:47 -04:00
gorkem-bwl 2dccf73050 fix(client): green-tone the empty state illustration
The foreground card was painted in blue (#EEF4FE/#7DA8E8 etc.); recoloured to the brand green family so the illustration matches the rest of the UI.
2026-04-26 01:21:11 -04:00
gorkem-bwl d6532c60a6 fix(client): brand primary colour is the brand green, not blue
Renames the primary palette token from blueBlueWave to brandGreen and points it at #13715B in both light and dark themes, so primary buttons, sidebar selection, slider rings, switch tracks etc. follow the brand instead of the old blue.
2026-04-26 01:21:04 -04:00
gorkem-bwl 99be8651aa feat(client): unify brand mark — green king across sidebar, page header and favicon
- Replace the blue chess-piece SVG with a green king silhouette adapted from Cburnett's chess set (Wikimedia Commons, CC BY-SA 3.0); applies to the page-header logo and the browser favicon
- Drop the placeholder green "C" square in the sidebar in favour of the same king SVG
- Add a NOTICE file documenting the asset attribution and license
2026-04-26 01:07:16 -04:00
gorkem-bwl 8ca53bd765 fix(client): smaller, lighter labels on uptime status cards
Up/down/paused/initializing labels now use the same uppercase 11px treatment as the table headers, with looser tracking, instead of the heavier h2 variant.
2026-04-26 01:07:10 -04:00
gorkem-bwl 26e49f6161 fix(client): drop card chrome around the settings save button
The sticky save bar no longer renders a paper background, top border or full-width margin extension — it just sticks to the bottom on its own.
2026-04-26 00:42:16 -04:00
gorkem-bwl cca027b5eb fix(client): subtle tinted selection on toggle button group
Selected segment uses a 6% primary alpha rather than the previous green tint, and the per-button border override is gone so adjacent segments share one clean divider line.
2026-04-26 00:42:11 -04:00
gorkem-bwl 51f9c09132 feat(client): unify switch, radio and slider styling via theme overrides
- Switch: 36x20 contained pill with 6px right padding so labels keep their distance even inside Stacks
- Radio: theme-level override, 20px ring with a fixed-size inner dot — checked state no longer animates a scale change that pushed labels around
- Slider: white thumb with primary-colour ring, 4px track, soft hover/active glow
- Drop the custom RadioInput icon overrides that bypassed the theme and caused the size jiggle
2026-04-26 00:32:18 -04:00
gorkem-bwl 897204ead3 refactor(client): extract useClientPagination hook and clean up Select prop
- Replace duplicated page/rowsPerPage state in Team, Notifications and Status Pages tables with a shared useClientPagination hook
- Drop unused placeholderColor prop from Select; placeholder always uses secondary text
- Restore LAYOUT.MD constant for the account menu item gap
2026-04-26 00:22:14 -04:00
gorkem-bwl 25735df0c6 fix(client): use theme divider for table header line so it shows in dark mode 2026-04-26 00:18:45 -04:00
gorkem-bwl e3b6183e00 fix(client): soften empty state typography and copy
Drop the heavy 600-weight title in favour of regular-weight secondary text, and reword "Nothing here" to "Nothing to show yet".
2026-04-26 00:18:41 -04:00
gorkem-bwl b2741ad567 fix(client): increase internal padding on status summary cards 2026-04-26 00:18:37 -04:00
gorkem-bwl 7905e97a84 fix(client): match account menu icon style with sidebar nav icons 2026-04-26 00:13:35 -04:00
gorkem-bwl b7d719132d fix(client): use secondary text color for empty select placeholders
Disabled-text was too pale for filter dropdowns like Type/Status/State, where the placeholder doubles as the field label.
2026-04-26 00:13:32 -04:00
gorkem-bwl 210e03cea0 fix(client): refine table header divider and typography
- replace heavier per-cell header borders with one lighter row divider
- shrink header text to 11px with looser tracking for a more refined feel
- tighten failed-jobs labels: "Fail count" -> "Count", "Last failed at" -> "Last failed"
2026-04-26 00:13:27 -04:00
gorkem-bwl 995fc59299 feat(client): add pagination to team, notifications and status page tables 2026-04-26 00:13:23 -04:00
gorkem-bwl cbd8236cb4 chore(i18n): seed jobQueueExplainer and failedJobsExplainer for non-English locales 2026-04-26 00:13:19 -04:00
gorkem-bwl 095086cdfd chore(i18n): seed translations for new UI surfaces
Across en + 15 locales:
- pages.<X>.fallback.title / .description for every page that has an
  EmptyState (uptime, infrastructure, pageSpeed, notifications,
  maintenance, statusPages, incidents, logs, logs.queueFallback,
  checks, account.team).
- pages.<X>.header.title / .description for every page that uses the
  new PageHeader (same list, plus settings).
- pages.logs.diagnostics.sections.runtimeStats / .memoryCpu titles
  and descriptions for the diagnostics section explainers.
- components.pageHeader.links.support / docs / changelog tooltip
  labels.

en.json also gains pages.logs.jobQueueExplainer and
.failedJobsExplainer (English only — non-English locales fall back
to English until a translator sweep).
2026-04-25 23:28:51 -04:00
gorkem-bwl 59846a041f fix(client): dark-mode text-field polish
- MuiOutlinedInput hover override: was inheriting MUI's default
  white outline in dark mode (too bright). Now uses an alpha-23%
  white in dark and text.primary in light.
- TextInput: -webkit-autofill now repaints the input bg with
  background.paper (instead of Chrome's harsh blue/yellow autofill
  highlight), text in text.primary, with the standard 5000s-transition
  trick to suppress the brief flash. Works in both modes.
2026-04-25 23:28:32 -04:00
gorkem-bwl 7d91d9e28b fix(client): job queue table layout + theme-aware running-row tint
TableJobs:
- Cut from 11 to 7 columns, dropping active / runCount / failCount /
  lastFinishedAt (covered by Failed jobs table or by lastRun + lastRunTook).
- All cells get whiteSpace:nowrap + textOverflow:ellipsis + maxWidth so
  long timestamps and IDs no longer wrap and inflate row height; full
  value visible via title tooltip.
- Running-row tint: was theme.palette.success.light (too saturated in
  light, drowns white text in dark). Now #ECF7F2 in light, an 18%-alpha
  green in dark — readable in both modes.

TabQueue:
- One-line explainer above the Job queue heading, with the words
  "Highlighted rows" wrapped in the same green tint so the meaning
  is immediately associated.
- One-line explainer above Failed jobs heading too.
2026-04-25 23:27:50 -04:00
gorkem-bwl 752f59b09b feat(client): diagnostics page polish
- Stats and StatGauges use CSS grid (5 + 4 columns) so cards in each
  row are equal width; widths overridden against the legacy 25%-flex
  GradientBox so they fill their grid cell.
- DetailGauge gains a maxWidth prop (default 225) so consumers in
  wide grids can opt out of the cap.
- Section explainers above each row: "Runtime stats" + description,
  "Memory & CPU" + description (i18n driven, propagated to all 16
  locales via pages.logs.diagnostics.sections).
- Both grids render immediately with placeholder "—" values, so the
  initial paint shows the layout and values fill in as data loads
  (eliminates the layout shake when switching to the tab).
2026-04-25 23:27:35 -04:00
gorkem-bwl 262c4eee93 feat(client): PageHeader on every page; remove sidebar bottom menu
- New PageHeader component (variant D — grouped icon-pill toolbar):
  big title + muted description on the left, Support / Docs /
  Changelog as a 3-icon segmented pill on the right with tooltips.
  External links open in a new tab.
- BasePage / BasePageWithStates / MonitorBasePageWithStates accept
  a headerKey prop; when set, render PageHeader pulling
  pages.<headerKey>.header.title and .description from i18n.
  When unset, falls back to the existing breadcrumb (no behavior
  change for not-yet-migrated pages).
- All top-level pages (uptime, infrastructure, pageSpeed,
  notifications, maintenance, statusPages, incidents, logs, checks,
  account, settings) now pass their headerKey.
- Sidebar: removed the bottom menu (Support / Discussions / Docs /
  Changelog) since those links now live in the page header.
2026-04-25 23:27:22 -04:00
gorkem-bwl 031a6fdf3c feat(client): unified EmptyState across all pages and table empties
- New EmptyState + EmptyStateIllustration components: stacked-cards SVG
  with grid background, theme-aware light/dark palette.
- Variants: default (centered with title + description), compact
  (horizontal, in-section), fullscreen (vertically centers in viewport).
- Wired into Checks, Incidents, Logs (Logs+Queue tabs), Notifications,
  Maintenance, Status pages, and Team tab — each with i18n title +
  description and a fullscreen layout when truly empty.
- Table.EmptyView now wraps the EmptyState in a divider-bordered card
  so short messages no longer look orphaned.
- Incidents Option-A short-circuit: when summary.total === 0, replace
  the whole page chrome with EmptyState; otherwise keep filters + cards.
- Fallback.tsx (BaseFallback / EmptyFallback / EmptyMonitorFallback /
  ErrorFallback) refactored to delegate to EmptyState.
2026-04-25 23:26:34 -04:00
gorkem-bwl ff208710d7 feat(client): unified EmptyState component for empty/error placeholders
Replaces the cards-with-halo SkeletonCard fallback (which produced a
washed-out, hard-to-read placeholder) with a single canonical empty
state used everywhere in the app.

What's new:

- EmptyStateIllustration.tsx — custom inline SVG: two stacked monitor
  cards (front blue, back gray, both with hairline strokes and a soft
  fade toward the bottom), set against a faint grid of solid + dashed
  background lines. Uses only lightened palette tokens (#7DA8E8 blue,
  #B6C2CF gray, #CBD5E1 grid).
- EmptyState.tsx — the layout: illustration + title + description +
  optional CTA + optional secondary link + optional inline alert slot.
  Supports a compact horizontal variant for in-panel use.

Migrations:

- Fallback.tsx: BaseFallback / EmptyFallback / EmptyMonitorFallback /
  ErrorFallback now delegate to EmptyState. Public APIs unchanged so
  every existing consumer (BasePageWithStates, MonitorBasePageWithStates,
  Pages/Uptime, Pages/Notifications, Pages/Infrastructure, etc.) keeps
  working without edits.
- BasePage.tsx: PageSpeedKeyPriorityFallback rebuilt on top of EmptyState
  with the warning slot. Fixes the previous reports of "white cloudy
  area" + half-faded text — message and link now render in consistent
  dark text with green Settings link.

No prop changes for any page-level consumer. The illustration is a
single SVG with no external assets.
2026-04-25 21:19:52 -04:00
Gorkem Cetin 29f1041cc3 Merge pull request #3578 from ZeinebMegaadi/fix/docs-link
fix:replaced the broken link with the working one everywhere
2026-04-25 19:40:31 -04:00
ZeinebMegaadi a613bfb45a fix:replaced the broken link with the working one everywhere 2026-04-25 15:33:42 +01:00
Gorkem Cetin ed49fd41db Merge pull request #3575 from ayshaL/fix/notification-channel-typo
Fixed typo in notification
2026-04-24 19:17:58 -04:00
Aicha Lassoued 625f9b588e Fix typo in heapAllocation string 2026-04-24 22:45:45 +01:00
Aicha Lassoued 6fa73dce49 fixed typo 2026-04-24 22:24:00 +01:00
Alexander Holliday e8892af8ba Merge pull request #3573 from bluewave-labs/fix/swagger-monitors-teams-args
docs(openapi): document all query params on /monitors/team/with-checks
2026-04-24 10:43:34 -07:00
Alexander Holliday e413991e63 Merge pull request #3571 from bluewave-labs/fix/check-schema-errors-warning
fix(server): suppress mongoose reserved-key warning on Check.errors
2026-04-24 10:19:03 -07:00
Alexander Holliday e909ddd78b Merge pull request #3572 from bluewave-labs/fix/version-from-package-json
fix(client): source app version from package.json
2026-04-24 10:12:20 -07:00
Alexander Holliday 2ed5015aee Merge pull request #3570 from bluewave-labs/fix/vite-allowed-hosts
fix(client): allow configurable Vite allowed hosts
2026-04-24 09:58:27 -07:00
Alexander Holliday 6e89be2ac5 Merge pull request #3574 from bluewave-labs/fix/open-site-action-internal-url
fix(client): hide Open site action when URL is not browser-openable
2026-04-24 09:51:01 -07:00
gorkem-bwl 50fb4f47fd fix(client): hide Open site action when URL is not browser-openable
The Open site action in monitor row menus called `window.open(monitor.url)`
unconditionally, which produced unresolvable navigation for monitors
targeting internal services:
- Hardware monitors always point at a Capture agent (e.g.
  http://capture:59232/api/v1/metrics) that the user's browser can't
  reach.
- Port, ping, docker, game, grpc, and websocket monitors store hostnames
  or non-HTTP endpoints, which browsers can't load anyway.

This change hides the action where it can't possibly work:
- Removed entirely from the Infrastructure (hardware) monitors table.
- In the Uptime monitors table, only shown for http and pagespeed
  monitor types whose URL starts with http:// or https://.

A more comprehensive fix that adds a separate user-facing siteUrl
field on the Monitor schema is left for a follow-up.

Closes #3434
2026-04-23 23:38:07 -04:00
gorkem-bwl 22f1d035b7 docs(openapi): document all query params on /monitors/team/with-checks
The OpenAPI spec only listed `limit` for GET /monitors/team/with-checks,
but the route's Zod schema (getMonitorsWithChecksQueryValidation) also
accepts page, rowsPerPage, filter, field, order, type, and explain.
Users hitting the endpoint via Swagger UI would either get rejected
with "page is not allowed" (when guessing param names) or miss
pagination entirely.

Adds the missing parameters with constraints mirrored from the
validation schema. Also bumps `limit` max from 50 to 100 to match
the schema (was 100 in code, 50 in spec).

Closes #3354
2026-04-23 23:35:52 -04:00
gorkem-bwl f654310c4d fix(client): source app version from package.json
The client version shown on the Settings page was hardcoded as a
literal in vite.config.ts, while client/package.json sat at the
placeholder "0.0.0". Bumping the displayed version required editing
two unrelated places, and stale Docker client images would keep
showing the old number after upgrades.

This change makes client/package.json the single source of truth
and reads it at build time. Bumps client/package.json from 0.0.0
to 3.6.1 to preserve current behaviour.

Closes #3271
2026-04-23 23:33:41 -04:00
gorkem-bwl d44f7497a5 fix(server): suppress mongoose reserved-key warning on Check.errors
Mongoose 8 logs a reserved-key warning at boot because the Check schema
defines an `errors` field, which collides with Mongoose's internal
document `errors` accessor. The field is intentional and safe to keep,
so opt out of the warning via `suppressReservedKeysWarning: true`.

Closes #1539
2026-04-23 23:32:33 -04:00
gorkem-bwl dbccce445b fix(client): allow configurable Vite allowed hosts
Vite >=4.3 rejects requests with a Host header not in the allowlist,
which broke status-page submissions and dev-server access for users
serving Checkmate behind a reverse proxy after upgrading.

Adds VITE_ALLOWED_HOSTS env var (comma-separated list). When unset,
falls back to allowing all hosts so existing self-hosted deployments
keep working without changes.

Closes #3397
Closes #2951
2026-04-23 23:31:05 -04:00
Alexander Holliday 6ed0818bad Merge pull request #3566 from bluewave-labs/fix/build
fix: build
2026-04-23 11:07:39 -07:00
Alex Holliday f2e3640e28 add helper function to extract strings 2026-04-23 11:07:01 -07:00
Alex Holliday 8bfffd540d remove esbuild 2026-04-23 11:06:51 -07:00
Alex Holliday 559288fceb bump version 2026-04-23 10:14:05 -07:00
Alexander Holliday 8886566a8f Merge pull request #3564 from bluewave-labs/fix/resolve-incident-comment
fix comment type
2026-04-23 10:13:17 -07:00
Alex Holliday 28cb2aeacd fix comment type 2026-04-23 10:01:46 -07:00
Alex Holliday cbd82e29af bump version 2026-04-23 09:49:34 -07:00
Alexander Holliday 50876e57b9 Merge pull request #3520 from ZeinebMegaadi/docs/monitor-lifecycle-explained
docs: added monitor lifecycle explanation to README
2026-04-23 09:45:32 -07:00
Alexander Holliday b70916de20 Merge pull request #3561 from bluewave-labs/fix/line-endings
normalize line endings
2026-04-23 09:40:56 -07:00
Alex Holliday 3202a4276d normalize line endings 2026-04-23 09:30:43 -07:00
Gorkem Cetin 7a8caec159 Change demo link for Checkmate
Updated the demo link for Checkmate in the README.
2026-04-22 22:53:25 -04:00
Alexander Holliday 7e7f1bb6ca Merge pull request #3557 from bluewave-labs/fix/hide-register-tip-on-login
fix: hide register tip on login and redirect to setup when no super admin
2026-04-20 11:50:16 -07:00
Alex Holliday 5f12459bfd explicit import 2026-04-20 11:48:48 -07:00
Alex Holliday 27e866ba08 use lazy get 2026-04-20 11:47:43 -07:00
Alex Holliday f7a2b2af54 Merge branch 'develop' into fix/hide-register-tip-on-login 2026-04-20 11:28:25 -07:00
Alexander Holliday 3f35176651 Merge pull request #3558 from bluewave-labs/chore/remove-timescale-db
chore: remove timescale db
2026-04-20 11:28:07 -07:00
Alex Holliday 62c7e20726 purge pg types 2026-04-20 11:06:56 -07:00
Alex Holliday ff08645087 remove pool references, update docs 2026-04-20 11:04:43 -07:00
Alex Holliday 3e947ca2df remove bullmq, pg, bump dependencies 2026-04-20 11:03:13 -07:00
Alex Holliday cc32206547 purge timescaledb 2026-04-20 11:00:49 -07:00
Alexander Holliday 984a611d19 Merge pull request #3534 from egeoztass/feat/twilio-sms-notification
feat: add Twilio SMS notification channel
2026-04-20 10:54:12 -07:00
gorkem-bwl 39011e2e33 style: apply prettier formatting 2026-04-20 13:53:50 -04:00
gorkem-bwl 4998fe4c94 fix: hide register tip on login and redirect to setup when no super admin (#3556)
## Changes
- Removed the "Register here" link from the login page — it misled users into thinking public registration was open.
- Added redirect from /login to /register when no super admin exists (initial setup).
- Added an info alert on the register page clarifying the page is only for initial setup; additional users are invited from team settings. Hidden for the invite-token flow.
- Extracted shared useSuperAdminRedirect hook to dedupe identical fetch/redirect logic across Login and Register.

## Benefits
- Clearer UX: login page no longer suggests self-registration is available post-setup.
- Correct routing on fresh installs: users land on the registration page instead of a login page they can't use.
2026-04-20 13:50:36 -04:00
Gorkem Cetin 247308b636 Clarify demo access information in README
Separated demo credentials from the main demo description for clarity.
2026-04-20 12:38:02 -04:00
Alexander Holliday 33110cf6c8 Merge pull request #3545 from ZeinebMegaadi/fix/node-version-docs
docs: update Node.js version requirement to >=20 in contributing guide
2026-04-20 09:35:04 -07:00
Alexander Holliday 15c3fcb9b9 Merge pull request #3549 from SkyKingPX/develop
Add build_images.bat for Docker image builds
2026-04-20 09:34:24 -07:00
Alexander Holliday d5295f4f6c Merge pull request #3552 from Smolcup/docs/fix-code-of-conduct-repo-name-v2
docs: update repo name bluewave-uptime to checkmate in CODE_OF_CONDUCT
2026-04-20 09:33:30 -07:00
Alexander Holliday 886e04710f Merge pull request #3553 from Smolcup/docs/add-i18n-contribution-guide-v2
docs: update i18n contribution guide
2026-04-20 09:33:07 -07:00
Alexander Holliday d0e79ea99c Merge pull request #3555 from ZeinebMegaadi/fix/docs-link
fix: correct docs link URL (404 issue)
2026-04-20 09:30:34 -07:00
ZeinebMegaadi a0568a44a6 fix: correct docs link URL (404 issue) 2026-04-20 10:05:12 +01:00
Smolcup 4435a66255 docs: add i18n contribution guide 2026-04-19 21:21:04 +02:00
Smolcup dbc592b86b docs: update repo name bluewave-uptime to checkmate in CODE_OF_CONDUCT
Updated the Code of Conduct to reflect the new project name and ensure a welcoming environment for contributors.
2026-04-19 20:28:53 +02:00
SkyKing_PX 47a78edba8 Update Dockerfile paths for services in build_images.bat 2026-04-19 14:12:41 +02:00
SkyKing_PX f4fd836137 Fix paths in docker/coolify/build_images.sh 2026-04-19 14:12:00 +02:00
SkyKing_PX 6c6823cf76 Add build_images.bat for docker/coolify 2026-04-19 14:10:23 +02:00
SkyKing_PX 59187cc114 Add build_images.bat for docker/dist-mono 2026-04-19 14:07:32 +02:00
SkyKing_PX 0ad9ef15af Add build_images.bat for docker/dist 2026-04-19 14:06:14 +02:00
SkyKing_PX e23a185eaf Fix paths in docker/unified/build_image.sh 2026-04-19 14:04:37 +02:00
SkyKing_PX 36cbe4096d Add build_images.bat for docker/unified 2026-04-19 14:03:35 +02:00
SkyKing_PX ab692f8033 Add windows buildscript in docker/staging 2026-04-19 14:01:44 +02:00
SkyKing_PX 15542154f4 Fix paths 2026-04-19 14:00:33 +02:00
SkyKing_PX 7eb7fa1629 Add build_images.bat for Docker image production builds 2026-04-19 13:50:33 +02:00
ZeinebMegaadi 7906fce77f docs: update Node.js version requirement to >=20 in contributing guide 2026-04-17 21:17:40 +01:00
egeoztassandClaude Opus 4.6 c57614e8df fix: add accountSid and twilioPhoneNumber to notification repositories
Updated both MongoDB and TimescaleDB repositories to map the new
Twilio-specific fields (accountSid, twilioPhoneNumber) in create,
update, and toEntity methods.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 23:14:16 +03:00
egeoztassandClaude Opus 4.6 d5d6797f91 fix: use dedicated Twilio fields and add service switch case tests
- Added `accountSid` and `twilioPhoneNumber` fields to Notification
  type, MongoDB model, and frontend type instead of reusing
  `address` and `homeserverUrl`
- Updated provider, validation, form hook, and form UI to use new fields
- Added Pushover and Twilio to notificationsService routing tests
  (both handleNotifications and sendTestNotification)
- All 59 tests passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 23:11:11 +03:00
Alexander Holliday 77545e9cf7 Merge pull request #3544 from bluewave-labs/fix/unified-docker-compose
fix/unified docker compose
2026-04-17 12:26:31 -07:00
Alex Holliday 29ea54419c add staging 2026-04-17 19:20:31 +00:00
Alexander Holliday 9042cb917a Merge pull request #3535 from Smolcup/docs/fix-discussions-link-readme-es
docs: fix discussions link in Spanish README
2026-04-17 12:12:38 -07:00
Alexander Holliday a65e1071a5 Merge pull request #3541 from Smolcup/docs/fix-typo-pullrequests
docs: fix typo 'big' to 'bug' in PULLREQUESTS.md
2026-04-17 11:28:32 -07:00
Alex Holliday 4493cca871 Merge branch 'fix/unified-docker-compose' of github.com:bluewave-labs/checkmate into fix/unified-docker-compose 2026-04-17 11:26:20 -07:00
Alex Holliday 999dfb13b9 update workflows 2026-04-17 11:25:53 -07:00
Alex Holliday 97f4008f4c remove explicit ports 2026-04-17 18:24:01 +00:00
Alex Holliday 6152144807 add staging, comment out for now 2026-04-17 11:18:03 -07:00
Alex Holliday b376fe9ab0 comment out staging 2026-04-17 11:07:25 -07:00
Alex Holliday aa3e097e16 initial commit 2026-04-17 10:54:39 -07:00
Alexander Holliday d77aeeb46c Merge pull request #3542 from bluewave-labs/fix/docker-compose
fix: update production docker compose/nginx conf
2026-04-17 10:37:58 -07:00
Alex Holliday 82b7ab83dd update production docker compose/nginx conf 2026-04-17 17:34:23 +00:00
Smolcup 88bc4e080d docs: fix typo 'big' to 'bug' in PULLREQUESTS.md 2026-04-17 19:27:57 +02:00
Alexander Holliday fa6aef1e86 Merge pull request #3518 from ZeinebMegaadi/fix/showing-down-for-down-monitors
Fix: added "down" display on down monitors instead of "Active for:..."
2026-04-17 10:17:34 -07:00
Gorkem Cetin 57ed0e1e7d Enhance README with PikaPods run button
Added a run button for PikaPods and improved project description.
2026-04-17 11:46:37 -04:00
ZeinebMegaadi 26077151ef fix: added maintenance state 2026-04-16 20:54:09 +01:00
Smolcup 55b05a2100 docs: fix discussions link in Spanish README 2026-04-16 21:43:03 +02:00
egeoztassandClaude Opus 4.6 9210259511 feat: add Twilio SMS notification channel
Adds Twilio SMS as a new notification channel, allowing users to
receive SMS alerts via the Twilio API.

Backend: provider using HTTP Basic Auth, type registration, validation,
service wiring. Uses existing fields: address (Account SID),
accessToken (Auth Token), homeserverUrl (From number), phone (To number).
Frontend: form UI with 4 fields, validation, i18n keys.
Tests: 18 provider tests + updated service test constructor.

Closes #3095

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:46:40 +03:00
Alexander Holliday e9a0914fad Merge pull request #3530 from egeoztass/feat/pushover-notification
feat: add Pushover notification channel
2026-04-16 11:21:43 -07:00
Alexander Holliday f392bee287 Merge pull request #3533 from bluewave-labs/fix/monitor-status-atomicity
fix: monitor status atomicity
2026-04-16 11:14:57 -07:00
egeoztassandClaude Opus 4.6 4281e87642 fix: add pushoverProvider to NotificationsService test constructor
The existing test was missing the new pushoverProvider argument,
causing settingsService to be passed in the wrong position.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:14:47 +03:00
Alex Holliday d40b766c83 timescaleDB implementation 2026-04-16 11:12:06 -07:00
Alexander Holliday d139db7697 Merge pull request #3512 from SkyKingPX/feat/improved-status-bar-messages
Improve status bar messages on public status pages
2026-04-16 11:02:07 -07:00
Alex Holliday 7547d1db2e update tests 2026-04-16 10:59:43 -07:00
Alex Holliday 24d7ead1d1 use a projected window instead of read/write 2026-04-16 10:59:30 -07:00
SkyKingPX e60dbb9f74 Add .gitattributes file so LF endings are preserved 2026-04-16 19:57:21 +02:00
Alexander Holliday f12a96ce58 Merge pull request #3532 from mayssagl/fix/email-templates-missing-from-dist
fix: copy email templates to dist during build
2026-04-16 10:56:55 -07:00
SkyKingPX 5920b92869 Run npm format 2026-04-16 19:55:17 +02:00
Alex Holliday 8f55d966f9 rename methods, remove unused helpers 2026-04-16 10:50:30 -07:00
Alex Holliday c7ef412d7a atomic update 2026-04-16 10:41:00 -07:00
mayssagl 14f76ec10b fix: copy email templates to dist during build 2026-04-16 18:35:17 +01:00
ZeinebMegaadi d532d13371 fix(lifecycle updated) 2026-04-16 18:33:44 +01:00
ZeinebMegaadi 58532d1ff6 fix(monitors): handle initializing and breached states in stat box 2026-04-16 18:09:05 +01:00
Alexander Holliday b5fe314dde Merge pull request #3531 from mayssagl/fix-claude.md
docs: improve CLAUDE.md with architecture flow and repository pattern…
2026-04-16 10:01:33 -07:00
SkyKingPX 0d163e7100 Change Breached to exceeded thresholds 2026-04-16 18:56:06 +02:00
mayssagl 5dda0b51c3 docs: improve CLAUDE.md with architecture flow and repository pattern explanation 2026-04-16 17:42:11 +01:00
Alexander Holliday 273aa7d01a Merge pull request #3529 from SkyKingPX/feat/docker-images-script-windows
Add windows batch script for creating docker images automatically
2026-04-16 09:41:15 -07:00
egeoztassandClaude Opus 4.6 cc1b6df8f2 style: run prettier on notification create page
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 16:55:30 +03:00
egeoztassandClaude Opus 4.6 97353bc7d2 feat: add Pushover notification channel
Adds Pushover as a new notification channel, allowing users to receive
push notifications on their devices via the Pushover API.

Backend: provider, type registration, validation, service wiring
Frontend: form UI with app token and user key fields, validation, i18n
Tests: full unit test suite (15 tests, 100% coverage on provider)

Closes #3445

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 16:25:24 +03:00
SkyKingPX 10a703d657 Update CONTRIBUTING.md 2026-04-16 13:49:58 +02:00
SkyKingPX b3077f6239 Merge branch 'feat/docker-images-script-windows' of https://github.com/SkyKingPX/Checkmate into feat/docker-images-script-windows 2026-04-16 13:46:33 +02:00
SkyKingPX 80ae5a1977 Add windows docker image build script 2026-04-16 13:46:16 +02:00
SkyKingPX 8579708f05 Add script 2026-04-16 13:41:30 +02:00
SkyKing_PX 675ec40836 Merge branch 'bluewave-labs:develop' into feat/improved-status-bar-messages 2026-04-16 13:40:10 +02:00
SkyKingPX 7b164e4df5 Make requested changes 2026-04-16 13:37:54 +02:00
Alexander Holliday 2be1b48995 Merge pull request #3527 from bluewave-labs/fix/demo-user
fix: demo user
2026-04-15 14:02:22 -07:00
Alex Holliday be3b7c2e86 add demo role to list of roles 2026-04-15 13:54:05 -07:00
Alex Holliday 69bec42a66 restrict editing user routes to regular users 2026-04-15 13:53:55 -07:00
Alexander Holliday 12b879ced5 Merge pull request #3526 from bluewave-labs/fix/notification-deletion
fix: remove notifications from monitors before deleting notifications
2026-04-15 13:31:42 -07:00
Alex Holliday 9e24cc655c remove notifications from monitors before deleting notifications 2026-04-15 13:21:14 -07:00
Alexander Holliday 95db80db5d Merge pull request #3525 from bluewave-labs/feat/initializaiton-tests
feat: initializaiton tests
2026-04-15 11:19:07 -07:00
Alexander Holliday ab7f2c42f5 Merge pull request #3524 from bluewave-labs/fix/streak-time
fix: tighten streak time coniditional
2026-04-15 11:09:33 -07:00
Alex Holliday be462811ac test initializing state 2026-04-15 11:08:40 -07:00
Alex Holliday 564b356115 tighten streak time coniditional 2026-04-15 11:06:30 -07:00
Alexander Holliday bcacd42162 Merge pull request #3523 from bluewave-labs/fix/initialization-state
fix: monitor init
2026-04-15 11:01:15 -07:00
Alex Holliday 6f7fba5ae5 fixes a bug where state was not correctly calcluated for monitors in initializing state 2026-04-15 10:54:43 -07:00
Alexander Holliday 61d753b119 Merge pull request #3522 from bluewave-labs/feat/additional-heartbeat-tests
feat: add additional heartbeat tests
2026-04-15 10:33:44 -07:00
ZeinebMegaadi b482e871a3 updated fix for same issue 2026-04-15 16:12:10 +01:00
ZeinebMegaadi bca602f4b0 docs: add monitor lifecycle explanation to README 2026-04-15 15:13:35 +01:00
ZeinebMegaadi f6222014b7 Fix: correct Active for display on down monitors 2026-04-15 14:51:12 +01:00
SkyKing_PX 360e8ad2a0 Merge branch 'bluewave-labs:develop' into feat/improved-status-bar-messages 2026-04-14 20:47:59 +02:00
Alex Holliday e8bcfdd21d add additional heartbeat tests 2026-04-14 11:31:09 -07:00
Alexander Holliday fd8dce8abe Merge pull request #3510 from bluewave-labs/feat/monitor-status-refactor
feat/monitor status refactor
2026-04-14 10:59:44 -07:00
Alex Holliday b9c14c76c9 add tests for new helper functions 2026-04-14 10:46:26 -07:00
Alex Holliday bf60c52692 simplify hardware changes 2026-04-14 10:41:55 -07:00
SkyKingPX a8339c0169 Improve status bar messages on public status pages 2026-04-14 19:32:05 +02:00
Alex Holliday d74f1bb6a8 add private helper methods to updateMonitorStats 2026-04-14 10:28:43 -07:00
Alexander Holliday 9bb7224fc4 Merge pull request #3505 from bluewave-labs/fix/notification-fix-down
fix: notification down not sent
2026-04-14 09:43:05 -07:00
Alex Holliday 403290db32 Merge branch 'develop' into fix/notification-fix-down 2026-04-14 09:41:16 -07:00
Alexander Holliday 98ae6b1105 Merge pull request #3508 from bluewave-labs/fix/monitor-status-tests
fix: additional status service tests
2026-04-14 09:40:58 -07:00
Alex Holliday 2014825618 additional tests 2026-04-14 09:40:14 -07:00
Alexander Holliday 4a61bc88d3 Merge pull request #3507 from bluewave-labs/fix/monitor-status-tests
fix: add test for monitor status
2026-04-14 09:37:27 -07:00
Alex Holliday fa4c0632ae add test for monitor status 2026-04-14 09:35:58 -07:00
mannilakash ece16158ef fix: notification down not sent 2026-04-14 12:07:51 -04:00
Alexander Holliday bd27721685 Merge pull request #3502 from bluewave-labs/feat/test-workflow
feat: add check-tests workflow
2026-04-13 13:11:23 -07:00
Alex Holliday 7c8549d092 fix messages 2026-04-13 13:08:33 -07:00
Alex Holliday 1e8c9d0187 stub out poeditor-sync 2026-04-13 13:07:21 -07:00
Alexander Holliday faa59ab694 Merge pull request #3501 from bluewave-labs/fix/notification-timeouts
fix: notification timeouts
2026-04-13 13:03:37 -07:00
Alex Holliday de4de0f5db add check-tests workflow 2026-04-13 13:03:22 -07:00
Alex Holliday 48c1e326c8 use relative paths for testing 2026-04-13 12:59:49 -07:00
Alex Holliday 22f54391d0 use abstract class 2026-04-13 12:55:20 -07:00
Alex Holliday 0bb3320010 add abstract class with default timeout and helper method 2026-04-13 12:54:51 -07:00
Alexander Holliday 7998bae87d Merge pull request #3500 from bluewave-labs/fix/invite-validation
fix: enforce correct role types
2026-04-13 12:37:33 -07:00
Alex Holliday ec929aef45 enforce correct role types 2026-04-13 12:26:14 -07:00
Alexander Holliday 77e72bc3bf Merge pull request #3499 from bluewave-labs/fix/update-running-stats
fix: remove in memory modification of monitor stats
2026-04-13 12:18:31 -07:00
Alex Holliday e1b00ce735 dedupe monitor stats, run migrations before index creation 2026-04-13 11:58:24 -07:00
Alex Holliday 0fcb38f7e6 Merge branch 'develop' into fix/update-running-stats 2026-04-13 11:48:18 -07:00
Alex Holliday b3930b31f2 remove in memory modification of monitor stats 2026-04-13 11:39:29 -07:00
Alexander Holliday 6222635eef Merge pull request #3498 from bluewave-labs/fix/stats-init
fix: initialize timeOfLastFailure
2026-04-13 11:01:59 -07:00
Alex Holliday dc7688bc13 initialize timeOfLastFailure 2026-04-13 10:58:58 -07:00
Gorkem Cetin c287cf16d1 Update pull_request_template.md 2026-04-13 13:38:48 -04:00
Alexander Holliday ff114b3ab2 Merge pull request #3494 from bluewave-labs/feat/integration-tests
feat: integration tests
2026-04-11 15:03:22 -07:00
Alex Holliday 233966b73d add heartbeat tests 2026-04-11 14:45:36 -07:00
Alex Holliday 45d4779b45 fix race condition in heartbeat job 2026-04-11 13:57:57 -07:00
Alexander Holliday d608b5ea24 Merge pull request #3492 from bluewave-labs/feat/service-tests
feat/service tests
2026-04-10 12:43:54 -07:00
Alex Holliday 1ad750e2ef fix ternary condiiton 2026-04-10 12:41:46 -07:00
Alex Holliday 4d1af5e2b4 fix TS errors, add missing tests 2026-04-10 12:33:08 -07:00
Alex Holliday b515d688f4 add geo check service tests 2026-04-10 11:43:02 -07:00
Alex Holliday ff92b307bb add diagnosticService tests 2026-04-10 11:39:26 -07:00
Alex Holliday e4ffe0e267 inviteSerice tests 2026-04-10 11:30:31 -07:00
Alex Holliday 2b121355c8 status page service tests 2026-04-10 11:25:54 -07:00
Alex Holliday e7db938baa import monitors bug fix 2026-04-10 11:15:28 -07:00
Alex Holliday 1b746d0f0a remvoe dead code from monitor service 2026-04-10 11:13:12 -07:00
Alex Holliday 6886fc75de monitorService tests 2026-04-10 11:07:48 -07:00
Alex Holliday 5c5f84a5b2 user service tests 2026-04-10 10:59:48 -07:00
Alex Holliday a12154523f settingsService tests 2026-04-10 10:50:37 -07:00
Alex Holliday 6c8adf8594 add tests for maintenancewindowsercie 2026-04-10 10:39:04 -07:00
Alex Holliday a0f73e4e8d add notificaiton provider tests 2026-04-09 11:05:21 -07:00
Alex Holliday 63efef65c7 add provider tests 2026-04-09 10:36:59 -07:00
Alex Holliday dca09daf35 add tests for globalPingService 2026-04-09 10:03:23 -07:00
Alex Holliday db833b441a add tests for emailService 2026-04-09 09:49:12 -07:00
Alex Holliday bb55f3b3eb add tests for notificaitonMessageBuilder 2026-04-09 09:41:17 -07:00
Alex Holliday 88e0660762 add tests for buffer service 2026-04-09 09:36:51 -07:00
Alex Holliday a8c172c77f add tests for network service 2026-04-09 09:27:38 -07:00
Alex Holliday b355da4aed Merge branch 'develop' into feat/server-testing 2026-04-09 09:15:55 -07:00
Alexander Holliday 77a4bf9c36 Merge pull request #3479 from ad2ien/fix/matrix-notif
Fix matrix notifications
2026-04-09 09:15:15 -07:00
Adrien Touzouli 6a0f4372c6 fix(notifications): fix matrix notifications
Respect Matrix spec, factorize api call and improve error log
2026-04-09 06:08:05 +02:00
Alex Holliday db378120be add queue tests 2026-04-08 12:03:26 -07:00
Alex Holliday ba5368f942 add notificationsService tests 2026-04-08 11:32:08 -07:00
Alex Holliday 7329306ccf add incident serivce tests 2026-04-08 10:43:47 -07:00
Alex Holliday 365987c287 relocate tests, add statusService tests 2026-04-08 10:31:24 -07:00
Gorkem Cetin 09d6147f75 Remove Translations section from README
Removed the Translations section from the README.
2026-04-08 01:26:16 -04:00
Gorkem Cetin 86ab1f2146 Add Coolify and Cloudzy 2026-04-07 18:34:28 -04:00
Alexander Holliday 934f85f505 Merge pull request #3460 from bluewave-labs/fix/server-test-suite-failures
fix: align server test suite with current source implementations
2026-04-07 11:11:51 -07:00
Alex Holliday 96beda5c47 update mock logger and tests 2026-04-07 11:10:24 -07:00
Alexander Holliday 504d6157e5 Merge pull request #3473 from bluewave-labs/fix/actions
fix: disable poeditor workflow
2026-04-07 09:58:41 -07:00
Alex Holliday 628bca3e29 disable poeditor workflow 2026-04-07 09:56:11 -07:00
Alexander Holliday 2c76484bad Merge pull request #3471 from bluewave-labs/feat/zh-tw
feat: add remaining zh-tw strings
2026-04-07 09:53:58 -07:00
Alex Holliday 22498756cd add remaining zh-tw strings 2026-04-07 09:46:07 -07:00
Alexander Holliday 7c61ca490c Merge pull request #3461 from bluewave-labs/fix/i18n-locale-migration
fix: restructure and translate all i18n locale files
2026-04-03 20:46:13 -07:00
gorkem-bwl 96f9360280 style: format migration script with prettier 2026-04-03 23:43:34 -04:00
gorkem-bwl eb4a92c84f fix: restructure and translate all i18n locale files
All 15 non-English locale files had a structural mismatch with en.json:
- en.json used nested keys (common.buttons.cancel)
- Other locales used flat keys (cancel, DeleteAccountButton)
- Result: 0.3% effective translation coverage at runtime

## Changes

Migration script (client/scripts/migrate-locales.ts):
- Restructures all locale files to match en.json's nested key structure
- Recovers existing translations via safe key-matching strategies
- Backs up originals to locales/backup/

Translation of all 15 languages:
- ar (94.6%), cs (91.6%), de (89.4%), es (92.6%), fi (94.2%)
- fr (86.7%), ja (93.3%), pt-BR (91.0%), ru (93.0%), th (93.4%)
- tr (91.9%), uk (94.3%), vi (92.5%), zh-CN (94.0%), zh-TW (94.2%)

Keys intentionally left in English are technical terms (HTTP, CPU,
Docker, gRPC, etc.), placeholder examples, and brand names.

en.json was NOT modified.
2026-04-03 23:35:14 -04:00
gorkem-bwl c80720c8c9 fix: align server test suite with current source implementations
## Changes
- teamsProvider.test.ts: fix got mock wiring (use top-level mockPost
  with dynamic import so mock intercepts correctly), fix getTestMessage
  assertion, fix incident URL path
- superSimpleQueueHelper.test.ts: change default import to named import,
  update constructor from object to 16 positional params, rename
  getMonitorJob -> getHeartbeatJob, add all missing dependencies
- monitorService.test.ts: remove stale constructor params (db,
  stringService, papaparse, errorService), add missing params
  (geoChecksRepository, incidentsRepository), fix method names
  (findLatestChecksByMonitorIds -> findLatestByMonitorIds,
  findDateRangeChecksByMonitor -> findByDateRangeAndMonitorId),
  update assertions from checks -> recentChecks
- jest.config.ts: consolidate @/utils path mapping to resolve .ts files
- Extract shared createMockLogger to test/helpers/

Closes #3457
2026-04-03 21:56:14 -04:00
Alexander Holliday 42e82af9bb Merge pull request #3458 from bluewave-labs/feat/scheduler/1.9.1
feat: bump scheduler, consume scheduler events
2026-04-03 15:38:12 -07:00
Alex 7636d2d090 error -> warn on job fail, register listeners before starting scheduler 2026-04-03 15:36:37 -07:00
Alex Holliday 72728748f8 bump scheduler, consume scheduler events 2026-04-03 13:21:16 -07:00
Alexander Holliday 4222d39a8b Merge pull request #3456 from bluewave-labs/fix/job-queue
fix geocheck update logic
2026-04-01 11:04:50 -07:00
Alex Holliday fb69e29adf fix geocheck update logic 2026-04-01 11:00:17 -07:00
Alexander Holliday 0d90083e63 Merge pull request #3455 from mayssagl/develop
Fix outdated links and add Prerequisites section
2026-04-01 10:10:48 -07:00
Alexander Holliday 8ab049aa6c Merge pull request #3447 from bluewave-labs/feat/dlq
Feat(DLQ): Add DLQ data layer -> types, model, and repository
2026-03-27 12:35:31 -07:00
Alexander Holliday 69b6955ced Merge pull request #3439 from LeC-D/fix/telegram-notification-type
feat(notifications): add Telegram notification channel (#2753)
2026-03-27 12:04:01 -07:00
LeC-D 04dfff4ebd fix(notifications): remove redundant defaultValue prop and fix incident URL in telegram provider
- Remove redundant 'defaultValue' prop on Telegram chat ID Controller in create/index.tsx;
  the form already initialises via 'defaultValues: defaults' at the useForm level, making
  the per-Controller prop unnecessary and inconsistent with the reviewer's expectation.
- Fix 'View Incident' URL in telegram.ts: was pointing to the infrastructure details page
  (/infrastructure/:id) instead of the incidents page (/incidents/:id).
2026-03-27 14:19:27 -04:00
Aryaman Sharma 15b0deb0bd Merge branch 'develop' into feat/dlq 2026-03-27 23:24:45 +05:30
Br0wnHammer a895912b99 refactor(dlq): inline DLQItemDocumentBase into DLQItemDocument 2026-03-27 23:23:01 +05:30
Alexander Holliday 22d2626a93 Merge pull request #3441 from bluewave-labs/feat/timescaledb
feat: timescaledb
2026-03-27 10:40:17 -07:00
Br0wnHammer 214fc4899c feat(dlq): add MongoDLQRepository with retry polling and grouped count queries 2026-03-27 20:08:18 +05:30
Br0wnHammer e6088fe06f feat(dlq): add IDLQRepository interface for dead letter queue data access 2026-03-27 20:07:00 +05:30
Br0wnHammer 60b1d95b74 feat(dlq): add DLQItem Mongoose model with indexes for retry polling and cleanup 2026-03-27 20:06:12 +05:30
Br0wnHammer 94ca9896db feat(dlq): add DLQItem type definitions for dead letter queue 2026-03-27 20:05:03 +05:30
LeC-D 13a7ae82e3 fix(notifications): remove type casts with exhaustive type narrowing in useNotificationForm
Replace the loose NotificationDefaults intermediate type and 'as NotificationFormData'
cast with an exhaustive buildDefaults() helper that narrows each branch of the
discriminated union explicitly. TypeScript now infers the return type correctly from
the discriminated union without any casts, satisfying strong typing for all channels
(email, slack, discord, webhook, pager_duty, teams, matrix, telegram).
2026-03-26 14:07:50 -04:00
Alex Holliday de3af64254 migrations, gitignore 2026-03-26 10:57:20 -07:00
Alex Holliday 317d531775 remove comments 2026-03-26 10:44:59 -07:00
Alex Holliday 2b2db2df6f set default all for incident validation 2026-03-26 10:33:19 -07:00
Alex Holliday c558c4b635 use ca tables 2026-03-26 10:30:15 -07:00
Alex Holliday be29cce788 db types 2026-03-26 09:47:10 -07:00
Alex Holliday e87879970a fix TS errors 2026-03-26 09:30:20 -07:00
Leandre Chamberland-Dozois 4c94a7c21e fix: resolve TypeScript build errors in notification form types 2026-03-25 19:13:37 -04:00
LeC-D 40968c370b refactor(notifications): hoist default values, remove else block in useNotificationForm
Per @ajhollid review: define defaults up-front with a NotificationDefaults type
and eliminate the trailing else branch entirely. The if/else-if blocks only
override when the type is matrix or telegram.
2026-03-25 18:06:26 -04:00
LeC-DandClaude Opus 4.6 a864bc0c05 fix: run format and fix build errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:52:48 -04:00
Alex Holliday 62e86434c2 checks repo, barrel export 2026-03-25 13:52:18 -07:00
Alex Holliday 07957d3a1f geo-checks repo 2026-03-25 13:52:10 -07:00
Alex Holliday bc088c3589 add incidents repo, rename old repo 2026-03-25 13:51:57 -07:00
Alex Holliday 5ea86d8e71 add inivtes repo 2026-03-25 13:51:37 -07:00
Alex Holliday 0944dba386 add maintenance-windows repo 2026-03-25 13:51:23 -07:00
Alex Holliday 86acc0c30a add monitor-stats repo 2026-03-25 13:51:12 -07:00
Alex Holliday dcdde845db monitors rep 2026-03-25 13:51:03 -07:00
Alex Holliday 3039fb9b69 nottificaitons repo 2026-03-25 13:50:46 -07:00
Alex Holliday 729600a86f recovery tokens repo 2026-03-25 13:50:33 -07:00
Alex Holliday 51853cb360 add settings repo 2026-03-25 13:50:22 -07:00
Alex Holliday f7db732d67 add status-pages repo 2026-03-25 13:50:12 -07:00
Alex Holliday 9e686a2319 add user repo 2026-03-25 13:49:56 -07:00
Alex Holliday da6f03ba59 add teams repo 2026-03-25 13:49:46 -07:00
Alex Holliday 276b11603e throw error on missing continent 2026-03-25 13:49:13 -07:00
Alex Holliday f09f0630dc update error handler 2026-03-25 13:48:50 -07:00
Alex Holliday 1defa52ae8 update config 2026-03-25 13:48:36 -07:00
Alex Holliday f43b7584a6 add PG dependencies 2026-03-25 13:47:56 -07:00
Alex Holliday ee74584699 Add method to interface 2026-03-25 13:47:36 -07:00
Alex Holliday 2422fcc83b update gitignore 2026-03-25 13:47:14 -07:00
Alex Holliday 0ecc2e21e5 Implemement TimescaleDB class 2026-03-25 13:47:01 -07:00
LeC-D fe242b1977 fix: replace nested ternaries and remove type casts per review
- useNotificationForm: replace nested ternary with if/else if/else block
- TelegramProvider: type error as unknown and access properties safely
  via instanceof checks instead of casting to HTTPError
2026-03-25 14:03:49 -04:00
LeC-D d1f1d31ea2 fix(i18n): revert en.json to upstream format, keep only telegram keys
The previous commit reformatted the entire en.json (spaces → kept as-is
but accumulated unrelated upstream changes), creating a 1.3k line diff.

Restore the file to match upstream/develop exactly and add only the
Telegram-specific i18n keys required by this PR.
2026-03-24 17:22:34 -04:00
Léo eacbb227c3 feat(notifications): add Telegram notification channel (#2753)
Add Telegram as a new notification type, allowing users to receive
monitor alerts via a Telegram bot.

Configuration requires:
- Bot token (obtained from @BotFather)
- Chat ID (user, group, or channel)

Changes:
- TelegramProvider: sends HTML-formatted messages via Telegram Bot API
- NotificationsService: route telegram type to TelegramProvider
- Notification model/types: add 'telegram' to NotificationChannel enum
- Server validation: telegram schema (accessToken + address/chat_id)
- Client Types/Validation: telegram schema with accessToken + address
- useNotificationForm: handle telegram defaults
- Notifications create page: render Telegram config UI
- en.json: add telegram i18n keys
2026-03-24 10:15:46 -04:00
Alexander Holliday c24b41ecd9 Merge pull request #3437 from bluewave-labs/fix/notificaiton-upper-limit
fix: add upper limit to notificationValidation
2026-03-23 10:16:05 -07:00
Alex 94cf4f17d1 add upper limit to notificationValidation 2026-03-23 10:13:43 -07:00
Alexander Holliday 0a6d876f4f Merge pull request #3376 from ashu130698/feat/bulk-edit-notifications
feat: add bulk edit monitor notifications endpoint
2026-03-23 10:11:12 -07:00
Mayssaaa gloulou ec129e3604 Fix outdated links and add Prerequisites section 2026-03-23 13:49:08 +01:00
ashu130698 833e2b63ad fix: resolve duplicate identifiers and missing interface method from merge 2026-03-21 01:24:52 +05:30
Alexander Holliday bc2bab87ba Merge pull request #3436 from bluewave-labs/fix/remaining-lint-errors
fix: resolve remaining ESlint errors
2026-03-20 12:42:54 -07:00
Alex Holliday ee5f7427e7 resolve remaining ESlint errors 2026-03-20 12:40:27 -07:00
Alexander Holliday d5968b841e Merge branch 'develop' into feat/bulk-edit-notifications 2026-03-20 12:28:57 -07:00
Alexander Holliday 26bac6d35a Merge pull request #3435 from bluewave-labs/fix/migrations
fix: migration lint errors
2026-03-20 12:24:08 -07:00
ashu130698 3e010f1c0d style: run prettier to fix formatting issues after upstream merge 2026-03-21 00:52:36 +05:30
Alex Holliday 1a504a3cd9 fix migraiton lint errors 2026-03-20 12:22:22 -07:00
Alex Holliday 120c5cd472 repo lint errors 2026-03-20 12:16:23 -07:00
Alexander Holliday cdf17bf600 Merge pull request #3433 from bluewave-labs/fix/controllers
fix/controllers
2026-03-20 11:55:59 -07:00
Alex Holliday 7144c20c5b check,auth 2026-03-20 11:52:53 -07:00
Alex Holliday 7456609e35 diagnostic 2026-03-20 11:51:54 -07:00
Alex Holliday 05c293d689 geo 2026-03-20 11:51:17 -07:00
Alex Holliday 80f3168837 invite, inident 2026-03-20 11:50:47 -07:00
Alex Holliday 332300dde4 log controller 2026-03-20 11:48:58 -07:00
Alex Holliday d4a8023a76 monitors 2026-03-20 11:47:22 -07:00
Alex Holliday c7e449d18c notifications 2026-03-20 11:45:04 -07:00
Alex Holliday 0495bef469 queue 2026-03-20 11:43:37 -07:00
Alex Holliday 6fb7ad63f6 settings 2026-03-20 11:42:40 -07:00
Alex Holliday 8322adbb26 statusPageController interface 2026-03-20 11:39:19 -07:00
Alexander Holliday 4470c87d42 Merge pull request #3431 from bluewave-labs/fix/infra-services
fix: infra services
2026-03-20 11:37:19 -07:00
Alexander Holliday 95bda35ec6 Merge pull request #3430 from bluewave-labs/fix/services
fix/services
2026-03-20 11:33:48 -07:00
Alex Holliday 928ab7551e fixes 2026-03-20 11:33:40 -07:00
Alex Holliday 465cea21bc use interface 2026-03-20 11:29:44 -07:00
Alex Holliday 404bd5d06b add interface to AdvancedMathcer, fix type 2026-03-20 11:28:53 -07:00
ashu130698 05814854df Merge branch 'upstream/develop' into feat/bulk-edit-notifications and resolve conflicts 2026-03-20 23:54:33 +05:30
Alex Holliday a4a3249b5b maintenacne window 2026-03-20 11:20:22 -07:00
ashu130698 1e6cf858c4 fix: address PR review feedback and add Zod validation constraints 2026-03-20 23:39:38 +05:30
Alex Holliday 533a8911cd fix errors in inviteService 2026-03-20 11:03:45 -07:00
Alex Holliday 2fb7516ca1 fix return type 2026-03-20 11:00:30 -07:00
Alex Holliday 6d2008e8d3 geo checks service 2026-03-20 10:59:34 -07:00
Alex Holliday 7332b15242 fix diagnosticSerivce lint error 2026-03-20 10:51:06 -07:00
Alexander Holliday d618a861e3 Merge pull request #3429 from bluewave-labs/fix/monitor-service-lint
fix/monitor service lint
2026-03-20 10:43:32 -07:00
Alex Holliday f69752ccb4 remove casts 2026-03-20 10:37:29 -07:00
Alex Holliday 210881a375 remove unused import 2026-03-20 10:17:24 -07:00
Alex Holliday d8ec8d7775 fix validation 2026-03-20 10:09:29 -07:00
Alex Holliday bfd3eee94d monitorService types 2026-03-20 09:58:49 -07:00
Alex Holliday bfbb4c390a Add type for getGeoChecksByMonitorId 2026-03-20 09:47:02 -07:00
Alexander Holliday 1285a641e8 Merge pull request #3428 from bluewave-labs/fix/status-page-swr-config
fix: modifying refreshInterval=10s for statusPage api
2026-03-20 09:38:46 -07:00
mannilakash 78566c0226 fix: modifying refreshInterval=10s for statusPage api 2026-03-19 11:34:26 -04:00
Alexander Holliday f5ba387261 Merge pull request #3427 from bluewave-labs/fix/swagger-post-monitor-schema
fix: updating swagger for createMonitor and /monitor/teams
2026-03-18 14:40:58 -07:00
Alexander Holliday 48b415a67c Merge pull request #3426 from bluewave-labs/fix/swagger-put-monitor
fix: updating swagger - /PUT to /PATCH monitor/{monitorId}
2026-03-18 14:40:34 -07:00
Alexander Holliday b53f0e56ea Merge pull request #3425 from bluewave-labs/feat/status-page-infra-section-fe
feat: status-page infra section FE
2026-03-18 14:40:01 -07:00
Alexander Holliday 07f828a01a Merge pull request #3424 from bluewave-labs/feat/status-page-infra-section-be
feat: status-page infrastructure section BE
2026-03-18 14:38:57 -07:00
mannilakash b09203664d fix: updating swagger for createMonitor and /monitor/teams 2026-03-18 17:30:19 -04:00
mannilakash 5a12105c3d fix: statusPageMonitor removal of infrastructureMonitors[] 2026-03-18 17:02:17 -04:00
mannilakash 22f79144d8 fix: hardcoded statusPage value fix 2026-03-18 16:25:07 -04:00
mannilakash f749ed46a6 fix: updating swagger - schema changes monitor/{monitorId} 2026-03-18 16:11:36 -04:00
mannilakash 5c23ebe315 fix: updating swagger - /PUT to /PATCH monitor/{monitorId} 2026-03-18 15:36:11 -04:00
mannilakash 115fcc67f6 fix: fetching game/grpc/websocket as well for statusPage 2026-03-17 15:14:44 -04:00
mannilakash 622446c308 fix: refactoring monitorsList and minor fixes based on feedback 2026-03-17 15:01:30 -04:00
mannilakash 294a149fd1 fix: minor changes to statusPageValidation and other fixes 2026-03-17 13:43:36 -04:00
mannilakash d3d00353a1 fix: minor refactoring infrastructureMetrics 2026-03-17 06:04:42 -04:00
mannilakash 894b6a7a7d feat: status-page infra section FE 2026-03-16 17:46:13 -04:00
mannilakash 3a9f9f0ce5 feat: status-page infrastructure section BE 2026-03-16 17:14:28 -04:00
Alexander Holliday 45618a2ab0 Merge pull request #3416 from bluewave-labs/fix/heatmap-response-time-fix
fix: modify heatmap response time conditional text
2026-03-13 12:00:13 -07:00
Alexander Holliday d80e232a10 Merge pull request #3418 from bluewave-labs/fix/middleware-typing
fix: middleware typing
2026-03-13 11:41:50 -07:00
ashu130698 1706012e54 fix:format code 2026-03-13 21:40:28 +05:30
Alex Holliday db9d5cf5e4 verifyJWT types 2026-03-12 11:25:32 -07:00
Alex Holliday 52a6b4c9fa overload sanitizeInput 2026-03-12 11:17:39 -07:00
Alex Holliday 9646e7dbdc type handleErrors 2026-03-12 11:12:46 -07:00
mannilakash d6ceedc2dd fix: upstream changes for resolving invalid responseTime 2026-03-12 14:05:31 -04:00
Alexander Holliday 501664509b Merge pull request #3417 from bluewave-labs/fix/check-snapshot
fix: properly type snapshot
2026-03-12 10:51:38 -07:00
Alex Holliday 2ef184c58a properly type snapshot 2026-03-12 10:43:18 -07:00
Alexander Holliday 22f917034d Merge pull request #3415 from bluewave-labs/fix/unset-with-explicit-null
fix: unset with explicit null
2026-03-12 10:12:40 -07:00
Alex Holliday 81f623b632 properly type updates 2026-03-12 10:05:36 -07:00
Alex Holliday d3605b0149 update client validation/pages 2026-03-12 09:54:08 -07:00
Alex Holliday 48e71d4345 use null for unsetting instead of empty string 2026-03-12 09:53:31 -07:00
mannilakash 411270d256 fix: modify heatmap response time conditional text 2026-03-12 12:44:46 -04:00
Alexander Holliday 6404a06999 Merge pull request #3414 from bluewave-labs/fix/settings-controller-typing
fix: SettingsController correct types
2026-03-12 09:38:56 -07:00
Alex Holliday a2bc2d8442 Merge branch 'fix/settings-controller-typing' of github.com:ajhollid/bluewave-uptime into fix/settings-controller-typing 2026-03-12 09:37:37 -07:00
Alex Holliday e9cb302d6e remove dead unions 2026-03-12 09:37:25 -07:00
Alex Holliday fa8764fde2 remove dead union, remove unused undefined -> conversion 2026-03-12 09:37:25 -07:00
Alex Holliday 84ca5db0fa refactor settingsController 2026-03-12 09:37:08 -07:00
Alex Holliday 8ec285ed41 remove dead unions 2026-03-12 09:35:33 -07:00
Alex Holliday d070a33d7f remove dead union, remove unused undefined -> conversion 2026-03-12 09:32:34 -07:00
Alex Holliday aa61e0f321 refacotr settingsController 2026-03-12 09:13:35 -07:00
ashu130698 88a39fe502 Merge branch 'upstream/develop' into feat/bulk-edit-notifications and resolve conflicts 2026-03-12 13:17:40 +05:30
Alexander Holliday a6b92d3c51 Merge pull request #3412 from bluewave-labs/fix/queueController-types
fix: QueueController Types
2026-03-11 14:10:26 -07:00
Alex Holliday 1af609a569 remove unsued route/methods 2026-03-11 14:08:20 -07:00
Alex Holliday 61cc0c2bef remove unused route 2026-03-11 13:51:37 -07:00
Alexander Holliday e4a228e61e Merge pull request #3411 from bluewave-labs/fix/notification-controller-validation
fix: implement NotificationController missing validation
2026-03-11 13:46:51 -07:00
Alex Holliday 76f550843b remove dead check 2026-03-11 13:45:17 -07:00
Alex Holliday 15d8a8ba1f fix test alert type 2026-03-11 13:40:35 -07:00
Alexander Holliday 842fa92cec Merge pull request #3401 from bluewave-labs/fix/rename-breached-to-exceeded
fix: rename "breached" status to "threshold exceeded"
2026-03-11 13:36:53 -07:00
Alex Holliday e878f51887 use service name 2026-03-11 13:30:39 -07:00
gorkem-bwl 9466090332 fix: rename "breached" to "threshold exceeded" in user-facing strings
Only changes user-facing text — no enum, type, or backend status changes.

## Changes
- locales/en.json: "breached" → "threshold exceeded"
- notificationMessageBuilder.ts: notification title/summary/details
- email.ts: email subject line
2026-03-11 16:30:30 -04:00
Alex Holliday 16b267d3a5 implement missing validation 2026-03-11 13:28:48 -07:00
Alexander Holliday 01f2aa294e Merge pull request #3410 from bluewave-labs/fix/monitor-controller-validation
fix: validation in monitor controller
2026-03-11 13:15:41 -07:00
Alex Holliday c156a49cc0 remove dead check 2026-03-11 13:10:09 -07:00
Alex Holliday 20ff76df9d remove unsued route/validation 2026-03-11 13:07:56 -07:00
Alex Holliday ff90953f17 cleanup and tighten validation 2026-03-11 12:57:27 -07:00
Alex Holliday 545926cfcf fix validation in monitor controller 2026-03-11 12:41:27 -07:00
Alexander Holliday 365b6cc60a Merge pull request #3409 from bluewave-labs/fix/mw-controller-typing
fix: type MWController
2026-03-11 12:11:09 -07:00
Alex Holliday 42f6c42ae1 fix discarded validation, tighten types 2026-03-11 12:04:28 -07:00
Alex Holliday 456237ba4e tighten date typing 2026-03-11 12:00:19 -07:00
Alex Holliday e887c2308a type MWController 2026-03-11 11:51:01 -07:00
Alexander Holliday 24d571a8db Merge pull request #3408 from bluewave-labs/fix/logController
fix: log controller
2026-03-11 11:39:01 -07:00
Alexander Holliday d41c5e9ebf Merge pull request #3407 from bluewave-labs/fix/invite-controller-typing
fix: inviteController typing
2026-03-11 11:38:02 -07:00
Alex Holliday d07f259829 properly type logController 2026-03-11 11:37:17 -07:00
Alex Holliday 566011c4e9 fix inviteController typing 2026-03-11 11:35:36 -07:00
Alexander Holliday 3dd0e0a998 Merge pull request #3403 from bluewave-labs/fix/email-body-mjml
fix: empty email body due to TSC ignoring .mjml templates
2026-03-11 11:31:24 -07:00
Alexander Holliday cda0ec3a4c Merge pull request #3406 from bluewave-labs/fix/incident-controller-typing
fix: Incident Controller/Service typing
2026-03-11 11:18:05 -07:00
Alex Holliday d00889ff9b renamed variable 2026-03-11 11:14:44 -07:00
Alex Holliday eafd97b9ad controller, service, validation 2026-03-11 11:10:38 -07:00
Alexander Holliday 7a0e0bccf4 Merge pull request #3405 from bluewave-labs/fix/diagnostic-controller-types
fix: properly type diagnosticController
2026-03-11 10:51:42 -07:00
Alexander Holliday 01401d56b8 Merge pull request #3404 from bluewave-labs/fix/controller-utils-types
fix: controller utils types
2026-03-11 10:51:11 -07:00
Alex Holliday f69b7f6a35 properly type diagnosticController 2026-03-11 10:50:10 -07:00
Alex Holliday cb5316e6f5 fix ssl-checker type 2026-03-11 10:48:12 -07:00
Alexander Holliday 25baff3013 Merge pull request #3400 from bluewave-labs/fix/dns-cache-ttl
fix: set DNS cache TTL to prevent stale lookups
2026-03-11 10:36:08 -07:00
mannilakash bcff3e15a8 fix: updating build script to add .mjml templates 2026-03-11 13:34:25 -04:00
mannilakash 1ad39fcac6 fix: empty email body due to TSC ignoring .mjml templates 2026-03-11 12:42:57 -04:00
Gorkem Cetin 85d2d34a90 Fix links to Checkmate documentation and user guide
Updated links to documentation and user guides in README.
2026-03-11 02:35:54 -04:00
Gorkem Cetin f6d9b7566b Remove project references from README
Removed references to other BlueWave projects from the README.
2026-03-11 01:47:48 -04:00
gorkem-bwl 943ef92053 fix: rename "breached" status to "exceeded" for clarity
The word "breached" in infrastructure monitoring was confusing users
as it implied a security breach. Renamed to "exceeded" which better
describes threshold violations (e.g. "threshold exceeded").

## Changes
- Renamed monitor status value from "breached" to "exceeded" across
  server types, status service, queue helper, notification builder,
  email subject lines, and MongoDB aggregation queries
- Renamed client types, status box/label components, translation key,
  and infrastructure page props to match
- Added DB migration (0005) to update existing monitors with the old
  status value
2026-03-11 01:31:05 -04:00
gorkem-bwl 84cac870d5 fix: set DNS cache TTL to prevent stale lookups
CacheableLookup defaults to maxTtl=Infinity, meaning successful DNS
lookups are cached forever until process restart. This causes monitors
to fail permanently if DNS changes or if a resolver outage causes
ENOTFOUND errors to persist after recovery.

Set maxTtl=300s (5 min) for successful lookups and errorTtl=30s for
failed lookups so the cache recovers automatically.
2026-03-10 19:04:04 -04:00
Alex Holliday 2884ab524d type fetchMonitorCertificate 2026-03-10 11:35:05 -07:00
Alexander Holliday eac470cb68 Merge pull request #3399 from bluewave-labs/fix/auth-controller
fix: type authController correctly, update services accordingly
2026-03-10 11:31:57 -07:00
Alex Holliday a15b9837c6 fix getUserById 2026-03-10 11:29:40 -07:00
Alex Holliday 562d723fcf remove redundant checks, use validated body 2026-03-10 11:25:55 -07:00
Alex Holliday 2fdd5a72f0 type authController correctly, update services accordingly 2026-03-10 11:18:59 -07:00
ashu130698 f9a4659cb2 Merge branch 'develop' into feat/bulk-edit-notifications 2026-03-10 23:27:01 +05:30
Alexander Holliday 3e26387b9d Merge pull request #3398 from bluewave-labs/feat/retention
feat: retention
2026-03-10 10:45:24 -07:00
Alex Holliday dc7d442ace remove unnecessary check 2026-03-10 10:44:02 -07:00
Alex Holliday 839f1beb41 remove __v from client type 2026-03-10 10:37:44 -07:00
Alex Holliday bbdadb0bf5 remove expiry from repository and service 2026-03-10 10:34:09 -07:00
Alex Holliday cadf68740a remove old expiry field, remove vestigal checks 2026-03-10 10:33:18 -07:00
ashu130698 0fc338db2f refactor(backend): move notifications update endpoint to monitors route and handle security feedback 2026-03-10 22:57:55 +05:30
Alex Holliday 6ad0a6a29d validation fix, batch deleteOlderThan 2026-03-10 10:20:23 -07:00
Alex Holliday 77af9d2e93 FE UI, userService type fix 2026-03-09 11:32:01 -07:00
Alex Holliday b1147b8bf9 FE implementation 2026-03-09 11:28:46 -07:00
Alex Holliday 5ab230f77b remove any types 2026-03-09 11:15:50 -07:00
Alex Holliday d9cb81e71d backend implementation 2026-03-09 11:14:40 -07:00
Alexander Holliday 0058772f61 Merge commit from fork
Fixed the Mass Assignment Privilege Escalation in Checkmate
2026-03-09 10:27:39 -07:00
Alexander Holliday bbc2e4073b Merge pull request #3375 from tb102122/feature/teams-notification-channel
add teams
2026-03-09 09:39:56 -07:00
Alexander Holliday 7967b363c2 Merge pull request #3395 from bluewave-labs/fix/demo-monitors
fix: demo monitor import
2026-03-09 09:10:27 -07:00
Aman Rawat 27dffe9fa6 Fixed 2026-03-09 13:12:01 +05:30
tobias.bruckert@mcon-group.com 7213bace08 Merge branch 'feature/teams-notification-channel' of https://github.com/tb102122/Checkmate into feature/teams-notification-channel 2026-03-09 08:43:30 +11:00
tobias.bruckert@mcon-group.com 2cbc667f30 add type checks and remove unneeded vars 2026-03-09 08:43:14 +11:00
Tobias Bruckert 978dc4cda6 Merge branch 'develop' into feature/teams-notification-channel 2026-03-09 08:33:36 +11:00
ashu130698 5578fdf17f Revert "feat(ui): add bulk edit notifications modal and checkmark selection for uptime monitors"
This reverts commit 27dd565bc6.
2026-03-07 10:40:38 +05:30
Alex Holliday a960e3aba2 fix demo monitor import 2026-03-06 14:27:57 -08:00
Alexander Holliday ff1d473b81 Merge pull request #3392 from bluewave-labs/feat/version-bump
bump bersion
2026-03-06 12:48:48 -08:00
Alex Holliday bd384bde4a bump version 2026-03-06 12:47:00 -08:00
Alexander Holliday e7f052dfa0 Merge pull request #3386 from bluewave-labs/feat/remove-team-member
Add ability to remove team members
2026-03-06 12:37:55 -08:00
Alex Holliday 9903c72ff5 merge 2026-03-06 12:36:26 -08:00
Alex Holliday d7d237d37b move button strings to correct location, flex-end 2026-03-06 12:35:38 -08:00
Alexander Holliday 5d03f6f0f0 Merge pull request #3391 from ajhollid/fix/bump-zod
explicitly bump zod
2026-03-06 12:27:34 -08:00
Alex Holliday 38e2a64255 explicitly bump zod 2026-03-06 12:25:32 -08:00
Alexander Holliday 1f56338697 Merge pull request #3390 from bluewave-labs/fix/port-env-var
Fix: restore PORT env var
2026-03-06 12:20:02 -08:00
gorkem-bwl 172467c0a6 fix: address PR review feedback
- Use useIsAdmin and useIsSuperAdmin hooks instead of manual role checks
- Close delete dialog on failure, not just on success
2026-03-06 15:19:01 -05:00
Alexander Holliday ff2b6dff2b Merge pull request #3387 from bluewave-labs/feat/uptime-websockets
Feat: Uptime - Websockets
2026-03-06 12:12:11 -08:00
Br0wnHammer 9f600f87af Fix: Dev Dependencies in Server 2026-03-07 01:40:07 +05:30
Br0wnHammer 7eeff7a396 Fix: Dev Dependencies 2026-03-07 01:37:37 +05:30
Alex Holliday afd6a12e7d restore PORT env var 2026-03-06 12:07:18 -08:00
Br0wnHammer 125d70c4b1 Format Checks 2026-03-07 01:13:00 +05:30
Br0wnHammer 5ebe46a81c Feat: Websocket Implementation 2026-03-07 01:11:20 +05:30
Br0wnHammer 19174ab3e5 Feat: update filter controls and default types 2026-03-07 01:02:30 +05:30
gorkem-bwl 7c953978ed refactor: simplify EditUser imports and canDeleteUser logic
- Merge duplicate react-router-dom imports into one
- Replace useIsAdmin + useIsSuperAdmin + useSelector with single useSelector
- Remove redundant !includes("superadmin") check from canDeleteUser
2026-03-06 14:31:59 -05:00
Br0wnHammer db5441d0e2 Feat: Frontend - update form hook and create/edit page 2026-03-07 01:01:49 +05:30
Br0wnHammer 1d529e3be4 Feat: Frontend - Add websocket to client types and validations 2026-03-07 01:00:38 +05:30
Br0wnHammer 23247d4319 Feat: Update server validation 2026-03-07 00:59:39 +05:30
Br0wnHammer 216d9b2996 Feat: Backend - Config 2026-03-07 00:58:55 +05:30
Br0wnHammer 62f1e62a26 Feat: Backend service - Implement WebSocket check in NetworkService 2026-03-07 00:57:52 +05:30
Br0wnHammer 55bdae77f9 Feat: Backend types - Register websocket type and payload 2026-03-07 00:56:58 +05:30
gorkem-bwl 82998a7795 feat: add ability to remove team members
## Changes
- Add DELETE /api/v1/auth/users/:userId endpoint (admin + superadmin)
- Add deleteUserById service method with role hierarchy enforcement
- Superadmins can remove admins and regular users
- Admins can only remove regular users
- No one can remove superadmins, demo users, or themselves via this endpoint
- Add "Remove user" button with confirmation dialog on edit user page
- Allow admins to view user details and access the edit user page
- Add i18n strings for remove user button and confirmation dialog

## Access control
- superadmin -> can remove admin, user
- admin -> can remove user only
- admin cannot remove superadmin or other admins (enforced on both backend and frontend)
2026-03-06 14:18:27 -05:00
Alexander Holliday 9fe8b7572f Merge pull request #3374 from bluewave-labs/fix/dark-mode-background-color
Fix dark mode background to use neutral gray
2026-03-06 11:14:21 -08:00
Alex Holliday a424092fbd remove unused imports 2026-03-06 11:12:52 -08:00
Alexander Holliday ad427dc765 Merge pull request #3385 from bluewave-labs/feat/globalping-ping-type
feat: globalping ping type
2026-03-06 11:10:45 -08:00
Alex Holliday 116eb80fc9 format 2026-03-06 11:07:48 -08:00
Alex Holliday c094a5fd73 format 2026-03-06 11:02:20 -08:00
Alex Holliday 206e28d1b9 user helper 2026-03-06 11:01:38 -08:00
Alex Holliday 2f1a164c26 remove rtt 2026-03-06 10:46:00 -08:00
Alex Holliday 124a8c0b07 ping type globalping checks 2026-03-06 10:37:29 -08:00
Alexander Holliday 188445c57a Merge pull request #3384 from bluewave-labs/fix/prettier
fix prettier hook
2026-03-06 09:46:08 -08:00
Alex Holliday 35f018623f fix prettier hook 2026-03-06 09:45:33 -08:00
Alexander Holliday d64526fed2 Merge pull request #3383 from bluewave-labs/fix/providers
fix: providers
2026-03-06 09:39:14 -08:00
Alex Holliday 9a8a175f7c format 2026-03-06 09:37:45 -08:00
Alex Holliday 6ecb27d522 remove buildStatusResponse 2026-03-06 09:35:52 -08:00
Alex Holliday 24b9b64979 manually build response 2026-03-06 09:35:07 -08:00
Alexander Holliday a4e4e1313e Merge pull request #3382 from bluewave-labs/fix/ts-errors
fix: resolve ts errors
2026-03-06 09:19:02 -08:00
Alex Holliday 990dc7875a format 2026-03-06 09:16:22 -08:00
Alex Holliday 69e98a51ec resolve ts errors 2026-03-06 09:14:12 -08:00
ashu130698 2a1645baf2 Merge branch 'develop' from upstream into feat/bulk-edit-notifications 2026-03-06 21:42:39 +05:30
ashu130698 8483a7bc55 fix(validation): remove invalid 2026-03-06 21:10:57 +05:30
ashu130698 27dd565bc6 feat(ui): add bulk edit notifications modal and checkmark selection for uptime monitors 2026-03-06 21:07:29 +05:30
ashu130698 c5f0316990 fix(validation): remove invalid zod enum argument 2026-03-06 20:41:33 +05:30
tobias.bruckert@mcon-group.com 08fd09f59b fix build errors 2026-03-06 19:48:19 +11:00
ashu130698 a40a76fb3c fix: resolve Zod build error and run formatter 2026-03-06 13:22:32 +05:30
tobias.bruckert@mcon-group.com 6c421717f8 run formatting 2026-03-06 17:58:04 +11:00
tobias.bruckert@mcon-group.com 083db95151 Merge branch 'feature/teams-notification-channel' of https://github.com/tb102122/Checkmate into feature/teams-notification-channel 2026-03-06 17:49:08 +11:00
tobias.bruckert@mcon-group.com b11ba68ff8 adjust based on review 2026-03-06 17:47:35 +11:00
Tobias Bruckert 12a4112055 Merge branch 'develop' into feature/teams-notification-channel 2026-03-06 13:08:41 +11:00
Alexander Holliday 3063b9cf22 Merge pull request #3379 from bluewave-labs/fix/network-providers
fix: network providers
2026-03-05 14:52:33 -08:00
Alex Holliday bd32854c7a cleanup services 2026-03-05 14:46:28 -08:00
Alex Holliday 0718e63e2f cleanup network service 2026-03-05 14:11:11 -08:00
Alexander Holliday cdb70f9171 Merge pull request #3378 from bluewave-labs/fix/email
Fix/email
2026-03-05 14:01:03 -08:00
Alex Holliday 69e07975e3 bump dependencies 2026-03-05 13:57:45 -08:00
Alex Holliday c5c9a1a88b fix missing await 2026-03-05 13:57:39 -08:00
Alexander Holliday 31efa791bd Merge pull request #3377 from bluewave-labs/fix/providers
fix/providers
2026-03-05 13:23:27 -08:00
Alex Holliday f8c0b57d21 remove unused imports 2026-03-05 19:37:32 +00:00
Alex Holliday 605c969d2f merge commit 2026-03-05 19:37:03 +00:00
Alex Holliday ad7d4e54c3 cleanup 2026-03-05 19:34:57 +00:00
Alex Holliday c7689cc64a grpc 2026-03-05 19:18:29 +00:00
Alex Holliday 27c44a0fbd config 2026-03-05 18:48:19 +00:00
Alex Holliday 190d9dd2b1 gameProvider 2026-03-05 18:45:27 +00:00
Alex Holliday 49672db563 port provider 2026-03-05 18:35:19 +00:00
Alex Holliday 80603c9a42 port provider 2026-03-05 18:30:06 +00:00
Alex Holliday f3b156f2d0 docker provider 2026-03-05 18:19:03 +00:00
ashu130698 4d7de2d3a1 fix: resolve merge conflicts, migrate validation to zod 2026-03-05 23:40:49 +05:30
Alex Holliday ec82efebb4 pagespeed provider, hardware provider 2026-03-05 17:54:16 +00:00
ashu130698 9c17fbe79c refactor: add Joi validation, rename to updateNotifications, add default case 2026-03-05 23:06:41 +05:30
ashu130698 8eca81c8be fix: handle malformed IDs and allow empty set action 2026-03-05 18:02:55 +05:30
ashu130698 eb2d8b8d3b style: format notificationController with prettier 2026-03-05 13:58:53 +05:30
tobias.bruckert@mcon-group.com 33201096b7 add teams 2026-03-05 19:16:08 +11:00
ashu130698 4827f8faec refractor: simplify bulk edit route to PATCH /notifications 2026-03-05 13:06:36 +05:30
gorkem-bwl a1068f1d7e refactor: move dark background colors to colors object
Addresses review feedback — define gray900 and gray850 in the colors
object and reference them in the dark palette.
2026-03-04 19:56:54 -05:00
Alex Holliday 8dd846d6cd harden http provider 2026-03-04 23:36:36 +00:00
Alex Holliday 82175f166f pingProvider, httpProvider 2026-03-04 23:24:48 +00:00
Alex Holliday 3c99809e8e rix reveresed checks 2026-03-04 23:24:05 +00:00
Alexander Holliday 26db2b3a41 Merge pull request #3371 from bluewave-labs/fix/infrastructure-threshold-migration
Fix infrastructure threshold defaults via migration (#3327)
2026-03-04 14:28:49 -08:00
Alexander Holliday 232a71c502 Merge pull request #3369 from bluewave-labs/fix/swagger-dynamic-server-url
fix: dynamically set Swagger UI server URL from request
2026-03-04 14:28:06 -08:00
gorkem-bwl 8df263fd93 fix: also migrate threshold value of 0 to 100, fix formatting
Addresses review feedback — thresholds set to 0 also caused issues
and should be migrated to 100 (disabled) alongside the value of 5.
2026-03-04 16:44:20 -05:00
gorkem-bwl d2f3335b1a fix: add type annotations to Swagger middleware parameters
Fixes TypeScript build error TS7006 for implicit 'any' types on req, res, next.
2026-03-04 16:32:01 -05:00
gorkem-bwl 75eca743b4 fix: use neutral gray background for dark mode
## Changes
- Replace MUI default blue-tinted dark background with neutral grays
  (#151518 for default, #1c1c21 for paper/cards)
- Remove decorative blue/purple SVG blob overlay from dark mode background

## Benefits
- Dark mode now has a clean, neutral gray appearance instead of a blue tint
2026-03-04 16:30:19 -05:00
Alexander Holliday 7bfd68e374 Merge pull request #3372 from bluewave-labs/fix/ipv6-support
Fix IPv6 address handling in ping monitor (#3053)
2026-03-04 13:00:15 -08:00
gorkem-bwl b2e2b11ef2 fix: support IPv6 addresses in ping monitor
## Changes
- Fixed ping host sanitization regex that stripped everything after
  the first colon, which destroyed IPv6 addresses like 2001:db8::1
- New regex properly handles bracketed IPv6 ([::1]:port), bare IPv6,
  and IPv4/hostname:port formats separately

## Closes
Fixes #3053
2026-03-04 15:41:01 -05:00
gorkem-bwl 93b9abd508 fix: add migration to reset infrastructure thresholds from 5 to 100
## Changes
- Added migration 0004_fixInfrastructureThresholds that finds hardware
  monitors with threshold values of 5 (the old incorrect default) and
  updates them to 100 (effectively disabled)
- Runs automatically on server startup like other migrations

## Closes
Fixes #3327
2026-03-04 15:38:34 -05:00
gorkem-bwl 888b399a4f fix: dynamically set Swagger UI server URL from request
## Changes
- Swagger UI now prepends the current server URL (protocol + host) to
  the servers list, so it works correctly in remote/Docker environments
  instead of always pointing to localhost.

## Closes
Fixes #3339
2026-03-04 15:29:44 -05:00
Alexander Holliday 189293b04d Merge pull request #3366 from bluewave-labs/fix/eslint-warnings
fix: eslint warnings
2026-03-04 10:29:35 -08:00
Alex Holliday 13e9185011 bump version 2026-03-04 18:24:06 +00:00
Alex Holliday a7cf78cecc emailService 2026-03-04 18:16:31 +00:00
Alex Holliday 0b30e23783 globalPing 2026-03-04 17:50:27 +00:00
Alexander Holliday 1155619835 Merge pull request #3365 from bluewave-labs/fix/eslint
fix: eslint
2026-03-04 09:47:51 -08:00
Alex Holliday e0608ad3ed notificationMessageBuilder 2026-03-04 17:43:25 +00:00
Alex Holliday d665e95f02 discord 2026-03-04 17:39:31 +00:00
Alex Holliday afc27c804d email 2026-03-04 17:32:50 +00:00
Alex Holliday 1deb22bf63 pagerduty 2026-03-04 17:17:52 +00:00
Alex Holliday af8b128ac2 notificaiton providers 2026-03-03 23:27:48 +00:00
Alex Holliday 00150ba6f4 checkService, bufferService 2026-03-03 23:19:54 +00:00
Alex Holliday 7f04dd5d9a checksService 2026-03-03 23:09:10 +00:00
Alex Holliday ab5389190d stautsService and settingsService 2026-03-03 23:01:35 +00:00
Alexander Holliday cba9f43032 Merge pull request #3362 from bluewave-labs/fix/types
Fix/types
2026-03-03 13:41:05 -08:00
Alex Holliday 1cd6e723cc netowrk-service 2026-03-03 21:37:08 +00:00
Alex Holliday f79a87f98a resolve remaining TS errors 2026-03-03 19:34:28 +00:00
Alex Holliday a0ea50d745 correct return types 2026-03-03 18:50:10 +00:00
Alex Holliday bfa11216f0 correct payload type for monitor response 2026-03-03 18:29:17 +00:00
Alex Holliday 07a2f36dd7 app error 2026-03-03 18:27:42 +00:00
Alex Holliday 8e44718787 logger, imageProcessing 2026-03-03 18:26:42 +00:00
ashu130698 9e06758997 added a PATCH/notifications/bulk/monitor 2026-03-03 23:28:11 +05:30
Alex Holliday 83572aa12a eslint update 2026-03-03 17:43:57 +00:00
Alexander Holliday 332a21cd99 Merge pull request #3361 from bluewave-labs/fix/logs
replace log statement
2026-03-03 09:20:22 -08:00
Alex Holliday 128d1d12b0 replace log statement 2026-03-02 23:04:20 +00:00
Alexander Holliday f73b07cd3c Merge pull request #3353 from bluewave-labs/feat/swr-global
feat: add global swr config
2026-03-02 14:50:44 -08:00
Alex Holliday a7d14e0e43 add global swr config 2026-03-02 22:37:58 +00:00
Alexander Holliday 6622a990be Merge pull request #3352 from bluewave-labs/fix/env-var-validation
Fix/env var validation
2026-03-02 14:01:35 -08:00
Alex Holliday 3854931682 remove comment 2026-03-02 22:00:03 +00:00
Alex Holliday 09534757a2 validation 2026-03-02 21:52:22 +00:00
Alexander Holliday 7b2ce0e350 Merge pull request #3350 from bluewave-labs/fix/server-validation
fix: server validation
2026-03-02 13:40:56 -08:00
Alexander Holliday 19887332c6 Merge pull request #3349 from bluewave-labs/fix/remove-monitor-swagger-api
fix: removing GET /monitors from swagger docs
2026-03-02 13:35:57 -08:00
Alex Holliday a1858e8302 remove passthrough, remove redudnant refine 2026-03-02 21:35:08 +00:00
Alex Holliday 9fd006cfff remove joi 2026-03-02 19:42:47 +00:00
Alex Holliday 75a7e144cd remove comments 2026-03-02 19:26:20 +00:00
Alex Holliday 16cf23baf1 status page validation 2026-03-02 19:25:34 +00:00
Alex Holliday 8236b02034 remove comments 2026-03-02 19:06:32 +00:00
Alex Holliday 64242322a2 add try/catch block 2026-03-02 18:46:21 +00:00
Alex Holliday c1e03a45b0 settings 2026-03-02 18:03:10 +00:00
Alex Holliday f1466df56c update monitor validation 2026-03-02 17:54:52 +00:00
mannilakash 3654c58469 fix: removing GET /monitors from swagger docs 2026-03-02 12:48:04 -05:00
Alex Holliday b997c43bd5 check, monitor, maintenance 2026-03-02 17:46:33 +00:00
Alex Holliday a5d3c95145 validation refactoring 2026-03-02 17:29:48 +00:00
Gorkem Cetin 003106348a Change demo username in README
Updated demo username in README.
2026-03-02 02:22:46 -05:00
Alex Holliday c3a41272a3 validation refactoring 2026-03-01 17:35:00 +00:00
Alexander Holliday 0bff26fe47 Merge pull request #3346 from bluewave-labs/fix/hardcoded-dimensions
Fix/hardcoded dimensions
2026-03-01 07:19:44 -08:00
Alex Holliday 9169410c1a fallback and histogram 2026-02-28 22:03:30 +00:00
Alex Holliday 9174e66134 sidebar and starprompt 2026-02-28 21:48:42 +00:00
Alex Holliday 04c3c57a59 card-details 2026-02-28 21:27:33 +00:00
Alex Holliday f69b6bbf31 create status page 2026-02-28 21:04:46 +00:00
Alex Holliday 05aa1e7112 authfooter 2026-02-28 20:57:44 +00:00
Alexander Holliday 8aead0a00c Merge pull request #3332 from bluewave-labs/fix/pagespeed-sort
Pagespeed filter sorting fix
2026-02-28 12:51:49 -08:00
Alex Holliday db8ed2994a maintenance create 2026-02-28 20:42:10 +00:00
Alex Holliday 8571ccea78 settings page 2026-02-28 20:25:49 +00:00
Alex Holliday 4d273a6dce table and createMonitor 2026-02-28 16:30:04 +00:00
Alex Holliday 4aabc16096 theme constants 2026-02-28 16:16:14 +00:00
Alexander Holliday 94f9c3d118 Merge pull request #3326 from bluewave-labs/fix/uptime/row-ui
Fix: Uptime Table Body Placement
2026-02-28 08:04:50 -08:00
Alexander Holliday a719364e40 Merge pull request #3344 from bluewave-labs/fix/logging
fix/logging
2026-02-27 18:07:53 -08:00
Alex Holliday 308a439790 apply logger 2026-02-28 01:55:41 +00:00
Alex Holliday 42a001b24e logger 2026-02-28 01:04:35 +00:00
Alexander Holliday f48fc24b9e Merge pull request #3342 from bluewave-labs/fix/remove-on-row-click
remove on row click
2026-02-26 14:22:41 -08:00
Alex Holliday e3057ad039 remove unused import 2026-02-26 22:21:19 +00:00
Alex Holliday 32f41a3cc4 remove unused import 2026-02-26 22:11:32 +00:00
Alex Holliday 177d6f80d0 remove on row click 2026-02-26 22:08:14 +00:00
Alexander Holliday ecef55f1b3 Merge pull request #3341 from bluewave-labs/fix/global-thresholds
Fix/global thresholds
2026-02-26 11:36:21 -08:00
Alex Holliday dede689990 global threshold slider fix 2026-02-26 19:31:12 +00:00
Alex Holliday 85edea713a replace textfields with sliders 2026-02-26 19:07:43 +00:00
Alexander Holliday 7e3da7add7 Merge pull request #3304 from bluewave-labs/feat/grpc-monitoring
Feat: gRPC Monitoring
2026-02-26 09:34:04 -08:00
Alex Holliday dfeba1e4fb resolve conflicts 2026-02-26 17:32:11 +00:00
Alexander Holliday 0442c8dd0f Merge pull request #3336 from bluewave-labs/feat/globalping-map
Feat/globalping map
2026-02-25 14:00:03 -08:00
Alex Holliday 7960f1e82c popup close button 2026-02-25 21:58:48 +00:00
Alexander Holliday f7f1602423 Merge pull request #3335 from bluewave-labs/feat/globalping-map
feat: globalping map
2026-02-25 13:57:12 -08:00
Alex Holliday 78d1451621 hide attribution 2026-02-25 21:49:01 +00:00
Alex Holliday a9f005b2c4 move css styles 2026-02-25 21:44:09 +00:00
Alex Holliday b68214fc47 dark/light mode 2026-02-25 21:20:45 +00:00
Alex Holliday 64c0c93c3e chart 2026-02-25 21:14:17 +00:00
Alexander Holliday 40a1f0c6e0 Merge pull request #3334 from bluewave-labs/feat/global-ping-implementation
remove comment
2026-02-25 12:18:01 -08:00
Alex Holliday 1bb2dd323a remove comment 2026-02-25 20:17:34 +00:00
Alexander Holliday 17238c982e Merge pull request #3333 from bluewave-labs/feat/global-ping-implementation
feat: global ping implementation
2026-02-25 12:17:12 -08:00
Alex Holliday cc1d63f91a remove comment 2026-02-25 20:14:31 +00:00
Alex Holliday ba6e931c59 date range extraction, minor fixes 2026-02-25 20:13:07 +00:00
Alex Holliday 885acf6fe6 all continents in table 2026-02-25 19:34:24 +00:00
Alex Holliday 477c30286d show all checks 2026-02-25 18:43:12 +00:00
Alex Holliday 88e28b9819 cleanup on delete, cleanup orphans 2026-02-24 23:28:27 +00:00
Alex Holliday e7ba3cb5f9 checks route, checks table 2026-02-24 23:20:36 +00:00
Alex Holliday 651fbd7cbb add graph 2026-02-24 22:45:59 +00:00
Alex Holliday 64fdd04cc7 conitnent based query 2026-02-24 22:30:28 +00:00
Alex Holliday c3e4b5b95f ui initial commit 2026-02-24 22:16:02 +00:00
Alex Holliday 10313102ee use correct validation 2026-02-24 21:45:55 +00:00
Alexander Holliday 868cbae66f Merge pull request #3331 from bluewave-labs/fix/uptime-filter-status
Fix: Uptime Status Filter
2026-02-24 13:33:15 -08:00
Alex Holliday 2989968fa1 button string 2026-02-24 13:31:36 -08:00
Alex Holliday 89a7fdbe34 cleanup imports 2026-02-24 19:36:45 +00:00
Alex Holliday 432d1d8ccf remove circular dep 2026-02-24 19:19:32 +00:00
Alex Holliday 5a74411ea2 geo bufer 2026-02-24 18:44:47 +00:00
Alex Holliday 705ecf41c2 rename interface 2026-02-24 18:19:51 +00:00
Alex Holliday 1d4e9d6806 geochecks iniital commit 2026-02-24 18:10:20 +00:00
Alex Holliday 8e37ed7ba2 geo jobs scheduling 2026-02-24 17:55:06 +00:00
Alex Holliday b870f25d1a geo job template 2026-02-24 17:39:09 +00:00
Alex Holliday 7d3abb3f98 map fields 2026-02-24 17:18:22 +00:00
mannilakash 9baa6692dd fix: pagespeed filter sorting fix 2026-02-24 07:45:12 -05:00
Br0wnHammer dd7dfba1cf Fix: Uptime Status Filter 2026-02-24 15:05:27 +05:30
Alex Holliday 858aecce62 fe config box 2026-02-23 18:08:01 +00:00
Alex Holliday 42fdc47d86 initial commit 2026-02-23 17:48:53 +00:00
Br0wnHammer af8f913e62 Fix: Uptime Table Body Placement 2026-02-23 13:38:26 +05:30
Br0wnHammer ea086d6956 Fix: PR comments 2026-02-23 10:25:01 +05:30
Br0wnHammer 22b33d789c Fix: Add grpc in checkData 2026-02-23 10:25:00 +05:30
Br0wnHammer 42e7bc1dbf Feat: Add gRPC to filters 2026-02-23 10:25:00 +05:30
Br0wnHammer 13aa600852 Feat: Add gRPC to CreateMonitor UI 2026-02-23 10:25:00 +05:30
Br0wnHammer c06f81ef76 Feat: Add gRPC to client validation 2026-02-23 10:25:00 +05:30
Br0wnHammer c95db26437 Feat: Update backend Joi validation 2026-02-23 10:25:00 +05:30
Br0wnHammer 94a85f8bbb Feat: Impement requestGrpc in NetworkService 2026-02-23 10:25:00 +05:30
Br0wnHammer 05f8e6a07e Feat: Add GrpcStatus to network and Mongoose schema 2026-02-23 10:25:00 +05:30
Br0wnHammer dac78c7647 Feat: Add gRPC to monitortypes 2026-02-23 10:25:00 +05:30
Alexander Holliday 2d023de568 Merge pull request #3325 from bluewave-labs/feat/pagespeed-date-range
feat: pagespeed date range
2026-02-21 13:09:58 -08:00
Alex Holliday f2c88cfd23 fe 2026-02-21 21:05:51 +00:00
Alex Holliday 910c675a49 aggregate pagespeed 2026-02-21 20:52:47 +00:00
Alex Holliday 882e91f6a7 hook up header 2026-02-21 20:31:56 +00:00
Alexander Holliday 06be65ec52 Merge pull request #3324 from bluewave-labs/fix/import
fix: import
2026-02-21 08:20:57 -08:00
Alex Holliday ea54736a39 remove string 2026-02-21 16:19:43 +00:00
Alex Holliday da38f2ee76 createBulkMonitors -> CreateMonitors 2026-02-21 16:17:23 +00:00
Alex Holliday 83d56f1ff6 fe->be 2026-02-21 16:03:45 +00:00
Alex Holliday f94afb63c6 backend 2026-02-21 03:43:11 +00:00
Alex Holliday 673f47983a FE implementation 2026-02-21 03:14:11 +00:00
Alex Holliday b708e83cce add TODOs 2026-02-20 15:11:37 -08:00
Alexander Holliday 288b677781 Merge pull request #3322 from bluewave-labs/fix/ts-error
ts error
2026-02-20 12:37:57 -08:00
Alex Holliday efcf2567b8 ts error 2026-02-20 20:37:29 +00:00
Alexander Holliday 3763b668ed Merge pull request #3320 from bluewave-labs/fix/no-cache
no cache
2026-02-20 12:20:12 -08:00
Alex Holliday 39c6d05196 no cache 2026-02-20 20:19:42 +00:00
Alexander Holliday 7bf83c12af Merge pull request #3310 from bluewave-labs/fix/be/status-page-access
Fix: Authentication Middleware in StatusPage
2026-02-20 10:45:11 -08:00
Br0wnHammer e25669ac6a Fix: Client Redirect 2026-02-21 00:12:17 +05:30
Br0wnHammer f9653888b1 Fix: One Route 2026-02-21 00:10:39 +05:30
Alexander Holliday 921a1c5145 Merge pull request #3316 from bluewave-labs/fix/settings-refactor
fix/settings refactor
2026-02-20 10:29:46 -08:00
Alex Holliday d45e6ec97c remove v2 dir 2026-02-20 18:13:39 +00:00
Alex Holliday ef774b44f2 remove v1 theme and components 2026-02-20 18:10:43 +00:00
Alex Holliday 8d104ee30a remove v1 theme provider 2026-02-20 17:59:08 +00:00
Alex Holliday fc6300d057 remove old, add about and export 2026-02-20 17:36:04 +00:00
Alex Holliday 73f313e4d5 remove old settings strings 2026-02-20 17:22:43 +00:00
Alex Holliday 42fe6ade3e target blank 2026-02-20 17:22:20 +00:00
Alex Holliday b78b584844 add link text 2026-02-20 17:20:43 +00:00
Alex Holliday b64cf3f6b6 email 2026-02-19 19:23:40 +00:00
Br0wnHammer c27bb0e7f1 fix: build error 2026-02-20 00:52:36 +05:30
Br0wnHammer 1a52531faf feat: new middleware 2026-02-20 00:34:43 +05:30
Br0wnHammer 0974c84b8d feat: fe integration of new endpoint 2026-02-20 00:34:23 +05:30
Br0wnHammer 600c937062 feat: API Middleware 2026-02-20 00:31:42 +05:30
Br0wnHammer b87fd5438e feat: verifyStatusPage middleware 2026-02-20 00:30:06 +05:30
Alex Holliday 6a04ce5eee demo monitors, remove monitors 2026-02-19 18:26:40 +00:00
Br0wnHammer dae2709d31 Fix: Authentication Middleware in StatusPage 2026-02-19 23:55:43 +05:30
Alex Holliday 889bb07946 min values 2026-02-19 18:04:34 +00:00
Alex Holliday 9283890b5f 0 handling 2026-02-19 18:01:15 +00:00
Alex Holliday f2779160a1 port 2026-02-19 17:55:55 +00:00
Alex Holliday 216c7753b4 add global thresholds configbox 2026-02-19 17:33:28 +00:00
Alex Holliday a3a25b2add clear-stats 2026-02-19 17:28:00 +00:00
Alex Holliday b5f2a7b26c Fix pagespeed key issue 2026-02-18 21:06:29 +00:00
Alex Holliday d4e72ee8a6 url settigns 2026-02-18 21:02:08 +00:00
Alex Holliday a59f7fd830 pagespeed 2026-02-18 20:35:46 +00:00
Alex Holliday d8e7f9fc0f add pagespeed config 2026-02-18 20:20:45 +00:00
Alex Holliday cdbf5fd0c0 simplify form 2026-02-18 20:14:35 +00:00
Alex Holliday bbb2da3935 fix state type 2026-02-18 20:04:53 +00:00
Alex Holliday 248482a406 initial commit 2026-02-18 19:59:03 +00:00
479 changed files with 48423 additions and 26792 deletions

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
* text=auto
* text eol=lf
+7 -6
View File
@@ -1,27 +1,28 @@
**(Please remove this line only before submitting your PR. Ensure that all relevant items are checked before submission.)**
**(Please remove this line only before submitting your PR. Ensure that all relevant items are checked before submission.)**
## Describe your changes
Briefly describe the changes you made and their purpose.
Briefly describe the changes you made and their purpose.
## Write your issue number after "Fixes "
Fixes #123
Fixes #123
## Please ensure all items are checked off before requesting a review. "Checked off" means you need to add an "x" character between brackets so they turn into checkmarks.
- [ ] (Do not skip this or your PR will be closed) I deployed the application locally.
- [ ] (Do not skip this or your PR will be closed) I have performed a self-review and testing of my code.
- [ ] (Do not skip this or your PR will be closed) I have performed a self-reviewing and testing of my code.
- [ ] I have included the issue # in the PR.
- [ ] I have added i18n support to visible strings (instead of `<div>Add</div>`, use):
- [ ] I have added i18n support to visible strings (instead of `<div>Add</div>`, use):
```Javascript
const { t } = useTranslation();
<div>{t('add')}</div>
```
- [ ] I have **not** included any files that are not related to my pull request, including package-lock and package-json if dependencies have not changed
- [ ] I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application).
- [ ] I made sure font sizes, color choices etc are all referenced from the theme. I don't have any hardcoded dimensions.
- [ ] My PR is granular and targeted to one specific feature.
- [ ] I ran `npm run format` in server and client directories, which automatically formats your code.
- [ ] I took a screenshot or a video and attached to this PR if there is a UI change.
+23
View File
@@ -0,0 +1,23 @@
name: Test Check (Server)
on:
pull_request:
workflow_dispatch:
jobs:
test-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install server dependencies
working-directory: server
run: npm install
- name: Run server tests
working-directory: server
run: npm test
@@ -107,6 +107,7 @@ jobs:
context: .
file: ./docker/dist-arm/server.Dockerfile
push: true
no-cache: true
tags: |
ghcr.io/bluewave-labs/checkmate-backend-mono-multiarch:${{ steps.extract_tag.outputs.version }}
platforms: linux/amd64,linux/arm64
+1
View File
@@ -102,6 +102,7 @@ jobs:
context: .
file: ./docker/dist-arm/server.Dockerfile
push: true
no-cache: true
tags: |
ghcr.io/bluewave-labs/checkmate-backend-mono-multiarch:latest
platforms: linux/amd64,linux/arm64
+122 -104
View File
@@ -1,120 +1,138 @@
name: POEditor Translation Synchronization
name: POEditor Translation Synchronization (disabled)
# This workflow is intentionally disabled — kept for reference only.
# The full definition is preserved commented-out below. To re-enable,
# delete the stub job and uncomment the section starting at `on:`.
on:
# For manual triggering
workflow_dispatch:
inputs:
languages:
description: "Languages to synchronize (comma separated, e.g.: tr,en,es)"
required: false
default: "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn,th"
format:
description: "Export format (key_value_json or json)"
required: false
default: "key_value_json"
permissions:
contents: write
pull-requests: write
workflow_dispatch:
jobs:
sync-translations:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
disabled:
if: false
runs-on: ubuntu-latest
steps:
- run: echo "This workflow is disabled. See comments below for the original definition."
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
# ---------------------------------------------------------------------------
# Original (disabled) workflow below. Do not uncomment if you don't know what you're doing.
# ---------------------------------------------------------------------------
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
# on:
# # For manual triggering
# workflow_dispatch:
# inputs:
# languages:
# description: "Languages to synchronize (comma separated, e.g.: tr,en,es)"
# required: false
# default: "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn,th"
# format:
# description: "Export format (key_value_json or json)"
# required: false
# default: "key_value_json"
- name: Create package.json for scripts
run: |
mkdir -p .github/scripts
cat > .github/scripts/package.json << EOF
{
"name": "poeditor-scripts",
"version": "1.0.0",
"private": true,
"type": "module",
"dependencies": {
"axios": "^1.6.0",
"fs-extra": "^11.1.1"
}
}
EOF
# permissions:
# contents: write
# pull-requests: write
- name: Install dependencies
run: |
cd .github/scripts
npm install
# jobs:
# sync-translations:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# issues: write
# pull-requests: write
- name: Download translations from POEditor
env:
POEDITOR_API: ${{ secrets.POEDITOR_API }}
POEDITOR_PROJECT_ID: ${{ secrets.POEDITOR_PROJECT_ID }}
LANGUAGES: ${{ github.event.inputs.languages || 'tr,en' }}
EXPORT_FORMAT: ${{ github.event.inputs.format || 'key_value_json' }}
run: |
mkdir -p temp
node .github/scripts/download-translations.js
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# fetch-depth: 0
- name: Verify translation files
run: |
echo "Verifying translation files..."
for file in temp/*.json; do
echo "Checking $file"
if [ ! -s "$file" ]; then
echo "Error: $file is empty or does not exist"
exit 1
fi
# Validate JSON format
cat "$file" | jq . > /dev/null || { echo "Error: $file is not valid JSON"; exit 1; }
done
echo "All translation files are valid"
# - name: Setup Node.js
# uses: actions/setup-node@v3
# with:
# node-version: "22"
- name: Copy translations to project
run: |
mkdir -p client/src/locales
cp -r temp/* client/src/locales/
echo "Translation files copied to client/src/locales/"
# - name: Create package.json for scripts
# run: |
# mkdir -p .github/scripts
# cat > .github/scripts/package.json << EOF
# {
# "name": "poeditor-scripts",
# "version": "1.0.0",
# "private": true,
# "type": "module",
# "dependencies": {
# "axios": "^1.6.0",
# "fs-extra": "^11.1.1"
# }
# }
# EOF
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT
# - name: Install dependencies
# run: |
# cd .github/scripts
# npm install
- name: Format client code
run: |
cd client
npm ci
npm run format
# - name: Download translations from POEditor
# env:
# POEDITOR_API: ${{ secrets.POEDITOR_API }}
# POEDITOR_PROJECT_ID: ${{ secrets.POEDITOR_PROJECT_ID }}
# LANGUAGES: ${{ github.event.inputs.languages || 'tr,en' }}
# EXPORT_FORMAT: ${{ github.event.inputs.format || 'key_value_json' }}
# run: |
# mkdir -p temp
# node .github/scripts/download-translations.js
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "feat: translations updated from POEditor"
title: "🌐 Updated Translations from POEditor"
body: |
This PR contains the latest translations from POEditor.
# - name: Verify translation files
# run: |
# echo "Verifying translation files..."
# for file in temp/*.json; do
# echo "Checking $file"
# if [ ! -s "$file" ]; then
# echo "Error: $file is empty or does not exist"
# exit 1
# fi
# # Validate JSON format
# cat "$file" | jq . > /dev/null || { echo "Error: $file is not valid JSON"; exit 1; }
# done
# echo "All translation files are valid"
📅 Update Date: ${{ steps.date.outputs.date }}
🔄 Updated Languages: ${{ github.event.inputs.languages || 'tr,en' }}
# - name: Copy translations to project
# run: |
# mkdir -p client/src/locales
# cp -r temp/* client/src/locales/
# echo "Translation files copied to client/src/locales/"
⚠️ Please review the translations and approve the PR if everything looks correct.
branch: translation-update-${{ github.run_number }}
delete-branch: true
base: develop
add-paths: |
client/src/locales/*.json
committer: GitHub Action <github-actions[bot]@users.noreply.github.com>
author: GitHub Action <github-actions[bot]@users.noreply.github.com>
# - name: Get current date
# id: date
# run: echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT
# - name: Format client code
# run: |
# cd client
# npm ci
# npm run format
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v7
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# commit-message: "feat: translations updated from POEditor"
# title: "🌐 Updated Translations from POEditor"
# body: |
# This PR contains the latest translations from POEditor.
# 📅 Update Date: ${{ steps.date.outputs.date }}
# 🔄 Updated Languages: ${{ github.event.inputs.languages || 'tr,en' }}
# ⚠️ Please review the translations and approve the PR if everything looks correct.
# branch: translation-update-${{ github.run_number }}
# delete-branch: true
# base: develop
# add-paths: |
# client/src/locales/*.json
# committer: GitHub Action <github-actions[bot]@users.noreply.github.com>
# author: GitHub Action <github-actions[bot]@users.noreply.github.com>
+3 -2
View File
@@ -2,7 +2,7 @@ name: Demo deploy
on:
push:
branches: ["demo"]
branches: [ "demo" ]
workflow_dispatch:
jobs:
docker-build-and-push-client:
@@ -84,7 +84,8 @@ jobs:
script: |
cd checkmate
git pull
cd docker/prod
cd docker/unified
docker compose down
docker compose pull
docker compose up -d
docker system prune -af
+5 -5
View File
@@ -2,7 +2,7 @@ name: Staging deploy
on:
push:
branches: ["develop"]
branches: [ "develop" ]
jobs:
docker-build-and-push-client:
@@ -78,13 +78,13 @@ jobs:
- name: SSH into server and restart container using Docker Compose
uses: appleboy/ssh-action@v1.2.2
with:
host: ${{ secrets.STAGING_SERVER_HOST }}
username: ${{ secrets.STAGING_SERVER_USER }}
key: ${{ secrets.STAGING_SERVER_SSH_KEY }}
host: ${{ secrets.DEMO_SERVER_HOST }}
username: ${{ secrets.DEMO_SERVER_USER }}
key: ${{ secrets.DEMO_SERVER_SSH_KEY }}
script: |
cd checkmate
git pull
cd docker/staging
cd docker/unified
docker compose down
docker compose pull
docker compose up -d
+3 -1
View File
@@ -5,4 +5,6 @@
mongo
node_modules/
docs/architecture
docs/reviews
docs/reviews
docs/todo
docs/frontend
+51 -1
View File
@@ -105,6 +105,56 @@ client/src/
- **Queue/Cache**: Redis + BullMQ + Pulse (cron scheduling)
- **i18n**: i18next + react-i18next (translations via PoEditor)
---
## Backend Architecture Patterns
### Repository Pattern & Separation of Concerns
The backend enforces a strict three-layer separation between HTTP handling, business logic, and data access:
```
Request → Controller → Service → Repository → MongoDB (Mongoose)
```
- **Controllers** (`/controllers`) handle HTTP concerns only: parsing request params, calling the appropriate service, and returning a response via the `responseHandler` middleware. They contain no business logic.
- **Services** (`/service/business`) contain all business logic: deciding whether an incident should be created, whether a notification should fire, what state a monitor is in, etc.
- **Repositories** (`/repositories`) are the sole layer that talks to MongoDB through Mongoose. They expose clean, reusable query methods (e.g. `findByMonitorId`, `createCheck`) so that services never construct raw DB queries directly.
This separation makes each layer independently testable and keeps Mongoose-specific code out of business logic. When adding a new feature, the pattern to follow is: add a repository method for any new DB query, call it from a service, and expose it via a controller route.
### Monitoring Flow: From Check to Notification
Background monitoring runs on a scheduled queue, not on the HTTP request cycle. The high-level flow for uptime monitoring is:
```
Pulse (cron) → BullMQ Job → StatusService
├── performs HTTP/port/ping check
├── saves Check via CheckRepository
├── evaluates monitor state change
│ └── calls IncidentService (create / resolve incident)
└── calls NotificationService (email, Slack, Discord, webhook)
```
1. **Pulse** (cron scheduler) enqueues a job into a **BullMQ** queue for each active monitor at its configured interval.
2. A **BullMQ worker** picks up the job and calls `StatusService`, which performs the actual check (HTTP request, TCP port probe, ping, etc.).
3. The result is persisted as a `Check` document via the repository layer.
4. `StatusService` compares the new result against the monitor's previous state. If the monitor transitions from up → down (or down → up), it delegates to `IncidentService` to open or resolve an `Incident` document.
5. On a state change, `NotificationService` reads the monitor's configured `Notification` documents and dispatches alerts to all enabled channels (email, Discord, Slack, webhooks).
### Queue System (BullMQ + Redis)
Redis serves two roles: job queue storage for BullMQ and ephemeral caching. BullMQ manages concurrency, retries, and backpressure for monitoring jobs, ensuring checks are processed reliably even under load.
- Each monitor type (HTTP, port, ping, infrastructure) maps to its own queue worker so failures in one type don't block others.
- Job scheduling interval is driven by the `interval` field on the `Monitor` model.
- Failed jobs are retried with configurable backoff before being moved to a dead-letter state.
- Redis is also used to cache frequently read data (e.g. aggregated stats) to reduce MongoDB query pressure.
When working on anything related to check scheduling, incident lifecycle, or notifications, trace the flow starting from the relevant BullMQ worker rather than from the controller layer.
---
## Code Conventions
### Internationalization
@@ -142,4 +192,4 @@ Key Mongoose models in `/server/src/db/models/`:
- **StatusPage** - Public status pages
- **Notification** - Alert configuration (email, Discord, Slack, webhooks)
- **MaintenanceWindow** - Scheduled maintenance periods
- **AppSettings** - Global application settings
- **AppSettings** - Global application settings
+69 -69
View File
@@ -1,69 +1,69 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in the **bluewave-uptime** project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community, especially during Hacktoberfest, where we encourage new contributors to join and feel supported.
## Our Standards
Examples of behavior that contributes to a positive environment for our community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, especially during Hacktoberfest to ensure a positive experience for all contributors.
## Scope
This Code of Conduct applies within all project spaces, and it also applies when an individual is officially representing the project or its community in public spaces. Examples of representing our project include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@bluewavelabs.ca. All complaints will be reviewed and investigated promptly and fairly.
All project team members are obligated to respect the privacy and security of the reporter of any incident.
## Enforcement Guidelines
Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from project maintainers, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of actions.
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
---
By following this Code of Conduct, we can ensure a welcoming and inclusive environment, encouraging new contributors to engage with the project and the community. Thank you for helping make **bluewave-uptime** a positive space for all!
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in the **checkmate** project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community, especially during Hacktoberfest, where we encourage new contributors to join and feel supported.
## Our Standards
Examples of behavior that contributes to a positive environment for our community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, especially during Hacktoberfest to ensure a positive experience for all contributors.
## Scope
This Code of Conduct applies within all project spaces, and it also applies when an individual is officially representing the project or its community in public spaces. Examples of representing our project include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@bluewavelabs.ca. All complaints will be reviewed and investigated promptly and fairly.
All project team members are obligated to respect the privacy and security of the reporter of any incident.
## Enforcement Guidelines
Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from project maintainers, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of actions.
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
---
By following this Code of Conduct, we can ensure a welcoming and inclusive environment, encouraging new contributors to engage with the project and the community. Thank you for helping make **checkmate** a positive space for all!
+9 -3
View File
@@ -16,7 +16,7 @@ PS: **We work closely with contributors on our [Discord channel](https://discord
Before you dive in, make sure you have these installed:
```bash
# Check Node.js (v16+ required)
# Check Node.js (v20+ required)
node --version
# Check npm
@@ -96,10 +96,16 @@ cd docker/dev
Build the Docker images:
Linux:
```bash
./build_images.sh
```
Windows:
```bash
./build_images.bat
```
Run MongoDB container:
```bash
@@ -234,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?
@@ -310,7 +316,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.
+1 -1
View File
@@ -33,4 +33,4 @@ Ensure you execute `npm run format` before submitting your pull requests in both
### Keep PRs focused
It may be tempting to address a bug you suddenly remembered or make some tiny adjustments in some component that bothers you, but don’t! Keep all commits in your pull request fully focused on the specific feature you are working on. Open up another PR if you want to fix a big or work on another feature.
It may be tempting to address a bug you suddenly remembered or make some tiny adjustments in some component that bothers you, but don’t! Keep all commits in your pull request fully focused on the specific feature you are working on. Open up another PR if you want to fix a bug or work on another feature.
+4 -4
View File
@@ -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.
@@ -76,7 +76,7 @@ También puedes ver el consumo de memoria de MongoDB y Redis en el mismo servido
Si tienes alguna pregunta, sugerencia o comentario, tienes varias opciones:
- [Canal de Discord](https://discord.gg/NAb6H3UTjK)
- [Discusiones en GitHub](https://github.com/bluewave-labs/bluewave-uptime/discussions)
- [Discusiones en GitHub](https://github.com/bluewave-labs/checkmate/discussions)
- [Grupo en Reddit](https://www.reddit.com/r/CheckmateMonitoring/)
¡No dudes en hacer preguntas o compartir tus ideas, nos encantaría saber de ti!
@@ -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.
+28 -24
View File
@@ -14,6 +14,8 @@
<p align="center"><strong>An open source uptime and infrastructure monitoring application</strong></p>
[![Run on PikaPods](https://www.pikapods.com/static/run-button.svg)](https://www.pikapods.com/pods?run=checkmate)
<img width="1660" alt="image" src="https://github.com/user-attachments/assets/b748f36d-a271-4965-ad0a-18bf153bbee7" />
This repository contains both the frontend and the backend of Checkmate, an open-source, self-hosted monitoring tool for tracking server hardware, uptime, response times, and incidents in real-time with beautiful visualizations. Checkmate regularly checks whether a server/website is accessible and performs optimally, providing real-time alerts and reports on the monitored services' availability, downtime, and response time.
@@ -29,7 +31,6 @@ Checkmate has been stress-tested with 1000+ active monitors without any particul
- [📦 Demo](#demo)
- [🔗 User's guide](#users-guide)
- [🛠️ Installation](#installation)
- [🏁 Translations](#translations)
- [🚀 Performance](#performance)
- [💚 Questions & Ideas](#questions--ideas)
- [🧩 Features](#features)
@@ -42,17 +43,23 @@ Checkmate has been stress-tested with 1000+ active monitors without any particul
## Demo
You can see the latest build of [Checkmate](https://checkmate-demo.bluewavelabs.ca/) in action. The username is uptimedemo@demo.com and the password is Demouser1! (just a note that we update the demo server from time to time, so if it doesn't work for you, please ping us on the Discussions channel).
You can see the latest build of [Checkmate](https://demo.checkmate.so/) in action.
The username is demouser@demo.com and the password is Demouser1! (just a note that we update the demo server from time to time, so if it doesn't work for you, please ping us on the Discussions channel).
## User's guide
Usage instructions can be found [here](https://docs.checkmate.so/checkmate-2.1). It's still WIP and some of the information there might be outdated as we continuously add features weekly. Rest assured, we are doing our best! :)
Usage instructions can be found [here](https://checkmate.so/docs).
## Prerequisites
- [Docker](https://www.docker.com/) installed
- [Git](https://git-scm.com/) installed
## Installation
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart).
See installation instructions in [Checkmate documentation portal](https://checkmate.so/docs).
Alternatively, you can also use [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
Alternatively, you can also use [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa), [Cloudzy](https://cloudzy.com/marketplace/checkmate) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
### Using a Custom CA
@@ -60,11 +67,6 @@ If you need to monitor internal HTTPS endpoints with certificates from private C
For more documentation, see the [docs directory](./docs/).
## Translations
If you would like to use Checkmate in your language, please [go to this page](https://poeditor.com/join/project/lRUoGZFCsJ) and register for the language you would like to translate Checkmate to.
## Performance
Thanks to extensive optimizations, Checkmate operates with an exceptionally small memory footprint, requiring minimal memory and CPU resources. Here’s the memory usage of a Node.js instance running on a server that monitors 323 servers every minute:
@@ -80,7 +82,7 @@ You can see the memory footprint of MongoDB and Redis on the same server (398Mb
If you have any questions, suggestions or comments, you have several options:
- [Discord channel](https://discord.gg/NAb6H3UTjK) (preferred)
- [GitHub Discussions](https://github.com/bluewave-labs/bluewave-uptime/discussions) (we check here from time to time)
- [GitHub Discussions](https://github.com/bluewave-labs/Checkmate/discussions) (we check here from time to time)
Feel free to ask questions or share your ideas - we'd love to hear from you!
@@ -112,6 +114,15 @@ Feel free to ask questions or share your ideas - we'd love to hear from you!
If you would like to sponsor an additional feature, [see this page](https://checkmate.so/sponsored-features).
## Monitor Lifecycle
1. A monitor executes a check (HTTP / ping / port / hardware via Capture agent)
2. The result is stored (success/failure + response time)
3. Recent check results are evaluated against the monitor's configured status change threshold
4. If the monitor's status change threshold is met and the current status is not equal to the previous status, the monitor's state changes (e.g. `initializing`, `up`, `down`, `breached`)
5. Upon a state change: an incident is either created or resolved, depending on the monitor's current status
6. Notifications are triggered based on configuration
## Screenshots
<p>
@@ -157,27 +168,20 @@ Here's how you can contribute:
0. Star this repo :)
1. Check [Contributor's guideline](https://github.com/bluewave-labs/Checkmate/blob/develop/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag.
2. Check [project structure](https://docs.checkmate.so/checkmate-2.1/developers-guide/general-project-structure) and [high level overview](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview).
3. Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
4. Open an issue if you believe you've encountered a bug.
5. Check for good-first-issue's if you are a newcomer.
6. Make a pull request to add new features/make quality-of-life improvements/fix bugs.
7. Check out this interactive walkthrough of the `Checkmate` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=Checkmate&owner=bluewave-labs&branch=develop&OnboardingTutorial=true). To refine existing dataflow simulation or create new ones, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
2. Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
3. Open an issue if you believe you've encountered a bug.
4. Check for good-first-issue's if you are a newcomer.
5. Make a pull request to add new features/make quality-of-life improvements/fix bugs.
6. Check out this interactive walkthrough of the `Checkmate` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=Checkmate&owner=bluewave-labs&branch=develop&OnboardingTutorial=true). To refine existing dataflow simulation or create new ones, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
<a href="https://github.com/bluewave-labs/checkmate/graphs/contributors">
<img src="https://contrib.rocks/image?repo=bluewave-labs/checkmate" />
</a>
[![Star History Chart](https://api.star-history.com/svg?repos=bluewave-labs/checkmate&type=Date)](https://star-history.com/#bluewave-labs/bluewave-uptime&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=bluewave-labs/checkmate&type=Date)](https://star-history.com/#bluewave-labs/Checkmate&Date)
## Our sponsors
Thanks to [Gitbook](https://gitbook.io/) for giving us a free tier for their documentation platform, and [Poeditor](https://poeditor.com/) providing us a free account to use their i18n services. If you would like to sponsor Checkmate, please send an email to hello@bluewavelabs.ca
If you would like to sponsor a feature, [see this page](https://checkmate.so/sponsored-features).
Also check other developer and contributor-friendly projects of BlueWave:
- [VerifyWise](https://github.com/bluewave-labs/verifywise), the first open source AI governance platform.
- [DataRoom](https://github.com/bluewave-labs/bluewave-dataroom), an secure file sharing application, aka dataroom.
- [Guidefox](https://github.com/bluewave-labs/guidefox), an application that helps new users learn how to use your product via hints, tours, popups and banners.
+690 -123
View File
File diff suppressed because it is too large. Load diff
+7 -4
View File
@@ -1,7 +1,7 @@
{
"name": "client",
"private": true,
"version": "0.0.0",
"version": "3.6.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -13,7 +13,7 @@
"format-check": "prettier --check ."
},
"lint-staged": {
"**/*": "npm run format"
"**/*": "prettier --write"
},
"dependencies": {
"@emotion/react": "^11.13.3",
@@ -25,6 +25,7 @@
"@mui/x-charts": "7.29.1",
"@mui/x-date-pickers": "7.29.4",
"@reduxjs/toolkit": "2.7.0",
"@types/maplibre-gl": "^1.13.2",
"axios": "^1.7.4",
"dayjs": "1.11.13",
"flag-icons": "7.3.2",
@@ -33,6 +34,7 @@
"i18next": "25.4.2",
"joi": "17.13.3",
"lucide-react": "^0.562.0",
"maplibre-gl": "^5.19.0",
"mui-color-input": "^7.0.0",
"pretty-bytes": "^7.1.0",
"pretty-ms": "^9.3.0",
@@ -41,6 +43,7 @@
"react-hook-form": "^7.63.0",
"react-i18next": "^15.4.0",
"react-icons": "5.5.0",
"react-map-gl": "^8.1.0",
"react-redux": "9.2.0",
"react-router": "^6.23.0",
"react-router-dom": "^6.23.1",
@@ -49,7 +52,7 @@
"redux-persist": "6.0.0",
"swr": "^2.3.6",
"vite-plugin-svgr": "^4.2.0",
"zod": "^4.1.11"
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "24.5.2",
@@ -63,6 +66,6 @@
"lint-staged": "^16.2.7",
"prettier": "^3.3.3",
"typescript": "5.9.3",
"vite": "6.3.6"
"vite": "6.4.1"
}
}
+258
View File
@@ -0,0 +1,258 @@
/**
* Locale Migration Script
*
* Restructures all non-English locale files to match en.json's nested key structure.
* Recovers translations via safe key-matching strategies, uses English placeholders
* for unmatched keys.
*
* Usage: npx tsx client/scripts/migrate-locales.ts
*
* SAFETY: en.json is NEVER modified. Originals are backed up before overwriting.
*/
import fs from "fs";
import path from "path";
const LOCALES_DIR = path.resolve(import.meta.dirname, "../src/locales");
const BACKUP_DIR = path.join(LOCALES_DIR, "backup");
const REPORT_PATH = path.join(LOCALES_DIR, "migration-report.json");
// ── Helpers ──────────────────────────────────────────────────────────────────
/** Flatten a nested object into { "a.b.c": value } pairs */
function flattenKeys(obj: Record<string, unknown>, prefix = ""): Record<string, string> {
const result: Record<string, string> = {};
for (const [key, value] of Object.entries(obj)) {
const fullPath = prefix ? `${prefix}.${key}` : key;
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
Object.assign(result, flattenKeys(value as Record<string, unknown>, fullPath));
} else {
result[fullPath] = String(value);
}
}
return result;
}
/** Set a value at a dot-separated path in a nested object */
function setNestedValue(
obj: Record<string, unknown>,
keyPath: string,
value: string
): void {
const parts = keyPath.split(".");
let current = obj;
for (let i = 0; i < parts.length - 1; i++) {
const part = parts[i];
if (!(part in current) || typeof current[part] !== "object") {
current[part] = {};
}
current = current[part] as Record<string, unknown>;
}
current[parts[parts.length - 1]] = value;
}
// ── Build mapping indexes from en.json ───────────────────────────────────────
function buildIndexes(enFlat: Record<string, string>) {
const enKeys = Object.keys(enFlat);
// last segment -> en key paths
const lastSegIndex: Record<string, string[]> = {};
// last 2 segments -> en key paths
const suffixIndex: Record<string, string[]> = {};
for (const keyPath of enKeys) {
const parts = keyPath.split(".");
const lastSeg = parts[parts.length - 1].toLowerCase();
if (!lastSegIndex[lastSeg]) lastSegIndex[lastSeg] = [];
lastSegIndex[lastSeg].push(keyPath);
if (parts.length >= 2) {
const suffix = parts.slice(-2).join(".").toLowerCase();
if (!suffixIndex[suffix]) suffixIndex[suffix] = [];
suffixIndex[suffix].push(keyPath);
}
}
return { lastSegIndex, suffixIndex };
}
// ── Mapping logic ────────────────────────────────────────────────────────────
type MatchStrategy = "exact" | "suffix-2" | "unique-name" | "english-placeholder";
interface KeyMatch {
enKey: string;
value: string;
strategy: MatchStrategy;
}
function buildMigratedLocale(
enFlat: Record<string, string>,
langFlat: Record<string, string>,
indexes: ReturnType<typeof buildIndexes>
): { matches: KeyMatch[]; result: Record<string, unknown> } {
const { lastSegIndex, suffixIndex } = indexes;
const matches: KeyMatch[] = [];
const result: Record<string, unknown> = {};
// Build reverse lookup: for each orphan key in lang, index by last segment and suffix
const langByLastSeg: Record<string, { key: string; value: string }[]> = {};
const langBySuffix: Record<string, { key: string; value: string }[]> = {};
for (const [langKey, langValue] of Object.entries(langFlat)) {
const parts = langKey.split(".");
const lastSeg = parts[parts.length - 1].toLowerCase();
if (!langByLastSeg[lastSeg]) langByLastSeg[lastSeg] = [];
langByLastSeg[lastSeg].push({ key: langKey, value: langValue });
if (parts.length >= 2) {
const suffix = parts.slice(-2).join(".").toLowerCase();
if (!langBySuffix[suffix]) langBySuffix[suffix] = [];
langBySuffix[suffix].push({ key: langKey, value: langValue });
}
}
for (const enKey of Object.keys(enFlat)) {
const enValue = enFlat[enKey];
const parts = enKey.split(".");
const lastSeg = parts[parts.length - 1].toLowerCase();
const suffix = parts.length >= 2 ? parts.slice(-2).join(".").toLowerCase() : null;
// Strategy 1: Exact path match
if (langFlat[enKey] !== undefined) {
const value = langFlat[enKey];
setNestedValue(result, enKey, value);
matches.push({ enKey, value, strategy: "exact" });
continue;
}
// Strategy 2: 2-segment suffix match (lang key suffix matches en key suffix, both unique)
if (suffix) {
const enCandidates = suffixIndex[suffix];
const langCandidates = langBySuffix[suffix];
if (
enCandidates &&
enCandidates.length === 1 &&
langCandidates &&
langCandidates.length === 1
) {
const value = langCandidates[0].value;
setNestedValue(result, enKey, value);
matches.push({ enKey, value, strategy: "suffix-2" });
continue;
}
}
// Strategy 3: Unique last-segment match
const enCandidates = lastSegIndex[lastSeg];
const langCandidates = langByLastSeg[lastSeg];
if (
enCandidates &&
enCandidates.length === 1 &&
langCandidates &&
langCandidates.length === 1
) {
const value = langCandidates[0].value;
setNestedValue(result, enKey, value);
matches.push({ enKey, value, strategy: "unique-name" });
continue;
}
// No match — use English placeholder
setNestedValue(result, enKey, enValue);
matches.push({ enKey, value: enValue, strategy: "english-placeholder" });
}
return { matches, result };
}
// ── Main ─────────────────────────────────────────────────────────────────────
function main() {
// Load en.json
const enPath = path.join(LOCALES_DIR, "en.json");
const en = JSON.parse(fs.readFileSync(enPath, "utf8"));
const enFlat = flattenKeys(en);
const enKeyCount = Object.keys(enFlat).length;
const indexes = buildIndexes(enFlat);
console.log(`English: ${enKeyCount} keys (source of truth — NOT modified)\n`);
// Find all non-English locale files
const localeFiles = fs
.readdirSync(LOCALES_DIR)
.filter(
(f: string) =>
f.endsWith(".json") && f !== "en.json" && f !== "migration-report.json"
);
if (localeFiles.length === 0) {
console.log("No locale files to migrate.");
return;
}
// Create backup directory
if (!fs.existsSync(BACKUP_DIR)) {
fs.mkdirSync(BACKUP_DIR, { recursive: true });
}
const report: Record<
string,
{
total: number;
exact: number;
suffix: number;
uniqueName: number;
placeholder: number;
}
> = {};
for (const file of localeFiles) {
const lang = file.replace(".json", "");
const filePath = path.join(LOCALES_DIR, file);
// Backup original
const backupPath = path.join(BACKUP_DIR, file);
fs.copyFileSync(filePath, backupPath);
// Load and flatten
const langData = JSON.parse(fs.readFileSync(filePath, "utf8"));
const langFlat = flattenKeys(langData);
// Migrate
const { matches, result } = buildMigratedLocale(enFlat, langFlat, indexes);
// Write migrated file
fs.writeFileSync(filePath, JSON.stringify(result, null, "\t") + "\n", "utf8");
// Compute stats
const stats = {
total: enKeyCount,
exact: matches.filter((m) => m.strategy === "exact").length,
suffix: matches.filter((m) => m.strategy === "suffix-2").length,
uniqueName: matches.filter((m) => m.strategy === "unique-name").length,
placeholder: matches.filter((m) => m.strategy === "english-placeholder").length,
};
report[lang] = stats;
const translated = stats.exact + stats.suffix + stats.uniqueName;
const pct = ((translated / enKeyCount) * 100).toFixed(1);
console.log(
`${lang.padEnd(8)} ${String(translated).padStart(4)} translated (${pct}%) | ` +
`exact: ${stats.exact} suffix: ${stats.suffix} name: ${stats.uniqueName} ` +
`placeholder: ${stats.placeholder}`
);
}
// Write report
fs.writeFileSync(REPORT_PATH, JSON.stringify(report, null, "\t") + "\n", "utf8");
const totalLangs = localeFiles.length;
console.log(
`\nMigrated ${totalLangs} locale files. Originals backed up to locales/backup/`
);
console.log(`Report written to ${REPORT_PATH}`);
}
main();
+38 -28
View File
@@ -3,43 +3,53 @@ import { useSelector } from "react-redux";
import "react-toastify/dist/ReactToastify.css";
import { ToastContainer } from "react-toastify";
import { ThemeProvider } from "@emotion/react";
import lightTheme from "./Utils/Theme/lightTheme";
import darkTheme from "./Utils/Theme/darkTheme";
import { CssBaseline, GlobalStyles } from "@mui/material";
import { SWRConfig } from "swr";
import { Routes } from "./Routes";
import AppLayout from "@/Components/v2/layout/AppLayout";
import AppLayout from "@/Components/layout/AppLayout";
import type { RootState } from "@/Types/state";
import { lightTheme, darkTheme } from "@/Utils/Theme/Theme";
const swrConfig = {
dedupingInterval: 5000,
revalidateOnFocus: false,
revalidateOnReconnect: true,
shouldRetryOnError: false,
errorRetryCount: 2,
errorRetryInterval: 1000,
focusThrottleInterval: 5000,
};
function App() {
const mode = useSelector((state: RootState) => state.ui.mode);
const theme = mode === "light" ? lightTheme : darkTheme;
return (
<ThemeProvider theme={theme}>
<CssBaseline />
<GlobalStyles
styles={{
body: {
// @ts-ignore
backgroundColor: theme.palette.background.main,
},
}}
/>
<AppLayout>
<Routes />
</AppLayout>
<ToastContainer
newestOnTop={true}
theme={mode}
style={
{
"--toastify-color-progress-light": "#7C8BA1",
"--toastify-color-progress-dark": "#7C8BA1",
} as CSSProperties
}
/>
</ThemeProvider>
<SWRConfig value={swrConfig}>
<ThemeProvider theme={theme}>
<CssBaseline />
<GlobalStyles
styles={{
body: {
backgroundColor: theme.palette.background.default,
},
}}
/>
<AppLayout>
<Routes />
</AppLayout>
<ToastContainer
newestOnTop={true}
theme={mode}
style={
{
"--toastify-color-progress-light": "#7C8BA1",
"--toastify-color-progress-dark": "#7C8BA1",
} as CSSProperties
}
/>
</ThemeProvider>
</SWRConfig>
);
}
@@ -2,7 +2,7 @@ import Box from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
import type { CheckSnapshot } from "@/Types/Check";
import { getResponseColor } from "@/Utils/DataUtils";
import { HeatmapResponseTimeTooltip } from "@/Components/v2/common/charts/HeatmapResponseTimeTooltip";
import { HeatmapResponseTimeTooltip } from "@/Components/common/charts/HeatmapResponseTimeTooltip";
import type { SxProps } from "@mui/material/styles";
import type { ResponsiveStyleValue } from "@mui/system";
@@ -32,7 +32,7 @@ export const HeatmapResponseTime = ({
if (!checks || checks.length === 0) return null;
const latestChecks = checks.slice(-25).reverse();
const latestChecks = checks.slice(-25);
let data: Array<CheckSnapshot | PlaceholderCheck>;
if (latestChecks.length !== 25) {
@@ -57,7 +57,8 @@ export const HeatmapResponseTimeTooltip = ({
{formatDateWithTz(check?.createdAt, "ddd, MMMM D, YYYY, HH:mm A", uiTimezone)}
</Typography>
<Typography>
{t("common.labels.responseTime")}: {check.originalResponseTime.toFixed()} ms
{t("common.labels.responseTime")}:{" "}
{check?.originalResponseTime?.toFixed() ?? "N/A"} ms
</Typography>
<Typography textTransform={"capitalize"}>
Status:{" "}
@@ -1,7 +1,7 @@
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import { ToggleButtonGroup, ToggleButton } from "@/Components/v2/inputs";
import { ToggleButtonGroup, ToggleButton } from "@/Components/inputs";
import { useTheme } from "@mui/material/styles";
import CircularProgress from "@mui/material/CircularProgress";
import { useTranslation } from "react-i18next";
+5
View File
@@ -0,0 +1,5 @@
export * from "./charts/HistogramResponseTime";
export * from "./charts/HeatmapResponseTime";
export * from "./charts/HeatmapResponseTimeTooltip";
export * from "./controls/HeaderCreate";
export * from "./controls/HeaderTimeRange";
@@ -1,7 +1,8 @@
import { BaseBox } from "../design-elements";
import { BaseBox } from ".";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import { LAYOUT } from "@/Utils/Theme/constants";
import type { ResponsiveStyleValue } from "@mui/system";
import { useTheme } from "@mui/material/styles";
@@ -26,7 +27,7 @@ export const BaseChart = ({
return (
<BaseBox
sx={{
padding: padding ?? theme.spacing(8),
padding: padding ?? theme.spacing(LAYOUT.MD),
display: "flex",
flex: 1,
width: width,
@@ -34,13 +35,13 @@ export const BaseChart = ({
}}
>
<Stack
gap={theme.spacing(8)}
gap={theme.spacing(LAYOUT.MD)}
flex={1}
>
<Stack
direction="row"
alignItems={"center"}
gap={theme.spacing(4)}
gap={theme.spacing(LAYOUT.XS)}
>
{icon && (
<BaseBox
@@ -3,13 +3,14 @@ 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 {
ErrorFallback,
EmptyFallback,
EmptyMonitorFallback,
BaseFallback,
} from "@/Components/v2/design-elements/Fallback";
import { Breadcrumb } from "@/Components/v2/design-elements/Breadcrumb";
} from "@/Components/design-elements/Fallback";
import { Breadcrumb } from "@/Components/design-elements/Breadcrumb";
import CircularProgress from "@mui/material/CircularProgress";
import { HeaderAuthControls } from "@/Pages/Auth/components/HeaderAuthControls";
@@ -91,7 +92,7 @@ export const BasePage = ({
return (
<Stack
spacing={theme.spacing(10)}
spacing={theme.spacing(LAYOUT.LG)}
{...props}
>
<Breadcrumb breadcrumbOverride={breadcrumbOverride} />
@@ -220,7 +221,7 @@ export const BaseAuthPage = ({
return (
<BasePage
breadcrumbOverride={[]}
gap={theme.spacing(8)}
gap={theme.spacing(LAYOUT.MD)}
alignItems={"center"}
justifyContent={"center"}
minHeight="100vh"
@@ -229,7 +230,7 @@ export const BaseAuthPage = ({
>
<HeaderAuthControls
hideLogo
py={theme.spacing(4)}
py={theme.spacing(LAYOUT.XS)}
position={"absolute"}
top={0}
left={0}
@@ -243,14 +244,14 @@ export const BaseAuthPage = ({
<Stack alignItems={"center"}>
<Typography
variant="h1"
mb={theme.spacing(2)}
mb={theme.spacing(SPACING.LG)}
>
{title}
</Typography>
<Typography variant="h2">{subtitle}</Typography>
</Stack>
<Stack
gap={theme.spacing(8)}
gap={theme.spacing(LAYOUT.MD)}
width={{
xs: "80%",
md: "25%",
@@ -2,6 +2,7 @@ import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { Check } from "lucide-react";
import { useTheme } from "@mui/material/styles";
import { LAYOUT } from "@/Utils/Theme/constants";
export const BulletPointCheck = ({
text,
@@ -21,7 +22,7 @@ export const BulletPointCheck = ({
return (
<Stack
direction="row"
gap={theme.spacing(6)}
gap={theme.spacing(LAYOUT.SM)}
alignItems="center"
>
<Check
@@ -1,7 +1,8 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { BulletPointCheck, SkeletonCard } from "@/Components/v2/design-elements";
import { Button } from "@/Components/v2/inputs";
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";
@@ -27,7 +28,7 @@ export const BaseFallback = ({ children, ...props }: BaseFallbackProps) => {
lg: "50%",
xl: "40%",
}}
padding={{ xs: theme.spacing(8), md: theme.spacing(16) }}
padding={{ xs: theme.spacing(LAYOUT.MD), md: theme.spacing(LAYOUT.XXL) }}
bgcolor={theme.palette.background.paper}
border={1}
borderColor={theme.palette.divider}
@@ -55,7 +56,7 @@ export const ErrorFallback = ({
<BaseFallback>
<Typography
variant="h1"
marginY={theme.spacing(4)}
marginY={theme.spacing(LAYOUT.XS)}
color={theme.palette.text.secondary}
>
{title}
@@ -81,20 +82,15 @@ export const EmptyFallback = ({
return (
<BaseFallback>
<Stack
gap={theme.spacing(10)}
gap={theme.spacing(LAYOUT.MD)}
zIndex={1}
alignItems="center"
>
<Typography
component="h1"
color={theme.palette.primary.contrastText}
>
{title}
</Typography>
<Typography component="h1">{title}</Typography>
<Stack
sx={{
flexWrap: "wrap",
gap: theme.spacing(2),
gap: theme.spacing(SPACING.MD),
maxWidth: "1100px",
width: "100%",
}}
@@ -139,7 +135,7 @@ export const EmptyMonitorFallback = ({
return (
<BaseFallback>
<Stack
gap={theme.spacing(10)}
gap={theme.spacing(LAYOUT.MD)}
zIndex={1}
alignItems="center"
>
@@ -152,7 +148,7 @@ export const EmptyMonitorFallback = ({
<Stack
sx={{
flexWrap: "wrap",
gap: theme.spacing(2),
gap: theme.spacing(SPACING.MD),
maxWidth: "1100px",
width: "100%",
}}
@@ -1,4 +1,4 @@
import { BaseChart } from "@/Components/v2/design-elements";
import { BaseChart } from "@/Components/design-elements";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
@@ -1,11 +1,11 @@
import type { Monitor } from "@/Types/Monitor";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { PulseDot, Dot } from "@/Components/v2/design-elements";
import { PulseDot, Dot } from "@/Components/design-elements";
import { getStatusColor, formatUrl } from "@/Utils/MonitorUtils";
import { useTheme } from "@mui/material/styles";
import prettyMilliseconds from "pretty-ms";
import { typographyLevels } from "@/Utils/Theme/v2Palette";
import { typographyLevels } from "@/Utils/Theme/Palette";
import useMediaQuery from "@mui/material/useMediaQuery";
export const MonitorStatus = ({ monitor }: { monitor: Monitor }) => {
const theme = useTheme();
@@ -19,7 +19,6 @@ export const MonitorStatus = ({ monitor }: { monitor: Monitor }) => {
<Typography
fontSize={typographyLevels.xl}
fontWeight={500}
color={theme.palette.primary.contrastText}
overflow={"hidden"}
textOverflow={"ellipsis"}
whiteSpace={"nowrap"}
@@ -3,6 +3,7 @@ import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import { useTheme } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
import { LAYOUT } from "@/Utils/Theme/constants";
export const SplitBox = ({
left,
right,
@@ -18,10 +19,10 @@ export const SplitBox = ({
bgcolor={theme.palette.background.paper}
border={1}
borderColor={theme.palette.divider}
borderRadius={theme.spacing(2)}
borderRadius={theme.shape.borderRadius}
>
<Box
padding={theme.spacing(15)}
padding={theme.spacing(LAYOUT.XXL)}
borderRight={isSmall ? 0 : 1}
borderBottom={isSmall ? 1 : 0}
borderColor={theme.palette.divider}
@@ -37,7 +38,7 @@ export const SplitBox = ({
</Box>
<Box
flex={1}
padding={theme.spacing(15)}
padding={theme.spacing(LAYOUT.XXL)}
>
{right}
</Box>
@@ -60,7 +61,7 @@ export const ConfigBox = ({
return (
<SplitBox
left={
<Stack spacing={theme.spacing(4)}>
<Stack spacing={theme.spacing(LAYOUT.XS)}>
<Typography
textTransform={"capitalize"}
component="h2"
@@ -4,8 +4,8 @@ import Box from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
import { lighten } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
import type { PaletteKey } from "@/Utils/Theme/v2Theme";
import { BaseBox, TooltipWithInfo } from "@/Components/v2/design-elements";
import type { PaletteKey } from "@/Utils/Theme/Theme";
import { BaseBox, TooltipWithInfo } from "@/Components/design-elements";
import type { SxProps } from "@mui/material";
type GradientBox = React.PropsWithChildren<{
@@ -1,7 +1,7 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import { BaseBox } from "@/Components/v2/design-elements";
import { BaseBox } from "@/Components/design-elements";
import { useTranslation } from "react-i18next";
import type { SxProps } from "@mui/material";
@@ -1,5 +1,5 @@
import Box from "@mui/material/Box";
import { BaseBox } from "@/Components/v2/design-elements";
import { BaseBox } from "@/Components/design-elements";
import Typography from "@mui/material/Typography";
import type { MonitorStatus } from "@/Types/Monitor";
@@ -29,6 +29,7 @@ import type { TablePaginationOwnProps } from "@mui/material/TablePagination";
import { useTranslation } from "react-i18next";
import { useState, Fragment, useEffect } from "react";
import { useTheme } from "@mui/material/styles";
import { SPACING, LAYOUT } from "@/Utils/Theme/constants";
import type { SxProps, Theme } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
@@ -90,20 +91,20 @@ export function DataTable<
// Return stack of cards for small screens
if (isSmall && cardsOnSmallScreens) {
return (
<Stack spacing={theme.spacing(4)}>
<Stack spacing={theme.spacing(LAYOUT.XS)}>
{data.map((row) => {
const key = row.id || row._id || Math.random();
keys.push(key);
return (
<Stack
onClick={() => (onRowClick ? onRowClick(row) : null)}
spacing={theme.spacing(4)}
spacing={theme.spacing(LAYOUT.XS)}
sx={{
borderStyle: "solid",
borderWidth: 1,
borderColor: theme.palette.divider,
borderRadius: theme.shape.borderRadius,
padding: theme.spacing(4),
padding: theme.spacing(LAYOUT.XS),
cursor: onRowClick ? "pointer" : "default",
}}
key={key}
@@ -155,7 +156,7 @@ export function DataTable<
<Table
sx={{
"&.MuiTable-root :is(.MuiTableHead-root, .MuiTableBody-root) :is(th, td)": {
paddingLeft: theme.spacing(8),
paddingLeft: theme.spacing(LAYOUT.MD),
},
"& .MuiTableCell-root": {
borderBottom: `1px solid ${theme.palette.divider}`,
@@ -168,13 +169,13 @@ export function DataTable<
color: theme.palette.text.secondary,
fontWeight: 500,
textTransform: "uppercase",
padding: `${theme.spacing(2)} ${theme.spacing(8)}`,
padding: `${theme.spacing(SPACING.LG)} ${theme.spacing(LAYOUT.MD)}`,
fontSize: theme.typography.fontSize,
},
"& :is(td)": {
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.secondary,
padding: `${theme.spacing(7)} ${theme.spacing(8)}`,
padding: `${theme.spacing(LAYOUT.MD)} ${theme.spacing(LAYOUT.MD)}`,
fontSize: theme.typography.fontSize,
overflowX: "hidden",
},
@@ -514,7 +515,7 @@ export const Pagination = ({ ...props }: PaginationProps) => {
display: "grid",
gridTemplateColumns: "1fr 1fr",
gridAutoRows: "auto",
rowGap: theme.spacing(1),
rowGap: theme.spacing(SPACING.SM),
alignItems: "center",
justifyItems: "center",
paddingLeft: 0,
@@ -556,8 +557,8 @@ const EmptyView = ({ text, positive }: { text?: string; positive?: boolean }) =>
alignItems={"center"}
justifyContent={"center"}
sx={{
py: theme.spacing(12),
px: theme.spacing(4),
py: theme.spacing(LAYOUT.XL),
px: theme.spacing(LAYOUT.XS),
borderWidth: 1,
borderStyle: "solid",
borderColor: theme.palette.divider,
@@ -574,7 +575,7 @@ const EmptyView = ({ text, positive }: { text?: string; positive?: boolean }) =>
display: "flex",
alignItems: "center",
justifyContent: "center",
mb: theme.spacing(2),
mb: theme.spacing(SPACING.LG),
}}
>
<Icon
@@ -10,7 +10,7 @@ interface TextLinkProps extends StackProps {
text: string;
linkText: string;
href: string;
target?: string;
target?: "_self" | "_blank" | "_parent" | "_top";
}
export const TextLink = ({
@@ -34,6 +34,7 @@ export const TextLink = ({
to={href}
component={RouterLink}
target={target}
{...(target === "_blank" && { rel: "noopener noreferrer" })}
>
{linkText}
</Link>
@@ -1,6 +1,6 @@
import Autocomplete from "@mui/material/Autocomplete";
import type { AutocompleteProps } from "@mui/material/Autocomplete";
import { TextField, Checkbox } from "@/Components/v2/inputs";
import { TextField, Checkbox } from "@/Components/inputs";
import ListItem from "@mui/material/ListItem";
import Stack from "@mui/material/Stack";
import { useTheme } from "@mui/material/styles";
@@ -1,9 +1,9 @@
import { MuiColorInput } from "mui-color-input";
import type { MuiColorInputProps } from "mui-color-input";
import { typographyLevels } from "@/Utils/Theme/v2Palette";
import { typographyLevels } from "@/Utils/Theme/Palette";
import { useTheme } from "@mui/material";
import Stack from "@mui/material/Stack";
import { FieldLabel } from "@/Components/v2/inputs/FieldLabel";
import { FieldLabel } from "@/Components/inputs/FieldLabel";
interface ColorPickerProps extends MuiColorInputProps {
fieldLabel?: string;
@@ -4,8 +4,8 @@ import DialogActions from "@mui/material/DialogActions";
import DialogContent from "@mui/material/DialogContent";
import DialogContentText from "@mui/material/DialogContentText";
import DialogTitle from "@mui/material/DialogTitle";
import { Button } from "@/Components/v2/inputs";
import { typographyLevels } from "@/Utils/Theme/v2Palette";
import { Button } from "@/Components/inputs";
import { typographyLevels } from "@/Utils/Theme/Palette";
import { useTranslation } from "react-i18next";
import type { ReactNode } from "react";
@@ -1,7 +1,7 @@
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import MenuItem from "@mui/material/MenuItem";
import { Select } from "@/Components/v2/inputs";
import { Select } from "@/Components/inputs";
import "flag-icons/css/flag-icons.min.css";
import { useTranslation } from "react-i18next";
@@ -11,20 +11,26 @@ import type { ResponsiveStyleValue } from "@mui/system";
interface SliderInputProps extends SliderProps {
sx?: SliderProps["sx"];
showValue?: boolean;
formatDisplayValue?: (value: number) => string;
}
export const SliderInput = forwardRef<HTMLSpanElement, SliderInputProps>(
({ sx, showValue = false, ...props }, ref) => {
({ sx, showValue = false, formatDisplayValue, ...props }, ref) => {
const theme = useTheme();
const additionalSx = Array.isArray(sx) ? sx : sx ? [sx] : [];
const displayValue =
showValue && formatDisplayValue && typeof props.value === "number"
? formatDisplayValue(props.value)
: props.value;
return (
<Stack
gap={theme.spacing(8)}
direction={"row"}
alignItems={"center"}
>
{showValue && <Typography>{props.value}</Typography>}
{showValue && <Typography>{displayValue}</Typography>}
<Slider
{...props}
ref={ref}
@@ -63,12 +69,21 @@ interface SliderWithLabelProps extends SliderProps {
fieldLabel?: string;
required?: boolean;
showValue?: boolean;
formatDisplayValue?: (value: number) => string;
sliderMaxWidth?: ResponsiveStyleValue<number | string>;
}
export const SliderWithLabel = forwardRef<HTMLSpanElement, SliderWithLabelProps>(
(
{ fieldLabel, required, showValue = true, value, sliderMaxWidth = "100%", ...props },
{
fieldLabel,
required,
showValue = true,
formatDisplayValue,
value,
sliderMaxWidth = "100%",
...props
},
ref
) => {
const theme = useTheme();
@@ -82,6 +97,7 @@ export const SliderWithLabel = forwardRef<HTMLSpanElement, SliderWithLabelProps>
<SliderInput
{...props}
showValue={showValue}
formatDisplayValue={formatDisplayValue}
value={value}
ref={ref}
/>
@@ -1,7 +1,7 @@
import { forwardRef } from "react";
import TextField from "@mui/material/TextField";
import type { TextFieldProps } from "@mui/material";
import { typographyLevels } from "@/Utils/Theme/v2Palette";
import { typographyLevels } from "@/Utils/Theme/Palette";
import { useTheme } from "@mui/material/styles";
import Stack from "@mui/material/Stack";
import { FieldLabel } from "./FieldLabel";
@@ -1,11 +1,7 @@
import Box from "@mui/material/Box";
import { useState, useEffect, useRef } from "react";
import { ThemeProvider, useTheme } from "@mui/material/styles";
import { useSelector } from "react-redux";
import BackgroundSVG from "@/assets/Images/background.svg";
import type { RootState } from "@/Types/state";
import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme";
import { OfflineBanner } from "@/Components/v2/design-elements";
import { useTheme } from "@mui/material/styles";
import { OfflineBanner } from "@/Components/design-elements";
import { setServerUnreachableCallback, get } from "@/Utils/ApiClient";
interface AppLayoutProps {
@@ -14,9 +10,6 @@ interface AppLayoutProps {
const AppLayout = ({ children }: AppLayoutProps) => {
const theme = useTheme();
const mode = useSelector((state: RootState) => state.ui.mode);
const v2theme = mode === "dark" ? darkTheme : lightTheme;
const [serverUnreachable, setServerUnreachable] = useState(false);
const retryIntervalRef = useRef<number | null>(null);
@@ -49,18 +42,10 @@ const AppLayout = ({ children }: AppLayoutProps) => {
<Box
sx={{
minHeight: "100vh",
// @ts-expect-error custom palette property
backgroundColor: theme.palette.primaryBackground.main,
backgroundImage: mode === "dark" ? `url("${BackgroundSVG}")` : "none",
backgroundSize: "100% 100%",
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
color: theme.palette.primary.contrastText,
backgroundColor: theme.palette.background.default,
}}
>
<ThemeProvider theme={v2theme}>
<OfflineBanner visible={serverUnreachable} />
</ThemeProvider>
<OfflineBanner visible={serverUnreachable} />
{children}
</Box>
);
@@ -1,26 +1,19 @@
import { Sidebar } from "@/Components/v2/sidebar";
import { Sidebar } from "@/Components/sidebar";
import { Outlet } from "react-router";
import Stack from "@mui/material/Stack";
import { useMediaQuery } from "@mui/material";
import { useSidebar } from "@/Hooks/useSidebar";
import { useSelector } from "react-redux";
import type { RootState } from "@/Types/state";
import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme";
import { ThemeProvider, useTheme } from "@mui/material";
import { useTheme } from "@mui/material";
const RootLayout = () => {
const mode = useSelector((state: RootState) => state.ui.mode);
const v2theme = mode === "dark" ? darkTheme : lightTheme;
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
const { collapsedWidth } = useSidebar();
return (
<Stack flexDirection="row">
<ThemeProvider theme={v2theme}>
<Sidebar />
</ThemeProvider>
<Sidebar />
<Stack
flex={1}
padding={6}
@@ -1,12 +1,22 @@
import Stack from "@mui/material/Stack";
import { Select, Button } from "@/Components/v2/inputs";
import { Select, Button } from "@/Components/inputs";
import MenuItem from "@mui/material/MenuItem";
import useMediaQuery from "@mui/material/useMediaQuery";
import type { MonitorType } from "@/Types/Monitor";
import { Typography, useTheme } from "@mui/material";
import { useTranslation } from "react-i18next";
const types = ["http", "ping", "port", "docker", "game"];
const types = ["http", "ping", "port", "docker", "game", "grpc", "websocket"];
const typeDisplayNames: Record<string, string> = {
http: "HTTP",
ping: "Ping",
port: "Port",
docker: "Docker",
game: "Game",
grpc: "gRPC",
websocket: "WebSocket",
};
const statuses = ["up", "down"];
const states = ["active", "paused"];
@@ -30,6 +40,7 @@ export const ControlsFilter = ({
onClearFilters: () => void;
}) => {
const theme = useTheme();
const { t } = useTranslation();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
const isFilterActive =
(selectedTypes?.length ?? 0) > 0 || selectedStatus !== "" || selectedState !== "";
@@ -50,7 +61,7 @@ export const ControlsFilter = ({
key={type}
value={type}
>
<Typography textTransform={"capitalize"}>{type}</Typography>
<Typography>{typeDisplayNames[type] ?? type}</Typography>
</MenuItem>
))}
</Select>
@@ -88,7 +99,7 @@ export const ControlsFilter = ({
variant="contained"
onClick={onClearFilters}
>
Clear Filters
{t("common.buttons.clearFilters")}
</Button>
)}
</Stack>
@@ -0,0 +1,203 @@
import { useRef, useEffect, useState } from "react";
import { Box, Typography, Stack, useTheme, GlobalStyles } from "@mui/material";
import Map, { Marker, Popup } from "react-map-gl/maplibre";
import type { MapRef } from "react-map-gl/maplibre";
import type { FlatGeoCheck } from "@/Types/GeoCheck";
import "maplibre-gl/dist/maplibre-gl.css";
interface GeoChecksMapProps {
geoChecks: FlatGeoCheck[];
}
export const GeoChecksMap = ({ geoChecks }: GeoChecksMapProps) => {
const mapRef = useRef<MapRef>(null);
const [selectedCheck, setSelectedCheck] = useState<FlatGeoCheck | null>(null);
const theme = useTheme();
const isDarkMode = theme.palette.mode === "dark";
const mapPopupStyles = (
<GlobalStyles
styles={{
".maplibregl-popup-content": {
background: "transparent !important",
padding: "0 !important",
boxShadow: "none !important",
},
".maplibregl-popup-tip": {
display: "none",
},
".maplibregl-ctrl-attrib": {
display: "none",
},
".maplibregl-ctrl-logo": {
display: "none",
},
".maplibregl-popup-close-button": {
color: theme.palette.text.primary,
background: "transparent",
fontSize: "20px",
padding: "4px",
"&:hover": {
backgroundColor: theme.palette.action.hover,
},
},
}}
/>
);
useEffect(() => {
if (geoChecks.length === 0 || !mapRef.current) return;
const bounds = geoChecks.reduce(
(acc, check) => {
return {
minLng: Math.min(acc.minLng, check.location.longitude),
maxLng: Math.max(acc.maxLng, check.location.longitude),
minLat: Math.min(acc.minLat, check.location.latitude),
maxLat: Math.max(acc.maxLat, check.location.latitude),
};
},
{
minLng: Infinity,
maxLng: -Infinity,
minLat: Infinity,
maxLat: -Infinity,
}
);
if (bounds.minLng !== Infinity) {
mapRef.current.fitBounds(
[
[bounds.minLng, bounds.minLat],
[bounds.maxLng, bounds.maxLat],
],
{ padding: 50, duration: 1000 }
);
}
}, [geoChecks]);
const getMarkerColor = (status: boolean): string => {
return status ? theme.palette.success.main : theme.palette.error.main;
};
const formatResponseTime = (timing: number): string => {
return `${timing.toFixed(0)}ms`;
};
return (
<>
{mapPopupStyles}
<Box
height={500}
width={"100%"}
borderRadius={theme.shape.borderRadius}
overflow={"hidden"}
>
<Map
ref={mapRef}
initialViewState={{
longitude: 0,
latitude: 20,
zoom: 1.5,
}}
style={{ height: "100%", width: "100%" }}
mapStyle={
isDarkMode
? "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
}
>
{geoChecks.map((check, index) => (
<Marker
key={`${check.id}-${index}`}
longitude={check.location.longitude}
latitude={check.location.latitude}
anchor="bottom"
onClick={(e: any) => {
e.originalEvent.stopPropagation();
setSelectedCheck(check);
}}
>
<div
style={{
width: "10px",
height: "10px",
borderRadius: "50%",
backgroundColor: getMarkerColor(check.status),
boxShadow: "0 2px 4px rgba(0,0,0,0.3)",
cursor: "pointer",
}}
/>
</Marker>
))}
{selectedCheck && (
<Popup
longitude={selectedCheck.location.longitude}
latitude={selectedCheck.location.latitude}
anchor="top"
onClose={() => setSelectedCheck(null)}
closeOnClick={false}
>
<Box
sx={{
minWidth: 200,
p: theme.spacing(4),
bgcolor: theme.palette.background.paper,
borderWidth: 1,
borderStyle: "solid",
borderColor: theme.palette.divider,
borderRadius: 1,
}}
>
<Typography
variant="subtitle1"
fontWeight="bold"
gutterBottom
>
{selectedCheck.location.city}, {selectedCheck.location.country}
</Typography>
<Stack spacing={0.5}>
<Typography variant="body2">
<Typography
component="span"
fontWeight="medium"
>
Status:
</Typography>{" "}
{selectedCheck.status ? "Up" : "Down"}
</Typography>
<Typography variant="body2">
<Typography
component="span"
fontWeight="medium"
>
Status Code:
</Typography>{" "}
{selectedCheck.statusCode}
</Typography>
<Typography variant="body2">
<Typography
component="span"
fontWeight="medium"
>
Response Time:
</Typography>{" "}
{formatResponseTime(selectedCheck.timings.total)}
</Typography>
<Typography
variant="caption"
color="text.secondary"
sx={{ mt: 0.5 }}
>
{new Date(selectedCheck.createdAt).toLocaleString()}
</Typography>
</Stack>
</Box>
</Popup>
)}
</Map>
</Box>
</>
);
};
@@ -0,0 +1,54 @@
import Stack from "@mui/material/Stack";
import { Tabs, Tab } from "@/Components/design-elements";
import { useTheme } from "@mui/material/styles";
import { useTranslation } from "react-i18next";
import type { GeoContinent } from "@/Types/GeoCheck";
interface HeaderGeoTabsProps {
geoCheckEnabled: boolean;
locations: GeoContinent[] | undefined;
selectedLocation: GeoContinent;
onLocationChange: (location: GeoContinent) => void;
}
export const HeaderGeoTabs = ({
geoCheckEnabled,
locations,
selectedLocation,
onLocationChange,
}: HeaderGeoTabsProps) => {
const { t } = useTranslation();
const theme = useTheme();
if (!geoCheckEnabled || !locations || locations.length === 0) {
return null;
}
const handleChange = (_event: React.SyntheticEvent, newValue: GeoContinent) => {
onLocationChange(newValue);
};
return (
<Stack
spacing={{ xs: theme.spacing(8), md: 0 }}
direction={{ xs: "column", md: "row" }}
alignItems={"center"}
justifyContent={"flex-start"}
>
<Tabs
value={selectedLocation}
onChange={handleChange}
>
{locations.map((location) => (
<Tab
key={location}
label={t(
`pages.createMonitor.form.geoChecks.option.locations.options.${location}`
)}
value={location}
/>
))}
</Tabs>
</Stack>
);
};
@@ -1,6 +1,6 @@
import Stack from "@mui/material/Stack";
import { Icon, MonitorStatus } from "@/Components/v2/design-elements";
import { Button } from "@/Components/v2/inputs";
import { Icon, MonitorStatus } from "@/Components/design-elements";
import { Button } from "@/Components/inputs";
import { Settings, Pause, Play, Mail, Bug, Trash } from "lucide-react";
import { useTranslation } from "react-i18next";
@@ -4,7 +4,7 @@ import {
PausedStatusBox,
InitializingStatusBox,
BreachedStatusBox,
} from "@/Components/v2/design-elements";
} from "@/Components/design-elements";
import Stack from "@mui/material/Stack";
import type { MonitorsSummary } from "@/Types/Monitor";
@@ -1,5 +1,5 @@
import Stack from "@mui/material/Stack";
import { StatBox } from "@/Components/v2/design-elements";
import { StatBox } from "@/Components/design-elements";
import prettyMilliseconds from "pretty-ms";
import { useTheme } from "@mui/material/styles";
@@ -25,10 +25,7 @@ export const MonitorStatBoxes = ({
}
const timeOfLastFailure = monitorStats?.timeOfLastFailure || 0;
const timeSinceLastFailure =
timeOfLastFailure > 0
? Date.now() - timeOfLastFailure
: Date.now() - new Date(monitorStats?.createdAt || 0).getTime();
const timeSinceLastFailure = timeOfLastFailure > 0 ? Date.now() - timeOfLastFailure : 0;
// Determine time since last check
const timeOfLastCheck = monitorStats?.lastCheckTimestamp || 0;
@@ -42,6 +39,12 @@ export const MonitorStatBoxes = ({
const streakTime = prettyMilliseconds(timeSinceLastFailure, options);
const lastCheckTime = prettyMilliseconds(timeSinceLastCheck, options);
const isActive =
monitor?.status === "up" ||
monitor?.status === "paused" ||
monitor?.status === "maintenance" ||
monitor?.status === "initializing" ||
monitor?.status === "breached";
const palette = getStatusPalette(monitor?.status);
return (
@@ -51,8 +54,12 @@ export const MonitorStatBoxes = ({
>
<StatBox
palette={palette}
title={t("pages.common.monitors.statBoxes.activeFor")}
subtitle={streakTime}
title={
isActive
? t("pages.common.monitors.statBoxes.activeFor")
: t("pages.common.monitors.statBoxes.serviceIsDown")
}
subtitle={isActive ? streakTime : ""}
/>
<StatBox
title={t("pages.common.monitors.statBoxes.lastCheck")}
@@ -1,4 +1,4 @@
import { BaseChart, BaseBox } from "@/Components/v2/design-elements";
import { BaseChart, BaseBox } from "@/Components/design-elements";
import { Clock } from "lucide-react";
import {
AreaChart,
@@ -1,4 +1,4 @@
import { BaseChart } from "@/Components/v2/design-elements";
import { BaseChart } from "@/Components/design-elements";
import {
AreaChart,
Area,
@@ -8,7 +8,7 @@ import {
ResponsiveContainer,
} from "recharts";
import { Fragment, useId } from "react";
import { XTick } from "@/Components/v2/monitors";
import { XTick } from "@/Components/monitors";
import { useTheme } from "@mui/material/styles";
import type { HardwareCheckStats } from "@/Types/Monitor";
@@ -1,6 +1,6 @@
import Stack from "@mui/material/Stack";
import { Area, AreaChart, CartesianGrid, ResponsiveContainer, Tooltip } from "recharts";
import { HistogramPageSpeedTooltip } from "@/Components/v2/monitors/charts/HistogramPageSpeedTooltip";
import { HistogramPageSpeedTooltip } from "@/Components/monitors/charts/HistogramPageSpeedTooltip";
import { useTheme } from "@mui/material/styles";
import type { CheckSnapshot } from "@/Types/Check";
import type { MonitorStatus } from "@/Types/Monitor";
@@ -1,6 +1,6 @@
import { BaseChart } from "@/Components/v2/design-elements";
import { BaseChart } from "@/Components/design-elements";
import { TrendingUp } from "lucide-react";
import { XTick } from "@/Components/v2/monitors/";
import { XTick } from "@/Components/monitors";
import {
XAxis,
AreaChart,
@@ -9,10 +9,10 @@ import {
CartesianGrid,
ResponsiveContainer,
} from "recharts";
import { HistogramPageSpeedScoresTooltip } from "@/Components/v2/monitors";
import { HistogramPageSpeedScoresTooltip } from "@/Components/monitors";
import { useTheme } from "@mui/material/styles";
import type { CheckSnapshot } from "@/Types/Check";
import type { PageSpeedGroupedCheck } from "@/Types/Check";
import type { Palette } from "@mui/material/styles";
type PaletteColorKey = Extract<
keyof Palette,
@@ -52,7 +52,7 @@ export const HistogramPageSpeedDetails = ({
checks,
range,
}: {
checks: CheckSnapshot[];
checks: PageSpeedGroupedCheck[];
range: string;
}) => {
const theme = useTheme();
@@ -73,7 +73,7 @@ export const HistogramPageSpeedDetails = ({
>
<AreaChart data={checks}>
<XAxis
dataKey={"createdAt"}
dataKey={"bucketDate"}
tick={(props) => (
<XTick
{...props}
@@ -2,8 +2,9 @@ import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { useTheme } from "@mui/material/styles";
import { SPACING, LAYOUT } from "@/Utils/Theme/constants";
import { formatDateWithTz } from "@/Utils/TimeUtils";
import type { ConfigItem } from "@/Components/v2/monitors";
import type { ConfigItem } from "@/Components/monitors";
import type { TooltipProps } from "recharts";
import { useSelector } from "react-redux";
import type { RootState } from "@/Types/state";
@@ -30,8 +31,8 @@ export const HistogramPageSpeedScoresTooltip = ({
border: 1,
borderColor: theme.palette.divider,
borderRadius: theme.shape.borderRadius,
py: theme.spacing(2),
px: theme.spacing(4),
py: theme.spacing(SPACING.LG),
px: theme.spacing(LAYOUT.XS),
}}
>
<Typography
@@ -54,12 +55,12 @@ export const HistogramPageSpeedScoresTooltip = ({
key={`${key}-tooltip`}
direction="row"
alignItems="center"
gap={theme.spacing(3)}
mt={theme.spacing(1)}
gap={theme.spacing(SPACING.XXL)}
mt={theme.spacing(SPACING.SM)}
>
<Box
width={theme.spacing(4)}
height={theme.spacing(4)}
width={theme.spacing(LAYOUT.XS)}
height={theme.spacing(LAYOUT.XS)}
sx={{ borderRadius: "50%", backgroundColor: dotColor }}
/>
<Typography
@@ -1,6 +1,6 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { BaseChart } from "@/Components/v2/design-elements";
import { BaseChart } from "@/Components/design-elements";
import { useTheme } from "@mui/material/styles";
import { useSelector } from "react-redux";
import { formatDateWithTz } from "@/Utils/TimeUtils";
@@ -1,4 +1,4 @@
import { BaseChart } from "@/Components/v2/design-elements";
import { BaseChart } from "@/Components/design-elements";
import { FileText } from "lucide-react";
import type { CheckAudits, CheckSnapshot } from "@/Types/Check";
import { Pie, PieChart, ResponsiveContainer, Label } from "recharts";
@@ -1,7 +1,7 @@
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import { BarChart3 } from "lucide-react";
import { BaseChart } from "@/Components/v2/design-elements";
import { BaseChart } from "@/Components/design-elements";
import Typography from "@mui/material/Typography";
import type { CheckSnapshot } from "@/Types/Check";
@@ -1,4 +1,4 @@
import { BaseChart } from "@/Components/v2/design-elements";
import { BaseChart } from "@/Components/design-elements";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { Gauge } from "lucide-react";
@@ -1,6 +1,8 @@
export * from "./ControlsFilter";
export * from "./MonitorStatBoxes";
export * from "./HeaderMonitorControls";
export * from "./HeaderGeoTabs";
export * from "./GeoChecksMap";
export * from "./charts/HistogramStatus";
export * from "./charts/RadialAvgResponse";
export * from "./charts/HistogramDetails";
@@ -5,12 +5,13 @@ import IconButton from "@mui/material/IconButton";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import { useTheme } from "@mui/material";
import { SPACING, LAYOUT } from "@/Utils/Theme/constants";
import { useSelector, useDispatch } from "react-redux";
import { useTranslation } from "react-i18next";
import { useState } from "react";
import { useNavigate } from "react-router";
import { MoreVertical, LogOut } from "lucide-react";
import { Avatar, Icon } from "@/Components/v2/design-elements";
import { Avatar, Icon } from "@/Components/design-elements";
import { clearAuthState } from "@/Features/Auth/authSlice.js";
import type { RootState } from "@/Types/state.js";
@@ -64,9 +65,9 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) =>
});
const menuItemSx = {
gap: theme.spacing(2),
gap: theme.spacing(LAYOUT.MD),
borderRadius: theme.shape.borderRadius,
pl: theme.spacing(4),
pl: theme.spacing(LAYOUT.XS),
"& svg": { stroke: theme.palette.text.secondary },
};
@@ -74,9 +75,9 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) =>
<Stack
direction="row"
alignItems="center"
py={theme.spacing(4)}
px={theme.spacing(8)}
gap={theme.spacing(4)}
py={theme.spacing(LAYOUT.XS)}
px={theme.spacing(LAYOUT.MD)}
gap={theme.spacing(LAYOUT.MD)}
>
<Avatar
small
@@ -88,7 +89,7 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) =>
<Stack
direction="row"
alignItems="center"
gap={theme.spacing(2)}
gap={theme.spacing(SPACING.MD)}
minWidth={0}
flex={1}
>
@@ -132,10 +133,15 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) =>
disableScrollLock
anchorOrigin={{ vertical: "top", horizontal: "right" }}
slotProps={{
paper: { sx: { mt: theme.spacing(-4), ml: collapsed ? theme.spacing(2) : 0 } },
paper: {
sx: {
mt: theme.spacing(-LAYOUT.XS),
ml: collapsed ? theme.spacing(SPACING.LG) : 0,
},
},
}}
MenuListProps={{ sx: { p: 2, "& li": { m: 0 } } }}
sx={{ ml: theme.spacing(4) }}
sx={{ ml: theme.spacing(LAYOUT.XS) }}
>
{collapsed && (
<Box
@@ -1,4 +1,4 @@
import { Icon } from "@/Components/v2/design-elements";
import { Icon } from "@/Components/design-elements";
import {
Globe,
@@ -1,6 +1,7 @@
import { Typography, IconButton, Stack, Box } from "@mui/material";
import { Icon } from "@/Components/v2/design-elements";
import { Icon } from "@/Components/design-elements";
import { X } from "lucide-react";
import { SPACING, LAYOUT } from "@/Utils/Theme/constants";
import { useTheme } from "@mui/material";
import { useSelector, useDispatch } from "react-redux";
@@ -34,25 +35,22 @@ export const StarPrompt = ({
return (
<Stack
direction="column"
sx={{
width: "100%",
padding: `${theme.spacing(6)} ${theme.spacing(6)}`,
borderTop: `1px solid ${theme.palette.divider}`,
borderBottom: `1px solid ${theme.palette.divider}`,
borderRadius: 0,
gap: theme.spacing(1.5),
}}
gap={theme.spacing(LAYOUT.MD)}
padding={theme.spacing(LAYOUT.SM)}
width={"100%"}
borderTop={`1px solid ${theme.palette.divider}`}
borderBottom={`1px solid ${theme.palette.divider}`}
>
<Stack
direction="row"
justifyContent="space-between"
alignItems="center"
width="100%"
pl={theme.spacing(4)}
pl={theme.spacing(LAYOUT.XS)}
>
<Typography
variant="subtitle2"
mt={theme.spacing(3)}
mt={theme.spacing(SPACING.XXL)}
>
{t("components.sidebar.starPrompt.title")}
</Typography>
@@ -78,7 +76,7 @@ export const StarPrompt = ({
<Typography
sx={{
mb: 1,
px: theme.spacing(4),
px: theme.spacing(LAYOUT.XS),
}}
>
{t("components.sidebar.starPrompt.description")}
@@ -96,7 +94,7 @@ export const StarPrompt = ({
"&:hover": {
opacity: 0.8,
},
pl: theme.spacing(4),
pl: theme.spacing(LAYOUT.XS),
filter: mode === "dark" ? "invert(1)" : "none",
}}
/>
@@ -3,12 +3,13 @@ import Backdrop from "@mui/material/Backdrop";
import Stack from "@mui/material/Stack";
import List from "@mui/material/List";
import Divider from "@mui/material/Divider";
import { LAYOUT } from "@/Utils/Theme/constants";
import { useSidebar } from "@/Hooks/useSidebar.js";
import { Logo } from "@/Components/v2/sidebar/Logo";
import { getMenu, getBottomMenu, getAccountMenu } from "@/Components/v2/sidebar/Menu";
import { NavItem } from "@/Components/v2/sidebar/NavItem";
import { StarPrompt } from "@/Components/v2/sidebar/StarPrompt";
import { AuthFooter } from "@/Components/v2/sidebar/Authfooter";
import { Logo } from "@/Components/sidebar/Logo";
import { getMenu, getBottomMenu, getAccountMenu } from "@/Components/sidebar/Menu";
import { NavItem } from "@/Components/sidebar/NavItem";
import { StarPrompt } from "@/Components/sidebar/StarPrompt";
import { AuthFooter } from "@/Components/sidebar/Authfooter";
import { useNavigate, useLocation } from "react-router";
import { useTranslation } from "react-i18next";
@@ -19,7 +20,7 @@ import { setCollapsed } from "@/Features/UI/uiSlice";
const URL_MAP: Record<string, string> = {
support: "https://discord.com/invite/NAb6H3UTjK",
discussions: "https://github.com/bluewave-labs/checkmate/discussions",
docs: "https://bluewavelabs.gitbook.io/checkmate",
docs: "https://checkmate.so/docs",
changelog: "https://github.com/bluewave-labs/checkmate/releases",
};
@@ -65,9 +66,9 @@ export const Sidebar = () => {
left={0}
minHeight={"100vh"}
maxHeight={"100vh"}
paddingTop={theme.spacing(6)}
paddingBottom={theme.spacing(6)}
gap={theme.spacing(6)}
paddingTop={theme.spacing(LAYOUT.SM)}
paddingBottom={theme.spacing(LAYOUT.SM)}
gap={theme.spacing(LAYOUT.SM)}
borderRight={`1px solid ${theme.palette.divider}`}
width={width}
sx={{
@@ -81,13 +82,13 @@ export const Sidebar = () => {
component="nav"
disablePadding
sx={{
px: theme.spacing(6),
px: theme.spacing(LAYOUT.SM),
flex: 1,
}}
>
<Logo
pt={theme.spacing(8)}
pb={theme.spacing(10)}
pt={theme.spacing(LAYOUT.MD)}
pb={theme.spacing(LAYOUT.MD)}
/>
{menu.map((item) => {
const selected = location.pathname.startsWith(`/${item.path}`);
@@ -105,7 +106,7 @@ export const Sidebar = () => {
<List
component="nav"
disablePadding
sx={{ px: theme.spacing(6) }}
sx={{ px: theme.spacing(LAYOUT.SM) }}
>
{bottomMenu.map((item) => {
const selected = location.pathname.startsWith(`/${item.path}`);
@@ -1,29 +0,0 @@
import Icon from "../Icon";
import PropTypes from "prop-types";
const ArrowRight = ({ type, color = "#667085", ...props }) => {
if (type === "double") {
return (
<Icon
name="ChevronsRight"
color={color}
{...props}
/>
);
} else {
return (
<Icon
name="ChevronRight"
color={color}
{...props}
/>
);
}
};
ArrowRight.propTypes = {
type: PropTypes.oneOf(["double", "default"]),
color: PropTypes.string,
};
export default ArrowRight;
@@ -1,21 +0,0 @@
.MuiBreadcrumbs-root {
min-height: 34px;
}
.MuiBreadcrumbs-root svg {
width: 16px;
min-height: 16px;
}
.MuiBreadcrumbs-root .MuiBreadcrumbs-li a {
font-weight: 400;
}
.MuiBreadcrumbs-root .MuiBreadcrumbs-li:not(:last-child) {
cursor: pointer;
}
.MuiBreadcrumbs-root .MuiBreadcrumbs-li:last-child a {
font-weight: 500;
opacity: 1;
cursor: default;
}
.MuiBreadcrumbs-root .MuiBreadcrumbs-separator {
margin: 0;
}
@@ -1,78 +0,0 @@
import PropTypes from "prop-types";
import { Box, Breadcrumbs as MUIBreadcrumbs } from "@mui/material";
import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom";
import ArrowRight from "../ArrowRight/index.jsx";
import "./index.css";
/**
* Breadcrumbs component that displays a list of breadcrumb items.
*
* @param {Object} props
* @param {Array} props.list - Array of breadcrumb items. Each item should have `name` and `path` properties.
* @param {string} props.list.name - The name to display for the breadcrumb.
* @param {string} props.list.path - The path to navigate to when the breadcrumb is clicked.
*
* @returns {JSX.Element} The rendered Breadcrumbs component.
*/
const Breadcrumbs = ({ list }) => {
const theme = useTheme();
const navigate = useNavigate();
return (
<MUIBreadcrumbs
separator={<ArrowRight />}
aria-label="breadcrumb"
px={theme.spacing(2)}
py={theme.spacing(3.5)}
width="fit-content"
backgroundColor={theme.palette.secondary.main}
borderRadius={theme.shape.borderRadius}
lineHeight="18px"
sx={{
"& .MuiBreadcrumbs-li a": {
transition: "background-color 0.2s ease-in-out, color 0.2s ease-in-out",
},
"& .MuiBreadcrumbs-li:not(:last-of-type):hover a": {
backgroundColor: theme.palette.secondary.contrastText,
color: theme.palette.secondary.main,
},
}}
>
{list.map((item, index) => {
return (
<Box
component="a"
key={`${item.name}-${index}`}
px={theme.spacing(4)}
pt={theme.spacing(2)}
pb={theme.spacing(3)}
borderRadius={theme.shape.borderRadius}
onClick={() => navigate(item.path)}
sx={{
opacity: 0.8,
textTransform: "capitalize",
"&, &:hover": {
color: theme.palette.secondary.contrastText,
},
}}
>
{item.name}
</Box>
);
})}
</MUIBreadcrumbs>
);
};
Breadcrumbs.propTypes = {
list: PropTypes.arrayOf(
PropTypes.shape({
name: PropTypes.string.isRequired,
path: PropTypes.string.isRequired,
}).isRequired
).isRequired,
};
export default Breadcrumbs;
@@ -1,39 +0,0 @@
import { Stack, styled } from "@mui/material";
const ConfigBox = styled(Stack)(({ theme }) => ({
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
backgroundColor: theme.palette.primary.main,
border: 1,
borderStyle: "solid",
borderColor: theme.palette.primary.lowContrast,
borderRadius: theme.spacing(2),
"& > *": {
paddingTop: theme.spacing(15),
paddingBottom: theme.spacing(15),
},
"& > div:first-of-type": {
flex: 0.7,
borderRight: 1,
borderRightStyle: "solid",
borderRightColor: theme.palette.primary.lowContrast,
paddingRight: theme.spacing(15),
paddingLeft: theme.spacing(15),
backgroundColor: theme.palette.tertiary.background,
"& :is(h1, h2):first-of-type": {
fontWeight: 600,
marginBottom: theme.spacing(4),
},
},
"& > div:last-of-type": {
flex: 1,
paddingRight: theme.spacing(20),
paddingLeft: theme.spacing(20),
},
"& h1, & h2": {
color: theme.palette.primary.contrastTextSecondary,
},
}));
export default ConfigBox;
@@ -1,73 +0,0 @@
import { useId } from "react";
import PropTypes from "prop-types";
import { Modal, Stack, Typography } from "@mui/material";
const GenericDialog = ({ title, description, open, onClose, theme, children, width }) => {
const titleId = useId();
const descriptionId = useId();
const ariaDescribedBy = description?.length > 0 ? descriptionId : "";
return (
<Modal
aria-labelledby={titleId}
aria-describedby={ariaDescribedBy}
open={open}
onClose={onClose}
onClick={(e) => e.stopPropagation()}
>
<Stack
gap={theme.spacing(2)}
width={width}
sx={{
position: "absolute",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
minWidth: 400,
bgcolor: theme.palette.primary.main,
border: 1,
borderColor: theme.palette.primary.lowContrast,
borderRadius: theme.shape.borderRadius,
boxShadow: 24,
p: theme.spacing(15),
"&:focus": {
outline: "none",
},
}}
>
<Typography
id={titleId}
component="h2"
fontSize={16}
color={theme.palette.primary.contrastText}
fontWeight={600}
marginBottom={theme.spacing(4)}
>
{title}
</Typography>
{description && (
<Typography
id={descriptionId}
color={theme.palette.primary.contrastTextTertiary}
marginBottom={theme.spacing(4)}
>
{description}
</Typography>
)}
{children}
</Stack>
</Modal>
);
};
GenericDialog.propTypes = {
title: PropTypes.string.isRequired,
description: PropTypes.string,
open: PropTypes.bool.isRequired,
onClose: PropTypes.func.isRequired,
theme: PropTypes.object.isRequired,
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
.isRequired,
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
};
export { GenericDialog };
-63
View File
@@ -1,63 +0,0 @@
import PropTypes from "prop-types";
import { Button, Stack } from "@mui/material";
import { GenericDialog } from "./genericDialog.jsx";
import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next";
const Dialog = ({
title,
description,
open,
onCancel,
confirmationButtonLabel,
onConfirm,
isLoading,
}) => {
const theme = useTheme();
const { t } = useTranslation();
return (
<GenericDialog
title={title}
description={description}
open={open}
onClose={onCancel}
theme={theme}
>
<Stack
direction="row"
gap={theme.spacing(4)}
mt={theme.spacing(12)}
justifyContent="flex-end"
>
<Button
variant="contained"
color="secondary"
onClick={onCancel}
>
{t("cancel", "Cancel")}
</Button>
<Button
variant="contained"
color="error"
loading={isLoading}
onClick={onConfirm}
>
{confirmationButtonLabel}
</Button>
</Stack>
</GenericDialog>
);
};
Dialog.propTypes = {
title: PropTypes.string.isRequired,
description: PropTypes.string,
open: PropTypes.bool.isRequired,
onCancel: PropTypes.func.isRequired,
confirmationButtonLabel: PropTypes.string.isRequired,
onConfirm: PropTypes.func.isRequired,
isLoading: PropTypes.bool,
};
export default Dialog;
Loaded 100 of 479 files, more files were not shown because too many files have changed in this diff. Show more