Skip to content

feat(agent): add the Pending Hosts, Pending Agents and Agent Tokens pages - #187

Merged
fog-workflows[bot] merged 1 commit into
masterfrom
feat/agent-admin-pages
Nov 10, 2026
Merged

fog-workflows[bot] merged 1 commit into
masterfrom
feat/agent-admin-pages

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

What

The fog-agent admin pages, with FOG 1.6 parity (brief: 2026-11-10-agent-admin-pages):

  • Pending Hosts (/hosts/pending): lists the hosts with pending: true. "Approve selected" clears the flag (POST /api/v1/host/pending/approve). "Delete selected" goes to DELETE /api/v1/host/pending.
  • Pending Agents (/hosts/pendingAgents): approves or denies each waiting enrollment (POST /api/v1/agent/enrollment/<id>/approve|deny). It has no delete, as in 1.6.
  • Agent Tokens (/hosts/agentTokens): "Create token" shows the token once, with the sample fog-agent enroll command and the CA download link. "Revoke selected" revokes it.
  • The menu entries, the dashboard counts, and the 1.6 toast titles and modal texts.

Security

  • The enroll route is public, so an agent chooses its own agent_version, hostname and system_serial. A review found that these columns rendered as raw HTML. Every server value in these tables now goes through the shared window.fogTextCell render, which escapes on display.
  • tools/smoke/checks/agent-admin.js enrolls with an <img onerror> payload in all three fields and names a token <b>t</b>. It needs the payload to show as literal text. Making fogTextCell return the raw value turns the check red.

Smoke harness

tools/smoke/ui.js no longer counts net::ERR_ABORTED as a page failure. The browser reports that code when the check's own navigation cancels a request in flight, such as a table-state save. ui16-07 failed on it in 5 of 7 local runs. HTTP errors and page errors still count.

Test

  • npm test: 349 passing.
  • npm run test:ui: green, 3 runs in a row.
  • npm run test:ui:prod: green.

🤖 Generated with Claude Code

…ages

The fog-agent admin pages, as in FOG 1.6:

- Pending Hosts (/hosts/pending): lists hosts with pending: true.
  "Approve selected" clears the flag, and "Delete selected" goes to
  DELETE /api/v1/host/pending.
- Pending Agents (/hosts/pendingAgents): approves or denies each waiting
  enrollment. There is no delete, as in 1.6.
- Agent Tokens (/hosts/agentTokens): creates a token, shows it once with
  the sample enroll command and the CA link, and revokes it.

The menu, the dashboard counts and the 1.6 toast and modal texts come
along. Every server value in these tables shows as text through the new
shared window.fogTextCell render. An agent chooses its own version,
hostname and serial, so the agent-admin smoke check seeds markup in each
of them and fails if any cell renders it.

The UI smoke harness no longer counts net::ERR_ABORTED as a page failure.
That code is the browser cancelling a request in flight when the check
navigates. ui16-07 failed on it in 5 of 7 local runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fog-workflows
fog-workflows Bot enabled auto-merge November 10, 2026 15:11
@fog-workflows
fog-workflows Bot added this pull request to the merge queue Nov 10, 2026
Merged via the queue into master with commit ce67e05 Nov 10, 2026
6 checks passed
@fog-workflows
fog-workflows Bot deleted the feat/agent-admin-pages branch November 10, 2026 15:28
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