release-2.9.0 (#1532)

* fix(macos): skip single-instance lock in Mac App Store builds (#1454)

fix(macos): skip single-instance lock in Mac App Store builds

* Fix/backend optional sharp (#1455)

Fix/backend optional sharp

* feat: issue #1218 (#1218)

https://github.com/Termix-SSH/Support/issues/1218

* feat: Add option to use saved global custom theme under Connection Defaults (#1209)

https://github.com/Termix-SSH/Support/issues/1209

* feat: Add Fleet Sharing functionality to the UI (#1228)

https://github.com/Termix-SSH/Support/issues/1228

* feat: Add a list view to the Docker management page (#1237)

https://github.com/Termix-SSH/Support/issues/1237

* feat: issue #1264 (#1264)

https://github.com/Termix-SSH/Support/issues/1264

* feat: 2FA With FortiToken (#1288)

https://github.com/Termix-SSH/Support/issues/1288

* feat: Allow to disable showing paths to folders (#1274)

https://github.com/Termix-SSH/Support/issues/1274

* feat: Sync Network Graph between Desktop and Remote Server (#1245)

https://github.com/Termix-SSH/Support/issues/1245

* feat: Version Number on offline servers (#1291)

https://github.com/Termix-SSH/Support/issues/1291

* feat: Support OrbStack Docker socket path on macOS / Fix "Docker is not installed" on mac... (#1302)

https://github.com/Termix-SSH/Support/issues/1302

* feat: Sidebar host click should focus existing tab instead of opening a new connection (#1289)

https://github.com/Termix-SSH/Support/issues/1289

* fix: Search in side bar shows overlapping hosts when grouped by tags (#1303)

https://github.com/Termix-SSH/Support/issues/1303

* fix: I can't send a file on its own. (#1304)

https://github.com/Termix-SSH/Support/issues/1304

* fix: sudo password not autofilling (#1248)

https://github.com/Termix-SSH/Support/issues/1248

* fix: node-MainThread (#1300)

https://github.com/Termix-SSH/Support/issues/1300

* fix: Tunnel authentication with shared credentials (#1295)

https://github.com/Termix-SSH/Support/issues/1295

* fix: host key updates not syncing, metrics 404 race on first connect

Host key writes never bumped updatedAt so sync never picked them up.
Also retry the first metrics fetch briefly instead of failing right away.

* chore: increment ver

* feat: add category and icon fields to plugin manifest schema

* ci(deps): bump the github-actions group with 2 updates (#1458)

Bumps the github-actions group with 2 updates: [crowdin/github-action](https://github.com/crowdin/github-action) and [actions/github-script](https://github.com/actions/github-script).


Updates `crowdin/github-action` from 2 to 3
- [Release notes](https://github.com/crowdin/github-action/releases)
- [Commits](https://github.com/crowdin/github-action/compare/v2...v3)

Updates `actions/github-script` from 7 to 9
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v9)

---
updated-dependencies:
- dependency-name: crowdin/github-action
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump the dev-patch-updates group with 13 updates (#1459)

Bumps the dev-patch-updates group with 13 updates:

| Package | From | To |
| --- | --- | --- |
| [@codemirror/commands](https://github.com/codemirror/commands) | `6.11.0` | `6.11.1` |
| [@codemirror/search](https://github.com/codemirror/search) | `6.7.1` | `6.7.2` |
| [@codemirror/view](https://github.com/codemirror/view) | `6.43.9` | `6.43.12` |
| [@testing-library/dom](https://github.com/testing-library/dom-testing-library) | `10.4.1` | `10.4.2` |
| [@testing-library/react](https://github.com/testing-library/react-testing-library) | `16.3.2` | `16.3.3` |
| [@testing-library/user-event](https://github.com/testing-library/user-event) | `14.6.5` | `14.6.7` |
| [@types/ssh2](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ssh2) | `1.15.5` | `1.15.6` |
| [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) | `6.1.0` | `6.1.1` |
| [cytoscape](https://github.com/cytoscape/cytoscape.js) | `3.34.1` | `3.34.3` |
| [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) | `0.5.4` | `0.5.7` |
| [i18next](https://github.com/i18next/i18next) | `26.4.0` | `26.4.2` |
| [prettier](https://github.com/prettier/prettier) | `3.9.6` | `3.9.8` |
| [react-i18next](https://github.com/i18next/react-i18next) | `17.0.12` | `17.0.14` |


Updates `@codemirror/commands` from 6.11.0 to 6.11.1
- [Changelog](https://github.com/codemirror/commands/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/commands/commits)

Updates `@codemirror/search` from 6.7.1 to 6.7.2
- [Changelog](https://github.com/codemirror/search/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/search/commits)

Updates `@codemirror/view` from 6.43.9 to 6.43.12
- [Changelog](https://github.com/codemirror/view/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/view/commits)

Updates `@testing-library/dom` from 10.4.1 to 10.4.2
- [Release notes](https://github.com/testing-library/dom-testing-library/releases)
- [Changelog](https://github.com/testing-library/dom-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/dom-testing-library/compare/v10.4.1...v10.4.2)

Updates `@testing-library/react` from 16.3.2 to 16.3.3
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.3.2...v16.3.3)

Updates `@testing-library/user-event` from 14.6.5 to 14.6.7
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v14.6.5...v14.6.7)

Updates `@types/ssh2` from 1.15.5 to 1.15.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ssh2)

Updates `@vitejs/plugin-react` from 6.1.0 to 6.1.1
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@6.1.1/packages/plugin-react)

Updates `cytoscape` from 3.34.1 to 3.34.3
- [Release notes](https://github.com/cytoscape/cytoscape.js/releases)
- [Commits](https://github.com/cytoscape/cytoscape.js/compare/v3.34.1...v3.34.3)

Updates `eslint-plugin-react-refresh` from 0.5.4 to 0.5.7
- [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases)
- [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.5.4...v0.5.7)

Updates `i18next` from 26.4.0 to 26.4.2
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v26.4.0...v26.4.2)

Updates `prettier` from 3.9.6 to 3.9.8
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.6...3.9.8)

Updates `react-i18next` from 17.0.12 to 17.0.14
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v17.0.12...v17.0.14)

---
updated-dependencies:
- dependency-name: "@codemirror/commands"
  dependency-version: 6.11.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@codemirror/search"
  dependency-version: 6.7.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@codemirror/view"
  dependency-version: 6.43.12
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@testing-library/dom"
  dependency-version: 10.4.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@testing-library/react"
  dependency-version: 16.3.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@testing-library/user-event"
  dependency-version: 14.6.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@types/ssh2"
  dependency-version: 1.15.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 6.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: cytoscape
  dependency-version: 3.34.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: eslint-plugin-react-refresh
  dependency-version: 0.5.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: i18next
  dependency-version: 26.4.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: prettier
  dependency-version: 3.9.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: react-i18next
  dependency-version: 17.0.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump the prod-patch-updates group with 6 updates (#1461)

Bumps the prod-patch-updates group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@tanstack/react-virtual](https://github.com/TanStack/virtual/tree/HEAD/packages/react-virtual) | `3.14.10` | `3.14.13` |
| [compression](https://github.com/expressjs/compression) | `1.8.1` | `1.8.2` |
| [jose](https://github.com/panva/jose) | `6.2.9` | `6.2.12` |
| [jszip](https://github.com/Stuk/jszip) | `3.10.1` | `3.10.2` |
| [socks](https://github.com/JoshGlazebrook/socks) | `2.8.9` | `2.8.10` |
| [undici](https://github.com/nodejs/undici) | `8.10.0` | `8.10.2` |


Updates `@tanstack/react-virtual` from 3.14.10 to 3.14.13
- [Release notes](https://github.com/TanStack/virtual/releases)
- [Changelog](https://github.com/TanStack/virtual/blob/main/packages/react-virtual/CHANGELOG.md)
- [Commits](https://github.com/TanStack/virtual/commits/@tanstack/react-virtual@3.14.13/packages/react-virtual)

Updates `compression` from 1.8.1 to 1.8.2
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/v1.8.1...v1.8.2)

Updates `jose` from 6.2.9 to 6.2.12
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/panva/jose/compare/v6.2.9...v6.2.12)

Updates `jszip` from 3.10.1 to 3.10.2
- [Changelog](https://github.com/Stuk/jszip/blob/main/CHANGES.md)
- [Commits](https://github.com/Stuk/jszip/compare/v3.10.1...v3.10.2)

Updates `socks` from 2.8.9 to 2.8.10
- [Release notes](https://github.com/JoshGlazebrook/socks/releases)
- [Commits](https://github.com/JoshGlazebrook/socks/compare/2.8.9...2.8.10)

Updates `undici` from 8.10.0 to 8.10.2
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v8.10.0...v8.10.2)

---
updated-dependencies:
- dependency-name: "@tanstack/react-virtual"
  dependency-version: 3.14.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: compression
  dependency-version: 1.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: jose
  dependency-version: 6.2.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: jszip
  dependency-version: 3.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: socks
  dependency-version: 2.8.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: undici
  dependency-version: 8.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add plugin worker protocol, bootstrap and plugin_storage table

Worker-side ctx proxy plus the message envelope it talks over, and the
per-plugin key/value table behind ctx.storage with migrations for all
three dialects. Rows cascade with the plugin so uninstalling leaves
nothing behind.

* feat: add allowlisted host view for plugins

An allowlist rather than a list of fields to strip. A blocklist rots:
the moment a new secret-bearing column lands on SSHHost it starts
leaking silently. With an allowlist a new field stays invisible to
plugins until someone adds it here on purpose.

* feat: add plugin loader with manifest validation and crash restart

Validates an unpacked plugin, spawns a worker_threads worker and manages
activate/deactivate/crash-restart with backoff, disabling after three
tries.

The crash counter clears only after a plugin stays up past a stability
window, not on activation. Clearing it on activation let a plugin that
activates cleanly and then dies restart forever, because every attempt
looked like the first.

loader.ts documents what the worker boundary does and does not buy you.
Node's permission model is process-wide, not per-worker, so it cannot be
enabled for plugin workers alone and is not claimed here.

* feat: route internal events through a shared plugin event bus

Formalises three ad-hoc publish paths that already existed:
automation-events.ts, metrics/automation-bridge.ts and the
hostSessionStatus singleton, now the host.session.status topic.

Both invariants the old code relied on are preserved. Publishing stays
fire-and-forget, so a failing subscriber cannot disturb a metrics poll or
a host delete. The automations engine subscribes to the bus at scheduler
start instead of being imported ad hoc, which keeps the edge
one-directional: automations may import repositories, hosts modules must
not import automations.

* feat: add plugin ctx broker with permission gate and audit

Every ctx call a plugin makes is checked against its granted
capabilities, performed by the main thread, then audited. A capability
must be both declared in the manifest and granted in the database, so
widening a plugin's reach always needs a new manifest the user can see,
never just a database row.

Audit attribution is set by the broker, not the plugin. The plugin
supplies only the details, so it cannot forge the actor.

fix: stop plugin workers seeing plaintext credentials in error messages

A failing ctx.ssh.connect handed the worker the raw error from deep in
the SSH stack, which embeds the connect config. The worker received, in
full:

  Authentication failed for root using password <SECRET>

where <SECRET> was the host's real plaintext password. Any plugin with
ssh.exec could read it by catching the error, defeating the whole point
of the handle-based ssh API.

Errors crossing the boundary are now sanitised. Only PluginFacingError
and PluginPermissionError, both authored here, reach a plugin verbatim;
anything else becomes a generic message and the real one goes to the
log. This uses a marker class rather than matching on message text,
because matching would start leaking again the moment an upstream error
happened to contain a familiar phrase.

Covered by credential-isolation.test.ts, which plants a sentinel in
every secret-bearing field and asserts it appears in no message the
worker ever receives.

* feat: dispatch plugin HTTP routes and wire the runtime into startup

ctx.http.route now registers a real router on the /plugin-api/:pluginId
dispatcher, replacing its stub 404. A plugin never touches the Express
req/res: it gets a plain summary and returns a plain object, so sockets
and session cookies stay on this side of the boundary. Authorization and
cookie headers are not forwarded.

Plugins load last in the start-up sequence, after the server is fully
wired, and are terminated before the database on shutdown so none can
outlive it. A plugin that fails to load cannot stop the backend.

fix: correct the nginx plugin-api location regex

The pattern was ^/plugin-api/(/.*)?$, which needs a double slash and so
never matched /plugin-api/<id>/<route>. Every other block in the file
uses ^/prefix(/.*)?$. Left alone, plugin routes would work in dev and
404 only behind Docker.

* fix: update stale SFTP transfer test for single file destination paths

The test still asserted transferToHost was called with the destination
directory "/srv". Commit 7727fa09 (#1304) deliberately changed a single
file transfer to send the full destination path including the filename,
so the correct expectation is "/srv/remote-1.txt". The code was right
and the test was left behind.

* feat: ship the ssh terminal as a first-party in-process plugin

Adds a hardcoded process:transport-owner tier so the terminal can own its
WebSocket server and ssh2 clients, which cannot cross the worker boundary.

* feat: ship docker as a first-party in-process plugin

Moves docker backend and frontend into plugins/docker/, alongside
ssh-terminal. Adds a host editor tab seam, a dashboard card registry,
and a build step to compile plugin backends into dist.

* feat: ship host metrics as a first-party in-process plugin

* fix: harden plugin auth and add per-request identity for ctx calls

Require auth on /plugin-api, gate plugin enable/grant/revoke routes
behind admin.plugins.manage, and thread the calling user through
worker ctx.hosts/ctx.ssh calls instead of always using the install
owner. Also adds the plugin permissions grant/revoke UI.

* feat: ship the AI assistant as a first-party in-process plugin

Moves src/backend/ai and its routes into plugins/ai, mounted through a
small /ai dispatcher instead of its own port. Moves the ai-enabled and
ai-private-endpoints settings routes out of user-settings-routes.ts
into the plugin too, so it has no leftover core dependents.

* fix: remove compiled plugin JS left behind in plugins/ after build

copy-bundled-plugins.cjs compiled and rewrote plugin backend TS in
place, copied it to dist/plugins, but never deleted the .js it had
just emitted next to the .ts sources. Those files shadowed the real
source for vitest/tsx and had import paths rewritten for the dist
layout, so tests failed with "Cannot find module" once a local build
had run. Affects docker, host-metrics and ai, not just this one.

* feat: add a permission-gated backend service registry for plugins

* feat: add a permission-gated UI action registry and action slots for plugins

Moves the terminal toolbar's hardwired AI button into a slot the ssh-terminal
plugin offers and the ai plugin fills, gated on ai.services.use.

* feat: add cross-plugin secret references gated by the provider's RBAC permission

* feat: move proxmox discovery/import/sync into a first-party plugin

* feat: move remote desktop (RDP/VNC/Telnet) into a first-party plugin

Relocates guacamole backend/frontend source and tests into
plugins/remote-desktop, following the ssh-terminal/docker pattern.

* feat: wire remote-desktop plugin into core and rename i18n keys

Repoints core consumers (dispatcher, collab, session-sharing, tab
utils) at the plugin, adds isTabTypeAvailable gating for rdp/vnc/
telnet, widens hostCapability to accept an array, and renames the
guacamole i18n namespace to remoteDesktop.

* feat: move fleets into a first-party plugin

* feat: move automations into a first-party plugin

* feat: remove legacy alert rules, superseded by automations

Alert rules already auto-migrate into automations on boot and the old
engine stands down after. Deletes the rule/firing tables, routes, UI,
and AI tools; keeps notification channels since automations still use
them. Also fixes automations' notify step, which still called the
deleted repository.

* feat: move network topology into a first-party plugin

* feat: move tailscale device discovery and settings into a plugin

Adds plugins/tailscale/ with a devices sidebar tab, admin settings
section, and re-auth dialog. Host Metrics tailscale manager card and
SSH re-auth banner parsing stay in core.

* feat: move workspaces into a first-party plugin

* feat: move web endpoint into a first-party plugin

* feat: collapse plugin runtime to one tier behind a plugin SDK

* feat: make each plugin an npm workspace built by a termix-plugin CLI

* feat: give plugins their own tables, migrations and sync entities

* feat: serve plugin http and websockets from one mount instead of ports

* feat: namespace plugin permissions and keep them valid when a plugin is off

* feat: give plugins their own settings and one settings screen

* feat: load plugin frontends at runtime and remove plugin ids from the shell

* fix: mock the ai status fetch in its activate test

* feat: add auth extension points and one ssh connect pipeline

* feat: rebuild workspaces as the reference plugin

* fix: gate second factors after SSO/LDAP behind an admin setting

* feat: convert network-topology to a full plugin (B1)

* feat: move snippets backend and tables into a plugin (B2)

* feat: point core frontend snippets pickers at the plugin (B2)

* feat: add the snippets plugin (B2)

* feat: wire ai, automations, fleets and ssh-terminal to snippets (B2)

* feat: finish the tailscale plugin, including SSH auth (B3)

* feat: finish the fleets plugin, add ctx.hosts and host-commands SDK (B4)

* chore: update proxmox and host-metrics locale files for B5

* chore: regenerate drizzle migration journals for B5

* feat: add ctx.hosts create/update to the SDK, host-metrics drops proxmox

* feat: move proxmox node stats and collectors into the proxmox plugin

* feat: drop proxmox host columns, use plugin settings instead

* feat: finish the fleets plugin, add ctx.hosts and host-commands SDK (B4)

* feat: convert file manager into a plugin

* feat: convert ssh tunnels into a plugin

* feat: finish the web-endpoint plugin, add ctx.desktop (B8)

* feat: move the terminal fully into the ssh-terminal plugin (B9)

* feat: convert tmux monitoring into a plugin (B10)

* feat: convert serial console into the serial plugin

* feat: move session sharing and collab rooms into a plugin (B12)

* feat: turn session recording into a plugin (B13)

* feat: finish the remote-desktop plugin (B14)

* feat: finish the host-metrics plugin, move host status into core (B16)

* feat: finish the docker plugin (B15)

* feat: finish the automations plugin (B17)

* feat: finish the ai plugin (B18)

* feat: finish the homepage plugin, move service links and canvas out of core (B19)

* feat: convert wake-on-lan into a plugin (B20)

* feat: convert secret-sources into a plugin (B20)

* feat: move totp and passkeys into plugins (C1)

* feat: move sso and ldap logins into plugins (C2)

* feat: move opkssh and warpgate into plugins (C3)

* feat: move step-ca into a plugin (C4)

* feat: move vault ssh signing into a plugin (C5)

* feat: move termix identity into a plugin (C6)

* feat: move acme certificate automation into a plugin (C7)

* fix: finish 2.9.0 plugin moves and get every check green

* chore: lock the plugin boundary and remove 2.9.0 leftovers

* fix: harden the plugin runtime after the 2.9.0 security review

* feat: add plugin packing, signing, pinned trust and tmxplug bundling

* test: prove 2.8 to 2.9.0 upgrade is lossless and fix what it caught

* fix: give bundled plugin backends a real require for CJS deps

* feat: improve UI loading time and jitter

* feat: show credential sharing inline in the sidebar like host sharing

* feat: tailscale add host and copy ip, fix outbound fetch hang and plugin ESM warning

* feat: unify alerts into one plugin, channels, rules and inbox

* feat: rebuild desktop sync as linked server accounts, fix packaged plugin bundles and UI scaling

* fix: set blacksmith builder cache-key to stop broken gha cache fallback

* fix: link plugin-sdk workspace before npm ci in docker deps stage

* fix: link every plugin workspace before npm ci in docker deps stage

* fix(host-metrics): exclude image and firmware filesystems (#1469)

* fix(host-metrics): exclude image and firmware filesystems

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* fix(hosts): normalize imported jump host references (#1470)

* fix(hosts): normalize imported jump host references

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* fix(ci): build plugin SDK and repair MySQL settings migration (#1471)

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* fix(file-manager): keep inline rename consistent (#1476)

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* fix(file-manager): keep inline rename consistent

* fix(dashboard): reuse translated host status labels (#1475)

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* fix(dashboard): reuse translated host status labels

* docs(api): clarify local and remote version fields (#1474)

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* docs(api): clarify local and remote version fields

* fix(file-manager): preserve selected backgrounds on hover (#1473)

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* fix(file-manager): preserve selection feedback on hover

* test(ui): await dialog focus cleanup before teardown

* fix(file-manager): restore Ctrl/Cmd+F file search (#1472)

* fix(ci): build plugin SDK before dependent checks

* fix(mysql): keep plugin settings scope indexes within limits

* test(mysql): refresh reviewed plugin upgrade SQL

* fix(file-manager): focus file search with Ctrl or Cmd F

* fix: keep rounded-full circular in production builds

* fix(file-manager): cancel uploads and stop remote writes (#1477)

* fix(file-manager): cancel uploads and stop remote writes

* test(css): exercise the configured PostCSS plugin chain

* fix(file-manager): apply compact density to directory tree (#1478)

* fix(file-manager): apply compact density to directory tree

* test(css): exercise the configured PostCSS plugin chain

* fix(file-manager): preserve font sizes in compact mode (#1480)

* fix(file-manager): preserve font sizes in compact mode

* test(css): exercise the configured PostCSS plugin chain

* fix(file-manager): prioritize file names in narrow lists (#1483)

* fix(file-manager): prioritize file names in narrow lists

* test(css): exercise the configured PostCSS plugin chain

* test(identity): preserve full Ed25519 public keys in fixtures

* test(remote-desktop): always mutate ciphertext in tamper test

* fix(remote-desktop): probe the saved host guacd endpoint (#1481)

* fix(remote-desktop): probe the saved host guacd endpoint

* test(css): exercise the configured PostCSS plugin chain

* test(identity): preserve full Ed25519 public keys in fixtures

* fix(homepage): check allowlisted private service reachability (#1479)

* fix(homepage): check allowlisted private service reachability

* test(css): exercise the configured PostCSS plugin chain

* fix(remote-desktop): stop unsolicited clipboard read prompts (#1482)

* fix(remote-desktop): read clipboard only on explicit paste

* test(css): exercise the configured PostCSS plugin chain

* test(identity): preserve full Ed25519 public keys in fixtures

* test(remote-desktop): always mutate ciphertext in tamper test

* chore: simplify plugin readmes, changelogs and manifest descriptions

* fix: keep plugins loaded after signing in from the login screen

* fix(file-manager): accept OS file drops over existing rows (#1484)

* fix(file-manager): accept OS file drops over existing rows

* test(file-manager): target the file label in drop tests

* test(css): exercise the configured PostCSS plugin chain

* test(identity): preserve full Ed25519 public keys in fixtures

* test(remote-desktop): always mutate ciphertext in tamper test

* fix(file-manager): pipeline SFTP download reads (#1485)

* feat: add plugin sdk build to beta release

* fix: make link-store secret check immune to random base64 matches

* fix(ldap): preserve the directory-provided bind DN (#1486)

* fix: compute beta changes across dev branches and move the beta tag

* chore: untrack plugin sdk ARCHITECTURE.md

* chore: remove references to plugin sdk ARCHITECTURE.md

* feat: merge host editor terminal tabs into one owned by ssh-terminal

* feat: add descriptions to plugin host enable toggles

* fix(file-manager): show download progress in file viewers (#1487)

* fix(electron): signal backend readiness over IPC (#1488)

* fix(split-screen): allow layout creation without randomUUID (#1490)

* fix(split-screen): allow layout creation without randomUUID

* test(credentials): avoid flaky Ed25519 key generation

* fix(sidebar): remeasure visible rows after density changes (#1489)

* fix(sidebar): remeasure visible rows after density changes

* test(credentials): avoid flaky Ed25519 key generation

* feat(split-screen): redesign split screen with free-form panes and pane picker

* feat(sidebar): add host click behavior setting, default to always opening a new tab

* feat(snippets): redesign panel to match the host list

* fix(session-recording): stop session logs panel from refetching in a loop

* feat(snippets): bring back sharing, target hosts and drag reorder

* feat(ssh-terminal): add toolbar position, start state, display and fade host settings

* feat(ssh-terminal): add host setting to turn off password prompt auto-fill

* fix(ai): stop streams getting cut off and keep tool steps across messages

* feat: improve quick connect system using plugin api

* fix: proxmox guest sync, startup snippet sync, drop dead cloudflare ssh transport

* feat: move terminal settings, look and ssh tools into ssh-terminal plugin

* feat: move snippets, keybinding actions and macros out of core into plugins

* feat: store rdp, vnc and telnet logins in a generic per-protocol table

* feat: type the plugin host record, move plugin strings out of core and add lint checks

* feat: replace core homepage widget registry with generic extension points

* feat: plugins only see their own host settings in the browser

* feat: harden plugin api for separate repos, signed updates and generic external login

* fix: keep plugin css below core utilities and version plugin assets by their css

* fix: load and save plugin host settings in the editor and tighten settings row spacing

* feat: redesign user host defaults system

* fix(remote-desktop): release held keys on focus loss (#1498)

* fix(session-sharing): replace local presentation after takeover (#1500)

* fix(file-manager): refresh disk usage with directory listing (#1503)

* fix(ssh-terminal): preserve input order during local echo reconciliation (#1505)

* feat(remote-desktop): expose display zoom controls for RDP (#1514)

* fix(file-manager): restore text selection and copying in Markdown previews (#1518)

* fix(sidebar): keep compact host addresses visible (#1524)

* fix(hosts): preserve plugin settings when reopening the editor (#1499)

* fix(ssh-terminal): close owner sockets when presentations unmount (#1501)

* fix(session-sharing): synchronize shared SSH terminal dimensions (#1502)

* fix(session-sharing): show participant presence in member terminals (#1504)

* fix(ai): sync provider configuration and keys across linked devices (#1506)

* feat(ssh-terminal): add a duplicate tab action (#1510)

* feat(file-manager): allow disabling move-to-trash confirmation (#1511)

* feat(file-manager): default to the remote login directory (#1512)

* feat(homepage): synchronize canvas layouts across devices (#1515)

* fix(shortcuts): prevent accidental double-Shift palette activation (#1519)

* feat(tmux-monitor): add a unified multi-host view (#1520)

* fix(electron): allow explicit quit with active connections (#1522)

* feat: reconnect all disconnected terminal tabs (#1523)

* fix(hosts): preserve recording and sharing settings in the dev editor (#1509)

* fix(database): preserve RDP domain during startup backfill (#1497)

* feat(sidebar): add keyboard type-ahead search for hosts (#1516)

* feat(automations): add per-host maintenance mode and recurring schedules (#1521)

* feat(tmux): add a per-host mouse toggle and preserve remote configuration (#1513)

* fix(session-sharing): use the linked server for desktop meetings and links (#1507)

* fix(tunnels): support TOTP for client tunnels and jump hosts (#1508)

* fix: type errors and lint failures from merged plugin prs

* feat(installer): make the Windows desktop shortcut optional (#1517)

* fix: ship the plugin sdk and serialport in desktop builds

* fix: prefer ipv4 when resolving ssh host names (#1365)

* fix: readable terminal selection with the light theme (#1319)

* fix: build desktop session share links on the linked server (#1350)

* fix: show meeting guests to members and hide the roster from guests (#1353)

* fix: reliable file manager saves with sudo prompt and no base64 guessing (#1335)

* fix: show disk usage for the mount being browsed (#1347)

* fix: load the linux tray icon reliably and log tray failures (#1332)

* fix: cover the gnome close path in the desktop quit test (#1332)

* fix: prompt for jump host TOTP in terminal, file manager and metrics (#1312)

* feat: optional auto reconnect for dropped ssh sessions (#1321)

* feat: tighter compact host rows with inline tags (#1325)

* feat: bring back the alert feed homepage widget

* feat: pick target terminals for snippets again

* feat: share button on connection tabs again

* feat: recent servers list when linking the desktop app

* feat: list the fixed app shortcuts in keyboard shortcuts

* fix: translate hardcoded toasts and drop em dashes from ui text

* fix: translate leftover hardcoded ui text

* fix: toolbar files button opens at the shell directory again

* fix: show the remote desktop note under connection origin again

* chore: openapi docs for host metrics manager routes

* chore: openapi docs for undocumented routes and fix two broken doc blocks

* fix: declare terminal.listSessions use for snippet targets

* revert: drop the alert feed widget, the notification center replaces it

* feat: restore the alert feed homepage widget

* fix: quick connect fills the host address from plugin auth editors like tailscale

* fix: docker container logs use the base background color

* chore: fix dependabot alerts and apply safe npm upgrades

* fix: proxmox stats tab reads its switch from plugin host settings

* fix: count plugin ssh logins toward host status and stop showing reachable as a warning

* fix: hide the built-in source pill in the host editor

* fix: host status shows online when the port answers and only warns on a failed login

* fix: drop the top border on the split layout menu

* fix: host defaults tabs sit where the host editor puts them and skip plugins with nothing to default

* fix: remote desktop auth method labels and notes for vnc and telnet

* fix: add description to the web endpoint enable switch

* fix: crowdin sync and pretranslate for plugin locales, run plugin tests on release

* feat: move telemetry out of core into a usage statistics plugin

* fix: recent activity card no longer cuts off host names early

* fix: remove duplicate top border on split screen menu

* fix: redesign session log player controls, fix tooltip overlap and drop dot separators

* fix: file manager and sftp text showing raw i18n keys

* fix: onboarding rerunning for existing users after upgrading

* fix: fleet detail buttons overflowing the sidebar

* fix: session log player scrolling off screen horizontally

* fix: network graph lag when adding hosts and on every render

* fix: maintenance index name, shared host read only view and badge polling

* fix: meeting tabs, workspace tab merging, rail panels as tabs and general ui lag

* chore: update release notes

* fix: remote desktop tabs reconnecting on every tab switch

* fix: build plugin sdk before linting in release workflow

* chore: lint, format, and bump version to 2.9.0

* chore: skip crowdin pre-translate in release for now

* chore: sync Crowdin translations for 2.9.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Koi <38512047+datlt4@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ZacharyZcR <zacharyzcr1984@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-10-01 16:20:16 -05:00
1 parent 49fa488093
commit 3643e7af97
4405 files changed
+1341026 -289722

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# Changelog
## 1.0.0
First release, bundled with Termix 2.9.0.
Adds one inbox for every alert in Termix. Alerts can also be sent to webhooks, ntfy, Discord and email, with delivery rules to pick what goes where.
+39
View File
@@ -0,0 +1,39 @@
# Alerts
One inbox for every alert, with delivery to webhooks, ntfy, Discord and email.
## Features
- One inbox for alerts from every part of Termix.
- Popups for new alerts, filtered by severity.
- Channels that send alerts to webhooks, ntfy, Discord and email.
- Delivery rules that pick which alerts go to which channel.
- Optional news from the Termix team, like security notices and new releases.
## Settings
### Admin
- Termix announcements: show news from the Termix team in everyone's inbox.
- Keep alerts for (days): older alerts are removed from every inbox.
- SMTP server, port, TLS, username, password and from address: needed for email channels. Leave the server empty to turn email off.
### User
- Alert popups: all alerts, warnings and critical, critical only, or none.
## Permissions
- `alerts.use`: Get alerts in the inbox and send them to your own channels. Admins and users have it by default.
## For plugin authors
Send an alert from any plugin with `ctx.notify.send()`. This plugin stores it and delivers it. Do not build a separate notification system into a plugin.
## Development
```bash
npm run build # build into dist/
npm run test # run this plugin's tests
npm run typecheck # type-check this plugin
```
+172
View File
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "General",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "None"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Warning",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Delete",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving...",
"delete": "Delete"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Loading..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Waarskuwings"
},
"permissions": {
"use": {
"title": "Gebruik waarskuwings",
"description": "Kry waarskuwings in die inboks en stuur dit na jou eie kanale."
}
},
"onboarding": {
"feature": "Waarskuwings",
"featureDesc": "Elke waarskuwing in een inboks, gestuur na Discord, ntfy, e-pos of 'n webhook as jy wil."
},
"settings": {
"group": {
"general": "Algemeen",
"email": "E-pos"
},
"admin": {
"announcements": {
"label": "Termix-aankondigings",
"description": "Wys nuus van die Termix-span, soos sekuriteitskennisgewings en vrystellings, in almal se inboks."
},
"retentionDays": {
"label": "Hou waarskuwings vir (dae)",
"description": "Ouer waarskuwings word uit elke inboks verwyder."
},
"smtpHost": {
"label": "SMTP-bediener",
"description": "Nodig vir e-poskanale. Los leeg om e-pos af te skakel.",
"placeholder": "smtp.voorbeeld.com"
},
"smtpPort": {
"label": "SMTP-poort",
"description": "Gewoonlik 587 met STARTTLS of 465 met TLS."
},
"smtpSecure": {
"label": "Gebruik TLS van die begin af",
"description": "Skakel aan vir poort 465. Los af vir poort 587, wat op sy eie na TLS opgradeer."
},
"smtpUser": {
"label": "SMTP-gebruikersnaam",
"description": "Los leeg as die bediener nie 'n aanmelding benodig nie."
},
"smtpPassword": {
"label": "SMTP-wagwoord",
"description": "Geënkripteer gestoor."
},
"smtpFrom": {
"label": "Van adres",
"description": "Die senderwaarskuwings kom vandaan.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Waarskuwings-opspringvensters",
"description": "Watter nuwe waarskuwings verskyn terwyl jy Termix gebruik? Hulle beland altyd in die inboks.",
"all": "Alle waarskuwings",
"warning": "Waarskuwings en kritieke",
"critical": "Slegs krities",
"off": "Geen"
}
}
},
"sections": {
"inbox": "Inboks",
"channels": "Kanale",
"rules": "Afleweringsreëls"
},
"severity": {
"info": "Inligting",
"success": "Sukses",
"warning": "Waarskuwing",
"critical": "Krities"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Oop",
"view": "Bekyk",
"unread": "Ongelees",
"deliveryFailed_one": "{{count}} kanaal het misluk",
"deliveryFailed_other": "{{count}} kanale het misluk",
"markRead": "Merk as gelees",
"markUnread": "Merk as ongelees",
"markAllRead": "Merk alles as gelees",
"delete": "Vee uit",
"clearRead": "Vee leeswaarskuwings uit",
"cleared_one": "Verwyderde {{count}} waarskuwing",
"cleared_other": "Verwyderde {{count}} waarskuwings",
"filterAll": "Alles",
"filterUnread": "Ongelees",
"anySeverity": "Enige erns",
"anySource": "Enige bron",
"openAll": "Maak oop in 'n oortjie",
"empty": "Geen waarskuwings nog nie.",
"emptyUnread": "Julle is almal ingehaal.",
"loadMore": "Laai meer"
},
"channels": {
"intro": "Kanale is waar waarskuwings buite Termix kan gaan. Afleweringsreëls kies watter waarskuwings dit gebruik.",
"add": "Voeg kanaal by",
"edit": "Wysig kanaal",
"test": "Stuur 'n toets",
"testSent": "Toetswaarskuwing gestuur",
"testFailed": "Toets het misluk: {{error}}",
"deleteConfirm": "Vee die kanaal \"{{name}} \" uit?",
"deleted": "Kanaal uitgevee",
"empty": "Geen kanale nog nie.",
"enabled": "Geaktiveer",
"needsSave": "Hierdie kanaal moet weer oopgemaak en gestoor word voordat dit kan stuur.",
"name": "Naam",
"nameRequired": "Naam word vereis",
"type": "Tipe",
"types": {
"webhook": "Webhaak",
"ntfy": "ntfy",
"discord": "Disharmonie",
"email": "E-pos"
},
"emailUnavailable": "E-pos benodig 'n SMTP-bediener, wat 'n administrateur in die Waarskuwingsinstellings opstel.",
"webhookUrl": "URL",
"webhookHint": "Kry 'n JSON-liggaam vir elke waarskuwing.",
"method": "Metode",
"headers": "Koptekste",
"headersHint": "Een per lyn, soos Naam: waarde.",
"ntfyServer": "Bediener-URL",
"ntfyTopic": "Onderwerp",
"ntfyToken": "Toegangstoken (opsioneel)",
"discordUrl": "Discord webhook URL",
"discordHint": "Van die kanaal se instellings in Discord, onder Integrasies.",
"discordUsername": "Vertoonnaam (opsioneel)",
"discordAvatar": "Avatar-URL (opsioneel)",
"emailTo": "Stuur na",
"emailHint": "Skei meer as een adres met kommas.",
"privateNetwork": "Laat 'n privaat netwerkadres toe",
"privateNetworkHint": "Werk slegs vir gashere wat 'n administrateur toelaat in die privaat eindpuntlys."
},
"rules": {
"intro": "'n Afleweringsreël stuur ooreenstemmende waarskuwings na jou kanale. Waarskuwings bly ook altyd in die inboks.",
"add": "Voeg reël by",
"edit": "Wysig reël",
"empty": "Geen reëls nog nie, so waarskuwings verskyn slegs in die inboks.",
"needChannel": "Voeg eers 'n kanaal by.",
"enabled": "Geaktiveer",
"name": "Naam",
"nameRequired": "Naam word vereis",
"match": "Waarskuwings om te stuur",
"matchHint": "* vir alles, outomatisasies.* vir alles van outomatisasies, of een presiese soort.",
"minSeverity": "Ten minste",
"channels": "Stuur na",
"channelRequired": "Kies ten minste een kanaal",
"deleteConfirm": "Vee die reël \"{{name}} \" uit?",
"everything": "Alles",
"summary": "{{match}}, {{severity}} of hoër, na {{channels}}"
},
"actions": {
"cancel": "Kanselleer",
"save": "Stoor",
"saving": "Stoor...",
"delete": "Vee uit"
},
"widget": {
"name": "Waarskuwingsvoer",
"description": "Jou nuutste waarskuwings, met 'n vinnige manier om hulle gelees te merk",
"maxItems": "Maksimum items",
"showRead": "Wys leeswaarskuwings",
"allClear": "Alles duidelik",
"loading": "Laai tans..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "التنبيهات"
},
"permissions": {
"use": {
"title": "استخدم التنبيهات",
"description": "احصل على التنبيهات في صندوق الوارد وأرسلها إلى قنواتك الخاصة."
}
},
"onboarding": {
"feature": "التنبيهات",
"featureDesc": "يتم إرسال جميع التنبيهات في صندوق وارد واحد، إلى Discord أو ntfy أو البريد الإلكتروني أو webhook إذا كنت ترغب في ذلك."
},
"settings": {
"group": {
"general": "عام",
"email": "البريد الإلكتروني"
},
"admin": {
"announcements": {
"label": "إعلانات تيرميكس",
"description": "اعرض الأخبار من فريق Termix، مثل الإشعارات الأمنية والإصدارات، في صندوق بريد الجميع."
},
"retentionDays": {
"label": "احتفظ بالتنبيهات لمدة (أيام)",
"description": "تتم إزالة التنبيهات القديمة من جميع صناديق البريد الوارد."
},
"smtpHost": {
"label": "خادم SMTP",
"description": "هذا الحقل ضروري لقنوات البريد الإلكتروني. اتركه فارغاً لإيقاف تشغيل البريد الإلكتروني.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "منفذ SMTP",
"description": "عادةً ما يكون 587 مع STARTTLS أو 465 مع TLS."
},
"smtpSecure": {
"label": "استخدم بروتوكول TLS منذ البداية",
"description": "قم بتشغيل المنفذ 465. اتركه معطلاً للمنفذ 587، الذي يتم ترقيته إلى TLS تلقائيًا."
},
"smtpUser": {
"label": "اسم مستخدم SMTP",
"description": "اترك هذا الحقل فارغًا إذا لم يكن الخادم بحاجة إلى تسجيل دخول."
},
"smtpPassword": {
"label": "كلمة مرور SMTP",
"description": "مخزنة بشكل مشفر."
},
"smtpFrom": {
"label": "عنوان المرسل",
"description": "تأتي تنبيهات المرسل من...",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "نوافذ تنبيه منبثقة",
"description": "ما هي التنبيهات الجديدة التي تظهر أثناء استخدامك لبرنامج Termix؟ تصل هذه التنبيهات دائمًا إلى صندوق الوارد.",
"all": "جميع التنبيهات",
"warning": "تحذيرات ومعلومات هامة",
"critical": "للنقد فقط",
"off": "بلا"
}
}
},
"sections": {
"inbox": "صندوق الوارد",
"channels": "القنوات",
"rules": "قواعد التوصيل"
},
"severity": {
"info": "معلومات",
"success": "نجاح",
"warning": "تحذير",
"critical": "شديد الأهمية"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "فتح",
"view": "عرض",
"unread": "غير مقروء",
"deliveryFailed_one": "فشل القناة {{count}}",
"deliveryFailed_other": "فشلت القنوات {{count}}",
"markRead": "ضع علامة كمقروء",
"markUnread": "ضع علامة كغير مقروء",
"markAllRead": "ضع علامة \"مقروء\" على الكل",
"delete": "حذف",
"clearRead": "حذف تنبيهات القراءة",
"cleared_one": "تنبيه الحذف {{count}}",
"cleared_other": "تم حذف التنبيهات {{count}}",
"filterAll": "الكل",
"filterUnread": "غير مقروء",
"anySeverity": "أي درجة من الشدة",
"anySource": "أي مصدر",
"openAll": "افتح في علامة تبويب",
"empty": "لم يتم تلقي أي تنبيهات حتى الآن.",
"emptyUnread": "لقد اطلعت على كل شيء.",
"loadMore": "تحميل المزيد"
},
"channels": {
"intro": "القنوات هي المكان الذي يمكن أن تصل إليه التنبيهات خارج Termix. وتحدد قواعد التسليم التنبيهات التي تستخدمها.",
"add": "إضافة قناة",
"edit": "قناة التحرير",
"test": "أرسل اختبارًا",
"testSent": "تم إرسال تنبيه اختبار",
"testFailed": "فشل الاختبار: {{error}}",
"deleteConfirm": "حذف القناة \"{{name}}\"؟",
"deleted": "تم حذف القناة",
"empty": "لا توجد قنوات حتى الآن.",
"enabled": "مُمكّن",
"needsSave": "يجب فتح هذه القناة وحفظها مرة أخرى قبل أن تتمكن من الإرسال.",
"name": "الاسم",
"nameRequired": "الاسم مطلوب",
"type": "النوع",
"types": {
"webhook": "رابط الويب",
"ntfy": "ntfy",
"discord": "Discord",
"email": "البريد الإلكتروني"
},
"emailUnavailable": "يحتاج البريد الإلكتروني إلى خادم SMTP، والذي يقوم المسؤول بإعداده في إعدادات التنبيهات.",
"webhookUrl": "URL",
"webhookHint": "يحصل على نص JSON لكل تنبيه.",
"method": "طريقة",
"headers": "العناوين",
"headersHint": "واحد في كل سطر، مثل الاسم: القيمة.",
"ntfyServer": "عنوان URL للخادم",
"ntfyTopic": "الموضوع",
"ntfyToken": "رمز الوصول (اختياري)",
"discordUrl": "رابط ويب هوك ديسكورد",
"discordHint": "من إعدادات القناة في ديسكورد، ضمن قسم التكاملات.",
"discordUsername": "اسم العرض (اختياري)",
"discordAvatar": "رابط الصورة الرمزية (اختياري)",
"emailTo": "أرسل إلى",
"emailHint": "افصل بين أكثر من عنوان واحد باستخدام الفواصل.",
"privateNetwork": "السماح بعنوان شبكة خاصة",
"privateNetworkHint": "لا يعمل إلا مع المضيفين الذين يسمح لهم المسؤول بإضافتهم إلى قائمة نقاط النهاية الخاصة."
},
"rules": {
"intro": "تقوم قاعدة التسليم بإرسال التنبيهات المطابقة إلى قنواتك. وتبقى التنبيهات دائمًا في صندوق الوارد أيضًا.",
"add": "إضافة قاعدة",
"edit": "تعديل القاعدة",
"empty": "لا توجد قواعد حتى الآن، لذا تظهر التنبيهات في صندوق الوارد فقط.",
"needChannel": "أضف قناة أولاً.",
"enabled": "مُمكّن",
"name": "الاسم",
"nameRequired": "الاسم مطلوب",
"match": "تنبيهات لإرسالها",
"matchHint": "* لكل شيء، الأتمتة.* لكل شيء من الأتمتة، أو نوع واحد محدد.",
"minSeverity": "على الأقل",
"channels": "أرسل إلى",
"channelRequired": "اختر قناة واحدة على الأقل",
"deleteConfirm": "هل تريد حذف القاعدة \"{{name}}\"؟",
"everything": "كل شئ",
"summary": "{{match}}، {{severity}} أو أعلى، إلى {{channels}}"
},
"actions": {
"cancel": "إلغاء",
"save": "حفظ",
"saving": "جارٍ الحفظ...",
"delete": "حذف"
},
"widget": {
"name": "موجز التنبيهات",
"description": "آخر تنبيهاتك، مع طريقة سريعة لوضع علامة \"مقروء\" عليها",
"maxItems": "ماكس فيش",
"showRead": "عرض تنبيهات القراءة",
"allClear": "كل شيء طبيعي",
"loading": "جارٍ التحميل..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Сигнали"
},
"permissions": {
"use": {
"title": "Използвайте известия",
"description": "Получавайте известия във входящата си поща и ги изпращайте към вашите собствени канали."
}
},
"onboarding": {
"feature": "Сигнали",
"featureDesc": "Всяко известие в една пощенска кутия, изпратено до Discord, ntfy, имейл или webhook, ако желаете."
},
"settings": {
"group": {
"general": "Общи",
"email": "Имейл"
},
"admin": {
"announcements": {
"label": "Съобщения на Termix",
"description": "Показвайте новини от екипа на Termix, като например съобщения и издания за сигурност, във входящата поща на всички."
},
"retentionDays": {
"label": "Запазване на сигналите за (дни)",
"description": "По-старите известия се премахват от всяка пощенска кутия."
},
"smtpHost": {
"label": "SMTP сървър",
"description": "Необходимо за имейл канали. Оставете празно, за да изключите имейла.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP порт",
"description": "Обикновено 587 със STARTTLS или 465 с TLS."
},
"smtpSecure": {
"label": "Използвайте TLS от самото начало",
"description": "Включете за порт 465. Не го правете за 587, който самостоятелно надгражда до TLS."
},
"smtpUser": {
"label": "SMTP потребителско име",
"description": "Оставете празно, ако сървърът не изисква вход."
},
"smtpPassword": {
"label": "SMTP парола",
"description": "Съхранява се криптирано."
},
"smtpFrom": {
"label": "От адрес",
"description": "Сигналите за подател идват от.",
"placeholder": "Термикс <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Изскачащи прозорци с предупреждения",
"description": "Кои нови известия се появяват, докато използвате Termix. Те винаги попадат във входящата поща.",
"all": "Всички сигнали",
"warning": "Предупреждения и критични",
"critical": "Само критично",
"off": "Няма"
}
}
},
"sections": {
"inbox": "Входяща поща",
"channels": "Канали",
"rules": "Правила за доставка"
},
"severity": {
"info": "Информация",
"success": "Успех",
"warning": "Предупреждение",
"critical": "Критично"
},
"inbox": {
"sourceTermix": "Термикс",
"openLink": "Отворено",
"view": "Преглед",
"unread": "Непрочетено",
"deliveryFailed_one": "{{count}} каналът е неуспешен",
"deliveryFailed_other": "{{count}} канали неуспешни",
"markRead": "Маркирай като прочетено",
"markUnread": "Маркирай като непрочетено",
"markAllRead": "Маркирай всички като прочетени",
"delete": "Изтриване",
"clearRead": "Изтриване на известия за четене",
"cleared_one": "Изтрито предупреждение {{count}}",
"cleared_other": "Изтрити {{count}} сигнали",
"filterAll": "Всички",
"filterUnread": "Непрочетено",
"anySeverity": "Всякаква тежест",
"anySource": "Всеки източник",
"openAll": "Отваряне в раздел",
"empty": "Все още няма сигнали.",
"emptyUnread": "Всичко е наясно с вас.",
"loadMore": "Зареди още"
},
"channels": {
"intro": "Каналите са местата, където известията могат да излизат извън Termix. Правилата за доставка избират кои известия ги използват.",
"add": "Добавяне на канал",
"edit": "Редактиране на канал",
"test": "Изпрати тест",
"testSent": "Изпратено е тестово предупреждение",
"testFailed": "Тестът не беше успешен: {{error}}",
"deleteConfirm": "Да се изтрие ли каналът „{{name}}“?",
"deleted": "Каналът е изтрит",
"empty": "Все още няма канали.",
"enabled": "Активирано",
"needsSave": "Този канал трябва да бъде отворен и запазен отново, преди да може да се изпраща.",
"name": "Име",
"nameRequired": "Името е задължително",
"type": "Тип",
"types": {
"webhook": "Уеб кукичка",
"ntfy": "ntfy",
"discord": "Дискорд",
"email": "Имейл"
},
"emailUnavailable": "Имейлът се нуждае от SMTP сървър, който администраторът настройва в настройките за предупреждения.",
"webhookUrl": "URL адрес",
"webhookHint": "Получава JSON тяло за всяко предупреждение.",
"method": "Метод",
"headers": "Заглавки",
"headersHint": "По един на ред, като Име: стойност.",
"ntfyServer": "URL адрес на сървъра",
"ntfyTopic": "Тема",
"ntfyToken": "Токен за достъп (по избор)",
"discordUrl": "URL адрес на уеб кукичката на Discord",
"discordHint": "От настройките на канала в Discord, под „Интеграции“.",
"discordUsername": "Показвано име (по избор)",
"discordAvatar": "URL адрес на аватара (по избор)",
"emailTo": "Изпрати до",
"emailHint": "Разделете повече от един адрес със запетаи.",
"privateNetwork": "Разрешаване на адрес на частна мрежа",
"privateNetworkHint": "Работи само за хостове, които администраторът е разрешил в списъка с частни крайни точки."
},
"rules": {
"intro": "Правило за доставка изпраща съответстващи известия до вашите канали. Известията винаги остават и във входящата поща.",
"add": "Добавяне на правило",
"edit": "Редактиране на правилото",
"empty": "Все още няма правила, така че известията се показват само във входящата поща.",
"needChannel": "Първо добавете канал.",
"enabled": "Активирано",
"name": "Име",
"nameRequired": "Името е задължително",
"match": "Сигнали за изпращане",
"matchHint": "* за всичко, автоматизации.* за всичко от автоматизации или един точно определен вид.",
"minSeverity": "Поне",
"channels": "Изпрати до",
"channelRequired": "Изберете поне един канал",
"deleteConfirm": "Да се изтрие ли правилото „{{name}}“?",
"everything": "Всичко",
"summary": "{{match}}, {{severity}} или по-висока, до {{channels}}"
},
"actions": {
"cancel": "Отказ",
"save": "Запазване",
"saving": "Запазване...",
"delete": "Изтриване"
},
"widget": {
"name": "Канал за предупреждения",
"description": "Най-новите ви сигнали с бърз начин да ги маркирате като прочетени",
"maxItems": "Максимален брой елементи",
"showRead": "Показване на известия за четене",
"allClear": "Всичко е чисто",
"loading": "Зареждане..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "General",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "None"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Warning",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Delete",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving...",
"delete": "Delete"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Loading..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alertes"
},
"permissions": {
"use": {
"title": "Utilitza alertes",
"description": "Rep alertes a la safata d'entrada i envia-les als teus propis canals."
}
},
"onboarding": {
"feature": "Alertes",
"featureDesc": "Totes les alertes en una safata d'entrada, enviades a Discord, ntfy, correu electrònic o un webhook si ho desitges."
},
"settings": {
"group": {
"general": "General",
"email": "Correu electrònic"
},
"admin": {
"announcements": {
"label": "Anuncis de Termix",
"description": "Mostra notícies de l'equip de Termix, com ara avisos de seguretat i llançaments, a la safata d'entrada de tothom."
},
"retentionDays": {
"label": "Mantén les alertes durant (dies)",
"description": "Les alertes més antigues s'eliminen de totes les safates d'entrada."
},
"smtpHost": {
"label": "Servidor SMTP",
"description": "Necessari per als canals de correu electrònic. Deixeu-ho en blanc per desactivar el correu electrònic.",
"placeholder": "smtp.exemple.com"
},
"smtpPort": {
"label": "Port SMTP",
"description": "Normalment 587 amb STARTTLS o 465 amb TLS."
},
"smtpSecure": {
"label": "Utilitza TLS des del principi",
"description": "Activeu el port 465. Deixeu-lo desactivat per al 587, que s'actualitza a TLS pel seu compte."
},
"smtpUser": {
"label": "Nom d'usuari SMTP",
"description": "Deixeu-ho en blanc si el servidor no necessita cap inici de sessió."
},
"smtpPassword": {
"label": "Contrasenya SMTP",
"description": "Emmagatzemat xifrat."
},
"smtpFrom": {
"label": "Adreça de remitent",
"description": "Les alertes del remitent provenen de.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Finestres emergents d'alerta",
"description": "Quines noves alertes apareixen mentre fas servir Termix. Sempre arriben a la safata d'entrada.",
"all": "Totes les alertes",
"warning": "Avisos i crítics",
"critical": "Només crític",
"off": "Cap"
}
}
},
"sections": {
"inbox": "Safata d'entrada",
"channels": "Canals",
"rules": "Normes de lliurament"
},
"severity": {
"info": "Informació",
"success": "Èxit",
"warning": "Avís",
"critical": "Crític"
},
"inbox": {
"sourceTermix": "Tèrmix",
"openLink": "Obre",
"view": "Vista",
"unread": "No llegit",
"deliveryFailed_one": "El canal {{count}} ha fallat",
"deliveryFailed_other": "Els canals {{count}} han fallat",
"markRead": "Marca com a llegit",
"markUnread": "Marca com a no llegit",
"markAllRead": "Marca-ho tot com a llegit",
"delete": "Suprimeix",
"clearRead": "Suprimeix les alertes de lectura",
"cleared_one": "Alerta suprimida {{count}}",
"cleared_other": "Alertes suprimides {{count}}",
"filterAll": "Tot",
"filterUnread": "No llegit",
"anySeverity": "Qualsevol gravetat",
"anySource": "Qualsevol font",
"openAll": "Obre en una pestanya",
"empty": "Encara no hi ha alertes.",
"emptyUnread": "Esteu tots atrapats.",
"loadMore": "Carrega'n més"
},
"channels": {
"intro": "Els canals són on les alertes poden sortir de Termix. Les regles de lliurament trien quines alertes els utilitzen.",
"add": "Afegeix un canal",
"edit": "Edita el canal",
"test": "Envia una prova",
"testSent": "Alerta de prova enviada",
"testFailed": "Prova fallida: {{error}}",
"deleteConfirm": "Voleu eliminar el canal \"{{name}}\"?",
"deleted": "Canal suprimit",
"empty": "Encara no hi ha canals.",
"enabled": "Activat",
"needsSave": "Cal obrir i desar de nou aquest canal abans de poder enviar.",
"name": "Nom",
"nameRequired": "El nom és obligatori",
"type": "Tipus",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discòrdia",
"email": "Correu electrònic"
},
"emailUnavailable": "El correu electrònic necessita un servidor SMTP, que un administrador configura a la configuració d'Alertes.",
"webhookUrl": "URL",
"webhookHint": "Obté un cos JSON per a cada alerta.",
"method": "Mètode",
"headers": "Capçaleres",
"headersHint": "Un per línia, com ara Nom: valor.",
"ntfyServer": "URL del servidor",
"ntfyTopic": "Tema",
"ntfyToken": "Token d'accés (opcional)",
"discordUrl": "URL del webhook de Discord",
"discordHint": "Des de la configuració del canal a Discord, a Integracions.",
"discordUsername": "Nom per mostrar (opcional)",
"discordAvatar": "URL de l'avatar (opcional)",
"emailTo": "Enviar a",
"emailHint": "Separeu més d'una adreça amb comes.",
"privateNetwork": "Permetre una adreça de xarxa privada",
"privateNetworkHint": "Només funciona per a hosts que un administrador permet a la llista de punts finals privats."
},
"rules": {
"intro": "Una regla de lliurament envia alertes coincidents als vostres canals. Les alertes també sempre romanen a la safata d'entrada.",
"add": "Afegeix una regla",
"edit": "Edita la regla",
"empty": "Encara no hi ha regles, així que les alertes només apareixen a la safata d'entrada.",
"needChannel": "Afegeix primer un canal.",
"enabled": "Activat",
"name": "Nom",
"nameRequired": "El nom és obligatori",
"match": "Alertes per enviar",
"matchHint": "* per a tot, automatitzacions. * per a tot, des d'automatitzacions o un tipus exacte.",
"minSeverity": "Almenys",
"channels": "Enviar a",
"channelRequired": "Trieu com a mínim un canal",
"deleteConfirm": "Voleu suprimir la regla \"{{name}}\"?",
"everything": "Tot",
"summary": "{{match}}, {{severity}} o superior, a {{channels}}"
},
"actions": {
"cancel": "Cancel·la",
"save": "Desa",
"saving": "Desant...",
"delete": "Suprimeix"
},
"widget": {
"name": "Canal d'alertes",
"description": "Les teves darreres alertes, amb una manera ràpida de marcar-les com a llegides",
"maxItems": "Màxim d'elements",
"showRead": "Mostra les alertes de lectura",
"allClear": "Tot clar",
"loading": "S'està carregant..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Upozornění"
},
"permissions": {
"use": {
"title": "Používejte upozornění",
"description": "Získejte upozornění do složky Doručená pošta a odesílejte je na své vlastní kanály."
}
},
"onboarding": {
"feature": "Upozornění",
"featureDesc": "Všechna upozornění v jedné schránce, odeslaná na Discord, ntfy, e-mail nebo webhook, pokud chcete."
},
"settings": {
"group": {
"general": "Obecné",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Oznámení Termixu",
"description": "Zobrazujte novinky od týmu Termix, jako jsou bezpečnostní oznámení a vydání, ve schránce všech uživatelů."
},
"retentionDays": {
"label": "Uchovávat upozornění po dobu (dnů)",
"description": "Starší upozornění jsou odstraněna ze všech složek doručené pošty."
},
"smtpHost": {
"label": "SMTP server",
"description": "Požadováno pro e-mailové kanály. Pro vypnutí e-mailu ponechte prázdné.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Obvykle 587 se STARTTLS nebo 465 s TLS."
},
"smtpSecure": {
"label": "Používejte TLS od začátku",
"description": "Zapněte pro port 465. Nechte vypnuto pro port 587, který se sám upgraduje na TLS."
},
"smtpUser": {
"label": "Uživatelské jméno SMTP",
"description": "Pokud server nevyžaduje přihlášení, nechte pole prázdné."
},
"smtpPassword": {
"label": "Heslo k SMTP",
"description": "Uloženo zašifrovaně."
},
"smtpFrom": {
"label": "Odesílatel",
"description": "Upozornění odesílatele pocházejí od.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Vyskakovací okna s upozorněními",
"description": "Která nová upozornění se zobrazují při používání Termixu. Vždy se dostanou do doručené pošty.",
"all": "Všechna upozornění",
"warning": "Varování a kritické",
"critical": "Pouze kritické",
"off": "Žádný"
}
}
},
"sections": {
"inbox": "Doručená pošta",
"channels": "Kanály",
"rules": "Pravidla doručení"
},
"severity": {
"info": "Informace",
"success": "Úspěch",
"warning": "Varování",
"critical": "Kritický"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "OTEVŘENO",
"view": "Pohled",
"unread": "Nepřečtený",
"deliveryFailed_one": "Kanál {{count}} selhal",
"deliveryFailed_other": "{{count}} kanálů selhalo",
"markRead": "Označit jako přečtené",
"markUnread": "Označit jako nepřečtené",
"markAllRead": "Označit vše jako přečtené",
"delete": "Vymazat",
"clearRead": "Smazat upozornění na přečtení",
"cleared_one": "Smazáno upozornění {{count}}",
"cleared_other": "Smazaná {{count}} upozornění",
"filterAll": "Vše",
"filterUnread": "Nepřečtený",
"anySeverity": "Jakákoli závažnost",
"anySource": "Jakýkoli zdroj",
"openAll": "Otevřít v kartě",
"empty": "Zatím žádná upozornění.",
"emptyUnread": "Všechno máte v obraze.",
"loadMore": "Načíst další"
},
"channels": {
"intro": "Kanály jsou místem, kudy mohou upozornění odesílat mimo Termix. Pravidla doručování vybírají, která upozornění je používají.",
"add": "Přidat kanál",
"edit": "Upravit kanál",
"test": "Odeslat test",
"testSent": "Testovací upozornění odesláno",
"testFailed": "Test selhal: {{error}}",
"deleteConfirm": "Smazat kanál „{{name}}“?",
"deleted": "Kanál smazán",
"empty": "Zatím žádné kanály.",
"enabled": "Povoleno",
"needsSave": "Tento kanál je nutné před odesláním znovu otevřít a uložit.",
"name": "Jméno",
"nameRequired": "Jméno je povinné",
"type": "Typ",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Svár",
"email": "E-mail"
},
"emailUnavailable": "E-mail potřebuje SMTP server, který administrátor nastaví v nastavení Upozornění.",
"webhookUrl": "URL",
"webhookHint": "Získá tělo JSON pro každé upozornění.",
"method": "Metoda",
"headers": "Záhlaví",
"headersHint": "Jeden na řádek, například Název: hodnota.",
"ntfyServer": "URL serveru",
"ntfyTopic": "Téma",
"ntfyToken": "Přístupový token (volitelné)",
"discordUrl": "URL webhooku na Discordu",
"discordHint": "V nastavení kanálu na Discordu, v sekci Integrace.",
"discordUsername": "Zobrazovaný název (volitelné)",
"discordAvatar": "URL adresa avatara (volitelné)",
"emailTo": "Odeslat",
"emailHint": "Více adres oddělte čárkami.",
"privateNetwork": "Povolit adresu privátní sítě",
"privateNetworkHint": "Funguje pouze pro hostitele, které správce povolí v seznamu privátních koncových bodů."
},
"rules": {
"intro": "Pravidlo doručování odesílá odpovídající upozornění do vašich kanálů. Upozornění vždy zůstávají také ve složce Doručená pošta.",
"add": "Přidat pravidlo",
"edit": "Upravit pravidlo",
"empty": "Zatím žádná pravidla, takže upozornění se zobrazují pouze ve schránce.",
"needChannel": "Nejprve přidejte kanál.",
"enabled": "Povoleno",
"name": "Jméno",
"nameRequired": "Jméno je povinné",
"match": "Upozornění k odeslání",
"matchHint": "* pro všechno, automatizace.* pro všechno od automatizací nebo jeden přesný druh.",
"minSeverity": "Alespoň",
"channels": "Odeslat",
"channelRequired": "Vyberte alespoň jeden kanál",
"deleteConfirm": "Smazat pravidlo „{{name}}“?",
"everything": "Všechno",
"summary": "{{match}}, {{severity}} nebo vyšší, na {{channels}}"
},
"actions": {
"cancel": "Zrušit",
"save": "Uložit",
"saving": "Ukládání…",
"delete": "Vymazat"
},
"widget": {
"name": "Zdroj upozornění",
"description": "Vaše nejnovější upozornění s rychlým způsobem, jak je označit jako přečtené",
"maxItems": "Maximální počet položek",
"showRead": "Zobrazit upozornění na přečtení",
"allClear": "Všechno čisté",
"loading": "Načítání..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Advarsler"
},
"permissions": {
"use": {
"title": "Brug alarmer",
"description": "Få besked i indbakken, og send dem til dine egne kanaler."
}
},
"onboarding": {
"feature": "Advarsler",
"featureDesc": "Alle alarmer i én indbakke, sendt videre til Discord, ntfy, e-mail eller en webhook, hvis du vil."
},
"settings": {
"group": {
"general": "Generel",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Termix-meddelelser",
"description": "Vis nyheder fra Termix-teamet, f.eks. sikkerhedsmeddelelser og udgivelser, i alles indbakke."
},
"retentionDays": {
"label": "Gem advarsler i (dage)",
"description": "Ældre advarsler fjernes fra alle indbakker."
},
"smtpHost": {
"label": "SMTP-server",
"description": "Nødvendigt for e-mailkanaler. Lad feltet stå tomt for at slå e-mail fra.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP-port",
"description": "Normalt 587 med STARTTLS eller 465 med TLS."
},
"smtpSecure": {
"label": "Brug TLS fra starten",
"description": "Slå port 465 til. Slå port 587 fra, som opgraderer til TLS af sig selv."
},
"smtpUser": {
"label": "SMTP-brugernavn",
"description": "Lad feltet stå tomt, hvis serveren ikke kræver login."
},
"smtpPassword": {
"label": "SMTP-adgangskode",
"description": "Gemt krypteret."
},
"smtpFrom": {
"label": "Fra adresse",
"description": "Afsenderbeskederne kommer fra.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Popup-vinduer for alarmer",
"description": "Hvilke nye advarsler dukker op, mens du bruger Termix? De lander altid i indbakken.",
"all": "Alle advarsler",
"warning": "Advarsler og kritiske",
"critical": "Kun kritisk",
"off": "Ingen"
}
}
},
"sections": {
"inbox": "Indbakke",
"channels": "Kanaler",
"rules": "Leveringsregler"
},
"severity": {
"info": "Info",
"success": "Succes",
"warning": "Advarsel",
"critical": "Kritisk"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Åben",
"view": "Udsigt",
"unread": "Ulæst",
"deliveryFailed_one": "{{count}} kanal mislykkedes",
"deliveryFailed_other": "{{count}} kanaler mislykkedes",
"markRead": "Markér som læst",
"markUnread": "Markér som ulæst",
"markAllRead": "Markér alle som læst",
"delete": "Slet",
"clearRead": "Slet læseadvarsler",
"cleared_one": "Slettet {{count}} -alarm",
"cleared_other": "Slettede {{count}} advarsler",
"filterAll": "Alle",
"filterUnread": "Ulæst",
"anySeverity": "Enhver alvorlighedsgrad",
"anySource": "Enhver kilde",
"openAll": "Åbn i en fane",
"empty": "Ingen advarsler endnu.",
"emptyUnread": "I er alle med på banen.",
"loadMore": "Indlæs mere"
},
"channels": {
"intro": "Kanaler er hvor advarsler kan sendes uden for Termix. Leveringsregler vælger hvilke advarsler der bruger dem.",
"add": "Tilføj kanal",
"edit": "Rediger kanal",
"test": "Send en test",
"testSent": "Testalarm sendt",
"testFailed": "Test mislykkedes: {{error}}",
"deleteConfirm": "Slet kanalen \"{{name}}\"?",
"deleted": "Kanal slettet",
"empty": "Ingen kanaler endnu.",
"enabled": "Aktiveret",
"needsSave": "Denne kanal skal åbnes og gemmes igen, før den kan sende.",
"name": "Navn",
"nameRequired": "Navn er påkrævet",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Disharmoni",
"email": "E-mail"
},
"emailUnavailable": "E-mail kræver en SMTP-server, som en administrator konfigurerer i indstillingerne for alarmer.",
"webhookUrl": "URL",
"webhookHint": "Henter en JSON-brødtekst for hver alarm.",
"method": "Metode",
"headers": "Overskrifter",
"headersHint": "En pr. linje, ligesom Navn: værdi.",
"ntfyServer": "Server-URL",
"ntfyTopic": "Emne",
"ntfyToken": "Adgangstoken (valgfrit)",
"discordUrl": "Discord webhook-URL",
"discordHint": "Fra kanalens indstillinger i Discord, under Integrationer.",
"discordUsername": "Visningsnavn (valgfrit)",
"discordAvatar": "Avatar-URL (valgfrit)",
"emailTo": "Send til",
"emailHint": "Adskil mere end én adresse med kommaer.",
"privateNetwork": "Tillad en privat netværksadresse",
"privateNetworkHint": "Fungerer kun for værter, som en administrator tillader på listen over private slutpunkter."
},
"rules": {
"intro": "En leveringsregel sender matchende advarsler til dine kanaler. Advarsler forbliver også altid i indbakken.",
"add": "Tilføj regel",
"edit": "Rediger regel",
"empty": "Ingen regler endnu, så advarsler vises kun i indbakken.",
"needChannel": "Tilføj først en kanal.",
"enabled": "Aktiveret",
"name": "Navn",
"nameRequired": "Navn er påkrævet",
"match": "Advarsler, der skal sendes",
"matchHint": "* for alt, automatiseringer.* for alt fra automatiseringer, eller én præcis slags.",
"minSeverity": "Mindst",
"channels": "Send til",
"channelRequired": "Vælg mindst én kanal",
"deleteConfirm": "Slet reglen \"{{name}}\"?",
"everything": "Alt",
"summary": "{{match}}, {{severity}} eller højere, til {{channels}}"
},
"actions": {
"cancel": "Ophæve",
"save": "Spare",
"saving": "Gemmer...",
"delete": "Slet"
},
"widget": {
"name": "Alarmfeed",
"description": "Dine seneste advarsler, med en hurtig måde at markere dem som læst",
"maxItems": "Maks. antal varer",
"showRead": "Vis læseadvarsler",
"allClear": "Alt klart",
"loading": "Indlæser..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Benachrichtigungen"
},
"permissions": {
"use": {
"title": "Warnmeldungen verwenden",
"description": "Erhalten Sie Benachrichtigungen in Ihrem Posteingang und leiten Sie diese an Ihre eigenen Kanäle weiter."
}
},
"onboarding": {
"feature": "Alarme",
"featureDesc": "Alle Benachrichtigungen in einem Posteingang, auf Wunsch auch per Discord, ntfy, E-Mail oder Webhook."
},
"settings": {
"group": {
"general": "Allgemein",
"email": "E-Mail"
},
"admin": {
"announcements": {
"label": "Termix-Ankündigungen",
"description": "Neuigkeiten vom Termix-Team, wie Sicherheitshinweise und Releases, werden direkt in den Posteingang aller Nutzer angezeigt."
},
"retentionDays": {
"label": "Benachrichtigungen beibehalten für (Tage)",
"description": "Ältere Benachrichtigungen werden aus jedem Posteingang entfernt."
},
"smtpHost": {
"label": "SMTP-Server",
"description": "Für E-Mail-Kanäle erforderlich. Leer lassen, um E-Mails zu deaktivieren.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP-Port",
"description": "Üblicherweise Port 587 mit STARTTLS oder Port 465 mit TLS."
},
"smtpSecure": {
"label": "Verwenden Sie TLS von Anfang an",
"description": "Aktivieren Sie die Option für Port 465. Lassen Sie sie für Port 587 deaktiviert, da dieser automatisch auf TLS umstellt."
},
"smtpUser": {
"label": "SMTP-Benutzername",
"description": "Lassen Sie dieses Feld leer, wenn der Server keine Anmeldung benötigt."
},
"smtpPassword": {
"label": "SMTP-Passwort",
"description": "Verschlüsselt gespeichert."
},
"smtpFrom": {
"label": "Von Adresse",
"description": "Die Absenderbenachrichtigungen stammen von",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Warnmeldungen",
"description": "Welche neuen Benachrichtigungen erscheinen während der Nutzung von Termix? Sie landen immer im Posteingang.",
"all": "Alle Benachrichtigungen",
"warning": "Warnungen und kritische",
"critical": "Nur für kritische Zwecke",
"off": "Keine"
}
}
},
"sections": {
"inbox": "Posteingang",
"channels": "Kanäle",
"rules": "Lieferregeln"
},
"severity": {
"info": "Info",
"success": "Erfolgreich",
"warning": "Warnung",
"critical": "Kritisch"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Offen",
"view": "Anzeigen",
"unread": "Ungelesen",
"deliveryFailed_one": "{{count}} Kanal fehlgeschlagen",
"deliveryFailed_other": "{{count}} Kanäle fehlgeschlagen",
"markRead": "Als gelesen markieren",
"markUnread": "Als ungelesen markieren",
"markAllRead": "Alle als gelesen markieren",
"delete": "Löschen",
"clearRead": "Lesebenachrichtigungen löschen",
"cleared_one": "Gelöschte {{count}} Warnung",
"cleared_other": "Gelöschte {{count}} Benachrichtigungen",
"filterAll": "Alle",
"filterUnread": "Ungelesen",
"anySeverity": "Jegliche Schwere",
"anySource": "Jede Quelle",
"openAll": "In einem Tab öffnen",
"empty": "Bisher keine Benachrichtigungen.",
"emptyUnread": "Sie sind nun auf dem neuesten Stand.",
"loadMore": "Mehr laden"
},
"channels": {
"intro": "Kanäle sind die Wege, über die Benachrichtigungen außerhalb von Termix weitergeleitet werden können. Zustellungsregeln legen fest, welche Benachrichtigungen diese Kanäle nutzen.",
"add": "Kanal hinzufügen",
"edit": "Kanal bearbeiten",
"test": "Senden Sie einen Test",
"testSent": "Testalarm gesendet",
"testFailed": "Test fehlgeschlagen: {{error}}",
"deleteConfirm": "Kanal \"{{name}} \" löschen?",
"deleted": "Kanal gelöscht",
"empty": "Noch keine Kanäle.",
"enabled": "Aktiviert",
"needsSave": "Dieser Kanal muss erneut geöffnet und gespeichert werden, bevor er senden kann.",
"name": "Name",
"nameRequired": "Name ist erforderlich",
"type": "Typ",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "E-Mail"
},
"emailUnavailable": "Für E-Mails wird ein SMTP-Server benötigt, der vom Administrator in den Benachrichtigungseinstellungen eingerichtet wird.",
"webhookUrl": "URL",
"webhookHint": "Erhält für jede Benachrichtigung einen JSON-Body.",
"method": "Verfahren",
"headers": "Überschriften",
"headersHint": "Ein Eintrag pro Zeile, z. B. Name: Wert.",
"ntfyServer": "Server-URL",
"ntfyTopic": "Topic",
"ntfyToken": "Zugriffstoken (optional)",
"discordUrl": "Discord-Webhook-URL",
"discordHint": "In den Kanaleinstellungen von Discord, unter Integrationen.",
"discordUsername": "Anzeigename (optional)",
"discordAvatar": "Avatar-URL (optional)",
"emailTo": "Senden an",
"emailHint": "Mehrere Adressen werden durch Kommas getrennt.",
"privateNetwork": "Erlauben Sie eine private Netzwerkadresse",
"privateNetworkHint": "Funktioniert nur für Hosts, die ein Administrator in der Liste der privaten Endpunkte zulässt."
},
"rules": {
"intro": "Eine Zustellungsregel sendet passende Benachrichtigungen an Ihre Kanäle. Benachrichtigungen bleiben außerdem immer im Posteingang erhalten.",
"add": "Regel hinzufügen",
"edit": "Bearbeitungsregel",
"empty": "Da es noch keine Regeln gibt, werden Benachrichtigungen nur im Posteingang angezeigt.",
"needChannel": "Füge zuerst einen Kanal hinzu.",
"enabled": "Aktiviert",
"name": "Name",
"nameRequired": "Name ist erforderlich",
"match": "Zu sendende Benachrichtigungen",
"matchHint": "* für alles, Automatisierungen.* für alles von Automatisierungen oder eine ganz bestimmte Art.",
"minSeverity": "Mindestens",
"channels": "Senden an",
"channelRequired": "Wählen Sie mindestens einen Kanal aus",
"deleteConfirm": "Regel \"{{name}} \" löschen?",
"everything": "Alles",
"summary": "{{match}}, {{severity}} oder höher, bis {{channels}}"
},
"actions": {
"cancel": "Abbrechen",
"save": "Speichern",
"saving": "Wird gespeichert …",
"delete": "Löschen"
},
"widget": {
"name": "Alarm-Feed",
"description": "Ihre neuesten Benachrichtigungen mit einer schnellen Möglichkeit, sie als gelesen zu markieren.",
"maxItems": "Maximale Anzahl an Artikeln",
"showRead": "Lesebenachrichtigungen anzeigen",
"allClear": "Alles in Ordnung",
"loading": "Laden..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Ειδοποιήσεις"
},
"permissions": {
"use": {
"title": "Χρήση ειδοποιήσεων",
"description": "Λάβετε ειδοποιήσεις στα εισερχόμενα και στείλτε τις στα δικά σας κανάλια."
}
},
"onboarding": {
"feature": "Ειδοποιήσεις",
"featureDesc": "Κάθε ειδοποίηση σε ένα μόνο inbox, αποστέλλεται στο Discord, ntfy, email ή σε webhook, αν θέλετε."
},
"settings": {
"group": {
"general": "Γενικός",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Ανακοινώσεις Termix",
"description": "Εμφάνιση ειδήσεων από την ομάδα Termix, όπως ειδοποιήσεις ασφαλείας και εκδόσεις, στα εισερχόμενα όλων."
},
"retentionDays": {
"label": "Διατήρηση ειδοποιήσεων για (ημέρες)",
"description": "Οι παλαιότερες ειδοποιήσεις αφαιρούνται από κάθε φάκελο εισερχομένων."
},
"smtpHost": {
"label": "Διακομιστής SMTP",
"description": "Απαιτείται για κανάλια email. Αφήστε το κενό για να απενεργοποιήσετε το email.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "Θύρα SMTP",
"description": "Συνήθως 587 με STARTTLS ή 465 με TLS."
},
"smtpSecure": {
"label": "Χρησιμοποιήστε TLS από την αρχή",
"description": "Ενεργοποιήστε τη θύρα 465. Αφήστε την απενεργοποιημένη για τη θύρα 587, η οποία αναβαθμίζεται σε TLS από μόνη της."
},
"smtpUser": {
"label": "Όνομα χρήστη SMTP",
"description": "Αφήστε το κενό εάν ο διακομιστής δεν χρειάζεται σύνδεση."
},
"smtpPassword": {
"label": "Κωδικός πρόσβασης SMTP",
"description": "Αποθηκεύεται κρυπτογραφημένο."
},
"smtpFrom": {
"label": "Διεύθυνση από",
"description": "Οι ειδοποιήσεις αποστολέα προέρχονται από.",
"placeholder": "Termmix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Αναδυόμενα παράθυρα ειδοποιήσεων",
"description": "Ποιες νέες ειδοποιήσεις εμφανίζονται ενώ χρησιμοποιείτε το Termix. Πάντα καταλήγουν στα εισερχόμενα.",
"all": "Όλες οι ειδοποιήσεις",
"warning": "Προειδοποιήσεις και κρίσιμα",
"critical": "Μόνο κρίσιμα",
"off": "Κανένας"
}
}
},
"sections": {
"inbox": "Εισερχόμενα",
"channels": "Κανάλια",
"rules": "Κανόνες παράδοσης"
},
"severity": {
"info": "Πληροφορίες",
"success": "Επιτυχία",
"warning": "Προειδοποίηση",
"critical": "Κρίσιμος"
},
"inbox": {
"sourceTermix": "Τέρμιξ",
"openLink": "Ανοιχτό",
"view": "Θέα",
"unread": "Αδιάβαστος",
"deliveryFailed_one": "Το κανάλι {{count}} απέτυχε",
"deliveryFailed_other": "{{count}} κανάλια απέτυχαν",
"markRead": "Σήμανση ως αναγνωσμένου",
"markUnread": "Επισήμανση ως μη αναγνωσμένου",
"markAllRead": "Σήμανση όλων ως αναγνωσμένων",
"delete": "Διαγράφω",
"clearRead": "Διαγραφή ειδοποιήσεων ανάγνωσης",
"cleared_one": "Διαγραμμένη ειδοποίηση {{count}}",
"cleared_other": "Διαγραμμένες {{count}} ειδοποιήσεις",
"filterAll": "Ολοι",
"filterUnread": "Αδιάβαστος",
"anySeverity": "Οποιαδήποτε σοβαρότητα",
"anySource": "Οποιαδήποτε πηγή",
"openAll": "Άνοιγμα σε καρτέλα",
"empty": "Δεν υπάρχουν ακόμη ειδοποιήσεις.",
"emptyUnread": "Είστε όλοι ενημερωμένοι.",
"loadMore": "Φόρτωση περισσότερων"
},
"channels": {
"intro": "Τα κανάλια είναι τα σημεία όπου οι ειδοποιήσεις μπορούν να μεταβούν εκτός Termix. Οι κανόνες παράδοσης επιλέγουν ποιες ειδοποιήσεις τις χρησιμοποιούν.",
"add": "Προσθήκη καναλιού",
"edit": "Επεξεργασία καναλιού",
"test": "Αποστολή δοκιμής",
"testSent": "Εστάλη δοκιμαστική ειδοποίηση",
"testFailed": "Η δοκιμή απέτυχε: {{error}}",
"deleteConfirm": "Διαγραφή του καναλιού \"{{name}}\";",
"deleted": "Το κανάλι διαγράφηκε",
"empty": "Δεν υπάρχουν ακόμη κανάλια.",
"enabled": "Ενεργοποιημένο",
"needsSave": "Αυτό το κανάλι πρέπει να ανοιχτεί και να αποθηκευτεί ξανά πριν από την αποστολή.",
"name": "Ονομα",
"nameRequired": "Απαιτείται όνομα",
"type": "Τύπος",
"types": {
"webhook": "Ιστότοπος",
"ntfy": "ntfy",
"discord": "Διχόνοια",
"email": "E-mail"
},
"emailUnavailable": "Το ηλεκτρονικό ταχυδρομείο χρειάζεται έναν διακομιστή SMTP, τον οποίο ρυθμίζει ένας διαχειριστής στις ρυθμίσεις Ειδοποιήσεων.",
"webhookUrl": "URL",
"webhookHint": "Λαμβάνει ένα σώμα JSON για κάθε ειδοποίηση.",
"method": "Μέθοδος",
"headers": "Κεφαλίδες",
"headersHint": "Ένα ανά γραμμή, όπως Όνομα: τιμή.",
"ntfyServer": "URL διακομιστή",
"ntfyTopic": "Θέμα",
"ntfyToken": "Διακριτικό πρόσβασης (προαιρετικό)",
"discordUrl": "URL webhook του Discord",
"discordHint": "Από τις ρυθμίσεις του καναλιού στο Discord, στην ενότητα Ενσωματώσεις.",
"discordUsername": "Εμφανιζόμενο όνομα (προαιρετικό)",
"discordAvatar": "URL avatar (προαιρετικό)",
"emailTo": "Αποστολή σε",
"emailHint": "Διαχωρίστε περισσότερες από μία διευθύνσεις με κόμματα.",
"privateNetwork": "Να επιτρέπεται μια ιδιωτική διεύθυνση δικτύου",
"privateNetworkHint": "Λειτουργεί μόνο για κεντρικούς υπολογιστές που επιτρέπει ένας διαχειριστής στη λίστα ιδιωτικών τελικών σημείων."
},
"rules": {
"intro": "Ένας κανόνας παράδοσης στέλνει αντίστοιχες ειδοποιήσεις στα κανάλια σας. Οι ειδοποιήσεις παραμένουν πάντα και στα εισερχόμενα.",
"add": "Προσθήκη κανόνα",
"edit": "Επεξεργασία κανόνα",
"empty": "Δεν υπάρχουν ακόμη κανόνες, επομένως οι ειδοποιήσεις εμφανίζονται μόνο στα εισερχόμενα.",
"needChannel": "Προσθέστε πρώτα ένα κανάλι.",
"enabled": "Ενεργοποιημένο",
"name": "Ονομα",
"nameRequired": "Απαιτείται όνομα",
"match": "Ειδοποιήσεις προς αποστολή",
"matchHint": "* για τα πάντα, αυτοματισμούς.* για τα πάντα, από αυτοματισμούς ή ένα συγκεκριμένο είδος.",
"minSeverity": "Τουλάχιστον",
"channels": "Αποστολή σε",
"channelRequired": "Επιλέξτε τουλάχιστον ένα κανάλι",
"deleteConfirm": "Να διαγραφεί ο κανόνας \"{{name}}\";",
"everything": "Πάντα",
"summary": "{{match}}, {{severity}} ή υψηλότερο, έως {{channels}}"
},
"actions": {
"cancel": "Ματαίωση",
"save": "Εκτός",
"saving": "Οικονομία...",
"delete": "Διαγράφω"
},
"widget": {
"name": "Ροή ειδοποιήσεων",
"description": "Οι τελευταίες ειδοποιήσεις σας, με έναν γρήγορο τρόπο για να τις επισημάνετε ως αναγνωσμένες",
"maxItems": "Μέγιστος αριθμός στοιχείων",
"showRead": "Εμφάνιση ειδοποιήσεων ανάγνωσης",
"allClear": "Ορίζοντας είναι σαφής",
"loading": "Φόρτωση..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alertas"
},
"permissions": {
"use": {
"title": "Usar alertas",
"description": "Recibe alertas en tu bandeja de entrada y envíalas a tus propios canales."
}
},
"onboarding": {
"feature": "Alertas",
"featureDesc": "Todas las alertas en una sola bandeja de entrada, enviadas a Discord, ntfy, correo electrónico o un webhook si lo deseas."
},
"settings": {
"group": {
"general": "General",
"email": "Correo electrónico"
},
"admin": {
"announcements": {
"label": "Anuncios de Termix",
"description": "Muestra las novedades del equipo de Termix, como avisos de seguridad y actualizaciones, directamente en la bandeja de entrada de todos."
},
"retentionDays": {
"label": "Mantener alertas durante (días)",
"description": "Las alertas más antiguas se eliminan de todas las bandejas de entrada."
},
"smtpHost": {
"label": "servidor SMTP",
"description": "Necesario para los canales de correo electrónico. Déjelo en blanco para desactivar el correo electrónico.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "puerto SMTP",
"description": "Normalmente 587 con STARTTLS o 465 con TLS."
},
"smtpSecure": {
"label": "Utilice TLS desde el principio.",
"description": "Habilítelo para el puerto 465. Déjelo desactivado para el puerto 587, que se actualiza a TLS automáticamente."
},
"smtpUser": {
"label": "Nombre de usuario SMTP",
"description": "Déjelo en blanco si el servidor no requiere inicio de sesión."
},
"smtpPassword": {
"label": "Contraseña SMTP",
"description": "Almacenado cifrado."
},
"smtpFrom": {
"label": "Desde la dirección",
"description": "Las alertas del remitente provienen de.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "ventanas emergentes de alerta",
"description": "¿Qué alertas nuevas aparecen mientras usas Termix? Siempre llegan a la bandeja de entrada.",
"all": "Todas las alertas",
"warning": "Advertencias y críticas",
"critical": "Solo crítico",
"off": "Ninguna"
}
}
},
"sections": {
"inbox": "Bandeja de entrada",
"channels": "Canales",
"rules": "Normas de entrega"
},
"severity": {
"info": "Información",
"success": "Éxito",
"warning": "Advertencia",
"critical": "Crítico"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Abrir",
"view": "Ver",
"unread": "No leído",
"deliveryFailed_one": "El canal {{count}} falló",
"deliveryFailed_other": "{{count}} canales fallaron",
"markRead": "Marcar como leído",
"markUnread": "Marcar como no leído",
"markAllRead": "Marcar todo como leído",
"delete": "Eliminar",
"clearRead": "Eliminar alertas de lectura",
"cleared_one": "Alerta eliminada {{count}}",
"cleared_other": "Alertas {{count}} eliminadas",
"filterAll": "Revocar todo",
"filterUnread": "No leído",
"anySeverity": "Cualquier gravedad",
"anySource": "Cualquier fuente",
"openAll": "Abrir en una pestaña",
"empty": "Aún no hay alertas.",
"emptyUnread": "Ya estás al día.",
"loadMore": "Cargar más"
},
"channels": {
"intro": "Los canales son donde las alertas pueden enviarse fuera de Termix. Las reglas de entrega determinan qué alertas los utilizan.",
"add": "Agregar canal",
"edit": "Editar canal",
"test": "Enviar una prueba",
"testSent": "Alerta de prueba enviada",
"testFailed": "Prueba fallida: {{error}}",
"deleteConfirm": "¿Eliminar el canal \"{{name}}\"?",
"deleted": "Canal eliminado",
"empty": "Aún no hay canales.",
"enabled": "Activado",
"needsSave": "Este canal debe abrirse y guardarse de nuevo antes de poder enviar mensajes.",
"name": "Nombre",
"nameRequired": "El nombre es obligatorio",
"type": "Tipo",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Correo electrónico"
},
"emailUnavailable": "El correo electrónico necesita un servidor SMTP, que un administrador configura en los ajustes de alertas.",
"webhookUrl": "URL",
"webhookHint": "Obtiene un cuerpo JSON para cada alerta.",
"method": "Método",
"headers": "Encabezados",
"headersHint": "Uno por línea, como Nombre: valor.",
"ntfyServer": "URL del servidor",
"ntfyTopic": "Tema",
"ntfyToken": "Token de acceso (opcional)",
"discordUrl": "URL del webhook de Discord",
"discordHint": "Desde la configuración del canal en Discord, en Integraciones.",
"discordUsername": "Nombre para mostrar (opcional)",
"discordAvatar": "URL del avatar (opcional)",
"emailTo": "Enviar a",
"emailHint": "Separe las direcciones con comas.",
"privateNetwork": "Permitir una dirección de red privada",
"privateNetworkHint": "Solo funciona para los hosts que un administrador haya autorizado en la lista de puntos finales privados."
},
"rules": {
"intro": "Una regla de envío envía alertas coincidentes a tus canales. Las alertas también permanecen siempre en la bandeja de entrada.",
"add": "Agregar regla",
"edit": "Regla de edición",
"empty": "Aún no hay reglas, por lo que las alertas solo aparecen en la bandeja de entrada.",
"needChannel": "Primero añade un canal.",
"enabled": "Activado",
"name": "Nombre",
"nameRequired": "El nombre es obligatorio",
"match": "Alertas para enviar",
"matchHint": "* para todo, automatizaciones.* para todo a partir de automatizaciones, o un tipo exacto.",
"minSeverity": "Al menos",
"channels": "Enviar a",
"channelRequired": "Elige al menos un canal.",
"deleteConfirm": "¿Eliminar la regla \"{{name}}\"?",
"everything": "Todo",
"summary": "{{match}}, {{severity}} o superior, a {{channels}}"
},
"actions": {
"cancel": "Cancelar",
"save": "Guardar",
"saving": "Guardando...",
"delete": "Eliminar"
},
"widget": {
"name": "Feed de alertas",
"description": "Tus últimas alertas, con una forma rápida de marcarlas como leídas.",
"maxItems": "Artículos máximos",
"showRead": "Mostrar alertas de lectura",
"allClear": "Todo correcto",
"loading": "Cargando..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Hälytykset"
},
"permissions": {
"use": {
"title": "Käytä hälytyksiä",
"description": "Saat hälytyksiä sähköpostiisi ja voit lähettää niitä omiin kanaviisi."
}
},
"onboarding": {
"feature": "Hälytykset",
"featureDesc": "Jokainen ilmoitus yhdessä postilaatikossa, lähetettynä Discordiin, ntfyyn, sähköpostiin tai webhookiin, jos haluat."
},
"settings": {
"group": {
"general": "Yleistä",
"email": "Sähköposti"
},
"admin": {
"announcements": {
"label": "Termix-ilmoitukset",
"description": "Näytä Termix-tiimin uutiset, kuten tietoturvailmoitukset ja julkaisut, kaikkien postilaatikossa."
},
"retentionDays": {
"label": "Säilytä hälytykset (päivää)",
"description": "Vanhemmat ilmoitukset poistetaan kaikista postilaatikoista."
},
"smtpHost": {
"label": "SMTP-palvelin",
"description": "Tarvitaan sähköpostikanaville. Jätä tyhjäksi poistaaksesi sähköpostin käytöstä.",
"placeholder": "smtp.esimerkki.com"
},
"smtpPort": {
"label": "SMTP-portti",
"description": "Yleensä 587 STARTTLS:n kanssa tai 465 TLS:n kanssa."
},
"smtpSecure": {
"label": "Käytä TLS:ää alusta alkaen",
"description": "Ota käyttöön portissa 465. Jätä pois käytöstä portissa 587, joka päivittää TLS:ään automaattisesti."
},
"smtpUser": {
"label": "SMTP-käyttäjätunnus",
"description": "Jätä tyhjäksi, jos palvelin ei vaadi kirjautumista."
},
"smtpPassword": {
"label": "SMTP-salasana",
"description": "Tallennettu salattuna."
},
"smtpFrom": {
"label": "Lähettäjän osoite",
"description": "Lähettäjän hälytykset tulevat.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Hälytysikkunat",
"description": "Mitkä uudet hälytykset ilmestyvät Termixin käytön aikana? Ne päätyvät aina postilaatikkoon.",
"all": "Kaikki hälytykset",
"warning": "Varoitukset ja kriittiset",
"critical": "Vain kriittiset",
"off": "Ei mitään"
}
}
},
"sections": {
"inbox": "Saapuneet",
"channels": "Kanavat",
"rules": "Toimitussäännöt"
},
"severity": {
"info": "Tiedot",
"success": "Menestys",
"warning": "Varoitus",
"critical": "Kriittinen"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Avata",
"view": "Näytä",
"unread": "Lukematon",
"deliveryFailed_one": "{{count}} kanava epäonnistui",
"deliveryFailed_other": "{{count}} kanavat epäonnistuivat",
"markRead": "Merkitse luetuksi",
"markUnread": "Merkitse lukemattomaksi",
"markAllRead": "Merkitse kaikki luetuiksi",
"delete": "Poistaa",
"clearRead": "Poista lukuilmoitukset",
"cleared_one": "Poistettu {{count}} -hälytys",
"cleared_other": "Poistetut {{count}} hälytykset",
"filterAll": "Kaikki",
"filterUnread": "Lukematon",
"anySeverity": "Mikä tahansa vakavuusaste",
"anySource": "Mikä tahansa lähde",
"openAll": "Avaa välilehdessä",
"empty": "Ei vielä hälytyksiä.",
"emptyUnread": "Olette kaikki kärryillä.",
"loadMore": "Lataa lisää"
},
"channels": {
"intro": "Kanavat ovat kanavia, joihin hälytykset voivat mennä Termixin ulkopuolelle. Toimitussäännöt valitsevat, mitkä hälytykset niitä käyttävät.",
"add": "Lisää kanava",
"edit": "Muokkaa kanavaa",
"test": "Lähetä testi",
"testSent": "Testihälytys lähetetty",
"testFailed": "Testi epäonnistui: {{error}}",
"deleteConfirm": "Poistetaanko kanava \"{{name}}\"?",
"deleted": "Kanava poistettu",
"empty": "Ei vielä kanavia.",
"enabled": "Käytössä",
"needsSave": "Tämä kanava on avattava ja tallennettava uudelleen ennen kuin se voi lähettää.",
"name": "Nimi",
"nameRequired": "Nimi on pakollinen",
"type": "Tyyppi",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Eripura",
"email": "Sähköposti"
},
"emailUnavailable": "Sähköposti tarvitsee SMTP-palvelimen, jonka järjestelmänvalvoja määrittää hälytysasetuksissa.",
"webhookUrl": "URL-osoite",
"webhookHint": "Hakee JSON-rungon jokaiselle hälytykselle.",
"method": "Menetelmä",
"headers": "Ylätunnisteet",
"headersHint": "Yksi riviä kohden, kuten Nimi: arvo.",
"ntfyServer": "Palvelimen URL-osoite",
"ntfyTopic": "Aihe",
"ntfyToken": "Käyttöoikeustunnus (valinnainen)",
"discordUrl": "Discord-webhookin URL-osoite",
"discordHint": "Kanavan asetuksista Discordissa, Integraatiot-kohdasta.",
"discordUsername": "Näyttönimi (valinnainen)",
"discordAvatar": "Avatarin URL-osoite (valinnainen)",
"emailTo": "Lähetä osoitteeseen",
"emailHint": "Erota useampi kuin yksi osoite pilkulla.",
"privateNetwork": "Salli yksityinen verkko-osoite",
"privateNetworkHint": "Toimii vain isännille, jotka ylläpitäjä sallii yksityisten päätepisteiden luettelossa."
},
"rules": {
"intro": "Toimitussääntö lähettää vastaavat hälytykset kanavillesi. Hälytykset pysyvät aina myös postilaatikossasi.",
"add": "Lisää sääntö",
"edit": "Muokkaa sääntöä",
"empty": "Ei vielä sääntöjä, joten hälytykset näkyvät vain postilaatikossa.",
"needChannel": "Lisää ensin kanava.",
"enabled": "Käytössä",
"name": "Nimi",
"nameRequired": "Nimi on pakollinen",
"match": "Lähetettävät hälytykset",
"matchHint": "* kaikkeen, automaatiot.* kaikkeen automaatioista alkaen tai tietynlaiseen.",
"minSeverity": "Vähintään",
"channels": "Lähetä osoitteeseen",
"channelRequired": "Valitse ainakin yksi kanava",
"deleteConfirm": "Poistetaanko sääntö \"{{name}}\"?",
"everything": "Kaikki",
"summary": "{{match}}, {{severity}} tai korkeampi, arvoon {{channels}}"
},
"actions": {
"cancel": "Peruuttaa",
"save": "Tallentaa",
"saving": "Tallennetaan...",
"delete": "Poistaa"
},
"widget": {
"name": "Hälytyssyöte",
"description": "Uusimmat ilmoituksesi ja nopea tapa merkitä ne luetuiksi",
"maxItems": "Enimmäismäärä esineitä",
"showRead": "Näytä lukuilmoitukset",
"allClear": "Kaikki selvää",
"loading": "Ladataan..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alertes"
},
"permissions": {
"use": {
"title": "Utiliser les alertes",
"description": "Recevez des alertes dans votre boîte de réception et transférez-les sur vos propres canaux."
}
},
"onboarding": {
"feature": "Alertes",
"featureDesc": "Toutes les alertes dans une seule boîte de réception, envoyées sur Discord, ntfy, par e-mail ou via un webhook si vous le souhaitez."
},
"settings": {
"group": {
"general": "Général",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Annonces de Termix",
"description": "Afficher les actualités de l'équipe Termix, telles que les avis de sécurité et les nouvelles versions, dans la boîte de réception de tous."
},
"retentionDays": {
"label": "Conserver les alertes pendant (jours)",
"description": "Les alertes les plus anciennes sont supprimées de chaque boîte de réception."
},
"smtpHost": {
"label": "Serveur SMTP",
"description": "Nécessaire pour les canaux de messagerie. Laisser vide pour désactiver les e-mails.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "Port SMTP",
"description": "Généralement 587 avec STARTTLS ou 465 avec TLS."
},
"smtpSecure": {
"label": "Utilisez TLS dès le début",
"description": "Activez le port 465. Désactivez le port 587, qui passe automatiquement au protocole TLS."
},
"smtpUser": {
"label": "Nom d'utilisateur SMTP",
"description": "Laissez ce champ vide si le serveur ne nécessite pas d'authentification."
},
"smtpPassword": {
"label": "Mot de passe SMTP",
"description": "Stocké de manière cryptée."
},
"smtpFrom": {
"label": "Adresse de départ",
"description": "L'expéditeur des alertes provient de :",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "fenêtres contextuelles d'alerte",
"description": "Quelles nouvelles alertes s'affichent lorsque vous utilisez Termix ? Elles arrivent toujours dans votre boîte de réception.",
"all": "Toutes les alertes",
"warning": "Avertissements et critiques",
"critical": "Critique uniquement",
"off": "Aucune"
}
}
},
"sections": {
"inbox": "Boîte de réception",
"channels": "Canaux",
"rules": "Règles de livraison"
},
"severity": {
"info": "Info",
"success": "Succès",
"warning": "Avertissement",
"critical": "Critique"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Ouvrir",
"view": "Consultation",
"unread": "Non lu",
"deliveryFailed_one": "Le canal {{count}} a échoué",
"deliveryFailed_other": "Les canaux {{count}} ont échoué",
"markRead": "Marquer comme lu",
"markUnread": "Marquer comme non lu",
"markAllRead": "Marquer tout comme lu",
"delete": "Supprimer",
"clearRead": "Supprimer les alertes de lecture",
"cleared_one": "Alerte {{count}} supprimée",
"cleared_other": "Alertes supprimées {{count}}",
"filterAll": "Tout",
"filterUnread": "Non lu",
"anySeverity": "Toute gravité",
"anySource": "Toute source",
"openAll": "Ouvrir dans un onglet",
"empty": "Aucune alerte pour le moment.",
"emptyUnread": "Vous êtes à jour.",
"loadMore": "Charger plus"
},
"channels": {
"intro": "Les canaux permettent aux alertes de sortir de Termix. Les règles de diffusion déterminent quelles alertes les utilisent.",
"add": "Ajouter une chaîne",
"edit": "Modifier la chaîne",
"test": "Envoyer un test",
"testSent": "Alerte de test envoyée",
"testFailed": "Test échoué : {{error}}",
"deleteConfirm": "Supprimer le canal \"{{name}}\"?",
"deleted": "Chaîne supprimée",
"empty": "Aucune chaîne pour le moment.",
"enabled": "Activé",
"needsSave": "Ce canal doit être ouvert et enregistré à nouveau avant de pouvoir envoyer des données.",
"name": "Nom",
"nameRequired": "Le nom est obligatoire",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "E-mail"
},
"emailUnavailable": "La messagerie électronique nécessite un serveur SMTP, que l'administrateur configure dans les paramètres d'alertes.",
"webhookUrl": "URL",
"webhookHint": "Récupère un corps JSON pour chaque alerte.",
"method": "Méthode",
"headers": "En-têtes",
"headersHint": "Une par ligne, comme Nom : valeur.",
"ntfyServer": "URL du serveur",
"ntfyTopic": "Sujet",
"ntfyToken": "Jeton d'accès (facultatif)",
"discordUrl": "URL du webhook Discord",
"discordHint": "Dans les paramètres de la chaîne sur Discord, sous Intégrations.",
"discordUsername": "Nom d'affichage (facultatif)",
"discordAvatar": "URL de l'avatar (facultatif)",
"emailTo": "Envoyer à",
"emailHint": "Séparez les adresses multiples par des virgules.",
"privateNetwork": "Autoriser une adresse réseau privée",
"privateNetworkHint": "Fonctionne uniquement pour les hôtes autorisés par un administrateur dans la liste des points de terminaison privés."
},
"rules": {
"intro": "Une règle de diffusion envoie des alertes correspondantes à vos canaux. Les alertes restent également disponibles dans votre boîte de réception.",
"add": "Ajouter une règle",
"edit": "Règle de modification",
"empty": "Aucune règle n'a encore été définie, les alertes n'apparaissent donc que dans la boîte de réception.",
"needChannel": "Commencez par ajouter un canal.",
"enabled": "Activé",
"name": "Nom",
"nameRequired": "Le nom est obligatoire",
"match": "Alertes à envoyer",
"matchHint": "* Pour tout, les automatisations.* Pour tout ce qui concerne les automatisations, ou un type précis.",
"minSeverity": "Au moins",
"channels": "Envoyer à",
"channelRequired": "Choisissez au moins une chaîne",
"deleteConfirm": "Supprimer la règle \"{{name}}\"?",
"everything": "Tout",
"summary": "{{match}}, {{severity}} ou supérieur, à {{channels}}"
},
"actions": {
"cancel": "Annuler",
"save": "Enregistrer",
"saving": "Enregistrement…",
"delete": "Supprimer"
},
"widget": {
"name": "Flux d'alertes",
"description": "Vos dernières alertes, avec un moyen rapide de les marquer comme lues",
"maxItems": "Articles maximum",
"showRead": "Afficher les alertes de lecture",
"allClear": "Aucune alerte",
"loading": "Chargement..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "התראות"
},
"permissions": {
"use": {
"title": "השתמש בהתראות",
"description": "קבל התראות לתיבת הדואר הנכנס ושלח אותן לערוצים שלך."
}
},
"onboarding": {
"feature": "התראות",
"featureDesc": "כל התראה בתיבת דואר נכנס אחת, נשלחת לדיסקורד, ntfy, אימייל או webhook אם תרצו."
},
"settings": {
"group": {
"general": "כְּלָלִי",
"email": "אֶלֶקטרוֹנִי"
},
"admin": {
"announcements": {
"label": "הכרזות של טרמיקס",
"description": "הצג חדשות מצוות Termix, כמו הודעות אבטחה ושחרורים, בתיבת הדואר הנכנס של כולם."
},
"retentionDays": {
"label": "שמור התראות למשך (ימים)",
"description": "התראות ישנות יותר מוסרות מכל תיבת דואר נכנס."
},
"smtpHost": {
"label": "שרת SMTP",
"description": "נדרש עבור ערוצי דוא\"ל. השאר ריק כדי לכבות את הדוא\"ל.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "יציאת SMTP",
"description": "בדרך כלל 587 עם STARTTLS או 465 עם TLS."
},
"smtpSecure": {
"label": "השתמש ב-TLS מההתחלה",
"description": "הפעל עבור פורט 465. השאר את היציאה כבויה עבור פורט 587, אשר משדרג ל-TLS בעצמו."
},
"smtpUser": {
"label": "שם משתמש של SMTP",
"description": "השאר ריק אם השרת אינו דורש התחברות."
},
"smtpPassword": {
"label": "סיסמת SMTP",
"description": "מאוחסן מוצפן."
},
"smtpFrom": {
"label": "מכתובת",
"description": "התראות השולח מגיעות מ-.",
"placeholder": "טרמיקס <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "חלונות קופצים של התראות",
"description": "אילו התראות חדשות מופיעות בזמן השימוש ב-Termix? הן תמיד מגיעות לתיבת הדואר הנכנס.",
"all": "כל ההתראות",
"warning": "אזהרות ומידע קריטי",
"critical": "קריטי בלבד",
"off": "אַף לֹא אֶחָד"
}
}
},
"sections": {
"inbox": "תיבת הדואר הנכנס",
"channels": "ערוצים",
"rules": "כללי משלוח"
},
"severity": {
"info": "מידע",
"success": "הַצלָחָה",
"warning": "אַזהָרָה",
"critical": "קרִיטִי"
},
"inbox": {
"sourceTermix": "טרמיקס",
"openLink": "לִפְתוֹחַ",
"view": "נוֹף",
"unread": "לא נקרא",
"deliveryFailed_one": "ערוץ {{count}} נכשל",
"deliveryFailed_other": "ערוצים {{count}} נכשלו",
"markRead": "סמן כנקרא",
"markUnread": "סמן כלא נקרא",
"markAllRead": "סמן הכל כנקרא",
"delete": "לִמְחוֹק",
"clearRead": "מחיקת התראות קריאה",
"cleared_one": "התראה {{count}} נמחקה",
"cleared_other": "התראות שנמחקו {{count}}",
"filterAll": "כֹּל",
"filterUnread": "לא נקרא",
"anySeverity": "כל חומרה",
"anySource": "כל מקור",
"openAll": "פתח בכרטיסייה",
"empty": "עדיין אין התראות.",
"emptyUnread": "כולכם שקועים.",
"loadMore": "טען עוד"
},
"channels": {
"intro": "ערוצים הם מקומות שבהם התראות יכולות להגיע מחוץ ל-Termix. כללי מסירה בוחרים אילו התראות משתמשות בהן.",
"add": "הוסף ערוץ",
"edit": "עריכת ערוץ",
"test": "שלח בדיקה",
"testSent": "התראת בדיקה נשלחה",
"testFailed": "הבדיקה נכשלה: {{error}}",
"deleteConfirm": "למחוק את הערוץ \"{{name}}\"?",
"deleted": "הערוץ נמחק",
"empty": "עדיין אין ערוצים.",
"enabled": "מופעל",
"needsSave": "יש לפתוח ולשמור שוב את הערוץ הזה לפני שניתן יהיה לשלוח אותו.",
"name": "שֵׁם",
"nameRequired": "שם נדרש",
"type": "סוּג",
"types": {
"webhook": "וובהוק",
"ntfy": "ntfy",
"discord": "מַחֲלוֹקֶת",
"email": "אֶלֶקטרוֹנִי"
},
"emailUnavailable": "דוא\"ל דורש שרת SMTP, אותו מנהל מערכת מגדיר בהגדרות ההתראות.",
"webhookUrl": "כתובת אתר",
"webhookHint": "מקבל גוף JSON עבור כל התראה.",
"method": "שִׁיטָה",
"headers": "כותרות",
"headersHint": "אחד בכל שורה, כמו שם: ערך.",
"ntfyServer": "כתובת URL של השרת",
"ntfyTopic": "נוֹשֵׂא",
"ntfyToken": "אסימון גישה (אופציונלי)",
"discordUrl": "כתובת אתר של דיסקורד ליצירת קשר עם רשת (webhook)",
"discordHint": "מהגדרות הערוץ בדיסקורד, תחת אינטגרציות.",
"discordUsername": "שם תצוגה (אופציונלי)",
"discordAvatar": "כתובת URL של אווטאר (אופציונלי)",
"emailTo": "שלח אל",
"emailHint": "הפרד יותר מכתובת אחת באמצעות פסיקים.",
"privateNetwork": "אפשר כתובת רשת פרטית",
"privateNetworkHint": "עובד רק עבור מארחים שמנהל מאפשר ברשימת נקודות הקצה הפרטיות."
},
"rules": {
"intro": "כלל מסירה שולח התראות תואמות לערוצים שלך. ההתראות תמיד נשארות גם בתיבת הדואר הנכנס.",
"add": "הוסף כלל",
"edit": "עריכת כלל",
"empty": "עדיין אין כללים, כך שההתראות מופיעות רק בתיבת הדואר הנכנס.",
"needChannel": "הוסף ערוץ קודם.",
"enabled": "מופעל",
"name": "שֵׁם",
"nameRequired": "שם נדרש",
"match": "התראות לשליחה",
"matchHint": "* להכל, אוטומציות.* להכל, החל מאוטומציות, או מסוג אחד מדויק.",
"minSeverity": "לְפָחוֹת",
"channels": "שלח אל",
"channelRequired": "בחר לפחות ערוץ אחד",
"deleteConfirm": "למחוק את הכלל \"{{name}}\"?",
"everything": "הַכֹּל",
"summary": "{{match}}, {{severity}} או גבוה יותר, עד {{channels}}"
},
"actions": {
"cancel": "לְבַטֵל",
"save": "לְהַצִיל",
"saving": "חִסָכוֹן...",
"delete": "לִמְחוֹק"
},
"widget": {
"name": "הזנת התראות",
"description": "ההתראות האחרונות שלך, עם דרך מהירה לסמן אותן כנקראו",
"maxItems": "מקסימום פריטים",
"showRead": "הצג התראות קריאה",
"allClear": "הכל ברור",
"loading": "טְעִינָה..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "अलर्ट्स"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "अलर्ट",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "सामान्य",
"email": "ईमेल"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "कोई नहीं"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "चैनल",
"rules": "Delivery rules"
},
"severity": {
"info": "जानकारी",
"success": "सफल",
"warning": "चेतावनी",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "खोलें",
"view": "देखें",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "हटाएँ",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "सभी",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "सक्षम",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "नाम",
"nameRequired": "नाम आवश्यक है",
"type": "प्रकार",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "ईमेल"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "सर्वर URL",
"ntfyTopic": "विषय",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "सक्षम",
"name": "नाम",
"nameRequired": "नाम आवश्यक है",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "रद्द करें",
"save": "सहेजें",
"saving": "सहेजा जा रहा है...",
"delete": "हटाएँ"
},
"widget": {
"name": "अलर्ट फीड",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "सब ठीक है",
"loading": "लोड हो रहा है..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Riasztások"
},
"permissions": {
"use": {
"title": "Értesítések használata",
"description": "Értesítéseket kaphatsz a beérkező levelek mappájába, és elküldheted azokat a saját csatornáidra."
}
},
"onboarding": {
"feature": "Riasztások",
"featureDesc": "Minden értesítés egy postaládában, továbbítva Discordra, ntfy-ra, e-mailben vagy webhookon, ha szeretnéd."
},
"settings": {
"group": {
"general": "Általános",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix bejelentések",
"description": "Jelenítse meg a Termix csapatától származó híreket, például a biztonsági értesítéseket és kiadásokat, mindenki postaládájában."
},
"retentionDays": {
"label": "Figyelmeztetések megőrzése (nap)",
"description": "A régebbi értesítések minden beérkező üzenetből törlődnek."
},
"smtpHost": {
"label": "SMTP-kiszolgáló",
"description": "E-mail csatornákhoz szükséges. Hagyja üresen az e-mail kikapcsolásához.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP-port",
"description": "Általában 587 STARTTLS-sel vagy 465 TLS-sel."
},
"smtpSecure": {
"label": "Használj TLS-t a kezdetektől fogva",
"description": "Kapcsold be a 465-ös porton. Hagyd kikapcsolva az 587-es porton, amely önmagában frissít TLS-re."
},
"smtpUser": {
"label": "SMTP felhasználónév",
"description": "Hagyja üresen, ha a szerver nem igényel bejelentkezést."
},
"smtpPassword": {
"label": "SMTP jelszó",
"description": "Titkosítva tárolva."
},
"smtpFrom": {
"label": "Feladó címe",
"description": "A feladó értesítései innen érkeznek.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Figyelmeztető felugró ablakok",
"description": "Milyen új értesítések ugranak fel a Termix használata közben? Mindig a beérkezett üzenetek mappába érkeznek.",
"all": "Minden riasztás",
"warning": "Figyelmeztetések és kritikus fontosságú információk",
"critical": "Csak kritikus fontosságú",
"off": "Egyik sem"
}
}
},
"sections": {
"inbox": "Beérkezett üzenetek",
"channels": "Csatornák",
"rules": "Szállítási szabályok"
},
"severity": {
"info": "Információ",
"success": "Siker",
"warning": "Figyelmeztetés",
"critical": "Kritikai"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Nyitott",
"view": "Kilátás",
"unread": "Nem olvasott",
"deliveryFailed_one": "{{count}} csatorna hibás",
"deliveryFailed_other": "{{count}} csatornák hibásak",
"markRead": "Megjelölés olvasottként",
"markUnread": "Megjelölés olvasatlanként",
"markAllRead": "Összes megjelölése olvasottként",
"delete": "Töröl",
"clearRead": "Olvasási értesítések törlése",
"cleared_one": "Törölt {{count}} riasztás",
"cleared_other": "Törölt {{count}} riasztások",
"filterAll": "Minden",
"filterUnread": "Nem olvasott",
"anySeverity": "Bármilyen súlyosságú",
"anySource": "Bármely forrás",
"openAll": "Megnyitás egy lapon",
"empty": "Még nincsenek riasztások.",
"emptyUnread": "Mindennel tisztában vagytok.",
"loadMore": "Továbbiak betöltése"
},
"channels": {
"intro": "A csatornák azok a csatornák, amelyeken keresztül a riasztások a Termixen kívülre kerülhetnek. A kézbesítési szabályok választják ki, hogy mely riasztások használják ezeket a csatornákat.",
"add": "Csatorna hozzáadása",
"edit": "Csatorna szerkesztése",
"test": "Küldj egy tesztet",
"testSent": "Tesztriasztás elküldve",
"testFailed": "Sikertelen teszt: {{error}}",
"deleteConfirm": "Törölni a(z) \"{{name}} \" csatornát?",
"deleted": "Csatorna törölve",
"empty": "Még nincsenek csatornák.",
"enabled": "Engedélyezve",
"needsSave": "Ezt a csatornát újra meg kell nyitni és menteni, mielőtt küldeni tudna.",
"name": "Név",
"nameRequired": "Név megadása kötelező",
"type": "Típus",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Viszály",
"email": "Email"
},
"emailUnavailable": "Az e-mailhez SMTP-kiszolgálóra van szükség, amelyet egy rendszergazda állít be a riasztási beállításokban.",
"webhookUrl": "URL-cím",
"webhookHint": "Minden riasztáshoz JSON törzset kap.",
"method": "Módszer",
"headers": "Fejlécek",
"headersHint": "Soronként egy, például Név: érték.",
"ntfyServer": "Szerver URL-címe",
"ntfyTopic": "Téma",
"ntfyToken": "Hozzáférési token (opcionális)",
"discordUrl": "Discord webhook URL",
"discordHint": "A csatorna beállításaiban a Discordban, az Integrációk alatt.",
"discordUsername": "Megjelenített név (opcionális)",
"discordAvatar": "Avatar URL-címe (opcionális)",
"emailTo": "Küldés ide:",
"emailHint": "Több cím esetén vesszővel válassza el az egyes címeket.",
"privateNetwork": "Privát hálózati cím engedélyezése",
"privateNetworkHint": "Csak azoknál a hosztoknál működik, amelyeket az adminisztrátor engedélyez a privát végpontok listájában."
},
"rules": {
"intro": "A kézbesítési szabály egyező értesítéseket küld a csatornáidra. Az értesítések mindig a beérkezett üzenetek mappájában is maradnak.",
"add": "Szabály hozzáadása",
"edit": "Szabály szerkesztése",
"empty": "Még nincsenek szabályok, így az értesítések csak a beérkező levelek mappában jelennek meg.",
"needChannel": "Először adj hozzá egy csatornát.",
"enabled": "Engedélyezve",
"name": "Név",
"nameRequired": "Név megadása kötelező",
"match": "Küldendő riasztások",
"matchHint": "* mindenre, automatizálásokra.* mindenre az automatizálásoktól kezdve, vagy egy pontos fajtára.",
"minSeverity": "Legalább",
"channels": "Küldés ide:",
"channelRequired": "Válassz legalább egy csatornát",
"deleteConfirm": "Törölni kell a(z) \"{{name}} \" szabályt?",
"everything": "Minden",
"summary": "{{match}}, {{severity}} vagy magasabb, {{channels}}-ra"
},
"actions": {
"cancel": "Mégsem",
"save": "Megtakarítás",
"saving": "Megtakarítás...",
"delete": "Töröl"
},
"widget": {
"name": "Értesítési hírcsatorna",
"description": "Legfrissebb értesítéseid, gyors móddal az olvasottként való megjelölésre",
"maxItems": "Max. tételek",
"showRead": "Olvasási értesítések megjelenítése",
"allClear": "Minden tiszta",
"loading": "Terhelés..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "General",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "None"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Warning",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Delete",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving...",
"delete": "Delete"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Loading..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Avvisi"
},
"permissions": {
"use": {
"title": "Utilizzare gli avvisi",
"description": "Ricevi notifiche nella casella di posta e inoltrale ai tuoi canali."
}
},
"onboarding": {
"feature": "Avvisi",
"featureDesc": "Tutte le notifiche in un'unica casella di posta, inviate anche a Discord, ntfy, via email o tramite webhook, a seconda delle tue preferenze."
},
"settings": {
"group": {
"general": "Generale",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Comunicazioni di Termix",
"description": "Mostra le notizie del team Termix, come avvisi di sicurezza e rilasci, direttamente nella casella di posta di tutti."
},
"retentionDays": {
"label": "Mantieni gli avvisi per (giorni)",
"description": "Gli avvisi più vecchi vengono rimossi da tutte le caselle di posta."
},
"smtpHost": {
"label": "server SMTP",
"description": "Necessario per i canali email. Lasciare vuoto per disattivare le email.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "porta SMTP",
"description": "Solitamente 587 con STARTTLS o 465 con TLS."
},
"smtpSecure": {
"label": "Utilizzare TLS fin dall'inizio",
"description": "Attivare la porta 465. Disattivare la porta 587, che si aggiorna automaticamente a TLS."
},
"smtpUser": {
"label": "nome utente SMTP",
"description": "Lascia vuoto se il server non richiede l'accesso tramite login."
},
"smtpPassword": {
"label": "password SMTP",
"description": "Archiviato in forma crittografata."
},
"smtpFrom": {
"label": "Da indirizzo",
"description": "Gli avvisi del mittente provengono da.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "popup di avviso",
"description": "Quali nuovi avvisi compaiono mentre usi Termix? Arrivano sempre nella tua casella di posta.",
"all": "Tutti gli avvisi",
"warning": "avvertimenti e critici",
"critical": "Solo critico",
"off": "Nessuno"
}
}
},
"sections": {
"inbox": "Posta in arrivo",
"channels": "Canali",
"rules": "Regole di consegna"
},
"severity": {
"info": "Info",
"success": "Successo",
"warning": "Attenzione",
"critical": "Critico"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Apri",
"view": "Visualizza",
"unread": "Non letto",
"deliveryFailed_one": "{{count}} canale non riuscito",
"deliveryFailed_other": "{{count}} canali non funzionanti",
"markRead": "Segna come letto",
"markUnread": "Segna come non letto",
"markAllRead": "Segna tutto come letto",
"delete": "Elimina",
"clearRead": "Elimina gli avvisi di lettura",
"cleared_one": "Avviso eliminato {{count}}",
"cleared_other": "Avvisi eliminati {{count}}",
"filterAll": "Tutte",
"filterUnread": "Non letto",
"anySeverity": "Qualsiasi gravità",
"anySource": "Qualsiasi fonte",
"openAll": "Apri in una scheda",
"empty": "Nessun avviso per ora.",
"emptyUnread": "Sei al corrente di tutto.",
"loadMore": "Carica altro"
},
"channels": {
"intro": "I canali sono i punti in cui gli avvisi possono essere inviati al di fuori di Termix. Le regole di consegna selezionano quali avvisi li utilizzano.",
"add": "Aggiungi canale",
"edit": "Modifica canale",
"test": "Invia un test",
"testSent": "Avviso di prova inviato",
"testFailed": "Test fallito: {{error}}",
"deleteConfirm": "Eliminare il canale \"{{name}}\"?",
"deleted": "Canale eliminato",
"empty": "Ancora nessun canale disponibile.",
"enabled": "Abilitato",
"needsSave": "Questo canale deve essere aperto e salvato nuovamente prima di poter inviare messaggi.",
"name": "Nome",
"nameRequired": "Nome obbligatorio",
"type": "Tipo",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Per l'invio di email è necessario un server SMTP, che l'amministratore configura nelle impostazioni degli avvisi.",
"webhookUrl": "URL",
"webhookHint": "Recupera un corpo JSON per ogni avviso.",
"method": "Metodo",
"headers": "Intestazioni",
"headersHint": "Uno per riga, ad esempio Nome: valore.",
"ntfyServer": "URL server",
"ntfyTopic": "Argomento",
"ntfyToken": "Token di accesso (facoltativo)",
"discordUrl": "URL del webhook di Discord",
"discordHint": "Dalle impostazioni del canale su Discord, alla voce Integrazioni.",
"discordUsername": "Nome visualizzato (facoltativo)",
"discordAvatar": "URL dell'avatar (facoltativo)",
"emailTo": "Invia a",
"emailHint": "Separare gli indirizzi con delle virgole.",
"privateNetwork": "Consentire un indirizzo di rete privato",
"privateNetworkHint": "Funziona solo per gli host che un amministratore consente nell'elenco degli endpoint privati."
},
"rules": {
"intro": "Una regola di consegna invia avvisi corrispondenti ai tuoi canali. Gli avvisi rimangono sempre anche nella posta in arrivo.",
"add": "Aggiungi regola",
"edit": "Modifica regola",
"empty": "Non ci sono ancora regole, quindi gli avvisi vengono visualizzati solo nella casella di posta.",
"needChannel": "Aggiungi prima un canale.",
"enabled": "Abilitato",
"name": "Nome",
"nameRequired": "Nome obbligatorio",
"match": "Avvisi da inviare",
"matchHint": "* per tutto, automazioni.* per tutto ciò che riguarda le automazioni, o un tipo specifico.",
"minSeverity": "Almeno",
"channels": "Invia a",
"channelRequired": "Scegli almeno un canale",
"deleteConfirm": "Eliminare la regola \"{{name}}\"?",
"everything": "Qualunque cosa",
"summary": "{{match}}, {{severity}} o superiore, a {{channels}}"
},
"actions": {
"cancel": "Annulla",
"save": "Salva",
"saving": "Salvando...",
"delete": "Elimina"
},
"widget": {
"name": "Feed degli avvisi",
"description": "I tuoi ultimi avvisi, con un modo rapido per contrassegnarli come letti.",
"maxItems": "Numero massimo di elementi",
"showRead": "Mostra gli avvisi di lettura",
"allClear": "Tutto a posto",
"loading": "Caricamento in corso..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "アラート"
},
"permissions": {
"use": {
"title": "アラートを使用する",
"description": "受信トレイでアラートを受け取り、自分のチャンネルに送信できます。"
}
},
"onboarding": {
"feature": "アラート",
"featureDesc": "すべてのアラートを1つの受信トレイに集約し、必要に応じてDiscord、ntfy、メール、またはWebhookに送信します。"
},
"settings": {
"group": {
"general": "全般",
"email": "メールアドレス"
},
"admin": {
"announcements": {
"label": "Termixのお知らせ",
"description": "セキュリティに関する通知やリリースなど、Termixチームからのニュースを全員の受信トレイに表示します。"
},
"retentionDays": {
"label": "(日間)アラートを保持する",
"description": "古いアラートはすべての受信トレイから削除されます。"
},
"smtpHost": {
"label": "SMTPサーバー",
"description": "メール配信には必須です。メール配信をオフにする場合は空欄のままにしてください。",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTPポート",
"description": "通常、STARTTLSの場合は587番ポート、TLSの場合は465番ポートが使用されます。"
},
"smtpSecure": {
"label": "最初からTLSを使用する",
"description": "ポート465は有効にしてください。ポート587は無効のままにしておいてください。587は自動的にTLSにアップグレードされます。"
},
"smtpUser": {
"label": "SMTPユーザー名",
"description": "サーバーへのログインが不要な場合は、空欄のままにしてください。"
},
"smtpPassword": {
"label": "SMTPパスワード",
"description": "暗号化して保存されます。"
},
"smtpFrom": {
"label": "送信元住所",
"description": "送信者アラートは以下から送信されます。",
"placeholder": "ターミックス <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "アラートポップアップ",
"description": "Termixの使用中に新しいアラートが表示されますか?それらはすべて受信トレイに届きます。",
"all": "すべてのアラート",
"warning": "警告と重大な",
"critical": "クリティカルのみ",
"off": "すべて解除"
}
}
},
"sections": {
"inbox": "受信箱",
"channels": "チャンネル",
"rules": "配送ルール"
},
"severity": {
"info": "情報",
"success": "成功",
"warning": "警告",
"critical": "致命的"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "開く",
"view": "表示",
"unread": "未読",
"deliveryFailed_one": "{{count}} チャネルが失敗しました",
"deliveryFailed_other": "{{count}} チャネルが失敗しました",
"markRead": "既読にする",
"markUnread": "未読としてマークする",
"markAllRead": "すべて既読にする",
"delete": "削除",
"clearRead": "既読アラートを削除する",
"cleared_one": "削除済み {{count}} アラート",
"cleared_other": "削除された {{count}} アラート",
"filterAll": "すべて選択",
"filterUnread": "未読",
"anySeverity": "重症度は問わない",
"anySource": "あらゆる情報源",
"openAll": "タブで開く",
"empty": "まだアラートはありません。",
"emptyUnread": "皆さんは最新情報に追いつきました。",
"loadMore": "もっと読み込む"
},
"channels": {
"intro": "チャネルとは、アラートをTermix外部に送信する場所です。配信ルールによって、どのアラートがチャネルを使用するかが決定されます。",
"add": "チャンネルを追加",
"edit": "チャンネルを編集",
"test": "テストを送信",
"testSent": "テストアラートが送信されました",
"testFailed": "テスト失敗: {{error}}",
"deleteConfirm": "チャンネル「{{name}}」を削除しますか?",
"deleted": "チャンネルが削除されました",
"empty": "まだチャンネルはありません。",
"enabled": "有効",
"needsSave": "このチャンネルは、送信する前に再度開いて保存する必要があります。",
"name": "名前",
"nameRequired": "名前は必須です",
"type": "タイプ",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "メールアドレス"
},
"emailUnavailable": "メール送信にはSMTPサーバーが必要で、管理者がアラート設定で設定します。",
"webhookUrl": "URL",
"webhookHint": "アラートごとにJSON形式の本文を取得します。",
"method": "方法",
"headers": "ヘッダー",
"headersHint": "1行に1つずつ、例:名前:値。",
"ntfyServer": "サーバーURL",
"ntfyTopic": "トピック",
"ntfyToken": "アクセストークン(任意)",
"discordUrl": "DiscordウェブフックURL",
"discordHint": "Discordのチャンネル設定の「統合」セクションから設定できます。",
"discordUsername": "表示名(任意)",
"discordAvatar": "アバターのURL(任意)",
"emailTo": "送信先",
"emailHint": "複数の住所を入力する場合は、カンマで区切ってください。",
"privateNetwork": "プライベートネットワークアドレスを許可する",
"privateNetworkHint": "管理者がプライベートエンドポイントリストで許可したホストでのみ機能します。"
},
"rules": {
"intro": "配信ルールを設定すると、該当するアラートが指定したチャネルに送信されます。アラートは常に受信トレイにも残ります。",
"add": "ルールを追加する",
"edit": "ルールを編集する",
"empty": "まだルールが設定されていないため、アラートは受信トレイにのみ表示されます。",
"needChannel": "まずチャンネルを追加してください。",
"enabled": "有効",
"name": "名前",
"nameRequired": "名前は必須です",
"match": "送信するアラート",
"matchHint": "* すべてに対して、自動化。* 自動化からのすべて、または特定の種類のもの。",
"minSeverity": "少なくとも",
"channels": "送信先",
"channelRequired": "少なくとも1つのチャンネルを選択してください",
"deleteConfirm": "ルール「{{name}}」を削除しますか?",
"everything": "すべて",
"summary": "{{match}}、 {{severity}} 以上、 {{channels}}まで"
},
"actions": {
"cancel": "キャンセル",
"save": "保存",
"saving": "保存中...",
"delete": "削除"
},
"widget": {
"name": "アラートフィード",
"description": "最新のアラートを既読にする簡単な方法",
"maxItems": "最大アイテム数",
"showRead": "既読通知を表示する",
"allClear": "すべて正常",
"loading": "読み込み中..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "알림"
},
"permissions": {
"use": {
"title": "알림 기능을 사용하세요",
"description": "받은 편지함으로 알림을 받고, 원하는 채널로도 알림을 보낼 수 있습니다."
}
},
"onboarding": {
"feature": "알림",
"featureDesc": "모든 알림은 하나의 받은 편지함에 모이며, 원하시면 Discord, ntfy, 이메일 또는 웹훅으로 전송됩니다."
},
"settings": {
"group": {
"general": "일반",
"email": "이메일"
},
"admin": {
"announcements": {
"label": "Termix 공지사항",
"description": "보안 공지 및 릴리스와 같은 Termix 팀의 소식을 모든 사람의 받은 편지함에 표시합니다."
},
"retentionDays": {
"label": "(일) 동안 알림을 유지하세요",
"description": "오래된 알림은 모든 받은 편지함에서 삭제됩니다."
},
"smtpHost": {
"label": "SMTP 서버",
"description": "이메일 채널에 필요합니다. 이메일 기능을 끄려면 비워 두세요.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP 포트",
"description": "일반적으로 STARTTLS를 사용하는 경우 587, TLS를 사용하는 경우 465입니다."
},
"smtpSecure": {
"label": "처음부터 TLS를 사용하세요",
"description": "포트 465에 대해서는 활성화하십시오. 포트 587은 자동으로 TLS로 업그레이드되므로 비활성화 상태로 두십시오."
},
"smtpUser": {
"label": "SMTP 사용자 이름",
"description": "서버에 로그인이 필요하지 않은 경우 비워 두십시오."
},
"smtpPassword": {
"label": "SMTP 비밀번호",
"description": "암호화되어 저장됩니다."
},
"smtpFrom": {
"label": "발신 주소",
"description": "발신자 알림은 다음에서 옵니다.",
"placeholder": "터믹스 <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "알림 팝업",
"description": "Termix를 사용하는 동안 어떤 새로운 알림이 뜨는지 확인하세요. 모든 알림은 받은 편지함에 표시됩니다.",
"all": "모든 알림",
"warning": "경고 및 중요 사항",
"critical": "중요 정보만",
"off": "전체 해제"
}
}
},
"sections": {
"inbox": "받은편지함",
"channels": "채널",
"rules": "배송 규칙"
},
"severity": {
"info": "정보",
"success": "성공",
"warning": "경고",
"critical": "비판적인"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "열기",
"view": "보기",
"unread": "읽히지 않는",
"deliveryFailed_one": "{{count}} 채널 실패",
"deliveryFailed_other": "{{count}} 채널이 실패했습니다",
"markRead": "읽음으로 표시",
"markUnread": "읽지 않음으로 표시",
"markAllRead": "모두 읽음으로 표시",
"delete": "삭제",
"clearRead": "읽음 알림 삭제",
"cleared_one": "삭제됨 {{count}} 알림",
"cleared_other": "삭제된 {{count}} 알림",
"filterAll": "모두",
"filterUnread": "읽히지 않는",
"anySeverity": "심각도와 관계없이",
"anySource": "어떤 출처든",
"openAll": "탭에서 열기",
"empty": "아직 알림이 없습니다.",
"emptyUnread": "이제 모든 내용을 따라잡으셨군요.",
"loadMore": "더 보기"
},
"channels": {
"intro": "채널은 알림이 Termix 외부로 전달될 수 있는 경로입니다. 전달 규칙은 어떤 알림이 이러한 채널을 사용할지 결정합니다.",
"add": "채널 추가",
"edit": "채널 편집",
"test": "테스트를 보내세요",
"testSent": "테스트 알림이 전송되었습니다.",
"testFailed": "테스트 실패: {{error}}",
"deleteConfirm": "채널 \"{{name}} \"을 삭제하시겠습니까?",
"deleted": "채널이 삭제되었습니다",
"empty": "아직 채널이 없습니다.",
"enabled": "사용",
"needsSave": "이 채널은 전송하기 전에 다시 열고 저장해야 합니다.",
"name": "이름",
"nameRequired": "이름은 필수입니다",
"type": "유형",
"types": {
"webhook": "웹훅",
"ntfy": "ntfy",
"discord": "Discord",
"email": "이메일"
},
"emailUnavailable": "이메일을 보내려면 SMTP 서버가 필요하며, 관리자는 알림 설정에서 이를 설정합니다.",
"webhookUrl": "URL",
"webhookHint": "모든 알림에 대한 JSON 본문을 가져옵니다.",
"method": "방법",
"headers": "헤더",
"headersHint": "이름: 값 형식으로 한 줄에 하나씩 입력합니다.",
"ntfyServer": "서버 URL",
"ntfyTopic": "토픽",
"ntfyToken": "액세스 토큰(선택 사항)",
"discordUrl": "디스코드 웹훅 URL",
"discordHint": "디스코드 채널 설정의 '통합' 메뉴에서 확인할 수 있습니다.",
"discordUsername": "표시 이름 (선택 사항)",
"discordAvatar": "아바타 URL (선택 사항)",
"emailTo": "보내기",
"emailHint": "여러 주소를 입력할 경우 쉼표로 구분하세요.",
"privateNetwork": "사설 네트워크 주소를 허용합니다",
"privateNetworkHint": "관리자가 개인 엔드포인트 목록에 허용한 호스트에서만 작동합니다."
},
"rules": {
"intro": "전송 규칙은 일치하는 알림을 채널로 보냅니다. 알림은 항상 받은 편지함에 보관됩니다.",
"add": "규칙 추가",
"edit": "규칙 편집",
"empty": "아직 규칙이 설정되지 않아 알림은 받은 편지함에만 표시됩니다.",
"needChannel": "먼저 채널을 추가하세요.",
"enabled": "사용",
"name": "이름",
"nameRequired": "이름은 필수입니다",
"match": "보낼 알림",
"matchHint": "*모든 것을 위한 자동화.* 자동화를 통한 모든 것, 또는 정확히 한 가지 유형.",
"minSeverity": "적어도",
"channels": "보내기",
"channelRequired": "채널 하나 이상을 선택하세요",
"deleteConfirm": "규칙 \"{{name}} \"을 삭제하시겠습니까?",
"everything": "모든 것",
"summary": "{{match}}, {{severity}} 이상, {{channels}}까지"
},
"actions": {
"cancel": "취소",
"save": "저장",
"saving": "저장 중...",
"delete": "삭제"
},
"widget": {
"name": "알림 피드",
"description": "최신 알림과 읽음 표시 기능을 간편하게 이용하세요.",
"maxItems": "최대 항목",
"showRead": "읽음 알림 표시",
"allClear": "모두 정상",
"loading": "로딩 중..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Waarschuwingen"
},
"permissions": {
"use": {
"title": "Gebruik waarschuwingen",
"description": "Ontvang meldingen in je inbox en deel ze via je eigen kanalen."
}
},
"onboarding": {
"feature": "Waarschuwingen",
"featureDesc": "Alle meldingen in één inbox, die je desgewenst kunt doorsturen naar Discord, ntfy, e-mail of een webhook."
},
"settings": {
"group": {
"general": "Algemeen",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Termix-aankondigingen",
"description": "Toon nieuws van het Termix-team, zoals beveiligingsmeldingen en releases, in ieders inbox."
},
"retentionDays": {
"label": "Houd meldingen aan voor (dagen)",
"description": "Oudere meldingen worden uit alle inboxen verwijderd."
},
"smtpHost": {
"label": "SMTP-server",
"description": "Nodig voor e-mailkanalen. Laat dit veld leeg om e-mail uit te schakelen.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP-poort",
"description": "Meestal poort 587 met STARTTLS of 465 met TLS."
},
"smtpSecure": {
"label": "Gebruik TLS vanaf het begin.",
"description": "Schakel poort 465 in. Laat deze uitgeschakeld voor poort 587, die automatisch overschakelt naar TLS."
},
"smtpUser": {
"label": "SMTP-gebruikersnaam",
"description": "Laat dit veld leeg als er geen inloggegevens nodig zijn voor de server."
},
"smtpPassword": {
"label": "SMTP-wachtwoord",
"description": "Versleuteld opgeslagen."
},
"smtpFrom": {
"label": "Van adres",
"description": "De afzenderwaarschuwingen zijn afkomstig van.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Waarschuwingspop-ups",
"description": "Welke nieuwe meldingen verschijnen er tijdens het gebruik van Termix? Ze komen altijd in je inbox terecht.",
"all": "Alle meldingen",
"warning": "Waarschuwingen en kritieke",
"critical": "Alleen kritisch",
"off": "Geen"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Kanalen",
"rules": "Leveringsregels"
},
"severity": {
"info": "Informatie",
"success": "Succes",
"warning": "Waarschuwing",
"critical": "Kritisch"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "Weergave",
"unread": "Ongelezen",
"deliveryFailed_one": "{{count}} kanaal mislukt",
"deliveryFailed_other": "{{count}} kanalen mislukt",
"markRead": "Markeer als gelezen",
"markUnread": "Markeer als ongelezen",
"markAllRead": "Markeer alles als gelezen",
"delete": "Verwijderen",
"clearRead": "Leeswaarschuwingen verwijderen",
"cleared_one": "Verwijderde {{count}} melding",
"cleared_other": "Verwijderde {{count}} -waarschuwingen",
"filterAll": "Alle",
"filterUnread": "Ongelezen",
"anySeverity": "Elke ernst",
"anySource": "Elke bron",
"openAll": "Openen in een tabblad",
"empty": "Nog geen meldingen.",
"emptyUnread": "Je bent helemaal bij.",
"loadMore": "Meer laden"
},
"channels": {
"intro": "Kanalen zijn de plekken waar meldingen buiten Termix naartoe kunnen worden gestuurd. Leveringsregels bepalen welke meldingen via deze kanalen worden verzonden.",
"add": "Voeg kanaal toe",
"edit": "Bewerk het kanaal",
"test": "Stuur een test",
"testSent": "Testwaarschuwing verzonden",
"testFailed": "Test mislukt: {{error}}",
"deleteConfirm": "Verwijder het kanaal \"{{name}}\"?",
"deleted": "Kanaal verwijderd",
"empty": "Nog geen kanalen.",
"enabled": "Ingeschakeld",
"needsSave": "Dit kanaal moet opnieuw worden geopend en opgeslagen voordat er berichten kunnen worden verzonden.",
"name": "Naam",
"nameRequired": "Naam is verplicht",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Meningsverschil",
"email": "E-mail"
},
"emailUnavailable": "Voor e-mail is een SMTP-server nodig, die een beheerder instelt in de waarschuwingsinstellingen.",
"webhookUrl": "URL",
"webhookHint": "Ontvangt een JSON-body voor elke melding.",
"method": "Methode",
"headers": "Kopteksten",
"headersHint": "Eén per regel, bijvoorbeeld: Naam: waarde.",
"ntfyServer": "Server-URL",
"ntfyTopic": "Onderwerp",
"ntfyToken": "Toegangstoken (optioneel)",
"discordUrl": "Discord webhook-URL",
"discordHint": "Via de kanaalinstellingen in Discord, onder Integraties.",
"discordUsername": "Weergavenaam (optioneel)",
"discordAvatar": "Avatar-URL (optioneel)",
"emailTo": "Verzenden naar",
"emailHint": "Scheid meerdere adressen met komma's.",
"privateNetwork": "Sta een privé-netwerkadres toe",
"privateNetworkHint": "Werkt alleen voor hosts die een beheerder toestaat in de lijst met privé-eindpunten."
},
"rules": {
"intro": "Een verzendregel stuurt overeenkomende meldingen naar uw kanalen. De meldingen blijven ook altijd in uw inbox staan.",
"add": "Regel toevoegen",
"edit": "Regel bewerken",
"empty": "Er zijn nog geen regels, dus meldingen verschijnen alleen in de inbox.",
"needChannel": "Voeg eerst een kanaal toe.",
"enabled": "Ingeschakeld",
"name": "Naam",
"nameRequired": "Naam is verplicht",
"match": "Waarschuwingen om te verzenden",
"matchHint": "* voor alles, automatiseringen.* voor alles wat met automatiseringen te maken heeft, of één specifiek type.",
"minSeverity": "Ten minste",
"channels": "Verzenden naar",
"channelRequired": "Kies minstens één kanaal",
"deleteConfirm": "Verwijder de regel \"{{name}}\"?",
"everything": "Alles",
"summary": "{{match}}, {{severity}} of hoger, tot {{channels}}"
},
"actions": {
"cancel": "Annuleren",
"save": "Redden",
"saving": "Besparing...",
"delete": "Verwijderen"
},
"widget": {
"name": "Waarschuwingsfeed",
"description": "Je meest recente meldingen, met een snelle manier om ze als gelezen te markeren.",
"maxItems": "Max items",
"showRead": "Leeswaarschuwingen weergeven",
"allClear": "Alles in orde",
"loading": "Laden..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "Generelt",
"email": "E-post"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "Ingen"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Suksess",
"warning": "Advarsel",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Slett",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Aktivert",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Navn",
"nameRequired": "Navn er påkrevd",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "E-post"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server-URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Aktivert",
"name": "Navn",
"nameRequired": "Navn er påkrevd",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Avbryt",
"save": "Lagre",
"saving": "Lagrer...",
"delete": "Slett"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Laster..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerty"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerty",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "Ogólne",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "Żaden"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Kanały",
"rules": "Delivery rules"
},
"severity": {
"info": "Informacje",
"success": "Powodzenie",
"warning": "Ostrzeżenie",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Otwórz",
"view": "Podgląd",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Usuń",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "Wszystkie",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Kanał usunięty",
"empty": "No channels yet.",
"enabled": "Włączona",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Nazwa",
"nameRequired": "Nazwa jest wymagana",
"type": "Typ",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "E-mail"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "Adres URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Metoda",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Adres URL serwera",
"ntfyTopic": "Temat",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Włączona",
"name": "Nazwa",
"nameRequired": "Nazwa jest wymagana",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Anuluj",
"save": "Zapisz",
"saving": "Zapisywanie...",
"delete": "Usuń"
},
"widget": {
"name": "Kanał alertów",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "Bez alertów",
"loading": "Ładowanie..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "Geral",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "Nenhum"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Atenção",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Apagar",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Tipo",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "URL do Servidor",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancelar",
"save": "Salvar",
"saving": "Salvando...",
"delete": "Apagar"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Carregando..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alertas"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alertas",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "Geral",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "Nenhuma"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Canais",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Sucesso",
"warning": "Aviso",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Abrir",
"view": "Ver",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Eliminar",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "Todas",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Ativado",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Nome",
"nameRequired": "O nome é obrigatório",
"type": "Tipo",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "E-mail"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "URL do servidor",
"ntfyTopic": "Tópico",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Ativado",
"name": "Nome",
"nameRequired": "O nome é obrigatório",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancelar",
"save": "Guardar",
"saving": "A guardar...",
"delete": "Eliminar"
},
"widget": {
"name": "Feed de alertas",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "Tudo em ordem",
"loading": "A carregar..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerte"
},
"permissions": {
"use": {
"title": "Utilizați alertele",
"description": "Primește alerte în căsuța poștală și trimite-le către propriile canale."
}
},
"onboarding": {
"feature": "Alerte",
"featureDesc": "Fiecare alertă într-o singură căsuță poștală, trimisă pe Discord, ntfy, e-mail sau un webhook, dacă dorești."
},
"settings": {
"group": {
"general": "General",
"email": "E-mail"
},
"admin": {
"announcements": {
"label": "Anunțuri Termix",
"description": "Afișează știri de la echipa Termix, cum ar fi notificări de securitate și lansări, în căsuța poștală a tuturor."
},
"retentionDays": {
"label": "Păstrați alertele timp de (zile)",
"description": "Alertele mai vechi sunt eliminate din fiecare inbox."
},
"smtpHost": {
"label": "Server SMTP",
"description": "Necesar pentru canalele de e-mail. Lăsați gol pentru a dezactiva e-mailul.",
"placeholder": "smtp.exemplu.com"
},
"smtpPort": {
"label": "Port SMTP",
"description": "De obicei 587 cu STARTTLS sau 465 cu TLS."
},
"smtpSecure": {
"label": "Folosește TLS de la început",
"description": "Activați portul 465. Lăsați dezactivat portul 587, care face upgrade la TLS de la sine."
},
"smtpUser": {
"label": "Nume de utilizator SMTP",
"description": "Lăsați câmpul gol dacă serverul nu necesită date de autentificare."
},
"smtpPassword": {
"label": "Parolă SMTP",
"description": "Stocat criptat."
},
"smtpFrom": {
"label": "Adresă de la",
"description": "Alertele expeditorului provin de la.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Ferestre pop-up de alertă",
"description": "Ce alerte noi apar în timp ce folosești Termix. Acestea ajung întotdeauna în inbox.",
"all": "Toate alertele",
"warning": "Avertismente și aspecte critice",
"critical": "Numai critice",
"off": "Nici unul"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Canale",
"rules": "Reguli de livrare"
},
"severity": {
"info": "Informații",
"success": "Succes",
"warning": "Avertizare",
"critical": "Critic"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Deschide",
"view": "Vedere",
"unread": "Necitit",
"deliveryFailed_one": "Canalul {{count}} a eșuat",
"deliveryFailed_other": "{{count}} canale au eșuat",
"markRead": "Marchează ca citit",
"markUnread": "Marchează ca necitit",
"markAllRead": "Marchează toate ca citite",
"delete": "Şterge",
"clearRead": "Ștergeți alertele de citire",
"cleared_one": "Alertă {{count}} ștearsă",
"cleared_other": "Alerte {{count}} șterse",
"filterAll": "Toate",
"filterUnread": "Necitit",
"anySeverity": "Orice severitate",
"anySource": "Orice sursă",
"openAll": "Deschide într-o filă",
"empty": "Încă nu există alerte.",
"emptyUnread": "Sunteți cu toții prinși la zi.",
"loadMore": "Încărcați mai multe"
},
"channels": {
"intro": "Canalele sunt locurile prin care alertele pot fi trimise în afara Termix. Regulile de livrare aleg alertele care le utilizează.",
"add": "Adăugați canal",
"edit": "Editați canalul",
"test": "Trimiteți un test",
"testSent": "Alertă de test trimisă",
"testFailed": "Testul a eșuat: {{error}}",
"deleteConfirm": "Ștergeți canalul „{{name}}”?",
"deleted": "Canalul a fost șters",
"empty": "Încă nu există canale.",
"enabled": "Activat",
"needsSave": "Acest canal trebuie deschis și salvat din nou înainte de a putea trimite.",
"name": "Nume",
"nameRequired": "Numele este obligatoriu",
"type": "Tip",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discordie",
"email": "E-mail"
},
"emailUnavailable": "E-mailul necesită un server SMTP, pe care un administrator îl configurează în setările Alerte.",
"webhookUrl": "URL-ul",
"webhookHint": "Obține un corp JSON pentru fiecare alertă.",
"method": "Metodă",
"headers": "Anteturi",
"headersHint": "Unul pe linie, cum ar fi Nume: valoare.",
"ntfyServer": "URL-ul serverului",
"ntfyTopic": "Subiect",
"ntfyToken": "Token de acces (opțional)",
"discordUrl": "Adresa URL a webhook-ului Discord",
"discordHint": "Din setările canalului din Discord, la Integrări.",
"discordUsername": "Nume afișat (opțional)",
"discordAvatar": "URL-ul avatarului (opțional)",
"emailTo": "Trimiteți către",
"emailHint": "Separați mai multe adrese prin virgule.",
"privateNetwork": "Permiteți o adresă de rețea privată",
"privateNetworkHint": "Funcționează doar pentru gazdele permise de un administrator în lista de puncte finale private."
},
"rules": {
"intro": "O regulă de livrare trimite alerte corespunzătoare către canalele dvs. Alertele rămân întotdeauna și în căsuța poștală.",
"add": "Adăugați o regulă",
"edit": "Editați regula",
"empty": "Încă nu există reguli, așa că alertele apar doar în inbox.",
"needChannel": "Adăugați mai întâi un canal.",
"enabled": "Activat",
"name": "Nume",
"nameRequired": "Numele este obligatoriu",
"match": "Alerte de trimis",
"matchHint": "* pentru orice, automatizări. * pentru orice, de la automatizări sau pentru un singur tip exact.",
"minSeverity": "Cel puţin",
"channels": "Trimiteți către",
"channelRequired": "Alege cel puțin un canal",
"deleteConfirm": "Ștergeți regula „{{name}}”?",
"everything": "Tot",
"summary": "{{match}}, {{severity}} sau mai mare, până la {{channels}}"
},
"actions": {
"cancel": "Anula",
"save": "Salva",
"saving": "Economisire...",
"delete": "Şterge"
},
"widget": {
"name": "Flux de alerte",
"description": "Cele mai recente alerte, cu o modalitate rapidă de a le marca ca fiind citite",
"maxItems": "Articole maxime",
"showRead": "Afișează alertele de citire",
"allClear": "Totul este clar",
"loading": "Încărcare..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Оповещения"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Оповещения",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "Общие",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "Ни одного"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Каналы",
"rules": "Delivery rules"
},
"severity": {
"info": "Информация",
"success": "Успех",
"warning": "Предупреждение",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Открыть",
"view": "Просмотр",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Удалить",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "Все",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Включено",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Название",
"nameRequired": "Имя обязательно",
"type": "Тип",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "URL сервера",
"ntfyTopic": "Тема",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Включено",
"name": "Название",
"nameRequired": "Имя обязательно",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Отмена",
"save": "Сохранить",
"saving": "Сохранение…",
"delete": "Удалить"
},
"widget": {
"name": "Лента оповещений",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "Всё в порядке",
"loading": "Загрузка..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "General",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "None"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Warning",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Delete",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving...",
"delete": "Delete"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Loading..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "General",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "None"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Warning",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Delete",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving...",
"delete": "Delete"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Loading..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "General",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "None"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Warning",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Delete",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving...",
"delete": "Delete"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Loading..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Uyarılar"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Uyarılar",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "Genel",
"email": "E-posta"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "Yok"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Kanallar",
"rules": "Delivery rules"
},
"severity": {
"info": "Bilgi",
"success": "Başarılı",
"warning": "Uyarı",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Aç",
"view": "Görüntüle",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Sil",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "Tümü",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Etkin",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Ad",
"nameRequired": "Ad zorunludur",
"type": "Tür",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "E-posta"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Sunucu URL'si",
"ntfyTopic": "Konu",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Etkin",
"name": "Ad",
"nameRequired": "Ad zorunludur",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "İptal",
"save": "Kaydet",
"saving": "Kaydediliyor...",
"delete": "Sil"
},
"widget": {
"name": "Uyarı Akışı",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "Her şey normal",
"loading": "Yükleniyor..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Alerts"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Alerts",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "General",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "None"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Channels",
"rules": "Delivery rules"
},
"severity": {
"info": "Info",
"success": "Success",
"warning": "Warning",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Open",
"view": "View",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Delete",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "All",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Enabled",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Name",
"nameRequired": "Name is required",
"type": "Type",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "Server URL",
"ntfyTopic": "Topic",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Enabled",
"name": "Name",
"nameRequired": "Name is required",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving...",
"delete": "Delete"
},
"widget": {
"name": "Alert Feed",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "All clear",
"loading": "Loading..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "Cảnh báo"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "Cảnh báo",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "Chung",
"email": "Email"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "Không"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "Kênh",
"rules": "Delivery rules"
},
"severity": {
"info": "Thông tin",
"success": "Thành công",
"warning": "Cảnh báo",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "Mở",
"view": "Xem",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "Xóa",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "Tất cả",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "Đã bật",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "Tên",
"nameRequired": "Tên là bắt buộc",
"type": "Loại",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "Email"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "URL máy chủ",
"ntfyTopic": "Chủ đề",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "Đã bật",
"name": "Tên",
"nameRequired": "Tên là bắt buộc",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "Hủy",
"save": "Lưu",
"saving": "Đang lưu...",
"delete": "Xóa"
},
"widget": {
"name": "Luồng cảnh báo",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "Tất cả ổn",
"loading": "Đang tải..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "告警"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "告警",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "常规",
"email": "邮箱"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "全不选"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "通道",
"rules": "Delivery rules"
},
"severity": {
"info": "信息",
"success": "成功",
"warning": "警告",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "打开",
"view": "查看",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "删除",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "全部",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "已启用",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "名称",
"nameRequired": "名称为必填项",
"type": "类型",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "邮箱"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "服务器 URL",
"ntfyTopic": "主题",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "已启用",
"name": "名称",
"nameRequired": "名称为必填项",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "取消",
"save": "保存",
"saving": "保存中...",
"delete": "删除"
},
"widget": {
"name": "告警信息流",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "一切正常",
"loading": "加载中..."
}
}
@@ -0,0 +1,172 @@
{
"nav": {
"alerts": "警示"
},
"permissions": {
"use": {
"title": "Use alerts",
"description": "Get alerts in the inbox and send them to your own channels."
}
},
"onboarding": {
"feature": "警示",
"featureDesc": "Every alert in one inbox, sent on to Discord, ntfy, email or a webhook if you want."
},
"settings": {
"group": {
"general": "一般",
"email": "電子郵件"
},
"admin": {
"announcements": {
"label": "Termix announcements",
"description": "Show news from the Termix team, like security notices and releases, in everyone's inbox."
},
"retentionDays": {
"label": "Keep alerts for (days)",
"description": "Older alerts are removed from every inbox."
},
"smtpHost": {
"label": "SMTP server",
"description": "Needed for email channels. Leave empty to turn email off.",
"placeholder": "smtp.example.com"
},
"smtpPort": {
"label": "SMTP port",
"description": "Usually 587 with STARTTLS or 465 with TLS."
},
"smtpSecure": {
"label": "Use TLS from the start",
"description": "Turn on for port 465. Leave off for 587, which upgrades to TLS on its own."
},
"smtpUser": {
"label": "SMTP username",
"description": "Leave empty if the server does not need a login."
},
"smtpPassword": {
"label": "SMTP password",
"description": "Stored encrypted."
},
"smtpFrom": {
"label": "From address",
"description": "The sender alerts come from.",
"placeholder": "Termix <alerts@example.com>"
}
},
"user": {
"popups": {
"label": "Alert popups",
"description": "Which new alerts pop up while you use Termix. They always land in the inbox.",
"all": "All alerts",
"warning": "Warnings and critical",
"critical": "Critical only",
"off": "取消全選"
}
}
},
"sections": {
"inbox": "Inbox",
"channels": "通道",
"rules": "Delivery rules"
},
"severity": {
"info": "資訊",
"success": "成功",
"warning": "警告",
"critical": "Critical"
},
"inbox": {
"sourceTermix": "Termix",
"openLink": "開啟",
"view": "檢視",
"unread": "Unread",
"deliveryFailed_one": "{{count}} channel failed",
"deliveryFailed_other": "{{count}} channels failed",
"markRead": "Mark as read",
"markUnread": "Mark as unread",
"markAllRead": "Mark all as read",
"delete": "刪除",
"clearRead": "Delete read alerts",
"cleared_one": "Deleted {{count}} alert",
"cleared_other": "Deleted {{count}} alerts",
"filterAll": "全選",
"filterUnread": "Unread",
"anySeverity": "Any severity",
"anySource": "Any source",
"openAll": "Open in a tab",
"empty": "No alerts yet.",
"emptyUnread": "You are all caught up.",
"loadMore": "Load more"
},
"channels": {
"intro": "Channels are where alerts can go outside Termix. Delivery rules pick which alerts use them.",
"add": "Add channel",
"edit": "Edit channel",
"test": "Send a test",
"testSent": "Test alert sent",
"testFailed": "Test failed: {{error}}",
"deleteConfirm": "Delete the channel \"{{name}}\"?",
"deleted": "Channel deleted",
"empty": "No channels yet.",
"enabled": "已啟用",
"needsSave": "This channel needs to be opened and saved again before it can send.",
"name": "名稱",
"nameRequired": "名稱為必填",
"type": "類型",
"types": {
"webhook": "Webhook",
"ntfy": "ntfy",
"discord": "Discord",
"email": "電子郵件"
},
"emailUnavailable": "Email needs an SMTP server, which an admin sets up in the Alerts settings.",
"webhookUrl": "URL",
"webhookHint": "Gets a JSON body for every alert.",
"method": "Method",
"headers": "Headers",
"headersHint": "One per line, like Name: value.",
"ntfyServer": "伺服器 URL",
"ntfyTopic": "主題",
"ntfyToken": "Access token (optional)",
"discordUrl": "Discord webhook URL",
"discordHint": "From the channel's settings in Discord, under Integrations.",
"discordUsername": "Display name (optional)",
"discordAvatar": "Avatar URL (optional)",
"emailTo": "Send to",
"emailHint": "Separate more than one address with commas.",
"privateNetwork": "Allow a private network address",
"privateNetworkHint": "Only works for hosts an admin allows in the private endpoint list."
},
"rules": {
"intro": "A delivery rule sends matching alerts to your channels. Alerts always stay in the inbox too.",
"add": "Add rule",
"edit": "Edit rule",
"empty": "No rules yet, so alerts only show up in the inbox.",
"needChannel": "Add a channel first.",
"enabled": "已啟用",
"name": "名稱",
"nameRequired": "名稱為必填",
"match": "Alerts to send",
"matchHint": "* for everything, automations.* for everything from automations, or one exact kind.",
"minSeverity": "At least",
"channels": "Send to",
"channelRequired": "Pick at least one channel",
"deleteConfirm": "Delete the rule \"{{name}}\"?",
"everything": "Everything",
"summary": "{{match}}, {{severity}} or higher, to {{channels}}"
},
"actions": {
"cancel": "取消",
"save": "儲存",
"saving": "儲存中…",
"delete": "刪除"
},
"widget": {
"name": "警報動態",
"description": "Your latest alerts, with a quick way to mark them read",
"maxItems": "Max items",
"showRead": "Show read alerts",
"allClear": "一切正常",
"loading": "載入中..."
}
}
+149
View File
@@ -0,0 +1,149 @@
{
"id": "alerts",
"name": "Alerts",
"version": "1.0.0",
"description": "One inbox for every alert, with delivery to webhooks, ntfy, Discord and email.",
"author": {
"name": "Termix"
},
"license": "MIT",
"repository": "https://github.com/Termix-SSH/Termix",
"category": "Monitoring",
"icon": "Bell",
"engine": {
"termix": ">=2.9.0",
"api": "1"
},
"capabilities": [
"db:own",
"events:core",
"network:outbound",
"network:serve",
"notify:hub",
"notify:send",
"secrets:own",
"settings:read-core",
"ui:surface"
],
"contributes": {
"tabs": [
{
"id": "alerts",
"titleKey": "nav.alerts",
"icon": "Bell",
"openFrom": ["rail", "palette"]
}
],
"permissions": [
{
"name": "use",
"titleKey": "permissions.use.title",
"descriptionKey": "permissions.use.description",
"defaultRoles": ["admin", "user"]
}
],
"settings": {
"admin": [
{
"key": "announcements",
"type": "boolean",
"group": "settings.group.general",
"labelKey": "settings.admin.announcements.label",
"descriptionKey": "settings.admin.announcements.description",
"default": true
},
{
"key": "retentionDays",
"type": "number",
"group": "settings.group.general",
"labelKey": "settings.admin.retentionDays.label",
"descriptionKey": "settings.admin.retentionDays.description",
"default": 90,
"min": 1,
"max": 3650
},
{
"key": "smtpHost",
"type": "string",
"group": "settings.group.email",
"labelKey": "settings.admin.smtpHost.label",
"descriptionKey": "settings.admin.smtpHost.description",
"placeholderKey": "settings.admin.smtpHost.placeholder",
"default": ""
},
{
"key": "smtpPort",
"type": "number",
"group": "settings.group.email",
"labelKey": "settings.admin.smtpPort.label",
"descriptionKey": "settings.admin.smtpPort.description",
"default": 587,
"min": 1,
"max": 65535
},
{
"key": "smtpSecure",
"type": "boolean",
"group": "settings.group.email",
"labelKey": "settings.admin.smtpSecure.label",
"descriptionKey": "settings.admin.smtpSecure.description",
"default": false
},
{
"key": "smtpUser",
"type": "string",
"group": "settings.group.email",
"labelKey": "settings.admin.smtpUser.label",
"descriptionKey": "settings.admin.smtpUser.description",
"default": ""
},
{
"key": "smtpPassword",
"type": "secret",
"group": "settings.group.email",
"labelKey": "settings.admin.smtpPassword.label",
"descriptionKey": "settings.admin.smtpPassword.description"
},
{
"key": "smtpFrom",
"type": "string",
"group": "settings.group.email",
"labelKey": "settings.admin.smtpFrom.label",
"descriptionKey": "settings.admin.smtpFrom.description",
"placeholderKey": "settings.admin.smtpFrom.placeholder",
"default": ""
}
],
"user": [
{
"key": "popups",
"type": "select",
"labelKey": "settings.user.popups.label",
"descriptionKey": "settings.user.popups.description",
"default": "warning",
"options": [
{
"value": "all",
"labelKey": "settings.user.popups.all"
},
{
"value": "warning",
"labelKey": "settings.user.popups.warning"
},
{
"value": "critical",
"labelKey": "settings.user.popups.critical"
},
{
"value": "off",
"labelKey": "settings.user.popups.off"
}
]
}
]
},
"uses": ["homepage.widgets"]
},
"locales": "locales",
"platforms": ["linux", "win32", "darwin"]
}
@@ -0,0 +1,54 @@
-- alerts 0001: create_alerts
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS `p_alerts_channels` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL,
`name` text NOT NULL,
`type` varchar(32) NOT NULL,
`config` text,
`enabled` boolean NOT NULL DEFAULT true,
`created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
CREATE INDEX `idx_alerts_channels_user` ON `p_alerts_channels` (`user_id`);
CREATE TABLE IF NOT EXISTS `p_alerts_items` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL,
`source` varchar(64) NOT NULL,
`category` varchar(128) NOT NULL,
`severity` varchar(16) NOT NULL,
`title` text NOT NULL,
`body` text,
`link` text,
`context` text,
`dedupe_key` varchar(255),
`deliveries` text,
`read_at` varchar(255),
`created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
CREATE INDEX `idx_alerts_items_user` ON `p_alerts_items` (`user_id`, `created_at`);
CREATE INDEX `idx_alerts_items_unread` ON `p_alerts_items` (`user_id`, `read_at`);
CREATE INDEX `idx_alerts_items_dedupe` ON `p_alerts_items` (`user_id`, `dedupe_key`);
CREATE TABLE IF NOT EXISTS `p_alerts_rules` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL,
`name` text NOT NULL,
`pattern` varchar(128) NOT NULL DEFAULT '*',
`min_severity` varchar(16) NOT NULL DEFAULT 'warning',
`channel_ids` text NOT NULL,
`enabled` boolean NOT NULL DEFAULT true,
`created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
CREATE INDEX `idx_alerts_rules_user` ON `p_alerts_rules` (`user_id`);
CREATE TABLE IF NOT EXISTS `dismissed_alerts` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL,
`alert_id` text NOT NULL,
`dismissed_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
RENAME TABLE `dismissed_alerts` TO `p_alerts_dismissed`;
@@ -0,0 +1,55 @@
-- alerts 0001: create_alerts
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "p_alerts_channels" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL,
"name" text NOT NULL,
"type" varchar(32) NOT NULL,
"config" text,
"enabled" boolean NOT NULL DEFAULT true,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_alerts_channels_user" ON "p_alerts_channels" ("user_id");
CREATE TABLE IF NOT EXISTS "p_alerts_items" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL,
"source" varchar(64) NOT NULL,
"category" varchar(128) NOT NULL,
"severity" varchar(16) NOT NULL,
"title" text NOT NULL,
"body" text,
"link" text,
"context" text,
"dedupe_key" varchar(255),
"deliveries" text,
"read_at" varchar(255),
"created_at" varchar(255) NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_alerts_items_user" ON "p_alerts_items" ("user_id", "created_at");
CREATE INDEX IF NOT EXISTS "idx_alerts_items_unread" ON "p_alerts_items" ("user_id", "read_at");
CREATE INDEX IF NOT EXISTS "idx_alerts_items_dedupe" ON "p_alerts_items" ("user_id", "dedupe_key");
CREATE TABLE IF NOT EXISTS "p_alerts_rules" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL,
"name" text NOT NULL,
"pattern" varchar(128) NOT NULL DEFAULT '*',
"min_severity" varchar(16) NOT NULL DEFAULT 'warning',
"channel_ids" text NOT NULL,
"enabled" boolean NOT NULL DEFAULT true,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_alerts_rules_user" ON "p_alerts_rules" ("user_id");
CREATE TABLE IF NOT EXISTS "dismissed_alerts" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL,
"alert_id" text NOT NULL,
"dismissed_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_dismissed_alerts_user_id" ON "dismissed_alerts" ("user_id");
ALTER TABLE "dismissed_alerts" RENAME TO "p_alerts_dismissed";
+203
View File
@@ -0,0 +1,203 @@
{
"version": 1,
"tables": {
"channels": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"name": {
"type": "text",
"notNull": true
},
"type": {
"type": "varchar",
"length": 32,
"notNull": true
},
"config": {
"type": "encryptedText"
},
"enabled": {
"type": "boolean",
"notNull": true,
"defaultValue": true
},
"createdAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
},
"updatedAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_alerts_channels_user",
"columns": ["userId"]
}
]
},
"items": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"source": {
"type": "varchar",
"length": 64,
"notNull": true
},
"category": {
"type": "varchar",
"length": 128,
"notNull": true
},
"severity": {
"type": "varchar",
"length": 16,
"notNull": true
},
"title": {
"type": "text",
"notNull": true
},
"body": {
"type": "text"
},
"link": {
"type": "text"
},
"context": {
"type": "text"
},
"dedupeKey": {
"type": "varchar",
"length": 255
},
"deliveries": {
"type": "text"
},
"readAt": {
"type": "timestamp"
},
"createdAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_alerts_items_user",
"columns": ["userId", "createdAt"]
},
{
"name": "idx_alerts_items_unread",
"columns": ["userId", "readAt"]
},
{
"name": "idx_alerts_items_dedupe",
"columns": ["userId", "dedupeKey"]
}
]
},
"rules": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"name": {
"type": "text",
"notNull": true
},
"pattern": {
"type": "varchar",
"length": 128,
"notNull": true,
"defaultValue": "*"
},
"minSeverity": {
"type": "varchar",
"length": 16,
"notNull": true,
"defaultValue": "warning"
},
"channelIds": {
"type": "text",
"notNull": true
},
"enabled": {
"type": "boolean",
"notNull": true,
"defaultValue": true
},
"createdAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_alerts_rules_user",
"columns": ["userId"]
}
]
},
"dismissed": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"alertId": {
"type": "text",
"notNull": true
},
"dismissedAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_dismissed_alerts_user_id",
"columns": ["userId"]
}
],
"adopts": "dismissed_alerts"
}
}
}
@@ -0,0 +1,55 @@
-- alerts 0001: create_alerts
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "p_alerts_channels" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL,
"name" text NOT NULL,
"type" text NOT NULL,
"config" text,
"enabled" integer NOT NULL DEFAULT 1,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_alerts_channels_user" ON "p_alerts_channels" ("user_id");
CREATE TABLE IF NOT EXISTS "p_alerts_items" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL,
"source" text NOT NULL,
"category" text NOT NULL,
"severity" text NOT NULL,
"title" text NOT NULL,
"body" text,
"link" text,
"context" text,
"dedupe_key" text,
"deliveries" text,
"read_at" text,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_alerts_items_user" ON "p_alerts_items" ("user_id", "created_at");
CREATE INDEX IF NOT EXISTS "idx_alerts_items_unread" ON "p_alerts_items" ("user_id", "read_at");
CREATE INDEX IF NOT EXISTS "idx_alerts_items_dedupe" ON "p_alerts_items" ("user_id", "dedupe_key");
CREATE TABLE IF NOT EXISTS "p_alerts_rules" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL,
"name" text NOT NULL,
"pattern" text NOT NULL DEFAULT '*',
"min_severity" text NOT NULL DEFAULT 'warning',
"channel_ids" text NOT NULL,
"enabled" integer NOT NULL DEFAULT 1,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_alerts_rules_user" ON "p_alerts_rules" ("user_id");
CREATE TABLE IF NOT EXISTS "dismissed_alerts" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL,
"alert_id" text NOT NULL,
"dismissed_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_dismissed_alerts_user_id" ON "dismissed_alerts" ("user_id");
ALTER TABLE "dismissed_alerts" RENAME TO "p_alerts_dismissed";
+34
View File
@@ -0,0 +1,34 @@
{
"name": "@termix-plugin/alerts",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"build": "termix-plugin build",
"test": "termix-plugin test",
"typecheck": "tsc -p .",
"validate": "termix-plugin validate"
},
"dependencies": {
"lucide-react": "^1.33.0",
"nodemailer": "^10.0.10"
},
"devDependencies": {
"@termix/plugin-sdk": "^1.0.0",
"@testing-library/dom": "^10.4.2",
"@testing-library/react": "^16.3.3",
"@types/node": "^26.2.0",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
"better-sqlite3": "^13.0.3",
"jsdom": "^30.0.1",
"vitest": "^4.1.11"
},
"peerDependencies": {
"@termix/plugin-sdk": "^1.0.0",
"drizzle-orm": "^0.45.2",
"express": "^5.2.1",
"react": "^19.2.8",
"sonner": "^2.0.8"
}
}
+164
View File
@@ -0,0 +1,164 @@
import type { PluginContext } from "@termix/plugin-sdk/backend";
import {
ANNOUNCEMENT_SOURCE,
type AlertItem,
type Severity,
} from "../types.js";
import type { AlertsRepository } from "./repository.js";
export const FEED_URL =
"https://raw.githubusercontent.com/Termix-SSH/Docs/main/termix-alerts.json";
export const REFRESH_MS = 30 * 60 * 1000;
export const ANNOUNCEMENT_CATEGORY = "termix.announcement";
/** One entry of termix-alerts.json, as the Docs repo publishes it. */
export interface Announcement {
id: string;
title: string;
message: string;
expiresAt?: string;
priority?: "low" | "medium" | "high" | "critical";
type?: "info" | "warning" | "error" | "success";
actionUrl?: string;
actionText?: string;
}
export function announcementSeverity(entry: Announcement): Severity {
if (entry.priority === "critical" || entry.type === "error") {
return "critical";
}
if (entry.type === "warning" || entry.priority === "high") return "warning";
if (entry.type === "success") return "success";
return "info";
}
export function parseFeed(raw: unknown, now = Date.now()): Announcement[] {
if (!Array.isArray(raw)) return [];
return raw.filter((entry): entry is Announcement => {
if (!entry || typeof entry !== "object") return false;
const candidate = entry as Record<string, unknown>;
if (typeof candidate.id !== "string" || !candidate.id) return false;
if (typeof candidate.title !== "string") return false;
if (typeof candidate.expiresAt === "string") {
const expires = Date.parse(candidate.expiresAt);
if (Number.isFinite(expires) && expires <= now) return false;
}
return true;
});
}
const dedupeKey = (id: string) => `announcement:${id}`;
/**
* Termix announcements from the Docs repo, brought into each user's inbox
* the first time they look after one is published. A user who deletes one
* never gets it back.
*/
export function createAnnouncements(
ctx: PluginContext,
repository: AlertsRepository,
) {
let feed: Announcement[] = [];
let fetchedAt = 0;
let refreshing: Promise<void> | null = null;
const syncing = new Map<string, Promise<AlertItem[]>>();
async function enabled(): Promise<boolean> {
return (await ctx.settings.get<boolean>("announcements")) !== false;
}
async function refresh(): Promise<void> {
if (refreshing) return refreshing;
refreshing = (async () => {
try {
const response = await ctx.fetch(FEED_URL, {
headers: {
Accept: "application/json",
"User-Agent": "TermixAlertChecker/1.0",
},
timeoutMs: 15_000,
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
feed = parseFeed(await response.json());
} catch (error) {
ctx.log.warn(
`Could not fetch Termix announcements: ${error instanceof Error ? error.message : String(error)}`,
);
} finally {
fetchedAt = Date.now();
refreshing = null;
}
})();
return refreshing;
}
async function current(): Promise<Announcement[]> {
if (!(await enabled())) return [];
if (Date.now() - fetchedAt > REFRESH_MS) await refresh();
return parseFeed(feed);
}
async function syncUser(userId: string): Promise<AlertItem[]> {
const added: AlertItem[] = [];
const active = await current();
if (active.length === 0) return added;
const dismissed = await repository.dismissedIds(userId);
for (const entry of active) {
if (dismissed.has(entry.id)) continue;
if (await repository.hasItemWithKey(userId, dedupeKey(entry.id))) {
continue;
}
added.push(
await repository.insertItem({
userId,
source: ANNOUNCEMENT_SOURCE,
category: ANNOUNCEMENT_CATEGORY,
severity: announcementSeverity(entry),
title: entry.title.slice(0, 200),
body: typeof entry.message === "string" ? entry.message : null,
link:
typeof entry.actionUrl === "string" &&
/^https?:\/\//i.test(entry.actionUrl)
? { url: entry.actionUrl }
: null,
context: {
announcementId: entry.id,
...(entry.actionText ? { actionText: entry.actionText } : {}),
},
dedupeKey: dedupeKey(entry.id),
}),
);
}
return added;
}
return {
refresh,
/** Adds any announcement the user has not seen yet. Returns what was added. */
sync(userId: string): Promise<AlertItem[]> {
const running = syncing.get(userId);
if (running) return running;
const run = syncUser(userId)
.catch((error) => {
ctx.log.warn(
`Could not add announcements to the inbox: ${error instanceof Error ? error.message : String(error)}`,
);
return [] as AlertItem[];
})
.finally(() => syncing.delete(userId));
syncing.set(userId, run);
return run;
},
/** Remembers that the user removed an announcement from their inbox. */
async forget(userId: string, item: AlertItem): Promise<void> {
const id = item.context?.announcementId;
if (item.source === ANNOUNCEMENT_SOURCE && typeof id === "string") {
await repository.dismiss(userId, id);
}
},
};
}
export type Announcements = ReturnType<typeof createAnnouncements>;
+193
View File
@@ -0,0 +1,193 @@
import type {
PluginNotification,
PluginNotifyHub,
PluginNotifyResult,
} from "@termix/plugin-sdk/backend";
import {
isSeverity,
matchesCategory,
severityRank,
type AlertLink,
type DeliveryResult,
} from "../types.js";
import type { AlertsRepository, DeliverableChannel } from "./repository.js";
import {
sendToChannel,
type OutgoingAlert,
type SenderDeps,
} from "./senders.js";
import type { AlertStream } from "./stream.js";
const MAX_TITLE = 200;
const MAX_BODY = 4000;
const MAX_CONTEXT = 8000;
const TAB_ID = /^[a-z0-9][a-z0-9._-]{0,63}$/i;
export interface HubDeps {
repository: AlertsRepository;
stream: AlertStream;
senders: SenderDeps;
}
function clip(value: unknown, max: number): string {
return typeof value === "string" ? value.trim().slice(0, max) : "";
}
export function cleanLink(link: unknown): AlertLink | null {
if (!link || typeof link !== "object") return null;
const { tab, url } = link as Record<string, unknown>;
const clean: AlertLink = {};
if (typeof tab === "string" && TAB_ID.test(tab)) clean.tab = tab;
if (typeof url === "string" && /^https?:\/\/\S+$/i.test(url.trim())) {
clean.url = url.trim().slice(0, 2000);
}
return clean.tab || clean.url ? clean : null;
}
function cleanContext(context: unknown): Record<string, unknown> | null {
if (!context || typeof context !== "object" || Array.isArray(context)) {
return null;
}
try {
const text = JSON.stringify(context);
return text.length <= MAX_CONTEXT
? (JSON.parse(text) as Record<string, unknown>)
: null;
} catch {
return null;
}
}
/** Sends to each channel and reports how each one went. */
export async function deliverToChannels(
targets: DeliverableChannel[],
alert: OutgoingAlert,
senders: SenderDeps,
): Promise<DeliveryResult[]> {
const results: DeliveryResult[] = [];
for (const channel of targets) {
if (!channel.config) {
results.push({
channelId: channel.id,
name: channel.name,
ok: false,
error: "Channel needs to be saved again before it can send",
});
continue;
}
try {
await sendToChannel(
{ type: channel.type, config: channel.config },
alert,
senders,
);
results.push({ channelId: channel.id, name: channel.name, ok: true });
} catch (error) {
results.push({
channelId: channel.id,
name: channel.name,
ok: false,
error: error instanceof Error ? error.message : String(error),
});
}
}
return results;
}
export function createHub(deps: HubDeps): PluginNotifyHub {
const { repository, stream, senders } = deps;
async function deliverOne(
userId: string,
source: string,
notification: PluginNotification,
result: PluginNotifyResult,
): Promise<void> {
const severity = isSeverity(notification.severity)
? notification.severity
: "warning";
const category = clip(notification.category, 128) || source;
const dedupeKey = clip(notification.dedupeKey, 255) || null;
if (dedupeKey && (await repository.hasUnreadWithKey(userId, dedupeKey))) {
return;
}
const title = clip(notification.title, MAX_TITLE) || category;
const body = clip(notification.body, MAX_BODY);
const link = cleanLink(notification.link);
const context = cleanContext(notification.context);
const item = await repository.insertItem({
userId,
source,
category,
severity,
title,
body: body || null,
link,
context,
dedupeKey,
});
result.recipients++;
stream.publish(userId, "item", item);
stream.publish(userId, "unread", {
count: await repository.unreadCount(userId),
});
const wanted = new Set<number>(
(notification.channelIds ?? []).filter(Number.isInteger),
);
for (const rule of await repository.listRules(userId)) {
if (!rule.enabled) continue;
if (severityRank(severity) < severityRank(rule.minSeverity)) continue;
if (!matchesCategory(rule.match, category)) continue;
for (const id of rule.channelIds) wanted.add(id);
}
if (wanted.size === 0) return;
const targets = (await repository.deliverableChannels(userId)).filter(
(channel) => channel.enabled && wanted.has(channel.id),
);
if (targets.length === 0) return;
const deliveries = await deliverToChannels(
targets,
{ title, body, severity, category, source, link, context },
senders,
);
for (const delivery of deliveries) {
if (delivery.ok) result.delivered++;
else {
result.failures.push({
channelId: delivery.channelId,
name: delivery.name,
error: delivery.error ?? "",
});
}
}
await repository.setDeliveries(item.id, deliveries);
stream.publish(userId, "item", { ...item, deliveries });
}
return {
async deliver({ source, recipients, notification }) {
const result: PluginNotifyResult = {
recipients: 0,
delivered: 0,
failures: [],
};
for (const userId of new Set(recipients)) {
await deliverOne(userId, source, notification, result);
}
return result;
},
async channels(userId) {
return (await repository.listChannels(userId)).map((channel) => ({
id: channel.id,
name: channel.name,
type: channel.type,
enabled: channel.enabled,
}));
},
};
}
+84
View File
@@ -0,0 +1,84 @@
import type { Router } from "express";
import type { PluginContext } from "@termix/plugin-sdk/backend";
import { createAnnouncements, REFRESH_MS } from "./announcements.js";
import { createHub } from "./hub.js";
import { readSmtp, sendMail } from "./mail.js";
import { createAlertsRepository } from "./repository.js";
import { registerRoutes } from "./routes.js";
import type { SenderDeps } from "./senders.js";
import { createAlertStream } from "./stream.js";
/** The admin allowlist of private hosts a channel may reach. */
const PRIVATE_ALLOWLIST_KEY = "notification_private_endpoint_allowlist";
const PRUNE_MS = 6 * 60 * 60 * 1000;
const DAY_MS = 24 * 60 * 60 * 1000;
export function parseAllowlist(raw: unknown): string[] {
if (typeof raw !== "string" || !raw) return [];
try {
const value = JSON.parse(raw);
return Array.isArray(value)
? value
.filter((entry): entry is string => typeof entry === "string")
.map((entry) => entry.trim().toLowerCase())
.filter(Boolean)
: [];
} catch {
return [];
}
}
export async function activate(ctx: PluginContext) {
const repository = await createAlertsRepository(ctx.db, ctx.secrets);
const stream = createAlertStream();
ctx.disposables.add(() => stream.closeAll());
const senders: SenderDeps = {
fetch: ctx.fetch,
privateAllowlist: async () =>
parseAllowlist(await ctx.settings.readCore(PRIVATE_ALLOWLIST_KEY)),
smtp: () => readSmtp(ctx),
sendMail,
};
const announcements = createAnnouncements(ctx, repository);
ctx.notify.serve(createHub({ repository, stream, senders }));
registerRoutes(ctx.http.router<Router>(), {
ctx,
repository,
stream,
senders,
announcements,
});
ctx.events.on("user.data_wiped", async (payload) => {
const userId = (payload as { userId?: string } | undefined)?.userId;
if (userId) await repository.wipeUser(userId);
});
const prune = async () => {
const days = Number(await ctx.settings.get("retentionDays"));
const keep = Number.isFinite(days) && days >= 1 ? days : 90;
await repository.pruneItems(
new Date(Date.now() - keep * DAY_MS).toISOString(),
);
};
ctx.schedule.after(60_000, prune);
ctx.schedule.every(PRUNE_MS, prune);
// Users with the app open get a new announcement without reloading.
ctx.schedule.every(REFRESH_MS, async () => {
await announcements.refresh();
for (const userId of stream.users()) {
const added = await announcements.sync(userId);
if (added.length === 0) continue;
for (const item of added) stream.publish(userId, "item", item);
stream.publish(userId, "unread", {
count: await repository.unreadCount(userId),
});
}
});
}
export async function deactivate() {}
+46
View File
@@ -0,0 +1,46 @@
import nodemailer from "nodemailer";
import type { PluginContext } from "@termix/plugin-sdk/backend";
import type { SendMail, SmtpSettings } from "./senders.js";
const str = (value: unknown) => (typeof value === "string" ? value.trim() : "");
/** The admin's SMTP server, or null while it is not set up. */
export async function readSmtp(
ctx: PluginContext,
): Promise<SmtpSettings | null> {
const all = await ctx.settings.getAll("admin");
const host = str(all.smtpHost);
const from = str(all.smtpFrom);
if (!host || !from) return null;
const port = Number(all.smtpPort);
return {
host,
port: Number.isInteger(port) && port > 0 ? port : 587,
secure: all.smtpSecure === true,
user: str(all.smtpUser),
password: typeof all.smtpPassword === "string" ? all.smtpPassword : "",
from,
};
}
export const sendMail: SendMail = async (smtp, message) => {
const transport = nodemailer.createTransport({
host: smtp.host,
port: smtp.port,
secure: smtp.secure,
auth: smtp.user ? { user: smtp.user, pass: smtp.password } : undefined,
connectionTimeout: 15_000,
greetingTimeout: 15_000,
socketTimeout: 30_000,
});
try {
await transport.sendMail({
from: smtp.from,
to: message.to.join(", "),
subject: message.subject,
text: message.text,
});
} finally {
transport.close();
}
};
+552
View File
@@ -0,0 +1,552 @@
import {
and,
desc,
eq,
inArray,
isNotNull,
isNull,
lt,
sql,
} from "drizzle-orm";
import type { PluginDatabase, PluginSecrets } from "@termix/plugin-sdk/backend";
import {
CHANNEL_TYPES,
isSeverity,
type AlertItem,
type AlertLink,
type AlertRule,
type ChannelDetail,
type ChannelSummary,
type ChannelType,
type DeliveryResult,
type Severity,
} from "../types.js";
import {
channels as channelsDef,
dismissed as dismissedDef,
items as itemsDef,
rules as rulesDef,
} from "./tables.js";
/* eslint-disable @typescript-eslint/no-explicit-any */
// Tables come from ctx.db.define, which the SDK hands back untyped, and the
// drizzle handle is the server's own. Typed at this module's edge instead.
type Table = any;
type Drizzle = any;
type Row = Record<string, any>;
/* eslint-enable @typescript-eslint/no-explicit-any */
export interface NewItem {
userId: string;
source: string;
category: string;
severity: Severity;
title: string;
body?: string | null;
link?: AlertLink | null;
context?: Record<string, unknown> | null;
dedupeKey?: string | null;
createdAt?: string;
}
export interface ItemFilter {
unread?: boolean;
source?: string;
severity?: Severity;
limit?: number;
beforeId?: number;
}
/** A channel with its config opened, for delivery. */
export interface DeliverableChannel {
id: number;
name: string;
type: ChannelType;
enabled: boolean;
config: Record<string, unknown> | null;
}
export type AlertsRepository = Awaited<
ReturnType<typeof createAlertsRepository>
>;
type Sealer = Pick<PluginSecrets, "seal" | "unseal">;
function parseJson<T>(value: unknown): T | null {
if (typeof value !== "string" || !value) return null;
try {
return JSON.parse(value) as T;
} catch {
return null;
}
}
function asChannelType(value: unknown): ChannelType {
return (CHANNEL_TYPES as readonly string[]).includes(String(value))
? (value as ChannelType)
: "webhook";
}
function toItem(row: Row): AlertItem {
return {
id: Number(row.id),
source: row.source,
category: row.category,
severity: isSeverity(row.severity) ? row.severity : "info",
title: row.title,
body: row.body ?? null,
link: parseJson<AlertLink>(row.link),
context: parseJson<Record<string, unknown>>(row.context),
deliveries: parseJson<DeliveryResult[]>(row.deliveries),
readAt: row.readAt ?? null,
createdAt: String(row.createdAt),
};
}
function toRule(row: Row): AlertRule {
const channelIds = parseJson<unknown[]>(row.channelIds) ?? [];
return {
id: Number(row.id),
name: row.name,
match: row.pattern,
minSeverity: isSeverity(row.minSeverity) ? row.minSeverity : "warning",
channelIds: channelIds.map(Number).filter(Number.isInteger),
enabled: !!row.enabled,
};
}
export async function createAlertsRepository(
db: PluginDatabase,
secrets: Sealer,
) {
const channels: Table = await db.define(channelsDef);
const items: Table = await db.define(itemsDef);
const rules: Table = await db.define(rulesDef);
const dismissed: Table = await db.define(dismissedDef);
const client = () => db.client<Drizzle>();
/** Inserts one row and returns its id. MySQL has no RETURNING. */
async function insertId(
table: Table,
values: Record<string, unknown>,
): Promise<number> {
const drizzle = await client();
if (db.dialect === "mysql") {
const result = await drizzle.insert(table).values(values);
const header = Array.isArray(result) ? result[0] : result;
return Number(header?.insertId);
}
const rows = await drizzle
.insert(table)
.values(values)
.returning({ id: table.id });
return Number(rows[0].id);
}
/** Null when the config was never sealed here, i.e. still waiting on its upgrade. */
async function openConfig(
stored: string | null,
): Promise<Record<string, unknown> | null> {
if (!stored) return null;
const plain = await secrets.unseal(stored);
return plain ? parseJson<Record<string, unknown>>(plain) : null;
}
async function summarize(row: Row): Promise<ChannelSummary> {
return {
id: Number(row.id),
name: row.name,
type: asChannelType(row.type),
enabled: !!row.enabled,
createdAt: String(row.createdAt),
usable: (await openConfig(row.config)) !== null,
};
}
async function channelRows(userId: string): Promise<Row[]> {
const drizzle = await client();
return drizzle
.select()
.from(channels)
.where(eq(channels.userId, userId))
.orderBy(channels.id);
}
async function findChannelRow(
userId: string,
id: number,
): Promise<Row | null> {
const drizzle = await client();
const [row] = await drizzle
.select()
.from(channels)
.where(and(eq(channels.id, id), eq(channels.userId, userId)));
return row ?? null;
}
const repository = {
async listChannels(userId: string): Promise<ChannelSummary[]> {
return Promise.all((await channelRows(userId)).map(summarize));
},
async getChannel(
userId: string,
id: number,
): Promise<ChannelDetail | null> {
const row = await findChannelRow(userId, id);
if (!row) return null;
const config = await openConfig(row.config);
return {
...(await summarize(row)),
config: config ?? {},
};
},
async deliverableChannels(userId: string): Promise<DeliverableChannel[]> {
const rows = await channelRows(userId);
return Promise.all(
rows.map(async (row) => ({
id: Number(row.id),
name: row.name,
type: asChannelType(row.type),
enabled: !!row.enabled,
config: await openConfig(row.config),
})),
);
},
async createChannel(
userId: string,
input: {
name: string;
type: ChannelType;
config: Record<string, unknown>;
enabled?: boolean;
},
): Promise<number> {
const now = new Date().toISOString();
const id = await insertId(channels, {
userId,
name: input.name,
type: input.type,
config: await secrets.seal(JSON.stringify(input.config)),
enabled: input.enabled !== false,
createdAt: now,
updatedAt: now,
});
await db.persist();
return id;
},
async updateChannel(
userId: string,
id: number,
patch: {
name?: string;
type?: ChannelType;
config?: Record<string, unknown>;
enabled?: boolean;
},
): Promise<boolean> {
if (!(await findChannelRow(userId, id))) return false;
const values: Record<string, unknown> = {
updatedAt: new Date().toISOString(),
};
if (patch.name !== undefined) values.name = patch.name;
if (patch.type !== undefined) values.type = patch.type;
if (patch.enabled !== undefined) values.enabled = patch.enabled;
if (patch.config !== undefined) {
values.config = await secrets.seal(JSON.stringify(patch.config));
}
const drizzle = await client();
await drizzle
.update(channels)
.set(values)
.where(and(eq(channels.id, id), eq(channels.userId, userId)));
await db.persist();
return true;
},
async deleteChannel(userId: string, id: number): Promise<boolean> {
if (!(await findChannelRow(userId, id))) return false;
const drizzle = await client();
await drizzle
.delete(channels)
.where(and(eq(channels.id, id), eq(channels.userId, userId)));
// Rules keep working with the channels they still name.
for (const rule of await repository.listRules(userId)) {
if (!rule.channelIds.includes(id)) continue;
await drizzle
.update(rules)
.set({
channelIds: JSON.stringify(
rule.channelIds.filter((channelId) => channelId !== id),
),
})
.where(eq(rules.id, rule.id));
}
await db.persist();
return true;
},
async insertItem(item: NewItem): Promise<AlertItem> {
const createdAt = item.createdAt ?? new Date().toISOString();
const id = await insertId(items, {
userId: item.userId,
source: item.source,
category: item.category,
severity: item.severity,
title: item.title,
body: item.body ?? null,
link: item.link ? JSON.stringify(item.link) : null,
context: item.context ? JSON.stringify(item.context) : null,
dedupeKey: item.dedupeKey ?? null,
createdAt,
});
await db.persist();
return toItem({
id,
...item,
link: item.link ? JSON.stringify(item.link) : null,
context: item.context ? JSON.stringify(item.context) : null,
deliveries: null,
readAt: null,
createdAt,
});
},
async setDeliveries(id: number, results: DeliveryResult[]): Promise<void> {
const drizzle = await client();
await drizzle
.update(items)
.set({ deliveries: JSON.stringify(results) })
.where(eq(items.id, id));
await db.persist();
},
async hasUnreadWithKey(userId: string, key: string): Promise<boolean> {
const drizzle = await client();
const rows: Row[] = await drizzle
.select({ id: items.id })
.from(items)
.where(
and(
eq(items.userId, userId),
eq(items.dedupeKey, key),
isNull(items.readAt),
),
)
.limit(1);
return rows.length > 0;
},
async hasItemWithKey(userId: string, key: string): Promise<boolean> {
const drizzle = await client();
const rows: Row[] = await drizzle
.select({ id: items.id })
.from(items)
.where(and(eq(items.userId, userId), eq(items.dedupeKey, key)))
.limit(1);
return rows.length > 0;
},
async listItems(
userId: string,
filter: ItemFilter = {},
): Promise<AlertItem[]> {
const conditions = [eq(items.userId, userId)];
if (filter.unread) conditions.push(isNull(items.readAt));
if (filter.source) conditions.push(eq(items.source, filter.source));
if (filter.severity) conditions.push(eq(items.severity, filter.severity));
if (filter.beforeId) conditions.push(lt(items.id, filter.beforeId));
const drizzle = await client();
const rows: Row[] = await drizzle
.select()
.from(items)
.where(and(...conditions))
.orderBy(desc(items.id))
.limit(Math.min(Math.max(filter.limit ?? 50, 1), 200));
return rows.map(toItem);
},
async getItem(userId: string, id: number): Promise<AlertItem | null> {
const drizzle = await client();
const [row] = await drizzle
.select()
.from(items)
.where(and(eq(items.id, id), eq(items.userId, userId)));
return row ? toItem(row) : null;
},
async unreadCount(userId: string): Promise<number> {
const drizzle = await client();
const [row] = await drizzle
.select({ count: sql<number>`count(*)` })
.from(items)
.where(and(eq(items.userId, userId), isNull(items.readAt)));
return Number(row?.count ?? 0);
},
async setRead(
userId: string,
ids: number[] | "all",
read: boolean,
): Promise<void> {
const conditions = [eq(items.userId, userId)];
if (ids !== "all") {
if (ids.length === 0) return;
conditions.push(inArray(items.id, ids));
}
conditions.push(read ? isNull(items.readAt) : isNotNull(items.readAt));
const drizzle = await client();
await drizzle
.update(items)
.set({ readAt: read ? new Date().toISOString() : null })
.where(and(...conditions));
await db.persist();
},
async deleteItem(userId: string, id: number): Promise<AlertItem | null> {
const item = await repository.getItem(userId, id);
if (!item) return null;
const drizzle = await client();
await drizzle
.delete(items)
.where(and(eq(items.id, id), eq(items.userId, userId)));
await db.persist();
return item;
},
/** Deletes the user's read alerts, or every alert. Returns what went. */
async clearItems(userId: string, onlyRead: boolean): Promise<AlertItem[]> {
const conditions = [eq(items.userId, userId)];
if (onlyRead) conditions.push(isNotNull(items.readAt));
const drizzle = await client();
const rows: Row[] = await drizzle
.select()
.from(items)
.where(and(...conditions));
if (rows.length === 0) return [];
await drizzle.delete(items).where(and(...conditions));
await db.persist();
return rows.map(toItem);
},
async pruneItems(olderThan: string): Promise<void> {
const drizzle = await client();
await drizzle.delete(items).where(lt(items.createdAt, olderThan));
await db.persist({ lazy: true });
},
/** Every source and category the user has alerts from, for the rule editor. */
async listCategories(
userId: string,
): Promise<Array<{ source: string; category: string }>> {
const drizzle = await client();
const rows: Row[] = await drizzle
.selectDistinct({ source: items.source, category: items.category })
.from(items)
.where(eq(items.userId, userId));
return rows
.map((row) => ({ source: row.source, category: row.category }))
.sort((a, b) => a.category.localeCompare(b.category));
},
async listRules(userId: string): Promise<AlertRule[]> {
const drizzle = await client();
const rows: Row[] = await drizzle
.select()
.from(rules)
.where(eq(rules.userId, userId))
.orderBy(rules.id);
return rows.map(toRule);
},
async createRule(
userId: string,
input: Omit<AlertRule, "id">,
): Promise<number> {
const id = await insertId(rules, {
userId,
name: input.name,
pattern: input.match,
minSeverity: input.minSeverity,
channelIds: JSON.stringify(input.channelIds),
enabled: input.enabled,
createdAt: new Date().toISOString(),
});
await db.persist();
return id;
},
async updateRule(
userId: string,
id: number,
input: Omit<AlertRule, "id">,
): Promise<boolean> {
const drizzle = await client();
const [row] = await drizzle
.select({ id: rules.id })
.from(rules)
.where(and(eq(rules.id, id), eq(rules.userId, userId)));
if (!row) return false;
await drizzle
.update(rules)
.set({
name: input.name,
pattern: input.match,
minSeverity: input.minSeverity,
channelIds: JSON.stringify(input.channelIds),
enabled: input.enabled,
})
.where(and(eq(rules.id, id), eq(rules.userId, userId)));
await db.persist();
return true;
},
async deleteRule(userId: string, id: number): Promise<boolean> {
const drizzle = await client();
const [row] = await drizzle
.select({ id: rules.id })
.from(rules)
.where(and(eq(rules.id, id), eq(rules.userId, userId)));
if (!row) return false;
await drizzle
.delete(rules)
.where(and(eq(rules.id, id), eq(rules.userId, userId)));
await db.persist();
return true;
},
async dismissedIds(userId: string): Promise<Set<string>> {
const drizzle = await client();
const rows: Row[] = await drizzle
.select({ alertId: dismissed.alertId })
.from(dismissed)
.where(eq(dismissed.userId, userId));
return new Set(rows.map((row) => String(row.alertId)));
},
async dismiss(userId: string, alertId: string): Promise<void> {
if ((await repository.dismissedIds(userId)).has(alertId)) return;
const drizzle = await client();
await drizzle.insert(dismissed).values({
userId,
alertId,
dismissedAt: new Date().toISOString(),
});
await db.persist();
},
/** A user's data was wiped: nothing of theirs stays. */
async wipeUser(userId: string): Promise<void> {
const drizzle = await client();
for (const table of [items, rules, channels, dismissed]) {
await drizzle.delete(table).where(eq(table.userId, userId));
}
await db.persist();
},
};
return repository;
}
+694
View File
@@ -0,0 +1,694 @@
import type { Request, Response, Router } from "express";
import type { PluginContext } from "@termix/plugin-sdk/backend";
import {
CHANNEL_TYPES,
isSeverity,
type AlertRule,
type ChannelType,
} from "../types.js";
import type { Announcements } from "./announcements.js";
import { deliverToChannels } from "./hub.js";
import type { AlertsRepository } from "./repository.js";
import { validateChannelConfig, type SenderDeps } from "./senders.js";
import type { AlertStream } from "./stream.js";
interface RouteDeps {
ctx: PluginContext;
repository: AlertsRepository;
stream: AlertStream;
senders: SenderDeps;
announcements: Announcements;
}
function actor(ctx: PluginContext): string {
// Core's plugin router authenticates every request and runs it as that user.
return ctx.currentActor() as string;
}
function positiveInt(value: unknown): number | null {
const parsed = Number.parseInt(String(value), 10);
return Number.isInteger(parsed) && parsed > 0 ? parsed : null;
}
function isChannelType(value: unknown): value is ChannelType {
return (CHANNEL_TYPES as readonly string[]).includes(String(value));
}
function idList(value: unknown): number[] {
return Array.isArray(value)
? value.map(positiveInt).filter((id): id is number => id !== null)
: [];
}
export function registerRoutes(router: Router, deps: RouteDeps): void {
const { ctx, repository, stream, senders, announcements } = deps;
router.use(ctx.rbac.require("use") as never);
const publishUnread = async (userId: string) => {
stream.publish(userId, "unread", {
count: await repository.unreadCount(userId),
});
};
/**
* @openapi
* /plugin-api/alerts/items:
* get:
* summary: List the caller's alerts
* description: Newest first. Brings in any Termix announcement the caller has not seen yet.
* tags:
* - Alerts
* parameters:
* - in: query
* name: unread
* schema:
* type: boolean
* - in: query
* name: source
* schema:
* type: string
* - in: query
* name: severity
* schema:
* type: string
* enum: [info, success, warning, critical]
* - in: query
* name: limit
* schema:
* type: integer
* - in: query
* name: before
* description: Only alerts with a lower id, for paging.
* schema:
* type: integer
* responses:
* 200:
* description: The alerts and the unread count.
* 403:
* description: Missing the alerts.use permission.
*/
router.get("/items", async (req: Request, res: Response) => {
const userId = actor(ctx);
await announcements.sync(userId);
const severity = isSeverity(req.query.severity)
? req.query.severity
: undefined;
const items = await repository.listItems(userId, {
unread: req.query.unread === "true",
source: typeof req.query.source === "string" ? req.query.source : "",
severity,
limit: positiveInt(req.query.limit) ?? 50,
beforeId: positiveInt(req.query.before) ?? undefined,
});
res.json({ items, unread: await repository.unreadCount(userId) });
});
/**
* @openapi
* /plugin-api/alerts/unread:
* get:
* summary: Count the caller's unread alerts
* tags:
* - Alerts
* responses:
* 200:
* description: The unread count.
*/
router.get("/unread", async (_req: Request, res: Response) => {
const userId = actor(ctx);
await announcements.sync(userId);
res.json({ count: await repository.unreadCount(userId) });
});
/**
* @openapi
* /plugin-api/alerts/stream:
* get:
* summary: Stream new alerts
* description: Server-sent events. Sends "unread" with the count on connect and after every change, and "item" with each new or updated alert.
* tags:
* - Alerts
* responses:
* 200:
* description: An event stream.
*/
router.get("/stream", async (req: Request, res: Response) => {
const userId = actor(ctx);
await announcements.sync(userId);
stream.open(req, res, userId, {
count: await repository.unreadCount(userId),
});
});
/**
* @openapi
* /plugin-api/alerts/items/read:
* post:
* summary: Mark alerts read or unread
* tags:
* - Alerts
* requestBody:
* content:
* application/json:
* schema:
* type: object
* properties:
* ids:
* type: array
* items:
* type: integer
* all:
* type: boolean
* read:
* type: boolean
* description: False marks them unread. Defaults to true.
* responses:
* 200:
* description: The new unread count.
*/
router.post("/items/read", async (req: Request, res: Response) => {
const userId = actor(ctx);
const body = (req.body ?? {}) as Record<string, unknown>;
const read = body.read !== false;
await repository.setRead(
userId,
body.all === true ? "all" : idList(body.ids),
read,
);
await publishUnread(userId);
res.json({ count: await repository.unreadCount(userId) });
});
/**
* @openapi
* /plugin-api/alerts/items/{id}:
* delete:
* summary: Delete an alert
* description: A deleted Termix announcement does not come back.
* tags:
* - Alerts
* parameters:
* - in: path
* name: id
* required: true
* schema:
* type: integer
* responses:
* 200:
* description: Deleted.
* 404:
* description: No such alert for the caller.
*/
router.delete("/items/:id", async (req: Request, res: Response) => {
const userId = actor(ctx);
const id = positiveInt(req.params.id);
const item = id ? await repository.deleteItem(userId, id) : null;
if (!item) return res.status(404).json({ error: "Alert not found" });
await announcements.forget(userId, item);
await publishUnread(userId);
res.json({ success: true });
});
/**
* @openapi
* /plugin-api/alerts/items:
* delete:
* summary: Clear the caller's alerts
* tags:
* - Alerts
* parameters:
* - in: query
* name: read
* description: Only clear alerts already read.
* schema:
* type: boolean
* responses:
* 200:
* description: How many alerts were removed.
*/
router.delete("/items", async (req: Request, res: Response) => {
const userId = actor(ctx);
const removed = await repository.clearItems(
userId,
req.query.read === "true",
);
for (const item of removed) await announcements.forget(userId, item);
await publishUnread(userId);
res.json({ removed: removed.length });
});
/**
* @openapi
* /plugin-api/alerts/categories:
* get:
* summary: List the sources and categories of the caller's alerts
* description: For building delivery rules.
* tags:
* - Alerts
* responses:
* 200:
* description: Source and category pairs.
*/
router.get("/categories", async (_req: Request, res: Response) => {
res.json(await repository.listCategories(actor(ctx)));
});
/**
* @openapi
* /plugin-api/alerts/meta:
* get:
* summary: What channel types this server can use
* tags:
* - Alerts
* responses:
* 200:
* description: The channel types and whether email is set up.
*/
router.get("/meta", async (_req: Request, res: Response) => {
res.json({
emailAvailable: (await senders.smtp()) !== null,
channelTypes: CHANNEL_TYPES,
});
});
/**
* @openapi
* /plugin-api/alerts/channels:
* get:
* summary: List the caller's channels
* description: Without their config.
* tags:
* - Alerts
* responses:
* 200:
* description: The channels.
*/
router.get("/channels", async (_req: Request, res: Response) => {
res.json(await repository.listChannels(actor(ctx)));
});
/**
* @openapi
* /plugin-api/alerts/channels/{id}:
* get:
* summary: Get one of the caller's channels with its config
* tags:
* - Alerts
* parameters:
* - in: path
* name: id
* required: true
* schema:
* type: integer
* responses:
* 200:
* description: The channel.
* 404:
* description: No such channel for the caller.
*/
router.get("/channels/:id", async (req: Request, res: Response) => {
const id = positiveInt(req.params.id);
const channel = id ? await repository.getChannel(actor(ctx), id) : null;
if (!channel) return res.status(404).json({ error: "Channel not found" });
res.json(channel);
});
const readChannel = (
body: Record<string, unknown>,
partial: boolean,
):
| { error: string }
| {
name?: string;
type?: ChannelType;
config?: Record<string, unknown>;
enabled?: boolean;
} => {
const out: {
name?: string;
type?: ChannelType;
config?: Record<string, unknown>;
enabled?: boolean;
} = {};
if (body.name !== undefined || !partial) {
const name = typeof body.name === "string" ? body.name.trim() : "";
if (!name) return { error: "name is required" };
out.name = name.slice(0, 100);
}
if (body.type !== undefined || !partial) {
if (!isChannelType(body.type)) {
return { error: `type must be one of ${CHANNEL_TYPES.join(", ")}` };
}
out.type = body.type;
}
if (body.config !== undefined || !partial) {
if (
!body.config ||
typeof body.config !== "object" ||
Array.isArray(body.config)
) {
return { error: "config is required" };
}
out.config = body.config as Record<string, unknown>;
}
if (body.enabled !== undefined) out.enabled = body.enabled !== false;
return out;
};
/**
* @openapi
* /plugin-api/alerts/channels:
* post:
* summary: Create a channel
* tags:
* - Alerts
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* required: [name, type, config]
* properties:
* name:
* type: string
* type:
* type: string
* enum: [webhook, ntfy, discord, email]
* config:
* type: object
* enabled:
* type: boolean
* responses:
* 201:
* description: The new channel.
* 400:
* description: The channel is not valid.
*/
router.post("/channels", async (req: Request, res: Response) => {
const userId = actor(ctx);
const input = readChannel(
(req.body ?? {}) as Record<string, unknown>,
false,
);
if ("error" in input) return res.status(400).json(input);
const problem = validateChannelConfig(input.type!, input.config!);
if (problem) return res.status(400).json({ error: problem });
const id = await repository.createChannel(userId, {
name: input.name!,
type: input.type!,
config: input.config!,
enabled: input.enabled,
});
res.status(201).json(await repository.getChannel(userId, id));
});
/**
* @openapi
* /plugin-api/alerts/channels/{id}:
* put:
* summary: Update a channel
* tags:
* - Alerts
* parameters:
* - in: path
* name: id
* required: true
* schema:
* type: integer
* requestBody:
* content:
* application/json:
* schema:
* type: object
* properties:
* name:
* type: string
* type:
* type: string
* enum: [webhook, ntfy, discord, email]
* config:
* type: object
* enabled:
* type: boolean
* responses:
* 200:
* description: The updated channel.
* 400:
* description: The channel is not valid.
* 404:
* description: No such channel for the caller.
*/
router.put("/channels/:id", async (req: Request, res: Response) => {
const userId = actor(ctx);
const id = positiveInt(req.params.id);
const existing = id ? await repository.getChannel(userId, id) : null;
if (!id || !existing) {
return res.status(404).json({ error: "Channel not found" });
}
const input = readChannel(
(req.body ?? {}) as Record<string, unknown>,
true,
);
if ("error" in input) return res.status(400).json(input);
const type = input.type ?? existing.type;
if (input.config !== undefined || input.type !== undefined) {
const problem = validateChannelConfig(
type,
input.config ?? existing.config,
);
if (problem) return res.status(400).json({ error: problem });
}
await repository.updateChannel(userId, id, input);
res.json(await repository.getChannel(userId, id));
});
/**
* @openapi
* /plugin-api/alerts/channels/{id}:
* delete:
* summary: Delete a channel
* tags:
* - Alerts
* parameters:
* - in: path
* name: id
* required: true
* schema:
* type: integer
* responses:
* 200:
* description: Deleted.
* 404:
* description: No such channel for the caller.
*/
router.delete("/channels/:id", async (req: Request, res: Response) => {
const id = positiveInt(req.params.id);
const deleted = id ? await repository.deleteChannel(actor(ctx), id) : false;
if (!deleted) return res.status(404).json({ error: "Channel not found" });
res.json({ success: true });
});
/**
* @openapi
* /plugin-api/alerts/channels/{id}/test:
* post:
* summary: Send a test alert to a channel
* description: Takes the same path a real alert does, private network opt-in included.
* tags:
* - Alerts
* parameters:
* - in: path
* name: id
* required: true
* schema:
* type: integer
* responses:
* 200:
* description: Whether the channel accepted it, with the error when it did not.
* 404:
* description: No such channel for the caller.
*/
router.post("/channels/:id/test", async (req: Request, res: Response) => {
const userId = actor(ctx);
const id = positiveInt(req.params.id);
const channel = id
? (await repository.deliverableChannels(userId)).find(
(candidate) => candidate.id === id,
)
: undefined;
if (!channel) return res.status(404).json({ error: "Channel not found" });
const [result] = await deliverToChannels(
[channel],
{
title: "Termix",
body: "This is a test alert from Termix.",
severity: "info",
category: "alerts.test",
source: ctx.pluginId,
context: { sourceName: "Test", triggerType: "test" },
},
senders,
);
res.json(
result.ok ? { success: true } : { success: false, error: result.error },
);
});
const readRule = async (
userId: string,
body: Record<string, unknown>,
): Promise<{ error: string } | Omit<AlertRule, "id">> => {
const name = typeof body.name === "string" ? body.name.trim() : "";
if (!name) return { error: "name is required" };
const match =
typeof body.match === "string" && body.match.trim()
? body.match.trim().slice(0, 128)
: "*";
const minSeverity = isSeverity(body.minSeverity)
? body.minSeverity
: "warning";
const owned = new Set(
(await repository.listChannels(userId)).map((channel) => channel.id),
);
const channelIds = [...new Set(idList(body.channelIds))];
if (channelIds.length === 0) {
return { error: "Pick at least one channel" };
}
if (channelIds.some((id) => !owned.has(id))) {
return { error: "Unknown channel" };
}
return {
name: name.slice(0, 100),
match,
minSeverity,
channelIds,
enabled: body.enabled !== false,
};
};
/**
* @openapi
* /plugin-api/alerts/rules:
* get:
* summary: List the caller's delivery rules
* tags:
* - Alerts
* responses:
* 200:
* description: The rules.
*/
router.get("/rules", async (_req: Request, res: Response) => {
res.json(await repository.listRules(actor(ctx)));
});
/**
* @openapi
* /plugin-api/alerts/rules:
* post:
* summary: Create a delivery rule
* description: Sends every alert whose category matches and whose severity is at least minSeverity to the listed channels.
* tags:
* - Alerts
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* required: [name, channelIds]
* properties:
* name:
* type: string
* match:
* type: string
* description: '"*", "automations.*" or an exact category.'
* minSeverity:
* type: string
* enum: [info, success, warning, critical]
* channelIds:
* type: array
* items:
* type: integer
* enabled:
* type: boolean
* responses:
* 201:
* description: The new rule.
* 400:
* description: The rule is not valid.
*/
router.post("/rules", async (req: Request, res: Response) => {
const userId = actor(ctx);
const input = await readRule(
userId,
(req.body ?? {}) as Record<string, unknown>,
);
if ("error" in input) return res.status(400).json(input);
const id = await repository.createRule(userId, input);
res.status(201).json({ id, ...input });
});
/**
* @openapi
* /plugin-api/alerts/rules/{id}:
* put:
* summary: Update a delivery rule
* tags:
* - Alerts
* parameters:
* - in: path
* name: id
* required: true
* schema:
* type: integer
* responses:
* 200:
* description: The updated rule.
* 400:
* description: The rule is not valid.
* 404:
* description: No such rule for the caller.
*/
router.put("/rules/:id", async (req: Request, res: Response) => {
const userId = actor(ctx);
const id = positiveInt(req.params.id);
if (!id) return res.status(404).json({ error: "Rule not found" });
const input = await readRule(
userId,
(req.body ?? {}) as Record<string, unknown>,
);
if ("error" in input) return res.status(400).json(input);
if (!(await repository.updateRule(userId, id, input))) {
return res.status(404).json({ error: "Rule not found" });
}
res.json({ id, ...input });
});
/**
* @openapi
* /plugin-api/alerts/rules/{id}:
* delete:
* summary: Delete a delivery rule
* tags:
* - Alerts
* parameters:
* - in: path
* name: id
* required: true
* schema:
* type: integer
* responses:
* 200:
* description: Deleted.
* 404:
* description: No such rule for the caller.
*/
router.delete("/rules/:id", async (req: Request, res: Response) => {
const id = positiveInt(req.params.id);
const deleted = id ? await repository.deleteRule(actor(ctx), id) : false;
if (!deleted) return res.status(404).json({ error: "Rule not found" });
res.json({ success: true });
});
}
+224
View File
@@ -0,0 +1,224 @@
import type { PluginFetch } from "@termix/plugin-sdk/backend";
import type { AlertLink, ChannelType, Severity } from "../types.js";
export interface OutgoingAlert {
title: string;
body: string;
severity: Severity;
category: string;
source: string;
link?: AlertLink | null;
context?: Record<string, unknown> | null;
}
export interface SmtpSettings {
host: string;
port: number;
secure: boolean;
user: string;
password: string;
from: string;
}
export interface SendMail {
(
smtp: SmtpSettings,
message: {
to: string[];
subject: string;
text: string;
},
): Promise<void>;
}
export interface SenderDeps {
fetch: PluginFetch;
/** Hosts the admin lets channels reach on a private network. */
privateAllowlist: () => Promise<string[]>;
smtp: () => Promise<SmtpSettings | null>;
sendMail: SendMail;
}
const NTFY_PRIORITY: Record<Severity, number> = {
info: 2,
success: 2,
warning: 3,
critical: 5,
};
const NTFY_TAGS: Record<Severity, string> = {
info: "information_source",
success: "white_check_mark",
warning: "warning",
critical: "rotating_light",
};
const DISCORD_COLORS: Record<Severity, number> = {
info: 3447003,
success: 3066993,
warning: 16753920,
critical: 15158332,
};
export const DISCORD_WEBHOOK =
/^https:\/\/(?:canary\.|ptb\.)?(?:discord\.com|discordapp\.com)\/api\/webhooks\/.+/i;
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const str = (value: unknown) => (typeof value === "string" ? value.trim() : "");
export function parseRecipients(value: unknown): string[] {
return str(value)
.split(/[,;\s]+/)
.map((entry) => entry.trim())
.filter(Boolean);
}
/** What is wrong with a channel's config, or null when it can be saved. */
export function validateChannelConfig(
type: ChannelType,
config: Record<string, unknown>,
): string | null {
switch (type) {
case "webhook":
return /^https?:\/\//i.test(str(config.url))
? null
: "webhook config requires an http(s) url";
case "ntfy":
if (!/^https?:\/\//i.test(str(config.url))) {
return "ntfy config requires an http(s) url";
}
return str(config.topic) ? null : "ntfy config requires a topic";
case "discord":
return DISCORD_WEBHOOK.test(str(config.url))
? null
: "discord config requires a Discord webhook URL";
case "email": {
const to = parseRecipients(config.to);
if (to.length === 0) return "email config requires at least one address";
return to.every((address) => EMAIL.test(address))
? null
: "email config has an invalid address";
}
}
}
function linkUrl(alert: OutgoingAlert): string | undefined {
const url = alert.link?.url;
return url && /^https?:\/\//i.test(url) ? url : undefined;
}
/**
* Sends one alert to one channel and throws on failure, so the caller can say
* which channel failed. Private and loopback targets need both the channel's
* allowPrivateNetwork opt-in and an exact host in the admin allowlist.
*/
export async function sendToChannel(
channel: { type: ChannelType; config: Record<string, unknown> },
alert: OutgoingAlert,
deps: SenderDeps,
): Promise<void> {
const { config } = channel;
if (channel.type === "email") {
const smtp = await deps.smtp();
if (!smtp) throw new Error("Email is not set up on this server");
const to = parseRecipients(config.to);
if (to.length === 0) throw new Error("Channel has no email address");
const url = linkUrl(alert);
await deps.sendMail(smtp, {
to,
subject: `[Termix] ${alert.title}`,
text: [alert.body || alert.title, url].filter(Boolean).join("\n\n"),
});
return;
}
const allowPrivateHosts =
config.allowPrivateNetwork === true ? await deps.privateAllowlist() : [];
const post = async (
url: string,
init: { method: string; headers: Record<string, string>; body: string },
) => {
const response = await deps.fetch(url, {
...init,
timeoutMs: 30_000,
allowPrivateHosts,
});
if (!response.ok) {
const detail = await response.text().catch(() => "");
throw new Error(
`HTTP ${response.status} ${response.statusText}${detail ? `: ${detail.slice(0, 200)}` : ""}`,
);
}
};
const url = str(config.url);
if (!url) throw new Error("Channel is missing a URL");
const context = alert.context ?? {};
switch (channel.type) {
case "webhook": {
const headers =
config.headers && typeof config.headers === "object"
? (config.headers as Record<string, string>)
: {};
return post(url, {
method: config.method === "PUT" ? "PUT" : "POST",
headers: { "Content-Type": "application/json", ...headers },
body: JSON.stringify({
title: alert.title,
message: alert.body,
severity: alert.severity,
category: alert.category,
source: alert.source,
link: linkUrl(alert),
hostName: context.hostName,
hostId: context.hostId,
ruleName: context.sourceName ?? alert.title,
ruleId: context.sourceId,
triggerType: context.triggerType,
value: context.value,
threshold: context.threshold,
timestamp: new Date().toISOString(),
}),
});
}
case "ntfy": {
const topic = str(config.topic);
if (!topic) throw new Error("ntfy channel is missing a topic");
const headers: Record<string, string> = {
Title: alert.title || "Termix",
Priority: String(NTFY_PRIORITY[alert.severity]),
Tags: NTFY_TAGS[alert.severity],
};
const click = linkUrl(alert);
if (click) headers.Click = click;
const token = str(config.token);
if (token) headers.Authorization = `Bearer ${token}`;
return post(`${url.replace(/\/$/, "")}/${encodeURIComponent(topic)}`, {
method: "POST",
headers,
body: alert.body || alert.title,
});
}
case "discord": {
const embed: Record<string, unknown> = {
title: alert.title || "Termix",
description: alert.body || undefined,
color: DISCORD_COLORS[alert.severity],
timestamp: new Date().toISOString(),
};
const click = linkUrl(alert);
if (click) embed.url = click;
const payload: Record<string, unknown> = { embeds: [embed] };
if (str(config.username)) payload.username = str(config.username);
if (str(config.avatar_url)) payload.avatar_url = str(config.avatar_url);
return post(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
}
}
}
+77
View File
@@ -0,0 +1,77 @@
import type { Request, Response } from "express";
/**
* Open event streams by user, so a new alert shows up in the browser the
* moment it is stored instead of on the next poll.
*/
export function createAlertStream() {
const clients = new Map<string, Set<Response>>();
const write = (res: Response, event: string, data: unknown) => {
try {
res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`);
} catch {
// The close handler removes it.
}
};
return {
open(req: Request, res: Response, userId: string, hello: unknown): void {
res.writeHead(200, {
"Content-Type": "text/event-stream",
"Cache-Control": "no-store, no-transform",
Connection: "keep-alive",
"X-Accel-Buffering": "no",
});
res.flushHeaders?.();
let set = clients.get(userId);
if (!set) {
set = new Set();
clients.set(userId, set);
}
set.add(res);
write(res, "unread", hello);
const heartbeat = setInterval(() => {
try {
res.write(": keepalive\n\n");
} catch {
close();
}
}, 30_000);
const close = () => {
clearInterval(heartbeat);
const current = clients.get(userId);
current?.delete(res);
if (current?.size === 0) clients.delete(userId);
};
req.on("close", close);
},
/** Users with at least one stream open. */
users(): string[] {
return [...clients.keys()];
},
publish(userId: string, event: string, data: unknown): void {
for (const res of clients.get(userId) ?? []) write(res, event, data);
},
closeAll(): void {
for (const set of clients.values()) {
for (const res of set) {
try {
res.end();
} catch {
// Already gone.
}
}
}
clients.clear();
},
};
}
export type AlertStream = ReturnType<typeof createAlertStream>;
+101
View File
@@ -0,0 +1,101 @@
import {
adoptLegacyTable,
boolean,
defineTable,
encryptedText,
id,
refUser,
text,
timestamp,
varchar,
} from "@termix/plugin-sdk/db";
/**
* Where a user's alerts go. The config holds webhook URLs, ntfy tokens and
* email addresses, sealed with ctx.secrets.seal so an alert sent with no
* acting user (a certificate that failed to renew at night) can still read it.
* 2.8 kept channels in core's notification_channels; the upgrade copies them
* here with their ids, which automations' notify steps still name.
*/
export const channels = defineTable(
"channels",
{
id: id(),
userId: refUser(),
name: text().notNull(),
type: varchar(32).notNull(),
config: encryptedText(),
enabled: boolean().notNull().default(true),
createdAt: timestamp().notNull().defaultNow(),
updatedAt: timestamp().notNull().defaultNow(),
},
{ indexes: [{ name: "idx_alerts_channels_user", columns: ["userId"] }] },
);
/** The inbox. One row per recipient, so read state is per user. */
export const items = defineTable(
"items",
{
id: id(),
userId: refUser(),
// The plugin that sent it, or "termix" for an announcement.
source: varchar(64).notNull(),
category: varchar(128).notNull(),
severity: varchar(16).notNull(),
title: text().notNull(),
body: text(),
link: text(),
context: text(),
dedupeKey: varchar(),
// What each channel said when the alert was delivered.
deliveries: text(),
readAt: timestamp(),
createdAt: timestamp().notNull().defaultNow(),
},
{
indexes: [
{ name: "idx_alerts_items_user", columns: ["userId", "createdAt"] },
{ name: "idx_alerts_items_unread", columns: ["userId", "readAt"] },
{ name: "idx_alerts_items_dedupe", columns: ["userId", "dedupeKey"] },
],
},
);
/** Which alerts a user sends to which of their channels. */
export const rules = defineTable(
"rules",
{
id: id(),
userId: refUser(),
name: text().notNull(),
// A category pattern: "*", "automations.*" or an exact category.
pattern: varchar(128).notNull().default("*"),
minSeverity: varchar(16).notNull().default("warning"),
channelIds: text().notNull(),
enabled: boolean().notNull().default(true),
createdAt: timestamp().notNull().defaultNow(),
},
{ indexes: [{ name: "idx_alerts_rules_user", columns: ["userId"] }] },
);
/**
* Announcements a user removed from their inbox, so they are not brought
* back. Adopted from core's dismissed_alerts, which held the same thing.
*/
export const dismissed = adoptLegacyTable(
"dismissed_alerts",
defineTable(
"dismissed",
{
id: id(),
userId: refUser(),
alertId: text().notNull(),
dismissedAt: timestamp().notNull().defaultNow(),
},
{
indexes: [{ name: "idx_dismissed_alerts_user_id", columns: ["userId"] }],
},
),
);
export const tables = [channels, items, rules, dismissed];
@@ -0,0 +1,197 @@
import { useEffect, useState } from "react";
import {
AlertCircle,
AlertTriangle,
Bell,
Check,
CheckCircle,
Info,
} from "lucide-react";
import { useTranslation } from "@termix/plugin-sdk/frontend";
import { Input } from "@termix/plugin-sdk/ui";
import type { AlertItem } from "../types";
import type { AlertsApi } from "./api";
import { timeAgo } from "./format";
import { useAlertsVersion, type AlertsStore } from "./store";
export interface AlertFeedConfig {
maxItems: number;
showRead: boolean;
/** 2.8 name for showRead, still found in saved homepages. */
showAcknowledged?: boolean;
}
export const DEFAULT_ALERT_FEED_CONFIG: AlertFeedConfig = {
maxItems: 10,
showRead: false,
};
function SeverityIcon({ severity }: { severity: AlertItem["severity"] }) {
if (severity === "critical")
return <AlertCircle size={11} className="shrink-0 text-red-500" />;
if (severity === "warning")
return <AlertTriangle size={11} className="shrink-0 text-amber-500" />;
if (severity === "success")
return <CheckCircle size={11} className="shrink-0 text-green-500" />;
return <Info size={11} className="shrink-0 text-blue-400" />;
}
export function showsRead(config: Partial<AlertFeedConfig>): boolean {
return config.showRead ?? config.showAcknowledged ?? false;
}
export function createAlertFeedWidget(api: AlertsApi, store: AlertsStore) {
function AlertFeedWidget({
widget,
config,
}: {
widget: { title?: string | null };
config: AlertFeedConfig;
}) {
const { t, language } = useTranslation();
const version = useAlertsVersion(store);
const maxItems = Math.max(1, config.maxItems || 10);
const showRead = showsRead(config);
const [items, setItems] = useState<AlertItem[] | null>(null);
useEffect(() => {
let cancelled = false;
api
.items({ unread: showRead ? undefined : true, limit: maxItems })
.then((result) => {
if (!cancelled) setItems(result.items.slice(0, maxItems));
})
.catch(() => {
if (!cancelled) setItems([]);
});
return () => {
cancelled = true;
};
}, [maxItems, showRead, version]);
const markRead = async (id: number) => {
try {
await api.setRead([id]);
setItems((prev) =>
(prev ?? []).flatMap((item) =>
item.id !== id
? [item]
: showRead
? [{ ...item, readAt: new Date().toISOString() }]
: [],
),
);
} catch {
// the next reload shows the real state
}
};
if (items === null) {
return (
<div className="flex items-center justify-center w-full h-full text-xs text-muted-foreground">
{t("widget.loading")}
</div>
);
}
return (
<div className="flex flex-col w-full h-full overflow-hidden">
<div className="flex items-center gap-1.5 px-2 py-1.5 border-b border-border/50 text-[11px] font-semibold text-muted-foreground">
<Bell size={11} />
<span className="truncate">{widget.title || t("widget.name")}</span>
</div>
{items.length === 0 ? (
<div className="flex flex-1 flex-col items-center justify-center gap-2">
<CheckCircle size={20} className="text-green-500" />
<span className="text-xs text-muted-foreground">
{t("widget.allClear")}
</span>
</div>
) : (
<div className="flex-1 overflow-auto">
{items.map((item) => (
<div
key={item.id}
className={`flex items-start gap-2 px-2 py-1.5 border-b border-border/30 ${item.readAt ? "opacity-50" : ""}`}
>
<SeverityIcon severity={item.severity} />
<div className="flex flex-col min-w-0 flex-1">
<span className="text-[10px] font-semibold text-foreground truncate">
{item.title}
</span>
<span className="text-[9px] text-muted-foreground truncate">
{timeAgo(item.createdAt, language)}
</span>
</div>
{!item.readAt && (
<button
type="button"
title={t("inbox.markRead")}
onClick={() => void markRead(item.id)}
className="shrink-0 p-0.5 text-muted-foreground hover:text-foreground"
>
<Check size={11} />
</button>
)}
</div>
))}
</div>
)}
</div>
);
}
return AlertFeedWidget;
}
export function AlertFeedEditForm({
config,
onChange,
}: {
config: AlertFeedConfig;
onChange: (config: AlertFeedConfig) => void;
}) {
const { t } = useTranslation();
return (
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-1">
<label className="text-xs font-medium text-muted-foreground">
{t("widget.maxItems")}
</label>
<Input
type="number"
min={1}
max={50}
value={config.maxItems}
onChange={(e) =>
onChange({
...config,
maxItems: Math.min(50, Math.max(1, Number(e.target.value))),
})
}
className="h-8 text-xs"
/>
</div>
<label className="flex items-center gap-2 text-xs text-muted-foreground cursor-pointer">
<input
type="checkbox"
checked={showsRead(config)}
onChange={(e) =>
onChange({
...config,
showRead: e.target.checked,
showAcknowledged: undefined,
})
}
className="accent-accent-brand"
/>
{t("widget.showRead")}
</label>
</div>
);
}
/** The widget's name in the homepage add menu, in this plugin's locale. */
export function AlertFeedLabel({ part }: { part: "name" | "description" }) {
const { t } = useTranslation();
return <>{t(part === "name" ? "widget.name" : "widget.description")}</>;
}
+166
View File
@@ -0,0 +1,166 @@
import {
AlertTriangle,
CheckCircle2,
ExternalLink,
Info,
Mail,
MailOpen,
OctagonAlert,
Trash2,
} from "lucide-react";
import { useTranslation } from "@termix/plugin-sdk/frontend";
import { Button, cn } from "@termix/plugin-sdk/ui";
import type { AlertItem, Severity } from "../types";
import { sourceLabel, timeAgo } from "./format";
const SEVERITY_ICON: Record<Severity, typeof Info> = {
info: Info,
success: CheckCircle2,
warning: AlertTriangle,
critical: OctagonAlert,
};
const SEVERITY_CLASS: Record<Severity, string> = {
info: "text-muted-foreground",
success: "text-green-500",
warning: "text-amber-500",
critical: "text-destructive",
};
export function SeverityIcon({
severity,
className,
}: {
severity: Severity;
className?: string;
}) {
const Icon = SEVERITY_ICON[severity];
return <Icon className={cn(SEVERITY_CLASS[severity], className)} />;
}
export function AlertList({
items,
compact = false,
onOpen,
onToggleRead,
onDelete,
}: {
items: AlertItem[];
compact?: boolean;
onOpen: (item: AlertItem) => void;
onToggleRead: (item: AlertItem) => void;
onDelete: (item: AlertItem) => void;
}) {
const { t, language } = useTranslation();
return (
<div className="flex flex-col">
{items.map((item) => {
const unread = !item.readAt;
const failed = (item.deliveries ?? []).filter((entry) => !entry.ok);
const actionText =
typeof item.context?.actionText === "string"
? item.context.actionText
: t("inbox.openLink");
return (
<div
key={item.id}
className={cn(
"group relative flex gap-2.5 border-b border-border px-3 py-2.5 hover:bg-muted/40",
unread && "bg-accent-brand/5",
)}
>
{unread && (
<span
className="absolute left-0 top-0 bottom-0 w-0.5 bg-accent-brand"
aria-label={t("inbox.unread")}
/>
)}
<SeverityIcon
severity={item.severity}
className="size-4 shrink-0 mt-0.5"
/>
<button
type="button"
className="flex-1 min-w-0 text-left"
onClick={() => onOpen(item)}
>
<div
className={cn(
"text-sm leading-snug break-words",
unread ? "font-semibold" : "font-medium",
)}
>
{item.title}
</div>
{item.body && (
<div
className={cn(
"text-xs text-muted-foreground mt-0.5 whitespace-pre-wrap break-words",
compact && "line-clamp-2",
)}
>
{item.body}
</div>
)}
<div className="flex flex-wrap items-center gap-x-2 gap-y-0.5 mt-1 text-[11px] text-muted-foreground">
<span title={item.category}>{sourceLabel(item.source, t)}</span>
<span>{timeAgo(item.createdAt, language)}</span>
{failed.length > 0 && (
<span
className="text-destructive"
title={failed
.map((entry) => `${entry.name}: ${entry.error ?? ""}`)
.join("\n")}
>
{t("inbox.deliveryFailed", { count: failed.length })}
</span>
)}
{item.link?.url && (
<a
href={item.link.url}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1 text-accent-brand hover:underline"
onClick={(event) => event.stopPropagation()}
>
{actionText}
<ExternalLink className="size-3" />
</a>
)}
</div>
</button>
<div className="flex items-start gap-0.5 shrink-0 opacity-60 group-hover:opacity-100">
<Button
variant="ghost"
size="icon"
className="h-6 w-6 rounded-none"
title={unread ? t("inbox.markRead") : t("inbox.markUnread")}
aria-label={
unread ? t("inbox.markRead") : t("inbox.markUnread")
}
onClick={() => onToggleRead(item)}
>
{unread ? (
<MailOpen className="size-3.5" />
) : (
<Mail className="size-3.5" />
)}
</Button>
<Button
variant="ghost"
size="icon"
className="h-6 w-6 rounded-none"
title={t("inbox.delete")}
aria-label={t("inbox.delete")}
onClick={() => onDelete(item)}
>
<Trash2 className="size-3.5" />
</Button>
</div>
</div>
);
})}
</div>
);
}
@@ -0,0 +1,49 @@
import { useEffect, useRef } from "react";
import { toast } from "sonner";
import {
useSettings,
useTabs,
useTranslation,
} from "@termix/plugin-sdk/frontend";
import { shouldPopUp, type PopupLevel } from "./popups";
import type { AlertsStore } from "./store";
/** Pops up alerts as they arrive, as far as the user's setting allows. */
export function AlertToaster({
store,
viewId,
}: {
store: AlertsStore;
viewId: string;
}) {
const { t } = useTranslation();
const tabs = useTabs();
const { values } = useSettings("user");
const level = useRef<PopupLevel>("warning");
level.current = (values.popups as PopupLevel | undefined) ?? "warning";
useEffect(
() =>
store.onItem((item, isNew) => {
if (!isNew || !shouldPopUp(item, level.current)) return;
const show =
item.severity === "critical"
? toast.error
: item.severity === "warning"
? toast.warning
: item.severity === "success"
? toast.success
: toast.info;
show(item.title, {
description: item.body ? item.body.slice(0, 200) : undefined,
action: {
label: t("inbox.view"),
onClick: () => tabs.openRailView(viewId),
},
});
}),
[store, t, tabs, viewId],
);
return null;
}
@@ -0,0 +1,69 @@
import { useEffect, useMemo, useState } from "react";
import { Bell, Radio, Route } from "lucide-react";
import { usePluginApi, useTranslation } from "@termix/plugin-sdk/frontend";
import { cn } from "@termix/plugin-sdk/ui";
import { createAlertsApi } from "./api";
import { ChannelsView } from "./ChannelsView";
import { InboxView } from "./InboxView";
import { RulesView } from "./RulesView";
import type { AlertsStore } from "./store";
import type { Section, SectionRequests } from "./sections";
const SECTIONS: Array<{ id: Section; icon: typeof Bell; labelKey: string }> = [
{ id: "inbox", icon: Bell, labelKey: "sections.inbox" },
{ id: "channels", icon: Radio, labelKey: "sections.channels" },
{ id: "rules", icon: Route, labelKey: "sections.rules" },
];
export function AlertsView({
store,
sections,
}: {
store: AlertsStore;
sections: SectionRequests;
}) {
const { t } = useTranslation();
const client = usePluginApi();
const api = useMemo(() => createAlertsApi(client), [client]);
const [section, setSection] = useState<Section>(
() => sections.take() ?? "inbox",
);
useEffect(
() =>
sections.subscribe((requested) => {
sections.take();
setSection(requested);
}),
[sections],
);
return (
<div className="flex flex-col flex-1 min-h-0 h-full bg-background">
<div className="flex items-center gap-1 border-b border-border px-2 shrink-0">
{SECTIONS.map(({ id, icon: Icon, labelKey }) => (
<button
key={id}
type="button"
onClick={() => setSection(id)}
className={cn(
"flex items-center gap-1.5 px-3 py-2 text-xs font-medium border-b-2 -mb-px transition-colors",
section === id
? "border-accent-brand text-accent-brand"
: "border-transparent text-muted-foreground hover:text-foreground",
)}
>
<Icon className="size-3.5" />
{t(labelKey)}
</button>
))}
</div>
<div className="flex flex-col flex-1 min-h-0 overflow-y-auto">
{section === "inbox" && <InboxView store={store} />}
{section === "channels" && <ChannelsView api={api} />}
{section === "rules" && <RulesView api={api} />}
</div>
</div>
);
}
@@ -0,0 +1,325 @@
import { useEffect, useState } from "react";
import { toast } from "sonner";
import { useTranslation } from "@termix/plugin-sdk/frontend";
import {
Button,
Dialog,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
Input,
PasswordInput,
Switch,
Textarea,
cn,
} from "@termix/plugin-sdk/ui";
import { CHANNEL_TYPES, type ChannelType } from "../types";
import { EMPTY, configFrom, draftFrom, type Draft } from "./channel-config";
import type { AlertsApi } from "./api";
function Field({
label,
hint,
children,
}: {
label: string;
hint?: string;
children: React.ReactNode;
}) {
return (
<div className="flex flex-col gap-1">
<label className="text-[10px] font-semibold uppercase tracking-widest text-muted-foreground">
{label}
</label>
{children}
{hint && (
<span className="text-[10px] text-muted-foreground">{hint}</span>
)}
</div>
);
}
export function ChannelDialog({
api,
open,
channelId,
emailAvailable,
onOpenChange,
onSaved,
}: {
api: AlertsApi;
open: boolean;
/** Null to create a new channel. */
channelId: number | null;
emailAvailable: boolean;
onOpenChange: (open: boolean) => void;
onSaved: () => void;
}) {
const { t } = useTranslation();
const [draft, setDraft] = useState<Draft>(EMPTY);
const [saving, setSaving] = useState(false);
useEffect(() => {
if (!open) return;
if (channelId === null) {
setDraft(EMPTY);
return;
}
api
.channel(channelId)
.then((channel) => setDraft(draftFrom(channel)))
.catch((error) =>
toast.error(error instanceof Error ? error.message : String(error)),
);
}, [api, channelId, open]);
const set = <K extends keyof Draft>(key: K, value: Draft[K]) =>
setDraft((current) => ({ ...current, [key]: value }));
const pickType = (type: ChannelType) =>
setDraft((current) => ({
...current,
type,
url:
type === "ntfy" && !current.url
? "https://ntfy.sh"
: type !== "ntfy" && current.url === "https://ntfy.sh"
? ""
: current.url,
}));
const save = async () => {
if (!draft.name.trim()) {
toast.error(t("channels.nameRequired"));
return;
}
setSaving(true);
try {
const input = {
name: draft.name.trim(),
type: draft.type,
config: configFrom(draft),
};
if (channelId === null) await api.createChannel(input);
else await api.updateChannel(channelId, input);
onSaved();
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
} finally {
setSaving(false);
}
};
const canReachPrivate = draft.type === "webhook" || draft.type === "ntfy";
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-md rounded-none">
<DialogHeader>
<DialogTitle>
{channelId === null ? t("channels.add") : t("channels.edit")}
</DialogTitle>
</DialogHeader>
<div className="flex flex-col gap-3 py-2">
<Field label={t("channels.name")}>
<Input
value={draft.name}
onChange={(event) => set("name", event.target.value)}
className="text-sm rounded-none"
/>
</Field>
<Field label={t("channels.type")}>
<div className="flex flex-wrap gap-2">
{CHANNEL_TYPES.map((type) => {
const disabled = type === "email" && !emailAvailable;
return (
<button
key={type}
type="button"
disabled={disabled}
title={
disabled ? t("channels.emailUnavailable") : undefined
}
onClick={() => pickType(type)}
className={cn(
"px-3 py-1 text-xs font-semibold border transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
draft.type === type
? "border-accent-brand/40 bg-accent-brand/10 text-accent-brand"
: "border-border text-muted-foreground hover:border-accent-brand/30",
)}
>
{t(`channels.types.${type}`)}
</button>
);
})}
</div>
{draft.type === "email" && !emailAvailable && (
<span className="text-[10px] text-destructive">
{t("channels.emailUnavailable")}
</span>
)}
</Field>
{draft.type === "webhook" && (
<>
<Field
label={t("channels.webhookUrl")}
hint={t("channels.webhookHint")}
>
<Input
value={draft.url}
onChange={(event) => set("url", event.target.value)}
placeholder="https://example.com/webhook"
className="text-sm font-mono rounded-none"
/>
</Field>
<Field label={t("channels.method")}>
<div className="flex gap-2">
{(["POST", "PUT"] as const).map((method) => (
<button
key={method}
type="button"
onClick={() => set("method", method)}
className={cn(
"px-3 py-1 text-xs font-mono border transition-colors",
draft.method === method
? "border-accent-brand/40 bg-accent-brand/10 text-accent-brand"
: "border-border text-muted-foreground",
)}
>
{method}
</button>
))}
</div>
</Field>
<Field
label={t("channels.headers")}
hint={t("channels.headersHint")}
>
<Textarea
value={draft.headers}
onChange={(event) => set("headers", event.target.value)}
placeholder="Authorization: Bearer ..."
rows={3}
className="text-xs font-mono rounded-none"
/>
</Field>
</>
)}
{draft.type === "ntfy" && (
<>
<Field label={t("channels.ntfyServer")}>
<Input
value={draft.url}
onChange={(event) => set("url", event.target.value)}
placeholder="https://ntfy.sh"
className="text-sm font-mono rounded-none"
/>
</Field>
<Field label={t("channels.ntfyTopic")}>
<Input
value={draft.topic}
onChange={(event) => set("topic", event.target.value)}
placeholder="my-alerts"
className="text-sm font-mono rounded-none"
/>
</Field>
<Field label={t("channels.ntfyToken")}>
<PasswordInput
value={draft.token}
onChange={(event) => set("token", event.target.value)}
placeholder="tk_..."
className="text-sm font-mono rounded-none"
/>
</Field>
</>
)}
{draft.type === "discord" && (
<>
<Field
label={t("channels.discordUrl")}
hint={t("channels.discordHint")}
>
<Input
value={draft.url}
onChange={(event) => set("url", event.target.value)}
placeholder="https://discord.com/api/webhooks/..."
className="text-sm font-mono rounded-none"
/>
</Field>
<Field label={t("channels.discordUsername")}>
<Input
value={draft.username}
onChange={(event) => set("username", event.target.value)}
placeholder="Termix"
className="text-sm rounded-none"
/>
</Field>
<Field label={t("channels.discordAvatar")}>
<Input
value={draft.avatarUrl}
onChange={(event) => set("avatarUrl", event.target.value)}
placeholder="https://example.com/avatar.png"
className="text-sm font-mono rounded-none"
/>
</Field>
</>
)}
{draft.type === "email" && (
<Field label={t("channels.emailTo")} hint={t("channels.emailHint")}>
<Input
value={draft.to}
onChange={(event) => set("to", event.target.value)}
placeholder="ops@example.com"
className="text-sm rounded-none"
/>
</Field>
)}
{canReachPrivate && (
<div className="flex items-start justify-between gap-3">
<div className="flex flex-col">
<span className="text-xs font-medium">
{t("channels.privateNetwork")}
</span>
<span className="text-[10px] text-muted-foreground">
{t("channels.privateNetworkHint")}
</span>
</div>
<Switch
checked={draft.allowPrivateNetwork}
onCheckedChange={(checked) =>
set("allowPrivateNetwork", checked)
}
/>
</div>
)}
</div>
<DialogFooter>
<Button
variant="ghost"
className="rounded-none"
onClick={() => onOpenChange(false)}
>
{t("actions.cancel")}
</Button>
<Button
variant="outline"
onClick={() => void save()}
disabled={saving}
className="rounded-none border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand"
>
{saving ? t("actions.saving") : t("actions.save")}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
}
@@ -0,0 +1,204 @@
import { useCallback, useEffect, useState } from "react";
import { toast } from "sonner";
import {
AlertTriangle,
Loader2,
Pencil,
Plus,
Send,
Trash2,
} from "lucide-react";
import { useTranslation } from "@termix/plugin-sdk/frontend";
import { Badge, Button, Switch, useConfirmation } from "@termix/plugin-sdk/ui";
import type { ChannelSummary } from "../types";
import type { AlertsApi } from "./api";
import { ChannelDialog } from "./ChannelDialog";
export function ChannelsView({
api,
onChanged,
}: {
api: AlertsApi;
onChanged?: () => void;
}) {
const { t } = useTranslation();
const { confirmWithToast } = useConfirmation();
const [channels, setChannels] = useState<ChannelSummary[]>([]);
const [loading, setLoading] = useState(true);
const [emailAvailable, setEmailAvailable] = useState(false);
const [dialogOpen, setDialogOpen] = useState(false);
const [editingId, setEditingId] = useState<number | null>(null);
const [testing, setTesting] = useState<number | null>(null);
const load = useCallback(async () => {
try {
const [list, meta] = await Promise.all([api.channels(), api.meta()]);
setChannels(list);
setEmailAvailable(meta.emailAvailable);
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
} finally {
setLoading(false);
}
}, [api]);
useEffect(() => {
void load();
}, [load]);
const test = async (channel: ChannelSummary) => {
setTesting(channel.id);
try {
await api.testChannel(channel.id);
toast.success(t("channels.testSent"));
} catch (error) {
toast.error(
t("channels.testFailed", {
error: error instanceof Error ? error.message : String(error),
}),
);
} finally {
setTesting(null);
}
};
const toggle = async (channel: ChannelSummary, enabled: boolean) => {
try {
await api.updateChannel(channel.id, { enabled });
setChannels((current) =>
current.map((entry) =>
entry.id === channel.id ? { ...entry, enabled } : entry,
),
);
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
}
};
const remove = (channel: ChannelSummary) => {
void confirmWithToast(
t("channels.deleteConfirm", { name: channel.name }),
async () => {
try {
await api.deleteChannel(channel.id);
toast.success(t("channels.deleted"));
await load();
onChanged?.();
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
}
},
t("actions.delete"),
t("actions.cancel"),
);
};
return (
<div className="flex flex-col gap-2 p-3">
<p className="text-xs text-muted-foreground">{t("channels.intro")}</p>
<Button
size="sm"
variant="outline"
className="rounded-none self-start border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand"
onClick={() => {
setEditingId(null);
setDialogOpen(true);
}}
>
<Plus className="size-3.5 mr-1" />
{t("channels.add")}
</Button>
{loading ? (
<Loader2 className="size-4 animate-spin text-muted-foreground m-4" />
) : channels.length === 0 ? (
<p className="text-xs text-muted-foreground py-4">
{t("channels.empty")}
</p>
) : (
<div className="flex flex-col border border-border">
{channels.map((channel) => (
<div
key={channel.id}
className="flex items-center gap-2 px-3 py-2 border-b border-border last:border-b-0"
>
<Switch
checked={channel.enabled}
onCheckedChange={(checked) => void toggle(channel, checked)}
aria-label={t("channels.enabled")}
/>
<span className="flex-1 min-w-0 text-sm truncate">
{channel.name}
</span>
{!channel.usable && (
<span
className="text-destructive"
title={t("channels.needsSave")}
>
<AlertTriangle className="size-3.5" />
</span>
)}
<Badge
variant="outline"
className="rounded-none text-[10px] uppercase"
>
{t(`channels.types.${channel.type}`)}
</Badge>
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
title={t("channels.test")}
aria-label={t("channels.test")}
disabled={testing === channel.id}
onClick={() => void test(channel)}
>
{testing === channel.id ? (
<Loader2 className="size-3.5 animate-spin" />
) : (
<Send className="size-3.5" />
)}
</Button>
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
title={t("channels.edit")}
aria-label={t("channels.edit")}
onClick={() => {
setEditingId(channel.id);
setDialogOpen(true);
}}
>
<Pencil className="size-3.5" />
</Button>
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
title={t("actions.delete")}
aria-label={t("actions.delete")}
onClick={() => remove(channel)}
>
<Trash2 className="size-3.5" />
</Button>
</div>
))}
</div>
)}
<ChannelDialog
api={api}
open={dialogOpen}
channelId={editingId}
emailAvailable={emailAvailable}
onOpenChange={setDialogOpen}
onSaved={() => {
setDialogOpen(false);
void load();
onChanged?.();
}}
/>
</div>
);
}
+283
View File
@@ -0,0 +1,283 @@
import { useCallback, useEffect, useMemo, useState } from "react";
import { toast } from "sonner";
import { BellOff, CheckCheck, Loader2, Maximize2, Trash2 } from "lucide-react";
import {
usePluginApi,
useTabs,
useTranslation,
} from "@termix/plugin-sdk/frontend";
import {
Button,
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
cn,
} from "@termix/plugin-sdk/ui";
import { SEVERITIES, type AlertItem, type Severity } from "../types";
import { createAlertsApi } from "./api";
import { AlertList } from "./AlertList";
import { sourceLabel } from "./format";
import { useAlertsVersion, type AlertsStore } from "./store";
const ALL = "__all";
export function InboxView({
store,
compact = false,
onOpenAll,
}: {
store: AlertsStore;
compact?: boolean;
onOpenAll?: () => void;
}) {
const { t } = useTranslation();
const client = usePluginApi();
const api = useMemo(() => createAlertsApi(client), [client]);
const tabs = useTabs();
const version = useAlertsVersion(store);
const [items, setItems] = useState<AlertItem[]>([]);
const [loading, setLoading] = useState(true);
const [hasMore, setHasMore] = useState(false);
const [unreadOnly, setUnreadOnly] = useState(false);
const [severity, setSeverity] = useState<Severity | "">("");
const [source, setSource] = useState("");
const [sources, setSources] = useState<string[]>([]);
const pageSize = compact ? 25 : 50;
const load = useCallback(async () => {
try {
const result = await api.items({
unread: unreadOnly,
severity: severity || undefined,
source: source || undefined,
limit: pageSize,
});
setItems(result.items);
setHasMore(result.items.length === pageSize);
store.setUnread(result.unread);
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
} finally {
setLoading(false);
}
}, [api, pageSize, severity, source, store, unreadOnly]);
useEffect(() => {
void load();
}, [load, version]);
useEffect(() => {
if (compact) return;
api
.categories()
.then((rows) =>
setSources([...new Set(rows.map((row) => row.source))].sort()),
)
.catch(() => {});
}, [api, compact, version]);
const loadMore = async () => {
const last = items[items.length - 1];
if (!last) return;
try {
const result = await api.items({
unread: unreadOnly,
severity: severity || undefined,
source: source || undefined,
limit: pageSize,
before: last.id,
});
setItems((current) => [...current, ...result.items]);
setHasMore(result.items.length === pageSize);
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
}
};
const setRead = async (ids: number[] | "all", read: boolean) => {
const { count } = await api.setRead(ids, read);
store.setUnread(count);
const now = new Date().toISOString();
setItems((current) =>
current
.map((item) =>
ids === "all" || ids.includes(item.id)
? { ...item, readAt: read ? (item.readAt ?? now) : null }
: item,
)
.filter((item) => !unreadOnly || !item.readAt),
);
};
const open = (item: AlertItem) => {
if (!item.readAt) void setRead([item.id], true).catch(() => {});
if (item.link?.tab) tabs.openSingletonTab(item.link.tab);
};
const remove = async (item: AlertItem) => {
try {
await api.remove(item.id);
setItems((current) => current.filter((entry) => entry.id !== item.id));
store.setUnread((await api.unread()).count);
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
}
};
const clearRead = async () => {
try {
const { removed } = await api.clear(true);
toast.success(t("inbox.cleared", { count: removed }));
await load();
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
}
};
const unread = items.some((item) => !item.readAt);
return (
<div className="flex flex-col flex-1 min-h-0">
<div
className={cn(
"flex flex-wrap items-center gap-1.5 border-b border-border shrink-0",
compact ? "px-2 py-1.5" : "px-3 py-2",
)}
>
<div className="flex border border-border">
{[false, true].map((value) => (
<button
key={String(value)}
type="button"
onClick={() => setUnreadOnly(value)}
className={cn(
"px-2 py-1 text-xs font-medium transition-colors",
unreadOnly === value
? "bg-accent-brand/10 text-accent-brand"
: "text-muted-foreground hover:text-foreground",
)}
>
{value ? t("inbox.filterUnread") : t("inbox.filterAll")}
</button>
))}
</div>
{!compact && (
<>
<Select
value={severity || ALL}
onValueChange={(value) =>
setSeverity(value === ALL ? "" : (value as Severity))
}
>
<SelectTrigger className="h-7 w-[140px] rounded-none text-xs">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value={ALL}>{t("inbox.anySeverity")}</SelectItem>
{SEVERITIES.map((value) => (
<SelectItem key={value} value={value}>
{t(`severity.${value}`)}
</SelectItem>
))}
</SelectContent>
</Select>
<Select
value={source || ALL}
onValueChange={(value) => setSource(value === ALL ? "" : value)}
>
<SelectTrigger className="h-7 w-[160px] rounded-none text-xs">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value={ALL}>{t("inbox.anySource")}</SelectItem>
{sources.map((value) => (
<SelectItem key={value} value={value}>
{sourceLabel(value, t)}
</SelectItem>
))}
</SelectContent>
</Select>
</>
)}
<span className="flex-1" />
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
disabled={!unread}
title={t("inbox.markAllRead")}
aria-label={t("inbox.markAllRead")}
onClick={() => void setRead("all", true).catch(() => {})}
>
<CheckCheck className="size-4" />
</Button>
{!compact && (
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
title={t("inbox.clearRead")}
aria-label={t("inbox.clearRead")}
onClick={() => void clearRead()}
>
<Trash2 className="size-4" />
</Button>
)}
{onOpenAll && (
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
title={t("inbox.openAll")}
aria-label={t("inbox.openAll")}
onClick={onOpenAll}
>
<Maximize2 className="size-4" />
</Button>
)}
</div>
<div className="flex-1 min-h-0 overflow-y-auto">
{loading ? (
<div className="flex justify-center p-6">
<Loader2 className="size-4 animate-spin text-muted-foreground" />
</div>
) : items.length === 0 ? (
<div className="flex flex-col items-center gap-2 p-8 text-center text-muted-foreground">
<BellOff className="size-6" />
<p className="text-sm">
{unreadOnly ? t("inbox.emptyUnread") : t("inbox.empty")}
</p>
</div>
) : (
<>
<AlertList
items={items}
compact={compact}
onOpen={open}
onToggleRead={(item) =>
void setRead([item.id], !item.readAt).catch(() => {})
}
onDelete={(item) => void remove(item)}
/>
{hasMore && (
<div className="p-2">
<Button
variant="ghost"
size="sm"
className="w-full rounded-none text-xs"
onClick={() => void loadMore()}
>
{t("inbox.loadMore")}
</Button>
</div>
)}
</>
)}
</div>
</div>
);
}
+337
View File
@@ -0,0 +1,337 @@
import { useCallback, useEffect, useState } from "react";
import { toast } from "sonner";
import { Loader2, Pencil, Plus, Trash2 } from "lucide-react";
import { useTranslation } from "@termix/plugin-sdk/frontend";
import {
Button,
Checkbox,
Dialog,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
Input,
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
Switch,
useConfirmation,
} from "@termix/plugin-sdk/ui";
import {
SEVERITIES,
type AlertRule,
type ChannelSummary,
type Severity,
} from "../types";
import type { AlertsApi, RuleInput } from "./api";
const EMPTY: RuleInput = {
name: "",
match: "*",
minSeverity: "warning",
channelIds: [],
enabled: true,
};
export function RulesView({ api }: { api: AlertsApi }) {
const { t } = useTranslation();
const { confirmWithToast } = useConfirmation();
const [rules, setRules] = useState<AlertRule[]>([]);
const [channels, setChannels] = useState<ChannelSummary[]>([]);
const [categories, setCategories] = useState<string[]>([]);
const [loading, setLoading] = useState(true);
const [editing, setEditing] = useState<AlertRule | null>(null);
const [draft, setDraft] = useState<RuleInput>(EMPTY);
const [dialogOpen, setDialogOpen] = useState(false);
const [saving, setSaving] = useState(false);
const load = useCallback(async () => {
try {
const [ruleList, channelList, categoryList] = await Promise.all([
api.rules(),
api.channels(),
api.categories(),
]);
setRules(ruleList);
setChannels(channelList);
setCategories([...new Set(categoryList.map((entry) => entry.category))]);
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
} finally {
setLoading(false);
}
}, [api]);
useEffect(() => {
void load();
}, [load]);
const channelName = (id: number) =>
channels.find((channel) => channel.id === id)?.name ?? `#${id}`;
const openEditor = (rule: AlertRule | null) => {
setEditing(rule);
setDraft(
rule
? {
name: rule.name,
match: rule.match,
minSeverity: rule.minSeverity,
channelIds: rule.channelIds,
enabled: rule.enabled,
}
: EMPTY,
);
setDialogOpen(true);
};
const save = async () => {
if (!draft.name.trim()) {
toast.error(t("rules.nameRequired"));
return;
}
if (draft.channelIds.length === 0) {
toast.error(t("rules.channelRequired"));
return;
}
setSaving(true);
try {
if (editing) await api.updateRule(editing.id, draft);
else await api.createRule(draft);
setDialogOpen(false);
await load();
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
} finally {
setSaving(false);
}
};
const toggle = async (rule: AlertRule, enabled: boolean) => {
try {
await api.updateRule(rule.id, {
name: rule.name,
match: rule.match,
minSeverity: rule.minSeverity,
channelIds: rule.channelIds,
enabled,
});
setRules((current) =>
current.map((entry) =>
entry.id === rule.id ? { ...entry, enabled } : entry,
),
);
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
}
};
const remove = (rule: AlertRule) => {
void confirmWithToast(
t("rules.deleteConfirm", { name: rule.name }),
async () => {
try {
await api.deleteRule(rule.id);
await load();
} catch (error) {
toast.error(error instanceof Error ? error.message : String(error));
}
},
t("actions.delete"),
t("actions.cancel"),
);
};
const toggleChannel = (id: number, checked: boolean) =>
setDraft((current) => ({
...current,
channelIds: checked
? [...new Set([...current.channelIds, id])]
: current.channelIds.filter((entry) => entry !== id),
}));
return (
<div className="flex flex-col gap-2 p-3">
<p className="text-xs text-muted-foreground">{t("rules.intro")}</p>
<Button
size="sm"
variant="outline"
className="rounded-none self-start border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand"
disabled={channels.length === 0}
title={channels.length === 0 ? t("rules.needChannel") : undefined}
onClick={() => openEditor(null)}
>
<Plus className="size-3.5 mr-1" />
{t("rules.add")}
</Button>
{loading ? (
<Loader2 className="size-4 animate-spin text-muted-foreground m-4" />
) : rules.length === 0 ? (
<p className="text-xs text-muted-foreground py-4">
{channels.length === 0 ? t("rules.needChannel") : t("rules.empty")}
</p>
) : (
<div className="flex flex-col border border-border">
{rules.map((rule) => (
<div
key={rule.id}
className="flex items-center gap-2 px-3 py-2 border-b border-border last:border-b-0"
>
<Switch
checked={rule.enabled}
onCheckedChange={(checked) => void toggle(rule, checked)}
aria-label={t("rules.enabled")}
/>
<div className="flex-1 min-w-0">
<div className="text-sm truncate">{rule.name}</div>
<div className="text-[11px] text-muted-foreground truncate">
{t("rules.summary", {
match:
rule.match === "*" ? t("rules.everything") : rule.match,
severity: t(`severity.${rule.minSeverity}`),
channels: rule.channelIds.map(channelName).join(", "),
})}
</div>
</div>
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
title={t("rules.edit")}
aria-label={t("rules.edit")}
onClick={() => openEditor(rule)}
>
<Pencil className="size-3.5" />
</Button>
<Button
variant="ghost"
size="icon"
className="h-7 w-7 rounded-none"
title={t("actions.delete")}
aria-label={t("actions.delete")}
onClick={() => remove(rule)}
>
<Trash2 className="size-3.5" />
</Button>
</div>
))}
</div>
)}
<Dialog open={dialogOpen} onOpenChange={setDialogOpen}>
<DialogContent className="max-w-md rounded-none">
<DialogHeader>
<DialogTitle>
{editing ? t("rules.edit") : t("rules.add")}
</DialogTitle>
</DialogHeader>
<div className="flex flex-col gap-3 py-2">
<div className="flex flex-col gap-1">
<label className="text-[10px] font-semibold uppercase tracking-widest text-muted-foreground">
{t("rules.name")}
</label>
<Input
value={draft.name}
onChange={(event) =>
setDraft({ ...draft, name: event.target.value })
}
className="text-sm rounded-none"
/>
</div>
<div className="flex flex-col gap-1">
<label className="text-[10px] font-semibold uppercase tracking-widest text-muted-foreground">
{t("rules.match")}
</label>
<Input
value={draft.match}
list="alerts-rule-categories"
onChange={(event) =>
setDraft({ ...draft, match: event.target.value })
}
placeholder="*"
className="text-sm font-mono rounded-none"
/>
<datalist id="alerts-rule-categories">
<option value="*" />
{categories.map((category) => (
<option key={category} value={category} />
))}
</datalist>
<span className="text-[10px] text-muted-foreground">
{t("rules.matchHint")}
</span>
</div>
<div className="flex flex-col gap-1">
<label className="text-[10px] font-semibold uppercase tracking-widest text-muted-foreground">
{t("rules.minSeverity")}
</label>
<Select
value={draft.minSeverity}
onValueChange={(value) =>
setDraft({ ...draft, minSeverity: value as Severity })
}
>
<SelectTrigger className="h-8 rounded-none text-sm">
<SelectValue />
</SelectTrigger>
<SelectContent>
{SEVERITIES.filter((value) => value !== "success").map(
(value) => (
<SelectItem key={value} value={value}>
{t(`severity.${value}`)}
</SelectItem>
),
)}
</SelectContent>
</Select>
</div>
<div className="flex flex-col gap-1">
<label className="text-[10px] font-semibold uppercase tracking-widest text-muted-foreground">
{t("rules.channels")}
</label>
<div className="flex flex-col gap-1.5 border border-border p-2 max-h-40 overflow-y-auto">
{channels.map((channel) => (
<label
key={channel.id}
className="flex items-center gap-2 text-sm cursor-pointer"
>
<Checkbox
checked={draft.channelIds.includes(channel.id)}
onCheckedChange={(checked) =>
toggleChannel(channel.id, checked === true)
}
/>
<span className="truncate">{channel.name}</span>
<span className="text-[10px] uppercase text-muted-foreground">
{t(`channels.types.${channel.type}`)}
</span>
</label>
))}
</div>
</div>
</div>
<DialogFooter>
<Button
variant="ghost"
className="rounded-none"
onClick={() => setDialogOpen(false)}
>
{t("actions.cancel")}
</Button>
<Button
variant="outline"
disabled={saving}
onClick={() => void save()}
className="rounded-none border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand"
>
{saving ? t("actions.saving") : t("actions.save")}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</div>
);
}
+123
View File
@@ -0,0 +1,123 @@
import type { PluginApiClient } from "@termix/plugin-sdk/frontend";
import type {
AlertItem,
AlertRule,
AlertsMeta,
ChannelDetail,
ChannelSummary,
ChannelType,
Severity,
} from "../types";
export interface ItemQuery {
unread?: boolean;
source?: string;
severity?: Severity;
limit?: number;
before?: number;
}
export interface ChannelInput {
name: string;
type: ChannelType;
config: Record<string, unknown>;
enabled?: boolean;
}
export type RuleInput = Omit<AlertRule, "id">;
function apiError(error: unknown, action: string): Error {
const data = (
error as { response?: { data?: { error?: string; message?: string } } }
)?.response?.data;
return new Error(
data?.error ||
data?.message ||
(error instanceof Error ? error.message : `Failed to ${action}`),
);
}
async function call<T>(
action: string,
request: () => Promise<{ data: T }>,
): Promise<T> {
try {
return (await request()).data;
} catch (error) {
throw apiError(error, action);
}
}
function query(params: ItemQuery): string {
const search = new URLSearchParams();
if (params.unread) search.set("unread", "true");
if (params.source) search.set("source", params.source);
if (params.severity) search.set("severity", params.severity);
if (params.limit) search.set("limit", String(params.limit));
if (params.before) search.set("before", String(params.before));
const text = search.toString();
return text ? `?${text}` : "";
}
export function createAlertsApi(api: PluginApiClient) {
return {
items: (params: ItemQuery = {}) =>
call<{ items: AlertItem[]; unread: number }>("load alerts", () =>
api.get(`/items${query(params)}`),
),
unread: () =>
call<{ count: number }>("count alerts", () => api.get("/unread")),
setRead: (ids: number[] | "all", read = true) =>
call<{ count: number }>("update alerts", () =>
api.post(
"/items/read",
ids === "all" ? { all: true, read } : { ids, read },
),
),
remove: (id: number) =>
call<{ success: boolean }>("delete alert", () =>
api.delete(`/items/${id}`),
),
clear: (onlyRead: boolean) =>
call<{ removed: number }>("clear alerts", () =>
api.delete(`/items${onlyRead ? "?read=true" : ""}`),
),
categories: () =>
call<Array<{ source: string; category: string }>>("load categories", () =>
api.get("/categories"),
),
meta: () => call<AlertsMeta>("load channel types", () => api.get("/meta")),
channels: () =>
call<ChannelSummary[]>("load channels", () => api.get("/channels")),
channel: (id: number) =>
call<ChannelDetail>("load channel", () => api.get(`/channels/${id}`)),
createChannel: (input: ChannelInput) =>
call<ChannelDetail>("create channel", () => api.post("/channels", input)),
updateChannel: (id: number, input: Partial<ChannelInput>) =>
call<ChannelDetail>("update channel", () =>
api.put(`/channels/${id}`, input),
),
deleteChannel: (id: number) =>
call<{ success: boolean }>("delete channel", () =>
api.delete(`/channels/${id}`),
),
testChannel: async (id: number) => {
const result = await call<{ success: boolean; error?: string }>(
"test channel",
() => api.post(`/channels/${id}/test`),
);
if (!result.success) throw new Error(result.error || "Test failed");
},
rules: () => call<AlertRule[]>("load rules", () => api.get("/rules")),
createRule: (input: RuleInput) =>
call<AlertRule>("create rule", () => api.post("/rules", input)),
updateRule: (id: number, input: RuleInput) =>
call<AlertRule>("update rule", () => api.put(`/rules/${id}`, input)),
deleteRule: (id: number) =>
call<{ success: boolean }>("delete rule", () =>
api.delete(`/rules/${id}`),
),
};
}
export type AlertsApi = ReturnType<typeof createAlertsApi>;
@@ -0,0 +1,101 @@
import type { ChannelDetail, ChannelType } from "../types";
export interface Draft {
name: string;
type: ChannelType;
url: string;
method: "POST" | "PUT";
headers: string;
topic: string;
token: string;
username: string;
avatarUrl: string;
to: string;
allowPrivateNetwork: boolean;
}
export const EMPTY: Draft = {
name: "",
type: "webhook",
url: "",
method: "POST",
headers: "",
topic: "",
token: "",
username: "",
avatarUrl: "",
to: "",
allowPrivateNetwork: false,
};
const str = (value: unknown) => (typeof value === "string" ? value : "");
export function draftFrom(channel: ChannelDetail): Draft {
const config = channel.config;
const headers =
config.headers && typeof config.headers === "object"
? Object.entries(config.headers as Record<string, unknown>)
.map(([key, value]) => `${key}: ${String(value)}`)
.join("\n")
: "";
return {
...EMPTY,
name: channel.name,
type: channel.type,
url: str(config.url) || (channel.type === "ntfy" ? "https://ntfy.sh" : ""),
method: config.method === "PUT" ? "PUT" : "POST",
headers,
topic: str(config.topic),
token: str(config.token),
username: str(config.username),
avatarUrl: str(config.avatar_url),
to: str(config.to),
allowPrivateNetwork: config.allowPrivateNetwork === true,
};
}
export function parseHeaders(text: string): Record<string, string> {
const headers: Record<string, string> = {};
for (const line of text.split(/\r?\n/)) {
const at = line.indexOf(":");
if (at <= 0) continue;
const key = line.slice(0, at).trim();
const value = line.slice(at + 1).trim();
if (key) headers[key] = value;
}
return headers;
}
export function configFrom(draft: Draft): Record<string, unknown> {
const privateNetwork = draft.allowPrivateNetwork
? { allowPrivateNetwork: true }
: {};
switch (draft.type) {
case "webhook": {
const headers = parseHeaders(draft.headers);
return {
url: draft.url.trim(),
method: draft.method,
...(Object.keys(headers).length ? { headers } : {}),
...privateNetwork,
};
}
case "ntfy":
return {
url: draft.url.trim(),
topic: draft.topic.trim(),
...(draft.token.trim() ? { token: draft.token.trim() } : {}),
...privateNetwork,
};
case "discord":
return {
url: draft.url.trim(),
...(draft.username.trim() ? { username: draft.username.trim() } : {}),
...(draft.avatarUrl.trim()
? { avatar_url: draft.avatarUrl.trim() }
: {}),
};
case "email":
return { to: draft.to.trim() };
}
}
+30
View File
@@ -0,0 +1,30 @@
import { ANNOUNCEMENT_SOURCE } from "../types";
export function timeAgo(iso: string, language: string): string {
// SQLite's CURRENT_TIMESTAMP has no zone; it is UTC.
const normalized = /[zZ]|[+-]\d\d:?\d\d$/.test(iso)
? iso
: `${iso.replace(" ", "T")}Z`;
const ms = Date.parse(normalized);
if (!Number.isFinite(ms)) return "";
const seconds = Math.round((ms - Date.now()) / 1000);
const format = new Intl.RelativeTimeFormat(language || "en", {
numeric: "auto",
});
const abs = Math.abs(seconds);
if (abs < 60) return format.format(seconds, "second");
if (abs < 3600) return format.format(Math.round(seconds / 60), "minute");
if (abs < 86400) return format.format(Math.round(seconds / 3600), "hour");
return format.format(Math.round(seconds / 86400), "day");
}
export function sourceLabel(
source: string,
t: (key: string, options?: Record<string, unknown>) => string,
): string {
if (source === ANNOUNCEMENT_SOURCE) return t("inbox.sourceTermix");
return source
.split("-")
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
.join(" ");
}
+112
View File
@@ -0,0 +1,112 @@
import type { ComponentType } from "react";
import { Bell } from "lucide-react";
import type {
PanelProps,
TabProps,
TermixApp,
} from "@termix/plugin-sdk/frontend";
import { AlertToaster } from "./AlertToaster";
import { AlertsView } from "./AlertsView";
import { createSectionRequests } from "./sections";
import { InboxView } from "./InboxView";
import { createAlertsStore, useUnreadCount } from "./store";
import { createAlertsApi } from "./api";
import {
AlertFeedEditForm,
AlertFeedLabel,
DEFAULT_ALERT_FEED_CONFIG,
createAlertFeedWidget,
} from "./AlertFeedWidget";
// The homepage grid step, in pixels.
const GRID_SIZE = 30;
const VIEW_ID = "alerts";
export function activate(app: TermixApp): void {
const store = createAlertsStore({
connect: (init) => app.fetch("/stream", init),
loadUnread: async () =>
(await app.api.get<{ count: number }>("/unread")).data.count,
});
const sections = createSectionRequests();
if (!app.guest) {
void app.hasPermission("use").then((allowed) => {
if (allowed) store.start();
});
}
app.onDispose(() => store.stop());
const openTab = () => app.tabs.openSingletonTab(VIEW_ID);
function Panel({ active }: PanelProps) {
if (!active) return null;
return <InboxView store={store} compact onOpenAll={openTab} />;
}
function AlertsTab() {
return <AlertsView store={store} sections={sections} />;
}
function Toaster() {
return <AlertToaster store={store} viewId={VIEW_ID} />;
}
app.registerRailItem({
id: VIEW_ID,
icon: Bell,
titleKey: "nav.alerts",
placement: "footer",
simplePreset: true,
promotable: true,
rightDockable: true,
separatorAfter: false,
permission: "use",
useBadge: () => useUnreadCount(store),
});
app.registerPanel(VIEW_ID, Panel);
app.registerTab(VIEW_ID, AlertsTab as ComponentType<TabProps>, {
icon: Bell,
titleKey: "nav.alerts",
singleton: true,
hostless: true,
panelFrame: true,
});
app.registerSlotContribution("shell.overlay", {
actionId: "alerts.toaster",
titleKey: "nav.alerts",
kind: "component",
component: Toaster as ComponentType<Record<string, unknown>>,
});
app.registerExtension("homepage.widgets", {
id: "alert_feed",
name: "Alert Feed",
description: "Your latest alerts",
category: "monitoring",
icon: <Bell size={14} />,
defaultConfig: DEFAULT_ALERT_FEED_CONFIG,
defaultSize: { w: GRID_SIZE * 10, h: GRID_SIZE * 10 },
minSize: { w: GRID_SIZE * 6, h: GRID_SIZE * 5 },
components: {
view: createAlertFeedWidget(createAlertsApi(app.api), store) as never,
editForm: AlertFeedEditForm as never,
label: AlertFeedLabel as never,
},
});
app.registerAction("alerts.open", () => openTab());
app.registerAction("alerts.openChannels", () => {
sections.request("channels");
openTab();
});
app.registerSlotContribution("onboarding.features", {
actionId: "alerts.feature",
titleKey: "onboarding.feature",
descriptionKey: "onboarding.featureDesc",
icon: Bell as ComponentType<{ className?: string }>,
});
}
+9
View File
@@ -0,0 +1,9 @@
import { severityRank, type AlertItem } from "../types";
export type PopupLevel = "all" | "warning" | "critical" | "off";
export function shouldPopUp(item: AlertItem, level: PopupLevel): boolean {
if (level === "off") return false;
if (level === "all") return true;
return severityRank(item.severity) >= severityRank(level);
}
+26
View File
@@ -0,0 +1,26 @@
export type Section = "inbox" | "channels" | "rules";
/** Lets an action open the tab on a given section. */
export function createSectionRequests() {
let pending: Section | null = null;
const listeners = new Set<(section: Section) => void>();
return {
request(section: Section) {
pending = section;
for (const listener of listeners) listener(section);
},
take(): Section | null {
const section = pending;
pending = null;
return section;
},
subscribe(listener: (section: Section) => void): () => void {
listeners.add(listener);
return () => {
listeners.delete(listener);
};
},
};
}
export type SectionRequests = ReturnType<typeof createSectionRequests>;
+177
View File
@@ -0,0 +1,177 @@
import { useSyncExternalStore } from "react";
import type { AlertItem } from "../types";
interface ServerSentEvent {
event: string;
data: string;
}
export function parseServerSentEvents(
buffer: string,
onEvent: (event: ServerSentEvent) => void,
): string {
const blocks = buffer.split(/\r?\n\r?\n/);
const rest = blocks.pop() ?? "";
for (const block of blocks) {
let event = "message";
const data: string[] = [];
for (const line of block.split(/\r?\n/)) {
if (line.startsWith(":")) continue;
if (line.startsWith("event:")) event = line.slice(6).trim();
else if (line.startsWith("data:")) data.push(line.slice(5).trimStart());
}
if (data.length > 0) onEvent({ event, data: data.join("\n") });
}
return rest;
}
export interface AlertsStoreDeps {
/** Opens the event stream; app.fetch carries core's auth. */
connect: (init: RequestInit) => Promise<Response>;
/** The unread count, for when the stream is down. */
loadUnread: () => Promise<number>;
retryMs?: number;
pollMs?: number;
}
/**
* The live side of the inbox: the unread count every badge shows, and every
* new alert as it arrives, from one stream shared by the whole app.
*/
export function createAlertsStore(deps: AlertsStoreDeps) {
const retryMs = deps.retryMs ?? 5_000;
const pollMs = deps.pollMs ?? 60_000;
let unread = 0;
let version = 0;
const seen = new Set<number>();
const listeners = new Set<() => void>();
const itemListeners = new Set<(item: AlertItem, isNew: boolean) => void>();
let controller: AbortController | null = null;
const emit = () => {
for (const listener of listeners) listener();
};
const setUnread = (count: number) => {
if (count === unread) return;
unread = Math.max(0, count);
emit();
};
const onItem = (item: AlertItem) => {
const isNew = !seen.has(item.id);
seen.add(item.id);
version++;
emit();
for (const listener of itemListeners) listener(item, isNew);
};
const wait = (ms: number, signal: AbortSignal) =>
new Promise<void>((resolve) => {
const timer = setTimeout(resolve, ms);
signal.addEventListener(
"abort",
() => {
clearTimeout(timer);
resolve();
},
{ once: true },
);
});
async function run(signal: AbortSignal) {
while (!signal.aborted) {
try {
const response = await deps.connect({
headers: { Accept: "text/event-stream" },
signal,
});
if (!response.ok || !response.body) throw new Error("stream failed");
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = "";
while (!signal.aborted) {
const { value, done } = await reader.read();
if (done) break;
buffer = parseServerSentEvents(
buffer + decoder.decode(value, { stream: true }),
(event) => {
try {
const data = JSON.parse(event.data);
if (event.event === "unread") setUnread(Number(data.count));
else if (event.event === "item") onItem(data as AlertItem);
} catch {
// A malformed event is skipped; the next one carries the count.
}
},
);
}
} catch {
// Falls through to a poll and a retry.
}
if (signal.aborted) return;
try {
setUnread(await deps.loadUnread());
} catch {
// Still offline.
}
await wait(retryMs, signal);
}
}
return {
start(): void {
if (controller) return;
controller = new AbortController();
const { signal } = controller;
void run(signal);
// A proxy that buffers the stream would hold the count back forever.
void (async () => {
while (!signal.aborted) {
await wait(pollMs, signal);
if (signal.aborted) return;
try {
setUnread(await deps.loadUnread());
} catch {
// Offline; the stream loop retries.
}
}
})();
},
stop(): void {
controller?.abort();
controller = null;
},
subscribe(listener: () => void): () => void {
listeners.add(listener);
return () => {
listeners.delete(listener);
};
},
/** Every alert that arrives while the app is open, and whether it is new. */
onItem(listener: (item: AlertItem, isNew: boolean) => void): () => void {
itemListeners.add(listener);
return () => {
itemListeners.delete(listener);
};
},
unread: () => unread,
/** Bumps whenever an alert arrives, so open lists know to reload. */
version: () => version,
setUnread,
};
}
export type AlertsStore = ReturnType<typeof createAlertsStore>;
export function useUnreadCount(store: AlertsStore): number {
return useSyncExternalStore(store.subscribe, store.unread, store.unread);
}
export function useAlertsVersion(store: AlertsStore): number {
return useSyncExternalStore(store.subscribe, store.version, store.version);
}
+91
View File
@@ -0,0 +1,91 @@
export const CHANNEL_TYPES = ["webhook", "ntfy", "discord", "email"] as const;
export type ChannelType = (typeof CHANNEL_TYPES)[number];
export const SEVERITIES = ["info", "success", "warning", "critical"] as const;
export type Severity = (typeof SEVERITIES)[number];
/** Where an announcement from the Termix docs comes from in the inbox. */
export const ANNOUNCEMENT_SOURCE = "termix";
export interface AlertLink {
tab?: string;
url?: string;
}
export interface DeliveryResult {
channelId: number;
name: string;
ok: boolean;
error?: string;
}
export interface AlertItem {
id: number;
source: string;
category: string;
severity: Severity;
title: string;
body: string | null;
link: AlertLink | null;
context: Record<string, unknown> | null;
deliveries: DeliveryResult[] | null;
readAt: string | null;
createdAt: string;
}
export interface ChannelSummary {
id: number;
name: string;
type: ChannelType;
enabled: boolean;
createdAt: string;
/** False when the config could not be read, e.g. still waiting on its upgrade. */
usable: boolean;
}
export interface ChannelDetail extends ChannelSummary {
config: Record<string, unknown>;
}
export interface AlertRule {
id: number;
name: string;
match: string;
minSeverity: Severity;
channelIds: number[];
enabled: boolean;
}
export interface AlertsMeta {
emailAvailable: boolean;
channelTypes: ChannelType[];
}
const RANK: Record<Severity, number> = {
info: 0,
success: 0,
warning: 1,
critical: 2,
};
export function isSeverity(value: unknown): value is Severity {
return (
typeof value === "string" &&
(SEVERITIES as readonly string[]).includes(value)
);
}
export function severityRank(severity: Severity): number {
return RANK[severity];
}
/** Whether a category pattern ("*", "automations.*", "acme-ssl.renewal_failed") covers a category. */
export function matchesCategory(pattern: string, category: string): boolean {
const trimmed = pattern.trim();
if (!trimmed || trimmed === "*") return true;
const escaped = trimmed
.split("*")
.map((part) => part.replace(/[.+?^${}()|[\]\\]/g, "\\$&"))
.join(".*");
return new RegExp(`^${escaped}$`, "i").test(category);
}
+142
View File
@@ -0,0 +1,142 @@
import http from "node:http";
import type { AddressInfo } from "node:net";
import { fileURLToPath } from "node:url";
import express, { type Router } from "express";
import {
createMockCtx,
createTestDb,
type MockPluginContext,
type TestDb,
} from "@termix/plugin-sdk/testing";
import type {
PluginFetchInit,
PluginNotifyHub,
} from "@termix/plugin-sdk/backend";
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
import manifestJson from "../../manifest.json";
export const pluginDir = fileURLToPath(new URL("../..", import.meta.url));
export const manifest = manifestJson as unknown as PluginManifest;
export interface FetchCall {
url: string;
init?: PluginFetchInit;
}
export interface TestServer {
db: TestDb;
mock: MockPluginContext;
hub: PluginNotifyHub;
fetches: FetchCall[];
/** Where the router is served, for a raw fetch such as the stream. */
url: string;
request: (
method: string,
path: string,
options?: { user?: string; body?: unknown },
// Route bodies vary per test; asserting on them is the point.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
) => Promise<{ status: number; body: any }>;
close: () => Promise<void>;
}
/**
* The plugin activated against a real in-memory database, its router mounted
* the way core mounts it, with every outbound request answered by `respond`.
*/
export async function startServer(
options: {
permissions?: string[];
settings?: Record<string, unknown>;
coreSettings?: Record<string, string>;
respond?: (url: string, init?: PluginFetchInit) => Response;
} = {},
): Promise<TestServer> {
const db = await createTestDb(pluginDir);
for (const user of ["alice", "bob"]) {
db.sqlite
.prepare("INSERT INTO users (id, username) VALUES (?, ?)")
.run(user, user);
}
const fetches: FetchCall[] = [];
let router: Router | null = null;
const mock = createMockCtx({
pluginId: manifest.id,
manifest,
capabilities: manifest.capabilities,
db: db.database,
router: () => (router = express.Router()),
permissions: options.permissions ?? ["alerts.use"],
settings: options.settings,
coreSettings: options.coreSettings,
fetch: async (url, init) => {
fetches.push({ url, init });
return options.respond?.(url, init) ?? new Response("ok");
},
});
const { activate } = await import("../../src/backend/index.js");
await activate(mock.ctx);
const hub = mock.notifyHub.current;
if (!hub) throw new Error("The plugin did not serve a hub");
const app = express();
app.use(express.json());
app.use((req, _res, next) => {
mock.setActor(req.header("x-test-user") || undefined);
next();
});
app.use((req, res, next) => router!(req, res, next));
const server = http.createServer(app);
await new Promise<void>((resolve) => server.listen(0, resolve));
const { port } = server.address() as AddressInfo;
return {
db,
mock,
hub,
fetches,
url: `http://127.0.0.1:${port}`,
async request(method, path, { user = "alice", body: given } = {}) {
const body = method === "GET" ? undefined : given;
const response = await fetch(`http://127.0.0.1:${port}${path}`, {
method,
headers: {
"x-test-user": user,
...(body !== undefined ? { "content-type": "application/json" } : {}),
},
body: body !== undefined ? JSON.stringify(body) : undefined,
});
const text = await response.text();
return { status: response.status, body: text ? JSON.parse(text) : null };
},
async close() {
await new Promise<void>((resolve) => server.close(() => resolve()));
for (const dispose of [...mock.disposals].reverse()) {
await Promise.resolve(dispose()).catch(() => {});
}
db.close();
},
};
}
/** A channel for alice through the route, returning its id. */
export async function addChannel(
server: TestServer,
body: Record<string, unknown>,
user = "alice",
): Promise<number> {
const response = await server.request("POST", "/channels", { user, body });
if (response.status !== 201) {
throw new Error(`channel not created: ${JSON.stringify(response.body)}`);
}
return response.body.id;
}
export const WEBHOOK = {
name: "ops",
type: "webhook",
config: { url: "https://hooks.example/alert" },
};
+328
View File
@@ -0,0 +1,328 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { addChannel, startServer, WEBHOOK, type TestServer } from "./helpers";
const mail = vi.hoisted(() => ({ sent: [] as unknown[] }));
vi.mock("../../src/backend/mail.js", async () => {
const actual = await vi.importActual<
typeof import("../../src/backend/mail.js")
>("../../src/backend/mail.js");
return {
...actual,
sendMail: async (smtp: unknown, message: unknown) => {
mail.sent.push({ smtp, message });
},
};
});
let server: TestServer | null = null;
afterEach(async () => {
await server?.close();
server = null;
mail.sent.length = 0;
});
const inbox = async (s: TestServer, user = "alice") =>
(await s.request("GET", "/items", { user })).body;
describe("the alert hub", () => {
it("puts an alert in each recipient's inbox with safe defaults", async () => {
server = await startServer();
const result = await server.hub.deliver({
source: "docker",
recipients: ["alice", "bob", "alice"],
notification: {
title: "Container stopped",
body: "web exited",
link: { tab: "docker", url: "javascript:alert(1)" },
},
});
expect(result).toEqual({ recipients: 2, delivered: 0, failures: [] });
for (const user of ["alice", "bob"]) {
const { items, unread } = await inbox(server, user);
expect(unread).toBe(1);
expect(items).toEqual([
expect.objectContaining({
source: "docker",
category: "docker",
severity: "warning",
title: "Container stopped",
body: "web exited",
link: { tab: "docker" },
readAt: null,
}),
]);
}
});
it("drops a repeat while the first is still unread", async () => {
server = await startServer();
const send = () =>
server!.hub.deliver({
source: "acme-ssl",
recipients: ["alice"],
notification: { title: "Renewal failed", dedupeKey: "renew:a" },
});
expect((await send()).recipients).toBe(1);
expect((await send()).recipients).toBe(0);
expect((await inbox(server)).items).toHaveLength(1);
await server.request("POST", "/items/read", { body: { all: true } });
expect((await send()).recipients).toBe(1);
expect((await inbox(server)).items).toHaveLength(2);
});
it("sends to the channels a matching rule names, and records how it went", async () => {
server = await startServer({
respond: (url) =>
url.includes("broken")
? new Response("nope", { status: 500, statusText: "Server Error" })
: new Response("ok"),
});
const ops = await addChannel(server, WEBHOOK);
const broken = await addChannel(server, {
...WEBHOOK,
name: "broken",
config: { url: "https://broken.example/hook" },
});
const quiet = await addChannel(server, {
...WEBHOOK,
name: "quiet",
config: { url: "https://quiet.example/hook" },
});
await server.request("POST", "/rules", {
body: {
name: "Docker",
match: "docker.*",
minSeverity: "warning",
channelIds: [ops, broken],
},
});
await server.request("POST", "/rules", {
body: {
name: "Only critical",
match: "*",
minSeverity: "critical",
channelIds: [quiet],
},
});
const result = await server.hub.deliver({
source: "docker",
recipients: ["alice"],
notification: {
title: "Container stopped",
category: "docker.container_stopped",
severity: "warning",
},
});
expect(result.delivered).toBe(1);
expect(result.failures).toEqual([
{
channelId: broken,
name: "broken",
error: "HTTP 500 Server Error: nope",
},
]);
expect(server.fetches.map((call) => call.url)).toEqual([
"https://hooks.example/alert",
"https://broken.example/hook",
]);
const body = JSON.parse(server.fetches[0].init!.body as string);
expect(body).toMatchObject({
title: "Container stopped",
severity: "warning",
category: "docker.container_stopped",
source: "docker",
});
const [item] = (await inbox(server)).items;
expect(item.deliveries).toEqual([
{ channelId: ops, name: "ops", ok: true },
{
channelId: broken,
name: "broken",
ok: false,
error: "HTTP 500 Server Error: nope",
},
]);
});
it("adds the channels a sender names, but only the recipient's own", async () => {
server = await startServer();
const mine = await addChannel(server, WEBHOOK);
const theirs = await addChannel(
server,
{ ...WEBHOOK, config: { url: "https://bob.example/hook" } },
"bob",
);
const result = await server.hub.deliver({
source: "automations",
recipients: ["alice"],
notification: { title: "Ping", channelIds: [mine, theirs] },
});
expect(result.delivered).toBe(1);
expect(server.fetches.map((call) => call.url)).toEqual([
"https://hooks.example/alert",
]);
});
it("skips a disabled channel", async () => {
server = await startServer();
const id = await addChannel(server, WEBHOOK);
await server.request("PUT", `/channels/${id}`, {
body: { enabled: false },
});
const result = await server.hub.deliver({
source: "automations",
recipients: ["alice"],
notification: { title: "Ping", channelIds: [id] },
});
expect(result.delivered).toBe(0);
expect(server.fetches).toEqual([]);
});
it("reaches a private address only with the opt-in and the admin allowlist", async () => {
server = await startServer({
coreSettings: {
notification_private_endpoint_allowlist: JSON.stringify(["NTFY.LAN"]),
},
});
const open = await addChannel(server, {
name: "lan",
type: "ntfy",
config: {
url: "http://ntfy.lan",
topic: "alerts",
allowPrivateNetwork: true,
},
});
const closed = await addChannel(server, {
name: "lan2",
type: "ntfy",
config: { url: "http://ntfy.lan", topic: "other" },
});
await server.hub.deliver({
source: "automations",
recipients: ["alice"],
notification: { title: "Ping", channelIds: [open, closed] },
});
expect(server.fetches.map((call) => call.init?.allowPrivateHosts)).toEqual([
["ntfy.lan"],
[],
]);
});
it("emails through the admin's SMTP server", async () => {
server = await startServer({
settings: {
smtpHost: "smtp.example",
smtpPort: 465,
smtpSecure: true,
smtpUser: "termix",
smtpPassword: "pw",
smtpFrom: "Termix <alerts@example.com>",
},
});
const id = await addChannel(server, {
name: "mail",
type: "email",
config: { to: "ops@example.com, oncall@example.com" },
});
const result = await server.hub.deliver({
source: "automations",
recipients: ["alice"],
notification: {
title: "Disk full",
body: "/data at 99%",
channelIds: [id],
link: { url: "https://termix.example/hosts/1" },
},
});
expect(result.delivered).toBe(1);
expect(mail.sent).toEqual([
{
smtp: {
host: "smtp.example",
port: 465,
secure: true,
user: "termix",
password: "pw",
from: "Termix <alerts@example.com>",
},
message: {
to: ["ops@example.com", "oncall@example.com"],
subject: "[Termix] Disk full",
text: "/data at 99%\n\nhttps://termix.example/hosts/1",
},
},
]);
});
it("reports an email channel as failed while SMTP is not set up", async () => {
server = await startServer({
settings: {
smtpHost: "smtp.example",
smtpFrom: "alerts@example.com",
},
});
const id = await addChannel(server, {
name: "mail",
type: "email",
config: { to: "ops@example.com" },
});
await server.mock.ctx.settings.set("smtpHost", "");
const result = await server.hub.deliver({
source: "automations",
recipients: ["alice"],
notification: { title: "Disk full", channelIds: [id] },
});
expect(result.failures).toEqual([
{
channelId: id,
name: "mail",
error: "Email is not set up on this server",
},
]);
});
it("lists a user's channels without their config", async () => {
server = await startServer();
const id = await addChannel(server, WEBHOOK);
expect(await server.hub.channels("alice")).toEqual([
{ id, name: "ops", type: "webhook", enabled: true },
]);
expect(await server.hub.channels("bob")).toEqual([]);
});
it("wipes everything a user had when their data is wiped", async () => {
server = await startServer();
await addChannel(server, WEBHOOK);
await server.hub.deliver({
source: "docker",
recipients: ["alice", "bob"],
notification: { title: "x" },
});
server.mock.ctx.events.emit("user.data_wiped", { userId: "alice" });
await vi.waitFor(async () =>
expect((await inbox(server!)).items).toEqual([]),
);
expect(await server.hub.channels("alice")).toEqual([]);
expect((await inbox(server, "bob")).items).toHaveLength(1);
});
});
@@ -0,0 +1,87 @@
import { afterEach, describe, expect, it } from "vitest";
import { createTestDb, type TestDb } from "@termix/plugin-sdk/testing";
import { pluginDir } from "./helpers";
// dismissed_alerts as core's SQLite bootstrap created it before 2.9.0, with
// the index performance-indexes.ts added.
const LEGACY_DDL = `
CREATE TABLE dismissed_alerts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id TEXT NOT NULL,
alert_id TEXT NOT NULL,
dismissed_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
);
CREATE INDEX idx_dismissed_alerts_user_id ON dismissed_alerts(user_id);
INSERT INTO users (id, username) VALUES ('alice', 'alice');
INSERT INTO dismissed_alerts (id, user_id, alert_id) VALUES (3, 'alice', 'old-news');
`;
const OWN = ["p_alerts_channels", "p_alerts_items", "p_alerts_rules"];
let db: TestDb | null = null;
afterEach(() => {
db?.close();
db = null;
});
function tables(target: TestDb): string[] {
return (
target.sqlite
.prepare("SELECT name FROM sqlite_master WHERE type = 'table'")
.all() as Array<{ name: string }>
).map((row) => row.name);
}
function indexes(target: TestDb, table: string): string[] {
return (
target.sqlite
.prepare(
"SELECT name FROM sqlite_master WHERE type = 'index' AND tbl_name = ? AND name NOT LIKE 'sqlite_%'",
)
.all(table) as Array<{ name: string }>
)
.map((row) => row.name)
.sort();
}
describe("the alerts tables", () => {
it("adopts dismissed_alerts with its rows and its one index", async () => {
db = await createTestDb(pluginDir, {
before: (sqlite) => sqlite.exec(LEGACY_DDL),
});
const names = tables(db);
expect(names).toContain("p_alerts_dismissed");
expect(names).not.toContain("dismissed_alerts");
for (const table of OWN) expect(names).toContain(table);
expect(
db.sqlite
.prepare("SELECT id, user_id, alert_id FROM p_alerts_dismissed")
.all(),
).toEqual([{ id: 3, user_id: "alice", alert_id: "old-news" }]);
expect(indexes(db, "p_alerts_dismissed")).toEqual([
"idx_dismissed_alerts_user_id",
]);
// Deleting the user still takes their rows with them.
db.sqlite.prepare("DELETE FROM users WHERE id = 'alice'").run();
expect(
db.sqlite.prepare("SELECT COUNT(*) AS n FROM p_alerts_dismissed").get(),
).toEqual({ n: 0 });
});
it("creates the same tables on a fresh install", async () => {
db = await createTestDb(pluginDir);
const names = tables(db);
for (const table of [...OWN, "p_alerts_dismissed"]) {
expect(names).toContain(table);
}
expect(indexes(db, "p_alerts_items")).toEqual([
"idx_alerts_items_dedupe",
"idx_alerts_items_unread",
"idx_alerts_items_user",
]);
});
});
+434
View File
@@ -0,0 +1,434 @@
import { afterEach, describe, expect, it } from "vitest";
import { FEED_URL } from "../../src/backend/announcements.js";
import { addChannel, startServer, WEBHOOK, type TestServer } from "./helpers";
let server: TestServer | null = null;
afterEach(async () => {
await server?.close();
server = null;
});
describe("permissions", () => {
it("refuses a user without alerts.use", async () => {
server = await startServer({ permissions: [] });
for (const [method, path] of [
["GET", "/items"],
["GET", "/channels"],
["POST", "/channels"],
["GET", "/rules"],
]) {
expect((await server.request(method, path, { body: {} })).status).toBe(
403,
);
}
});
});
describe("channels", () => {
it("creates, reads back, updates and deletes a channel", async () => {
server = await startServer();
const id = await addChannel(server, {
name: "pager",
type: "ntfy",
config: { url: "https://ntfy.sh", topic: "ops", token: "tk_1" },
});
const list = await server.request("GET", "/channels");
expect(list.body).toEqual([
expect.objectContaining({
id,
name: "pager",
type: "ntfy",
enabled: true,
usable: true,
}),
]);
expect(list.body[0].config).toBeUndefined();
const detail = await server.request("GET", `/channels/${id}`);
expect(detail.body.config).toEqual({
url: "https://ntfy.sh",
topic: "ops",
token: "tk_1",
});
// Stored sealed, never as plain JSON.
const stored = server.db.sqlite
.prepare("SELECT config FROM p_alerts_channels WHERE id = ?")
.get(id) as { config: string };
expect(stored.config).not.toContain("tk_1");
const renamed = await server.request("PUT", `/channels/${id}`, {
body: { name: "night pager" },
});
expect(renamed.body).toMatchObject({ name: "night pager", type: "ntfy" });
expect(renamed.body.config.token).toBe("tk_1");
expect((await server.request("DELETE", `/channels/${id}`)).status).toBe(
200,
);
expect((await server.request("GET", "/channels")).body).toEqual([]);
});
it("refuses a config that cannot send", async () => {
server = await startServer();
for (const body of [
{ name: "", type: "webhook", config: { url: "https://a.example" } },
{ name: "x", type: "sms", config: {} },
{ name: "x", type: "webhook", config: { url: "ftp://a.example" } },
{ name: "x", type: "ntfy", config: { url: "https://ntfy.sh" } },
{
name: "x",
type: "discord",
config: { url: "https://example.com/api/webhooks/1" },
},
{ name: "x", type: "email", config: { to: "not an address" } },
]) {
const response = await server.request("POST", "/channels", { body });
expect(response.status, JSON.stringify(body)).toBe(400);
}
});
it("keeps each user's channels to themselves", async () => {
server = await startServer();
const id = await addChannel(server, WEBHOOK);
for (const [method, path] of [
["GET", `/channels/${id}`],
["PUT", `/channels/${id}`],
["DELETE", `/channels/${id}`],
["POST", `/channels/${id}/test`],
]) {
const response = await server.request(method, path, {
user: "bob",
body: { name: "mine" },
});
expect(response.status, `${method} ${path}`).toBe(404);
}
expect(
(await server.request("GET", "/channels", { user: "bob" })).body,
).toEqual([]);
});
it("sends a test and reports why one failed", async () => {
server = await startServer({
respond: (url) =>
url.includes("down")
? new Response("", { status: 502, statusText: "Bad Gateway" })
: new Response("ok"),
});
const good = await addChannel(server, WEBHOOK);
const bad = await addChannel(server, {
...WEBHOOK,
config: { url: "https://down.example" },
});
expect(
(await server.request("POST", `/channels/${good}/test`)).body,
).toEqual({ success: true });
expect(
(await server.request("POST", `/channels/${bad}/test`)).body,
).toEqual({ success: false, error: "HTTP 502 Bad Gateway" });
});
it("says email is unavailable until SMTP is set up", async () => {
server = await startServer();
expect((await server.request("GET", "/meta")).body).toEqual({
emailAvailable: false,
channelTypes: ["webhook", "ntfy", "discord", "email"],
});
await server.mock.ctx.settings.set("smtpHost", "smtp.example");
await server.mock.ctx.settings.set("smtpFrom", "alerts@example.com");
expect((await server.request("GET", "/meta")).body.emailAvailable).toBe(
true,
);
});
});
describe("inbox", () => {
async function seed(s: TestServer) {
for (const title of ["one", "two", "three"]) {
await s.hub.deliver({
source: "docker",
recipients: ["alice"],
notification: {
title,
severity: title === "two" ? "critical" : "info",
},
});
}
await s.hub.deliver({
source: "docker",
recipients: ["bob"],
notification: { title: "bob only" },
});
}
it("lists newest first, filters and pages", async () => {
server = await startServer();
await seed(server);
const all = await server.request("GET", "/items");
expect(all.body.unread).toBe(3);
expect(all.body.items.map((item: { title: string }) => item.title)).toEqual(
["three", "two", "one"],
);
const critical = await server.request("GET", "/items?severity=critical");
expect(
critical.body.items.map((item: { title: string }) => item.title),
).toEqual(["two"]);
const page = await server.request(
"GET",
`/items?limit=1&before=${all.body.items[0].id}`,
);
expect(
page.body.items.map((item: { title: string }) => item.title),
).toEqual(["two"]);
});
it("marks read and unread, and counts what is left", async () => {
server = await startServer();
await seed(server);
const { items } = (await server.request("GET", "/items")).body;
const read = await server.request("POST", "/items/read", {
body: { ids: [items[0].id] },
});
expect(read.body).toEqual({ count: 2 });
const unread = await server.request("GET", "/items?unread=true");
expect(unread.body.items).toHaveLength(2);
await server.request("POST", "/items/read", {
body: { ids: [items[0].id], read: false },
});
expect((await server.request("GET", "/unread")).body).toEqual({
count: 3,
});
await server.request("POST", "/items/read", { body: { all: true } });
expect((await server.request("GET", "/unread")).body).toEqual({
count: 0,
});
// Bob's alert is his own.
expect(
(await server.request("GET", "/unread", { user: "bob" })).body,
).toEqual({ count: 1 });
});
it("deletes one alert, then every read one", async () => {
server = await startServer();
await seed(server);
const { items } = (await server.request("GET", "/items")).body;
expect(
(await server.request("DELETE", `/items/${items[0].id}`, { user: "bob" }))
.status,
).toBe(404);
await server.request("DELETE", `/items/${items[0].id}`);
await server.request("POST", "/items/read", {
body: { ids: [items[1].id] },
});
expect((await server.request("DELETE", "/items?read=true")).body).toEqual({
removed: 1,
});
expect(
(await server.request("GET", "/items")).body.items.map(
(item: { title: string }) => item.title,
),
).toEqual(["one"]);
});
it("lists the categories a user has alerts from", async () => {
server = await startServer();
await server.hub.deliver({
source: "acme-ssl",
recipients: ["alice"],
notification: { title: "x", category: "acme-ssl.renewal_failed" },
});
expect((await server.request("GET", "/categories")).body).toEqual([
{ source: "acme-ssl", category: "acme-ssl.renewal_failed" },
]);
});
});
describe("rules", () => {
it("creates, updates and deletes a rule over the user's own channels", async () => {
server = await startServer();
const mine = await addChannel(server, WEBHOOK);
const theirs = await addChannel(server, WEBHOOK, "bob");
expect(
(
await server.request("POST", "/rules", {
body: { name: "All", channelIds: [theirs] },
})
).status,
).toBe(400);
expect(
(
await server.request("POST", "/rules", {
body: { name: "All", channelIds: [] },
})
).status,
).toBe(400);
const created = await server.request("POST", "/rules", {
body: { name: "All", channelIds: [mine] },
});
expect(created.status).toBe(201);
expect(created.body).toMatchObject({
name: "All",
match: "*",
minSeverity: "warning",
channelIds: [mine],
enabled: true,
});
await server.request("PUT", `/rules/${created.body.id}`, {
body: {
name: "Docker",
match: "docker.*",
minSeverity: "critical",
channelIds: [mine],
enabled: false,
},
});
expect((await server.request("GET", "/rules")).body).toEqual([
{
id: created.body.id,
name: "Docker",
match: "docker.*",
minSeverity: "critical",
channelIds: [mine],
enabled: false,
},
]);
expect(
(
await server.request("DELETE", `/rules/${created.body.id}`, {
user: "bob",
})
).status,
).toBe(404);
await server.request("DELETE", `/rules/${created.body.id}`);
expect((await server.request("GET", "/rules")).body).toEqual([]);
});
it("drops a deleted channel from the rules that named it", async () => {
server = await startServer();
const a = await addChannel(server, WEBHOOK);
const b = await addChannel(server, { ...WEBHOOK, name: "b" });
await server.request("POST", "/rules", {
body: { name: "Both", channelIds: [a, b] },
});
await server.request("DELETE", `/channels/${a}`);
expect((await server.request("GET", "/rules")).body[0].channelIds).toEqual([
b,
]);
});
});
describe("announcements", () => {
const future = new Date(Date.now() + 86_400_000).toISOString();
const past = new Date(Date.now() - 86_400_000).toISOString();
const feed = [
{
id: "release-2-9",
title: "Termix 2.9 is out",
message: "Plugins are here.",
expiresAt: future,
type: "success",
actionUrl: "https://termix.site/blog",
actionText: "Read more",
},
{
id: "old",
title: "Gone",
message: "Expired",
expiresAt: past,
},
];
const respond = (url: string) =>
url === FEED_URL ? Response.json(feed) : new Response("ok");
it("brings each live announcement into the inbox once", async () => {
server = await startServer({ respond });
const first = await server.request("GET", "/items");
expect(first.body.items).toEqual([
expect.objectContaining({
source: "termix",
category: "termix.announcement",
severity: "success",
title: "Termix 2.9 is out",
body: "Plugins are here.",
link: { url: "https://termix.site/blog" },
context: { announcementId: "release-2-9", actionText: "Read more" },
}),
]);
await server.request("POST", "/items/read", { body: { all: true } });
const again = await server.request("GET", "/items");
expect(again.body.items).toHaveLength(1);
expect(again.body.unread).toBe(0);
});
it("never brings back one the user deleted", async () => {
server = await startServer({ respond });
const { items } = (await server.request("GET", "/items")).body;
await server.request("DELETE", `/items/${items[0].id}`);
expect((await server.request("GET", "/items")).body.items).toEqual([]);
expect(
server.db.sqlite.prepare("SELECT alert_id FROM p_alerts_dismissed").all(),
).toEqual([{ alert_id: "release-2-9" }]);
});
it("shows none while an admin has them turned off", async () => {
server = await startServer({ respond, settings: { announcements: false } });
expect((await server.request("GET", "/items")).body.items).toEqual([]);
expect(server.fetches).toEqual([]);
});
});
describe("the event stream", () => {
it("sends the unread count, then each new alert", async () => {
server = await startServer();
const controller = new AbortController();
const response = await fetch(`${server.url}/stream`, {
headers: { "x-test-user": "alice" },
signal: controller.signal,
});
expect(response.headers.get("content-type")).toContain("text/event-stream");
const reader = response.body!.getReader();
const decoder = new TextDecoder();
let text = "";
const readUntil = async (needle: string) => {
while (!text.includes(needle)) {
const { value, done } = await reader.read();
if (done) break;
text += decoder.decode(value, { stream: true });
}
};
await readUntil('"count":0');
expect(text).toContain("event: unread");
await server.hub.deliver({
source: "docker",
recipients: ["alice"],
notification: { title: "Live one" },
});
await readUntil("Live one");
await readUntil('"count":1');
expect(text).toContain("event: item");
controller.abort();
});
});
@@ -0,0 +1,213 @@
import { describe, expect, it, vi } from "vitest";
import type { PluginFetchInit } from "@termix/plugin-sdk/backend";
import {
parseRecipients,
sendToChannel,
validateChannelConfig,
type OutgoingAlert,
type SenderDeps,
} from "../../src/backend/senders.js";
import { matchesCategory, severityRank } from "../../src/types.js";
import { parseAllowlist } from "../../src/backend/index.js";
import { cleanLink } from "../../src/backend/hub.js";
const ALERT: OutgoingAlert = {
title: "Disk full",
body: "/data at 99%",
severity: "critical",
category: "automations.notify",
source: "automations",
link: { url: "https://termix.example/hosts/1" },
};
function deps(response = new Response("ok")) {
const calls: Array<{ url: string; init?: PluginFetchInit }> = [];
const value: SenderDeps = {
fetch: async (url, init) => {
calls.push({ url, init });
return response;
},
privateAllowlist: async () => ["ntfy.lan"],
smtp: async () => null,
sendMail: vi.fn(),
};
return { deps: value, calls };
}
describe("sendToChannel", () => {
it("posts ntfy with its priority, tag, click link and token", async () => {
const { deps: d, calls } = deps();
await sendToChannel(
{
type: "ntfy",
config: { url: "https://ntfy.sh/", topic: "ops", token: "tk_1" },
},
ALERT,
d,
);
expect(calls).toEqual([
{
url: "https://ntfy.sh/ops",
init: expect.objectContaining({
method: "POST",
body: "/data at 99%",
allowPrivateHosts: [],
headers: {
Title: "Disk full",
Priority: "5",
Tags: "rotating_light",
Click: "https://termix.example/hosts/1",
Authorization: "Bearer tk_1",
},
}),
},
]);
});
it("posts a Discord embed", async () => {
const { deps: d, calls } = deps();
await sendToChannel(
{
type: "discord",
config: {
url: "https://discord.com/api/webhooks/1/abc",
username: "Termix",
},
},
ALERT,
d,
);
const payload = JSON.parse(calls[0].init!.body!);
expect(payload).toMatchObject({
username: "Termix",
embeds: [
{
title: "Disk full",
description: "/data at 99%",
color: 15158332,
url: "https://termix.example/hosts/1",
},
],
});
});
it("puts on the webhook's own method and headers", async () => {
const { deps: d, calls } = deps();
await sendToChannel(
{
type: "webhook",
config: {
url: "https://hooks.example",
method: "PUT",
headers: { Authorization: "Bearer x" },
},
},
ALERT,
d,
);
expect(calls[0].init).toMatchObject({
method: "PUT",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer x",
},
});
});
it("throws with the status when the receiver refuses", async () => {
const { deps: d } = deps(
new Response("slow down", { status: 429, statusText: "Too Many" }),
);
await expect(
sendToChannel(
{ type: "webhook", config: { url: "https://hooks.example" } },
ALERT,
d,
),
).rejects.toThrow("HTTP 429 Too Many: slow down");
});
it("never links to anything but http(s)", async () => {
const { deps: d, calls } = deps();
await sendToChannel(
{ type: "ntfy", config: { url: "https://ntfy.sh", topic: "t" } },
{ ...ALERT, link: { url: "javascript:alert(1)" } },
d,
);
expect(calls[0].init!.headers).not.toHaveProperty("Click");
});
});
describe("validateChannelConfig", () => {
it("accepts a working config of each type", () => {
expect(
validateChannelConfig("webhook", { url: "https://a.example" }),
).toBeNull();
expect(
validateChannelConfig("ntfy", { url: "https://ntfy.sh", topic: "t" }),
).toBeNull();
expect(
validateChannelConfig("discord", {
url: "https://discordapp.com/api/webhooks/1/x",
}),
).toBeNull();
expect(
validateChannelConfig("email", { to: "a@example.com; b@example.org" }),
).toBeNull();
});
it("names what is missing", () => {
expect(validateChannelConfig("ntfy", { url: "https://ntfy.sh" })).toMatch(
/topic/,
);
expect(validateChannelConfig("email", { to: "" })).toMatch(/address/);
});
});
describe("helpers", () => {
it("splits email recipients on commas, semicolons and spaces", () => {
expect(parseRecipients("a@x.io, b@x.io;c@x.io d@x.io")).toEqual([
"a@x.io",
"b@x.io",
"c@x.io",
"d@x.io",
]);
});
it("matches categories by pattern", () => {
expect(matchesCategory("*", "docker.stopped")).toBe(true);
expect(matchesCategory("", "docker.stopped")).toBe(true);
expect(matchesCategory("docker.*", "docker.stopped")).toBe(true);
expect(matchesCategory("docker.*", "dockerx.stopped")).toBe(false);
expect(
matchesCategory("acme-ssl.renewal_failed", "acme-ssl.renewal_failed"),
).toBe(true);
expect(matchesCategory("acme-ssl.renewal_failed", "acme-ssl.other")).toBe(
false,
);
});
it("orders severities with success alongside info", () => {
expect(severityRank("info")).toBe(severityRank("success"));
expect(severityRank("warning")).toBeGreaterThan(severityRank("info"));
expect(severityRank("critical")).toBeGreaterThan(severityRank("warning"));
});
it("reads the admin allowlist leniently", () => {
expect(parseAllowlist('["NTFY.lan", " mail.lan ", 3]')).toEqual([
"ntfy.lan",
"mail.lan",
]);
expect(parseAllowlist("not json")).toEqual([]);
expect(parseAllowlist(null)).toEqual([]);
});
it("keeps only a safe tab id and an http(s) url in a link", () => {
expect(cleanLink({ tab: "docker", url: "https://a.example" })).toEqual({
tab: "docker",
url: "https://a.example",
});
expect(cleanLink({ tab: "../../x", url: "file:///etc/passwd" })).toBeNull();
expect(cleanLink("docker")).toBeNull();
});
});
@@ -0,0 +1,197 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { fireEvent, waitFor } from "@testing-library/react";
import type { PluginApiClient } from "@termix/plugin-sdk/frontend";
import {
renderWithApp,
type RenderedPluginApp,
} from "@termix/plugin-sdk/testing";
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
import * as plugin from "../../src/frontend/index";
import manifestJson from "../../manifest.json";
import locales from "../../locales/en.json";
const manifest = manifestJson as unknown as PluginManifest;
let rendered: RenderedPluginApp | null = null;
afterEach(async () => {
await rendered?.deactivate();
rendered = null;
});
const ITEMS = [
{
id: 2,
source: "acme-ssl",
category: "acme-ssl.renewal_failed",
severity: "critical",
title: "Certificate renewal failed",
body: "rate limited",
link: null,
context: null,
deliveries: [{ channelId: 1, name: "pager", ok: false, error: "HTTP 500" }],
readAt: null,
createdAt: new Date().toISOString(),
},
{
id: 1,
source: "termix",
category: "termix.announcement",
severity: "info",
title: "Termix 2.9 is out",
body: null,
link: { url: "https://termix.site" },
context: { actionText: "Read more" },
deliveries: null,
readAt: "2026-01-01T00:00:00.000Z",
createdAt: "2026-01-01T00:00:00.000Z",
},
];
function stubApi() {
const calls: Array<[string, string, unknown?]> = [];
const api = {
get: vi.fn(async (url: string) => {
calls.push(["GET", url]);
if (url.startsWith("/items"))
return { data: { items: ITEMS, unread: 1 } };
if (url === "/unread") return { data: { count: 1 } };
return { data: [] };
}),
post: vi.fn(async (url: string, body?: unknown) => {
calls.push(["POST", url, body]);
return { data: { count: 0 } };
}),
delete: vi.fn(async (url: string) => {
calls.push(["DELETE", url]);
return { data: { success: true } };
}),
put: vi.fn(),
patch: vi.fn(),
} as unknown as PluginApiClient;
return { api, calls };
}
describe(`${manifest.id} activate`, () => {
it("registers a footer rail item, its panel and tab, the popups and its actions", async () => {
rendered = await renderWithApp(plugin, { manifest, locales });
expect(rendered.registered.railItems()).toEqual([
expect.objectContaining({ id: "alerts", permission: "alerts.use" }),
]);
expect(rendered.registered.panels()).toEqual(["alerts"]);
expect(rendered.registered.tabs()).toEqual(["alerts"]);
expect(rendered.registered.slot("shell.overlay")).toEqual([
"alerts.toaster",
]);
expect(rendered.registered.actions().sort()).toEqual([
"alerts.open",
"alerts.openChannels",
]);
});
it("opens the tab from its actions", async () => {
rendered = await renderWithApp(plugin, { manifest, locales });
await rendered.app.invokeAction("alerts.openChannels");
expect(rendered.shellCalls).toContainEqual({
method: "openSingletonTab",
args: ["alerts"],
});
});
it("removes everything it registered on deactivate", async () => {
const app = await renderWithApp(plugin, { manifest, locales });
await app.deactivate();
expect(app.registered.tabs()).toEqual([]);
expect(app.registered.panels()).toEqual([]);
expect(app.registered.railItems()).toEqual([]);
expect(app.registered.actions()).toEqual([]);
expect(app.registered.slot("shell.overlay")).toEqual([]);
});
});
describe("the alerts panel", () => {
it("lists alerts, flags a failed delivery and marks one read", async () => {
const { api, calls } = stubApi();
rendered = await renderWithApp(plugin, { manifest, locales, api });
const panel = rendered.renderPanel("alerts", { active: true });
await waitFor(() =>
expect(panel.textContent).toContain("Certificate renewal failed"),
);
expect(panel.textContent).toContain("Termix 2.9 is out");
expect(panel.textContent).toContain("1 channel failed");
expect(panel.textContent).toContain("Read more");
fireEvent.click(panel.querySelector('[aria-label="Mark as read"]')!);
await waitFor(() =>
expect(calls).toContainEqual([
"POST",
"/items/read",
{ ids: [2], read: true },
]),
);
});
it("deletes an alert", async () => {
const { api, calls } = stubApi();
rendered = await renderWithApp(plugin, { manifest, locales, api });
const panel = rendered.renderPanel("alerts", { active: true });
await waitFor(() =>
expect(panel.textContent).toContain("Certificate renewal failed"),
);
fireEvent.click(panel.querySelectorAll('[aria-label="Delete"]')[0]);
await waitFor(() => expect(calls).toContainEqual(["DELETE", "/items/2"]));
await waitFor(() =>
expect(panel.textContent).not.toContain("Certificate renewal failed"),
);
});
});
describe("the alert feed homepage widget", () => {
it("registers under the 2.8 widget id", async () => {
rendered = await renderWithApp(plugin, { manifest, locales });
expect(rendered.registered.extensions("homepage.widgets")).toEqual([
"alert_feed",
]);
});
it("shows unread alerts and marks one read", async () => {
const { api, calls } = stubApi();
rendered = await renderWithApp(plugin, { manifest, locales, api });
const view = rendered.renderExtension(
"homepage.widgets",
"alert_feed",
"view",
{
widget: { title: null },
config: { maxItems: 5, showRead: false },
},
);
await waitFor(() =>
expect(view.textContent).toContain("Certificate renewal failed"),
);
expect(calls).toContainEqual(["GET", "/items?unread=true&limit=5"]);
fireEvent.click(view.querySelector('[title="Mark as read"]')!);
await waitFor(() =>
expect(calls).toContainEqual([
"POST",
"/items/read",
{ ids: [2], read: true },
]),
);
});
it("reads the 2.8 showAcknowledged option", async () => {
const { api, calls } = stubApi();
rendered = await renderWithApp(plugin, { manifest, locales, api });
rendered.renderExtension("homepage.widgets", "alert_feed", "view", {
widget: {},
config: { maxItems: 3, showAcknowledged: true },
});
await waitFor(() =>
expect(calls).toContainEqual(["GET", "/items?limit=3"]),
);
});
});
+140
View File
@@ -0,0 +1,140 @@
import { describe, expect, it, vi } from "vitest";
import {
createAlertsStore,
parseServerSentEvents,
} from "../../src/frontend/store";
import { shouldPopUp } from "../../src/frontend/popups";
import {
configFrom,
parseHeaders,
EMPTY,
} from "../../src/frontend/channel-config";
import type { AlertItem } from "../../src/types";
function item(id: number, severity: AlertItem["severity"]): AlertItem {
return {
id,
source: "docker",
category: "docker",
severity,
title: `alert ${id}`,
body: null,
link: null,
context: null,
deliveries: null,
readAt: null,
createdAt: new Date().toISOString(),
};
}
/** A response whose body streams the given chunks, then stays open. */
function streaming(chunks: string[]): Response {
const encoder = new TextEncoder();
const body = new ReadableStream<Uint8Array>({
start(controller) {
for (const chunk of chunks) controller.enqueue(encoder.encode(chunk));
},
});
return new Response(body, {
headers: { "Content-Type": "text/event-stream" },
});
}
describe("parseServerSentEvents", () => {
it("parses whole events and keeps the rest for later", () => {
const events: Array<{ event: string; data: string }> = [];
const rest = parseServerSentEvents(
'event: unread\ndata: {"count":2}\n\n: keepalive\n\nevent: item\ndata: {"id"',
(event) => events.push(event),
);
expect(events).toEqual([{ event: "unread", data: '{"count":2}' }]);
expect(rest).toBe('event: item\ndata: {"id"');
});
});
describe("createAlertsStore", () => {
it("follows the unread count and hands on each alert once as new", async () => {
const first = item(7, "critical");
const store = createAlertsStore({
connect: async () =>
streaming([
'event: unread\ndata: {"count":3}\n\n',
`event: item\ndata: ${JSON.stringify(first)}\n\n`,
`event: item\ndata: ${JSON.stringify({ ...first, deliveries: [] })}\n\n`,
]),
loadUnread: async () => 0,
});
const seen: Array<[number, boolean]> = [];
store.onItem((alert, isNew) => seen.push([alert.id, isNew]));
store.start();
await vi.waitFor(() => expect(seen).toHaveLength(2));
store.stop();
expect(store.unread()).toBe(3);
expect(seen).toEqual([
[7, true],
[7, false],
]);
expect(store.version()).toBe(2);
});
it("falls back to the count route while the stream is down", async () => {
const loadUnread = vi.fn(async () => 5);
const store = createAlertsStore({
connect: async () => new Response("", { status: 503 }),
loadUnread,
retryMs: 10_000,
});
store.start();
await vi.waitFor(() => expect(store.unread()).toBe(5));
store.stop();
});
});
describe("popups", () => {
it("follows the user's level", () => {
expect(shouldPopUp(item(1, "info"), "all")).toBe(true);
expect(shouldPopUp(item(1, "info"), "warning")).toBe(false);
expect(shouldPopUp(item(1, "warning"), "warning")).toBe(true);
expect(shouldPopUp(item(1, "warning"), "critical")).toBe(false);
expect(shouldPopUp(item(1, "critical"), "critical")).toBe(true);
expect(shouldPopUp(item(1, "critical"), "off")).toBe(false);
});
});
describe("channel config", () => {
it("reads headers one per line", () => {
expect(
parseHeaders("Authorization: Bearer x\nbad line\nX-Id: 7 "),
).toEqual({ Authorization: "Bearer x", "X-Id": "7" });
});
it("builds only the fields each type uses", () => {
expect(
configFrom({
...EMPTY,
type: "webhook",
url: " https://a.example ",
headers: "A: b",
allowPrivateNetwork: true,
}),
).toEqual({
url: "https://a.example",
method: "POST",
headers: { A: "b" },
allowPrivateNetwork: true,
});
expect(
configFrom({ ...EMPTY, type: "email", to: "ops@example.com" }),
).toEqual({ to: "ops@example.com" });
expect(
configFrom({
...EMPTY,
type: "discord",
url: "https://discord.com/api/webhooks/1",
allowPrivateNetwork: true,
}),
).toEqual({ url: "https://discord.com/api/webhooks/1" });
});
});
+4
View File
@@ -0,0 +1,4 @@
{
"extends": "@termix/plugin-sdk/tsconfig.plugin.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts", "tests/**/*.tsx"]
}
+3
View File
@@ -0,0 +1,3 @@
import { pluginVitestConfig } from "@termix/plugin-sdk/vitest-preset";
export default pluginVitestConfig(import.meta.url);