feat: move-device + logout-fix + Windows GUI installer (round 1) #10
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hex/zeno-rmm!10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/admin-round1-move-logout-installer-gui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Three sub-features in one round:
A — Move device to a different site
devices.rs): NewPOST /api/devices/{id}/movehandler (admin-only). Accepts{ target_site_id: UUID | null }. Emitsdevice.moveaudit entry withfrom_site_id/to_site_id. Backed byDevice::set_site(pool, id, Option<Uuid>)added todb/models.rs.device-actions.js,devices.js):Zeno.deviceActions.moveToSite(id, hostname)fetches/api/sites, shows aui.dialogwith a<select>containing all sites plus a "No site" option, POSTs to the new endpoint on confirm, shows snackbar. A new "Move to site…" row-action button (drive_file_move icon) calls this handler and refreshes on success.B — Logout redirect to /login
app.js: The submit handler onform[action="/api/auth/logout"]now callse.preventDefault()so the browser does not land on the bare 204. After clearing localStorage it navigates to/login.C — Windows GUI installer (replaces console window)
New file
crates/zeno-installer/src/ui.rs— Win32 form viaCreateWindowExW:PersistentInstall mode (default):
AdHocSupport mode (ad_hoc payload):
Console path unchanged:
windows_subsystem = "windows"is applied only in release builds;AttachConsole(ATTACH_PARENT_PROCESS)at startup keepsINSTALL_OK/INSTALL_FAILED:lines visible to any parent process.Files touched
crates/zeno-server/src/api/devices.rscrates/zeno-server/src/api/mod.rscrates/zeno-server/src/db/models.rscrates/zeno-server/src/web/static/js/device-actions.jscrates/zeno-server/src/web/static/js/devices.jscrates/zeno-server/src/web/static/js/app.jscrates/zeno-installer/src/ui.rscrates/zeno-installer/src/install.rscrates/zeno-installer/src/main.rscrates/zeno-installer/Cargo.tomlTest plan
/loginwithout a blank-page flash./devices, click the new move icon (drive_file_move) on any row → dialog shows site list → select a site → snackbar confirms → row reflects new site after refresh.POST /api/devices/{uuid}/movewith{"target_site_id": null}→ audit log showsdevice.movewith from/to site IDs.zeno-installer.exe --server <lan> --site <uuid> --code <key>(no--non-interactive). Expect: GUI window appears, log streams, status → "Installation complete", Close button enables, click → exit 0.--non-interactive. Expect: no GUI, console output as before,INSTALL_OK/INSTALL_FAILED:parseable.🤖 Generated with Claude Code