Skip to content

feat(pools): import an existing pool from the web UI - #139

Merged
gnacho merged 1 commit into
mainfrom
feat/138-import-ui
Sep 24, 2026
Merged

gnacho merged 1 commit into
mainfrom
feat/138-import-ui

Conversation

@gnacho

@gnacho gnacho commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Problem

The import operation already existed in the backend (POST /api/pools/import), but the web UI only listed importable pools as plain text and never imported anything. The Pools button called importPool() with no name, and the missing-pools banner only navigated to Pools. After a power loss where a pool fails to auto-import, there was no self-service way to bring it back up from the UI.

Changes

  • Add an ImportPoolModal: lists importable pools (zpool import), lets the admin select one, requires typing the pool name to confirm, imports it (zpool import <name>), then refreshes and toasts.
  • Wire the Pools "Import existing pool" button to the modal (previously it only printed the list and never imported).
  • Make the Dashboard missing-pools banner actionable: an "Import" button per missing pool (admin only) opens the modal preselected.
  • Fix HttpProvider.importPool(name): the backend answers 202 with no body, so reading r.importable threw on an undefined response.
  • ES/EN i18n strings.

No backend change is needed: PoolImportList / PoolImport and the endpoint were already in place.

Verification

  • go test ./internal/... green.
  • npm run build OK.
  • Playwright E2E against the frontend mock provider (demo mode): 9/9 (button -> modal -> lists importable -> select -> confirm -> import -> toast -> modal closed, 0 page errors).
  • Preview build deployed to a test instance: served bundle contains the modal and POST /api/pools/import responds {"importable":[]} (HTTP 200) with an admin session.

Closes #138

@gnacho
gnacho merged commit 5c8529e into main Sep 24, 2026
3 checks passed
@gnacho
gnacho deleted the feat/138-import-ui branch September 24, 2026 07:15
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.

Import pool from the web UI (import endpoint exists but no UI action)

1 participant