diff --git a/web/src/services/agentAssets.js b/web/src/services/agentAssets.js index c5a5622..ce8b00f 100644 --- a/web/src/services/agentAssets.js +++ b/web/src/services/agentAssets.js @@ -118,3 +118,7 @@ export function activateAgentAsset(assetId, options = {}) { export function fetchAgentRuns(params = {}) { return apiRequest(`/agent-runs${buildQuery(params)}`) } + +export function fetchAgentRunDetail(runId) { + return apiRequest(`/agent-runs/${encodeURIComponent(runId)}`) +} diff --git a/web/src/services/systemLogs.js b/web/src/services/systemLogs.js new file mode 100644 index 0000000..814dd00 --- /dev/null +++ b/web/src/services/systemLogs.js @@ -0,0 +1,17 @@ +import { apiRequest } from './api.js' + +export function fetchSystemLogFiles() { + return apiRequest('/system-logs/files') +} + +export function fetchSystemLogTail(fileName, lines = 300) { + return apiRequest(`/system-logs/files/${encodeURIComponent(fileName)}?lines=${encodeURIComponent(lines)}`) +} + +export function fetchSystemLogEntries(limit = 300) { + return apiRequest(`/system-logs/entries?limit=${encodeURIComponent(limit)}`) +} + +export function fetchSystemLogEntry(entryId) { + return apiRequest(`/system-logs/entries/${encodeURIComponent(entryId)}`) +} diff --git a/web/src/utils/accessControl.js b/web/src/utils/accessControl.js index 4e6c2c3..5f81095 100644 --- a/web/src/utils/accessControl.js +++ b/web/src/utils/accessControl.js @@ -5,6 +5,7 @@ export const DEFAULT_APP_VIEW_ORDER = [ 'approval', 'policies', 'audit', + 'logs', 'employees', 'settings' ] @@ -12,11 +13,12 @@ export const DEFAULT_APP_VIEW_ORDER = [ const ALWAYS_VISIBLE_VIEWS = new Set(['workbench', 'requests', 'policies']) const VIEW_ROLE_RULES = { overview: ['finance', 'executive'], - approval: ['approver'], - audit: ['auditor'], - employees: ['manager'], - settings: ['manager'] -} + approval: ['approver'], + audit: ['auditor'], + logs: ['manager'], + employees: ['manager'], + settings: ['manager'] +} function normalizedRoleCodes(user) { if (!user) {