Repository navigation
Add the FOG 1.6 Agent Activity page and the agentactivity.view permission - #212
Merged
Merged
Conversation
…tivity.view Adds GET /agent-activity with POST /api/v1/agent-activity/summary and /host: the fog-agent enrollment events of each host, grouped by host, most recently active host first (1.6 AgentActivityManagement). A view over the audit trail, no new collection. - New permission stock.agentactivity.view (Tom approved 2026-11-17), separate from audit.view: agent rows are a different disclosure. - Rows: agent.* audit rows of a non-empty host. An enrollment with no host, and agent.token rows (their subject is the token), stay on the Audit Log page. An empty hostId answers 400. - Bounds as 1.6: 5000 hosts in the summary (native aggregation with an _id tie-break), 500 rows per host; the host answer carries total and limit for the "showing the newest N" note. - RowGroup on hostId, no Scroller, fixed order. The toggle expands a host and collapses it back to its summary row. - The smoke enrollment code is shared in tools/smoke/lib/agent-enroll.js. Closes #207 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 17, 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.
Closes #207. Map: #155. Follows #206 (PR #210).
What
GET /agent-activityshows the fog-agent enrollment events of each host, grouped by host, with the most recently active host first. It matches FOG 1.6 Agent Activity. It is a view over the audit trail, with no new collection.POST /api/v1/agent-activity/summaryreturns one entry per host, from a native aggregation with an_idtie-break, at most 5000 hosts. A deleted host shows as its stored label plus " (deleted)".POST /api/v1/agent-activity/hostreturns one host's rows, newest first, at most 500, withtotalandlimit. A missing, non-string or emptyhostIdanswers 400.stock.agentactivity.view, approved by Tom on 2026-11-17. It is separate fromaudit.view, because the audit trail discloses refusals and attempted user names. A role with onlyaudit.viewgets 403 here.Rows
agent.*audit rows that name a host. Today these are enrollments bound to a host, and renewals.agent.tokenrows also stay on the Audit Log page, because their subject is the token, not a host.Beyond the brief
limit, so the page does not hardcode 500.tools/smoke/lib/agent-enroll.js.agent-admin.jssends the same payload as before.Tests
npm test: 587 passing.npm run test:uiandnpm run test:ui:prod: all checks pass.test/integration/agent-activity-page.test.jsandtools/smoke/checks/agent-activity.js. Each fails without the change.hostIdtest failed with "got 200" before its fix.Review
hostIdleak, and it is fixed.🤖 Generated with Claude Code