Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,25 @@ Before submitting a PR:

---

## Administrator UI checks

Run the Go regression suite with `go -C src test -race ./...`.
The browser checks use Node 20 or newer, Playwright, and its Chromium browser:

```bash
node scripts/test_admin_ui.mjs
```

The checks use simulated API responses and do not access deployed services or
user data. Set `PLAYWRIGHT_MODULE` to the absolute path of an existing Playwright
installation when it is not available through normal Node module resolution.
`PLAYWRIGHT_BROWSERS_PATH` selects a custom browser installation directory.
Set `LINUXUS_UI_SCREENSHOTS` to save desktop, mobile, and dialog screenshots.
These tools are only needed for development; the deployed binary embeds the
administrator HTML, CSS, and JavaScript.

---

## 🐛 Reporting Issues

If you find a bug:
Expand Down
43 changes: 39 additions & 4 deletions docs/OPERATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,52 @@ Restart an environment to apply a changed template image.

## Administrator web interface

When the account named by `MANAGER_SERVICE_ADMIN_ID` logs in, the service page
shows an **Admin** link. The interface is also available at `/admin`. Create
Login, registration, the workspace, and administration share one interface.
When the account named by `MANAGER_SERVICE_ADMIN_ID` logs in, the navigation
shows **Workspace** and **Administration**. Switching views keeps the terminal
connected and preserves dashboard search and filters. Browser Back and Forward
follow the selected view. Opening administration directly does not start a
personal environment; it starts when Workspace is first opened. Regular users
see only Workspace. **Reconnect terminal** explicitly reloads the terminal.
Without JavaScript, Workspace remains available through server navigation.

The administrator interface defaults to `/admin`. Set its public base
path in `.env`, without leading or trailing slashes:

```dotenv
AUTH_SERVICE_SERVICE_URL_ADMIN='ops/classroom'
```

This example serves the page at `/ops/classroom`, its API at
`/ops/classroom/api/users`, and its assets below `/ops/classroom/assets/`.
Navigation links and browser requests follow the configured path. Omitted or
empty values keep the default `admin` route. The administrator path must not
overlap login, logout, service, terminal, signup, or reserved asset paths.
`config-check` prints the effective administrator URL. Rebuild and restart the
services to apply these changes; `init` includes the setting in new files and
leaves existing configuration files unchanged.

Create
accounts through registration or `add-user`; assigning an administrator ID does
not create the account automatically.

The interface shows users, account locks, session counts, container states, and
usage for mounted home disks. Actions include locking, unlocking, password resets,
disconnecting, restarting environments, and assigning classes or templates.
Status refreshes every 15 seconds. Disk service failures produce an explicit
The dashboard includes summary counts, user search, state filters, and home
storage meters. Rows are updated in place, preserving search text and keyboard
focus. Manual and automatic refreshes share a single request. Automatic updates
run 15 seconds after the preceding request finishes; they pause while a dialog
is open, an action is running, the tab is hidden, or Workspace is selected.
Leaving Administration cancels pending status reads; returning refreshes status
when automatic updates are enabled. The Auto-refresh checkbox
allows manual control. Failed updates retain the last successful display and
show an error with its last update time. Disk service failures produce an explicit
warning while retaining available container and session status. The web interface rejects locking your own
administrator account to prevent accidental lockout.
administrator account to prevent accidental lockout. Password resets require
confirmation. Updating your own account invalidates the current session; the
interface stops polling and provides a sign-in link. Account changes that succeed
before a runtime error are explicitly reported, without automatic action retries.

Every administrator API request rechecks the account and administrator role.
Mutation requests require a session-bound CSRF token. Responses exclude account
Expand Down
9 changes: 7 additions & 2 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ validated normally; they are not filled from embedded defaults at runtime.

Auth route paths must be distinct, clean paths
without leading/trailing slashes or wildcard patterns; `static/` and
`favicon.ico` are reserved. Nested paths such as `auth/login` are supported.
`favicon.ico` and `healthz` are reserved. Nested paths such as `auth/login` are supported.
`AUTH_SERVICE_SERVICE_URL_ADMIN='admin'` selects the administrator page, API, and
asset base path. Existing files that omit it retain `/admin`; for example,
`AUTH_SERVICE_SERVICE_URL_ADMIN='ops/classroom'` moves the interface to
`/ops/classroom`. It must not overlap the other configured routes.
Docker subnet allocation checks all existing Docker IPAM ranges to avoid
conflicts with other projects. Trusted proxy CIDRs support both IPv4 and IPv6.

Expand Down Expand Up @@ -412,5 +416,6 @@ it deletes the images and their contents.

See [Operations](OPERATIONS.md) for `config-check`, `doctor`, systemd recovery,
account locks and password changes, backups, capacity settings, class templates,
and the administrator interface at `/admin`. New optional `.env` keys may be
and the administrator interface at the configured `AUTH_SERVICE_SERVICE_URL_ADMIN`
path (default `/admin`). New optional `.env` keys may be
added to an existing file; rerunning `init` does not overwrite existing settings.
Loading
Loading