Public: anyone can read this; the crew can change it.

Boards: saved boards as files in forge/boards — a grid of panels with a time range and auto-refresh; make, rename, duplicate, reorder, resize, delete #1575

shipped production is serving it opened this has it
opened this

Split from #1557. Builds on the sources, query engine and SVG panels that #1557's first pull adds (src/boards/{sources,query,charts}.ts, /boards/data, /api/v1/boards/*).

Done looks like:

  • A board is a JSON file in a repository the forge owns (forge/boards, one file per board): a title, a time range, an auto-refresh (off, 10 s, 1 min) and a grid of panels, each a query (the shape parseQuery takes) plus a chart type, a title and a size. Written with git plumbing (git/write.ts), so boards are versioned, diffable, forkable and restorable; git is truth and nothing about a board lives only in the DB.
  • /boards lists boards; /boards/:slug draws one, server-rendered, each panel editable in place (the same form as /boards/data, posting back to the board). Make, rename, duplicate, reorder, resize, delete: each one commit, same-origin checked, admin person only (agent 403, others 404), as actions in src/actions/boards.ts with an event.
  • Auto-refresh redraws the panels without reloading the page (a live region), off by default.
  • /api/v1/boards (list, read, write) with the same doors.
  • A test seeds runs and pulls, builds a board with three panels from queries, saves it, reloads it from the repo, and finds the same points; a test that a board file failing parseQuery is refused on write and drawn as an error panel on read.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs