Rule editor: silent-source and metric-threshold triggers #23

Merged
Gilles merged 10 commits from feat/18-stale-threshold-rules into master 2026-10-29 06:59:46 +00:00
Owner

Closes #18

Frontend for argus/backend#29 (PR argus/backend#33) and argus/backend#23 (PR argus/backend#34). Stacked on #22 (base feat/17-sources).

Changes

  • Trigger gains stale ("Source muette", default severity alert) and metric_threshold ("Seuil sur une métrique", default warning); THRESHOLD_OPERATORS.
  • Rule form:
    • stale: optional "Délai sans rapport" (90s, 15m, 1h, 7d…, validated by a pattern; empty = the period announced by the source). Sent as {after: "2h"} or {}.
    • metric_threshold: metric key (required), operator (>, >=, <, <=, default >=), warning and/or failure threshold — only the thresholds that are set are sent.
  • Editing shows a stored delay (seconds) back as 2h / 1d… (utils/duration.ts); the rule list summarises the parameters ("après 2h", "disk_pct > warn 80 / fail 90").
  • Tests: src/__tests__/RuleTriggers.spec.ts.

Checks

pnpm run test:unit (93 passed), vue-tsc -b, pnpm run build.

🤖 Generated with Claude Code

https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA

Closes #18 Frontend for argus/backend#29 (PR argus/backend#33) and argus/backend#23 (PR argus/backend#34). **Stacked on #22** (base `feat/17-sources`). ## Changes - `Trigger` gains `stale` ("Source muette", default severity alert) and `metric_threshold` ("Seuil sur une métrique", default warning); `THRESHOLD_OPERATORS`. - Rule form: - stale: optional "Délai sans rapport" (`90s`, `15m`, `1h`, `7d`…, validated by a pattern; empty = the period announced by the source). Sent as `{after: "2h"}` or `{}`. - metric_threshold: metric key (required), operator (`>`, `>=`, `<`, `<=`, default `>=`), warning and/or failure threshold — only the thresholds that are set are sent. - Editing shows a stored delay (seconds) back as `2h` / `1d`… (`utils/duration.ts`); the rule list summarises the parameters ("après 2h", "disk_pct > warn 80 / fail 90"). - Tests: `src/__tests__/RuleTriggers.spec.ts`. ## Checks `pnpm run test:unit` (93 passed), `vue-tsc -b`, `pnpm run build`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
feature: rule editor for silent-source and metric-threshold triggers
All checks were successful
ci / unit (pull_request) Successful in 1m41s
ci / publish (pull_request) Has been skipped
1587c7f1f3
- Triggers "stale" (Source muette, alert by default, optional delay
  such as 2h; empty means the period the source announces) and
  "metric_threshold" (metric key, operator, warn and/or fail
  thresholds, warning by default).
- A stored delay comes back in seconds and is shown again as 2h/1d...
  (utils/duration.ts); the rule list summarises the parameters.

Closes #18

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
Author
Owner
<!-- argus-link-bot:argus/frontend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/argus/frontend/pr/23)
Merge branch 'feat/17-sources' into feat/18-stale-threshold-rules
Some checks failed
ci / unit (pull_request) Has been cancelled
ci / publish (pull_request) Has been cancelled
37d4e1c051
Merge branch 'feat/17-sources' into feat/18-stale-threshold-rules
All checks were successful
ci / unit (pull_request) Successful in 1m38s
ci / publish (pull_request) Has been skipped
a54933fcc1
Gilles changed target branch from feat/17-sources to master 2026-10-29 06:56:29 +00:00
Merge remote-tracking branch 'origin/master' into feat/18-stale-threshold-rules
All checks were successful
ci / unit (pull_request) Successful in 1m37s
ci / publish (pull_request) Has been skipped
bbb4c07a7d
Gilles scheduled this pull request to auto merge when all checks succeed 2026-10-29 06:57:51 +00:00
Gilles merged commit db73da549f into master 2026-10-29 06:59:46 +00:00
Gilles deleted branch feat/18-stale-threshold-rules 2026-10-29 06:59:47 +00:00
Sign in to join this conversation.
No description provided.