Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
446938e
Polish dashboard charts and preserve hover across refreshes
bazaruzero Nov 19, 2026
6dee61e
Clarify sparse chart history and tighten the panel layout
bazaruzero Nov 21, 2026
5a815b2
Thin dashboard chart lines for dense readings
bazaruzero Nov 21, 2026
2676711
Archive polish-chart-design and sync dashboard requirements
bazaruzero Nov 21, 2026
c89131c
Display dashboard chart times in the viewer's timezone
bazaruzero Nov 21, 2026
0accf81
Archive localize-chart-timezones and sync dashboard requirements
bazaruzero Nov 21, 2026
637c157
Add shareable dashboard and panel time ranges
bazaruzero Nov 22, 2026
1c927f9
Add one-minute and five-minute chart ranges
bazaruzero Nov 22, 2026
034d612
Archive add-time-range-picker and sync dashboard requirements
bazaruzero Nov 22, 2026
b963c53
Add dashboard refresh cadence and manual refresh controls
bazaruzero Nov 22, 2026
314f3ef
Refine refresh button and reduce dashboard control labels
bazaruzero Nov 22, 2026
55807d6
Archive add-refresh-control and sync dashboard requirements
bazaruzero Nov 22, 2026
93d12c6
Add panel-local drag zoom and range reset
bazaruzero Nov 23, 2026
1b766cd
Archive add-chart-zoom and sync dashboard requirements
bazaruzero Nov 23, 2026
9f1860a
Add legend series visibility selection
bazaruzero Nov 23, 2026
97301ee
Remove redundant All legend control
bazaruzero Nov 23, 2026
3b5fce2
Archive add-series-visibility-toggle and complete UI series
bazaruzero Nov 23, 2026
bdd32fe
Remove internal feature review checklists
bazaruzero Nov 23, 2026
b57bb86
Show decimal chart values and selected-window means
bazaruzero Nov 23, 2026
727a851
Round displayed chart means to whole numbers
bazaruzero Nov 23, 2026
b29b6d4
Reserve chart headroom above visible peaks
bazaruzero Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 92 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,15 @@ Then open `http://localhost:8081`.
### Behavior
- Each panel shows the **last hour** of its metric(s) as a smooth line chart
(per-series or min/max/current legend under the chart, tooltips on every
point) and refreshes automatically every `refresh.interval` — no page
reload, no user action.
- A metric with no data in the window renders an explicit "No data in the
last hour" panel; the rest of the page is unaffected.
- Each panel starts with the **last hour** of its metrics. Hover over the plot
to inspect the nearest sample's local date, time and value. Axis labels
and hover times use your browser's timezone, including daylight saving
transitions. Each viewer sees their own local times after every refresh.
With JavaScript disabled, the axis shows UTC. The crosshair
and tooltip follow the pointer and stay visible during automatic refresh.
A single-series legend shows the minimum, maximum and current value.
Multi-series legends show each metric's current value in its configured color.
- An empty panel identifies the window that has no readings.
- If the agent becomes unreachable, a visible banner appears and panels
switch to an error state; when the agent comes back, everything recovers
automatically — no frontend restart needed. The frontend also starts
Expand All @@ -175,6 +178,89 @@ Then open `http://localhost:8081`.
htmx) are embedded in the binary and served by the frontend itself — no
CDN, no external requests, no Node/npm toolchain.
### Chart time ranges
Choose **1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h or 24h** for the dashboard. Each panel
inherits that range until you choose a panel override. Clearing the override
restores the dashboard selection. A relative range advances with each poll.
The URL records your choices so you can share a view or revisit it with Back.
| Example query | Result |
| --- | --- |
| `?range=3h` | All panels show the last three hours. |
| `?range=3h&p.Active%20Sessions.range=15m` | Active Sessions shows fifteen minutes and other panels inherit three hours. |
| `?from=2026-10-20T18:00:00Z&to=2026-10-20T21:00:00Z` | Polls repeatedly fetch the same fixed period. |
Use either `range` or a complete, increasing RFC3339 `from` and `to` pair.
Prefix any of these keys with `p.<graph name>.` for one panel. URL-encode
graph names and timestamp offsets. Invalid or conflicting panel selections
inherit the dashboard range; an invalid dashboard range defaults to one hour.
At twelve hours and above, ticks include the local date. For dense series,
each chart draws up to 1,000 representative samples per series. The visible
curve retains bucket extrema and the first and last readings; the legend
and vertical scale use all in-range samples.
### Series visibility
Chart summaries display full decimal values. Each visible series also shows
its arithmetic **mean** over all readings in the panel's selected period,
using its override or the inherited dashboard range. The mean uses the full
data before rendering reduction and rounds to the nearest whole number.
On a multi-series panel, click a legend chip to isolate that metric.
Ctrl+click (Cmd+click on macOS) adds or removes a series. Clicking
the sole visible series, or removing the last selected series restores
the complete graph. Dimmed chips remain available for selection.
The server fetches only selected metrics and fits the scale and summaries
to them. Each metric retains its configured color. Selection is shared by
repeated URL fields such as `p.Database.series=db_stats.commits` and
`p.Database.series=db_stats.reads`. Invalid names or duplicate selections
show all series. Selection survives polling, zoom, reset and browser history.
### Drag to zoom
Drag horizontally inside a chart with the mouse to inspect a smaller period.
The selected panel fetches that fixed period again and fits its scale to the
readings. A short enough period shows every sample within the 1,000-point
budget. Other panels keep their selections.
Use **Reset** to restore the panel's range before zooming, or choose a preset
to return to a rolling range. Zoom and Reset update browser history and can
be shared by URL. Nested zooms keep the original reset destination in
`p.<graph name>.zoomBack`. Automatic and manual refresh retain zoomed bounds.
Drags shorter than eight pixels or ending outside the plot are cancelled.
Press Escape to cancel a selection. This interaction uses a desktop mouse.
### Refresh cadence
Choose Off, 5s, 10s, 30s, 1m or 5m, or enter a custom whole minute/hour
interval such as `15m` or `2h` (one minute through 24 hours).
`?refresh=30s` shares the cadence; without a valid parameter the
`webui.yaml` refresh interval is used. Cadence changes replace the current
history entry. Off pauses both chart and connectivity polling.
**Refresh now** fetches all selected windows once, including while paused.
Relative ranges advance to the current time; fixed ranges retain their
bounds. The last-updated time uses your browser timezone and remains visible while paused. Failed updates retain the last successful time.
### Dashboard design tokens
The embedded stylesheet in `internal/web/server/assets/app.css` defines
the tokens shared by panels, legends, tooltips and dashboard controls.
| Purpose | CSS custom properties |
| --- | --- |
| Page, panel and inset backgrounds | `--bg`, `--panel`, `--surface-soft` |
| Borders and chart guides | `--border`, `--grid` |
| Text, secondary text, accent and errors | `--text`, `--muted`, `--accent`, `--error` |
| Interface and detail typography | `--font-ui`, `--font-detail` |
| Spacing scale | `--space-1`, `--space-2`, `--space-3`, `--space-4`, `--space-6` |
| Corner radii and floating tooltip shadow | `--radius-sm`, `--radius-panel`, `--shadow-float` |
The chart renderer assigns palette colors by position in the graph's
configured metric list. The matching legend chip receives `--series-color`.
## How collection is scheduled
Collection runs in cycles driven by `collector.interval`: the agent wakes,
Expand Down
4 changes: 2 additions & 2 deletions internal/web/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ type rawPoint struct {
func (c *Client) Points(ctx context.Context, name string, from, to time.Time) ([]Point, error) {
u := fmt.Sprintf("%s/api/v1/metrics/%s/data", c.baseURL, url.PathEscape(name))
q := url.Values{}
q.Set("from", from.Format(time.RFC3339))
q.Set("to", to.Format(time.RFC3339))
q.Set("from", from.Format(time.RFC3339Nano))
q.Set("to", to.Format(time.RFC3339Nano))
req, err := http.NewRequestWithContext(ctx, http.MethodGet, u+"?"+q.Encode(), nil)
if err != nil {
return nil, &Error{Metric: name, Err: err}
Expand Down
Loading