Skip to content

Resource detail drawer on click (config, history, actions) - #11

Merged
prop4n merged 1 commit into
mainfrom
feat/resource-detail-panel
Aug 30, 2026
Merged

prop4n merged 1 commit into
mainfrom
feat/resource-detail-panel

Conversation

@prop4n

@prop4n prop4n commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Replaces the per-card action buttons with a right-hand detail drawer opened by
clicking a resource (card or graph node). The drawer shows desired vs observed
config, history, and actions.

Backend

  • GET /api/v1/resources/{kind}/{name} returns { desiredYAML, observed }:
    • desiredYAML: the matched manifest re-marshaled (uniform across kinds).
    • observed: best-effort cluster state — VM/Template matched by vmid
      (present/cores/memory/cpu/running/ip/nameserver), ISO by presence.
    • 404 when the resource isn't declared.
  • New ResourceDetailer (implemented by app), wired via server Options. The
    observe logic takes a small clusterObserver interface (unit-tested with a fake).

Frontend

  • ResourceDetail.vue: a right drawer with header (name/kind/status), Desired
    (YAML block), Observed (key/values, "not present" when absent), History
    timeline, and a Delete action (two-step confirm, ISO + VM).
  • A tiny stores/selection.ts holds the selected resource; the drawer fetches
    detail + events on open.
  • ResourceCard is now a click-to-select button; the trash and history buttons
    are gone (they live in the drawer). Selected card gets a ring. Works in both the
    card view and the graph (nodrag).

Tests

  • App: observe-by-vmid, observe-absent, ISO presence.
  • Route registered (verified: GET returns 401 unauth, not 405).
  • Go + vitest suites, golangci-lint (v2), gofmt clean.

Non-goals

Live-streaming observed config, daemon-log lines in the drawer (separate logs
increment), editing from the panel.

@prop4n
prop4n merged commit 66cf0aa into main Aug 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant