Repository navigation
feat(agent): add the Pending Hosts, Pending Agents and Agent Tokens pages - #187
Merged
Merged
Conversation
…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>
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.
What
The fog-agent admin pages, with FOG 1.6 parity (brief:
2026-11-10-agent-admin-pages):/hosts/pending): lists the hosts withpending: true. "Approve selected" clears the flag (POST /api/v1/host/pending/approve). "Delete selected" goes toDELETE /api/v1/host/pending./hosts/pendingAgents): approves or denies each waiting enrollment (POST /api/v1/agent/enrollment/<id>/approve|deny). It has no delete, as in 1.6./hosts/agentTokens): "Create token" shows the token once, with the samplefog-agent enrollcommand and the CA download link. "Revoke selected" revokes it.Security
agent_version,hostnameandsystem_serial. A review found that these columns rendered as raw HTML. Every server value in these tables now goes through the sharedwindow.fogTextCellrender, which escapes on display.tools/smoke/checks/agent-admin.jsenrolls 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. MakingfogTextCellreturn the raw value turns the check red.Smoke harness
tools/smoke/ui.jsno longer countsnet::ERR_ABORTEDas 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