Feature: "All containers" toggle for admins sitewide; add additional docker build failsafe's. #374
Merged
Conversation
Issue: #112 Expose an admin-only API and UI to list every container on a site and add owner metadata. Server: add apiAdmin, include owner in serialized containers, introduce CONTAINER_INCLUDE and buildContainerListWhere to centralize eager-loading and filtering, reuse includes for list/show routes, and add GET /sites/{siteId}/containers/all (with username/nodeId/hostname filters). Client: add route /containers/all and scope prop to ContainersListPage, query keys and listAllContainers API call, owner type, admin toggle to switch between "Mine" and "All", and show owner column when viewing all. OpenAPI: document owner property, nodeId query param, and new /containers/all path. Compose: make the node service the single owner of npm installs (use --ignore-scripts + patch-package) and make the client wait for node to finish to avoid concurrent install races. images/proxmox-ve: handle partially-created LXC configs by checking for lingering create locks and missing arch, tearing down remnants and recreating to avoid wedging boots.
runleveldev
requested changes
Jun 23, 2026
Allow listing containers by owner via a `user` query param and propagate that across API, client, and docs. Server: add resolveUsernameFilter to enforce admin-only access for `user='*'` or other owners, apply the username constraint to the existing /containers endpoint, and remove the legacy /containers/all route; update OpenAPI to document the new `user` query and 403 response. Client: update query keys and listContainers to send the `user` param, change routing to use ?user=* for the "All" view, and make ContainersListPage read the user query param so the view is bookmarkable. Dev environment: adjust compose.yml to use node:24-trixie and run npm installs/builds in the client service (simplify install steps and watch behavior). images/proxmox-ve: clarify create-manager.sh comments and simplify the partial-create detection logic to rely on the create lock. These changes make owner-scoped listing explicit, bookmarkable, and consistently enforced.
Collaborator
|
It's not a blocker to this PR, but can we see why the job for the preview container failed and get another issue opened. https://github.com/mieweb/opensource-server/actions/runs/28060284274/job/83073005593?pr=374 |
runleveldev
requested changes
Jun 24, 2026
runleveldev
reviewed
Jun 30, 2026
| const userFilter = isAll ? '*' : undefined; | ||
| // Only admins ever see more than one owner in the `*` view, so the owner | ||
| // column is meaningful for them alone. | ||
| const showOwner = isAdmin && isAll; |
Collaborator
There was a problem hiding this comment.
Not a blocker just a note, this will no longer be true once the sharing system is added.
Collaborator
Author
There was a problem hiding this comment.
I'll remove this on my next PR
runleveldev
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #374
This pull request introduces an "All Containers" admin view to the container management system, allowing admins to see every container on a site, including the owner of each container. It also refactors the Docker Compose setup to prevent race conditions during dependency installation, and extends the API, client types, and OpenAPI schema to support the new functionality.
Admin "All Containers" View and API Enhancements:
/sites/{siteId}/containers/allAPI endpoint (admin-only) that returns all containers for a site, including theownerfield, with support for filtering bynodeId,hostname, andusername. [1] [2] [3] [4]ownerfield on containers, and the new query parameters. [1] [2] [3]ownerfield and to support flexible filtering for both user and admin list endpoints. [1] [2] [3] [4]Frontend: Containers List Page and API Integration:
ContainersListPageto support an "all"/"mine" toggle (visible to admins), display the container owner in the "All" view, and handle new query parameters for filtering. [1] [2] [3] [4] [5] [6] [7] [8]ownerfield and the newlistAllContainersAPI. [1] [2] [3]Docker Compose Dependency Installation Improvements:
nodeservice runsnpm ci(with--ignore-scriptsand manual patching), preventing race conditions and ensuring reliable dependency setup for both server and client. Theclientservice now waits fornodeto finish before building. [1] [2] [3]