feat(console): status filter, own monitor order, page limits and smaller fixes #157

Merged
Sebi merged 4 commits from feat/dashboard-status-filter into main 2026-11-25 22:43:21 +00:00
Owner

Five changes, each in its own commit.

1. Filter the monitor list by status

  • Status counts as links: the status counts above the list (●) are now links. One shows only the monitors of that status, the active one shows all again.
  • Combines with the search and the range; the search form and the pager keep it.
  • Edge cases: an unknown status shows everything, and an empty filter says so.

2. Status page editor and signup

  • "Add all" / "Remove all" above "Monitors on this page". This is a small generic data-check-all handler in app.js.
  • /signup when signed in redirects to the monitor list, as /login already did.

3. Limit: monitors per status page

  • Where it is set: a new limit monitors_per_page, with a platform default (Admin → Limits) and an override per organization, like the other limits.
  • Migration 00053: adds orgs.limit_monitors_per_page.
  • When the limit is hit: saving a page with more monitors gives 422 page_monitor_limit. A page beyond a lowered limit keeps its monitors but cannot grow.
  • Where it shows: the page editor names the limit, and the organization's usage lists it.

4. Sorting and own order

  • Sort switcher: own order (the default), name, status (problems first), uptime (worst first) or latency (slowest first). The choice is remembered in a cookie, and paging follows it.
  • "Arrange monitors": shows the whole tree. Within each group, monitors are moved by drag & drop or with ↑/↓, and every change is saved at once.
    • The endpoint is PUT /api/v1/org/monitors/order. It needs write access to every monitor given, is atomic, is audited (monitor.order) and is documented.
    • Monitors without a position follow the positioned ones, by name.
  • Migration 00054: adds monitors.position.

Tests

  • TestDashboardFiltersByStatus
  • TestSignupSendsSignedInUsersToTheMonitors
  • TestPageEditorOffersAddAndRemoveAll
  • TestMonitorsPerStatusPageLimit
  • TestMonitorOrder: order, remembered sort, unknown, duplicate and foreign monitors.
  • go test -p 1 ./..., go vet and gofmt are clean.
  • Dev environment on 8080 is restarted with migrations 52–54.

🤖 Generated with Claude Code

https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3

Five changes, each in its own commit. ## 1. Filter the monitor list by status - **Status counts as links:** the status counts above the list (●) are now links. One shows only the monitors of that status, the active one shows all again. - **Combines** with the search and the range; the search form and the pager keep it. - **Edge cases:** an unknown `status` shows everything, and an empty filter says so. ## 2. Status page editor and signup - **"Add all" / "Remove all"** above "Monitors on this page". This is a small generic `data-check-all` handler in `app.js`. - **`/signup` when signed in** redirects to the monitor list, as `/login` already did. ## 3. Limit: monitors per status page - **Where it is set:** a new limit `monitors_per_page`, with a platform default (Admin → Limits) and an override per organization, like the other limits. - **Migration 00053:** adds `orgs.limit_monitors_per_page`. - **When the limit is hit:** saving a page with more monitors gives `422 page_monitor_limit`. A page beyond a lowered limit keeps its monitors but cannot grow. - **Where it shows:** the page editor names the limit, and the organization's usage lists it. ## 4. Sorting and own order - **Sort switcher:** own order (the default), name, status (problems first), uptime (worst first) or latency (slowest first). The choice is remembered in a cookie, and paging follows it. - **"Arrange monitors":** shows the whole tree. Within each group, monitors are moved by drag & drop or with ↑/↓, and every change is saved at once. - The endpoint is `PUT /api/v1/org/monitors/order`. It needs write access to every monitor given, is atomic, is audited (`monitor.order`) and is documented. - Monitors without a position follow the positioned ones, by name. - **Migration 00054:** adds `monitors.position`. ## Tests - `TestDashboardFiltersByStatus` - `TestSignupSendsSignedInUsersToTheMonitors` - `TestPageEditorOffersAddAndRemoveAll` - `TestMonitorsPerStatusPageLimit` - `TestMonitorOrder`: order, remembered sort, unknown, duplicate and foreign monitors. - `go test -p 1 ./...`, `go vet` and `gofmt` are clean. - Dev environment on 8080 is restarted with migrations 52–54. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi added 4 commits 2026-11-25 22:35:47 +00:00
The status counts above the monitor list are now links: one shows only
the monitors of that status as a flat list, the active one shows all
again. The filter combines with the search and the range and is kept by
the search form and the pager; an unknown status shows everything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
The status page editor gets "Add all" and "Remove all" above its monitor
list. Opening the signup page while signed in leads to the monitor list,
as the login page already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Platform admins set a default for how many monitors a status page may
show, and an override per organization, like the other limits. Saving a
page with more gives 422 page_monitor_limit; a page beyond a lowered
limit keeps its monitors but cannot grow. The page editor names the
limit and the organization's usage lists it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
feat(console): sort the monitor list and put monitors in an order of one's own
ci / image (pull_request) Waiting for needed jobs
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 10m49s
ci / test (pull_request) Successful in 14m39s
ci / build (pull_request) In progress
b0d4bcc002
The monitor list gets a sort switcher: the organization's own order, by
default, or by name, status (problems first), uptime (worst first) or
latency (slowest first). The choice is remembered in a cookie; paging
follows it.

"Arrange monitors" shows the whole tree with each group's monitors to
drag, or move with up and down, into the order wanted; every change is
saved at once through PUT /api/v1/org/monitors/order, which needs write
access to every monitor given and is audited. Monitors without a position
follow the positioned ones, by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi merged commit 15aad53d3d into main 2026-11-25 22:43:21 +00:00
Sebi deleted branch feat/dashboard-status-filter 2026-11-25 22:43:23 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ZB-Server/uptimesebi#157