Follow terdut-server into teams: switch team, per-team schedule
terdut-server v0.12 made everything team-scoped and v0.20 is what this
client now targets. Against it the old client was wrong in three ways:
the schedule moved to /api/teams/{id}/schedule, GET /api/schedule/current
became a list with one entry per team, and users, incidents, alerts and
schedule entries all grew fields the client ignored.
T steps through all teams and then each of yours. The header names what
is showing, and incident and alert rows gain a Team column when more than
one team can appear. team: in config.yaml picks the team to start on, by
name or id; an unknown one is reported and falls back to all teams.
The schedule is one team's rota, so it shows the active team, or with
all teams showing the first one you own. Writes need an owner or an
administrator, and the picker offers only the team's members, since the
server answers 404 for anybody else. Both are checked up front and the
reason goes in the status bar, rather than surfacing as a 403 after the
user has picked somebody. Stats are not team-scoped by the server and
stay that way here.
Users shows an admin/disabled Flags column. Creating and deleting users
is administrators only, and topic, keys and password work on your own
row or on anyone's for an administrator; the server enforces the same
rule, this only explains it before the round trip.
The server has no version endpoint, so an older one is recognised by
GET /api/teams answering 404, and the TUI says it needs v0.20 or later.
Connecting now also loads /api/teams and /api/me with the key, which
means a wrong key fails on start instead of on the first list; /healthz
does not check it. There is no fallback to the pre-team paths.
Rebuilding a table whose column count changes under loaded rows panicked
inside bubbles, because it re-renders the old rows on SetColumns. The
rows are now cleared first and the cursor put back, so a refresh still
does not jump to the top.
Escalation ladders, invites, integrations and the admin settings are
left to the server's web UI. Checked against a real v0.20.1 server with
two teams, an administrator and a plain member.
Breaking: requires terdut-server v0.20.0 or later. Use terdut-tui v0.9.x
with servers before v0.12.
This commit is contained in:
@@ -10,12 +10,33 @@ Written in Go using [Bubbletea](https://github.com/charmbracelet/bubbletea).
|
||||
- **Incident actions** — acknowledge, assign, snooze, note, resolve and archive
|
||||
- **Timeline** — the full history of an incident, system events, pages and notes together
|
||||
- **Alert feed** — the raw read-only alerts underneath, each linked to its incident
|
||||
- **On-call schedule** — visual calendar of who is on duty, assign and remove entries
|
||||
- **Teams** — switch between your teams, or see all of them at once
|
||||
- **On-call schedule** — visual calendar of who is on duty in a team, assign and remove entries
|
||||
- **Statistics** — MTTA and MTTR, plus alert frequency by name, hour and day
|
||||
- **User management** — add and remove users, manage API keys, set each user's ntfy topic
|
||||
|
||||
> Requires terdut-server **v0.4.0 or later**. Earlier servers have no incidents API;
|
||||
> use terdut-tui v0.3.x with those.
|
||||
> Requires terdut-server **v0.20.0 or later**. The server became team-scoped in
|
||||
> v0.12 and this client follows it; earlier servers answer 404 for `/api/teams`
|
||||
> and the TUI says so on start. Use terdut-tui v0.9.x with servers before v0.12.
|
||||
> Escalation ladders, invites, integrations and the admin settings stay in the
|
||||
> server's web UI.
|
||||
|
||||
## Teams
|
||||
|
||||
Everything the server returns is scoped to the teams your key's user belongs
|
||||
to. The header shows which are on screen, and `T` steps through *all* → each of
|
||||
your teams in turn. With several teams showing, incident and alert rows carry a
|
||||
Team column.
|
||||
|
||||
The schedule is one team's rota, so the Schedule section shows the active team,
|
||||
or with *all* showing the first team you own. Only a team's owners, and
|
||||
administrators, can change its rota; anyone else gets the reason in the status
|
||||
bar instead of a picker. The picker offers only that team's members, because the
|
||||
server refuses anybody else. Stats are not team-scoped by the server and always
|
||||
cover all your teams.
|
||||
|
||||
Administrators are the only users who can create or delete users, or act on
|
||||
someone else's password, topic or API keys. Everyone can manage their own.
|
||||
|
||||
## Alerts and incidents
|
||||
|
||||
@@ -49,9 +70,6 @@ Every delivery lands on the incident's timeline: `Notified <user> (triggered)`
|
||||
when ntfy accepted the page, and `Notification to <user> failed` when it ran out
|
||||
of retries. That second one is the one to look for when nobody's phone rang.
|
||||
|
||||
Editing topics needs terdut-server **v0.6.0 or later**; the timeline entries need
|
||||
**v0.7.0 or later**. Against an older server the topic column stays empty and
|
||||
editing one reports the server's 404.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -70,6 +88,7 @@ server_url: https://terdut.example.com
|
||||
api_key: <your-api-key>
|
||||
refresh_interval: 30 # seconds, optional
|
||||
theme: gruvbox-dark # optional, this is the default
|
||||
team: Ops # optional, a team name or id to start on; default is all
|
||||
```
|
||||
|
||||
The API key is generated in terdut-server. See the server documentation for how to bootstrap a user and issue an API key.
|
||||
@@ -133,6 +152,7 @@ Global:
|
||||
| `esc` | Go back |
|
||||
| `r` | Refresh |
|
||||
| `f` | Cycle filter |
|
||||
| `T` | Switch team: all → each of your teams (when you have more than one) |
|
||||
| `q` | Quit |
|
||||
|
||||
The sections, in `tab` order: Incidents · Alerts · Stats · Archived · Schedule · Users.
|
||||
@@ -181,9 +201,8 @@ Schedule section:
|
||||
One person holds a given day. Assigning over days somebody else already has
|
||||
asks first — naming them and how many days are being taken — and moves the whole
|
||||
selection at once when you accept, so reassigning a week is one confirmation
|
||||
rather than seven deletions. Taking somebody's shift needs terdut-server
|
||||
**v0.8.0 or later**; against an older server the assignment is refused with
|
||||
`date already assigned`.
|
||||
rather than seven deletions. The header line names the team whose rota this is,
|
||||
and "On-call today" lists everyone on call across your teams.
|
||||
|
||||
Users section:
|
||||
|
||||
@@ -196,5 +215,6 @@ Users section:
|
||||
| `p` | Set the selected user's web UI password — asks for the current one when it is your own |
|
||||
|
||||
In Users, `k` and `d` act on the selected row, so move with `↑`/`↓` there rather
|
||||
than `k`. Setting passwords needs terdut-server **v0.10.2 or later**, the first
|
||||
with a web UI.
|
||||
than `k`. The Flags column marks administrators and disabled accounts. `n` and `d`
|
||||
are for administrators; `t`, `k` and `p` work on your own row, or on anyone's if you
|
||||
are one.
|
||||
|
||||
Reference in New Issue
Block a user