mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add startup script logs to the ui (#6558)
* Add startup script logs to the database * Add coderd endpoints for startup script logs * Push startup script logs from agent * Pull startup script logs on frontend * Rename queries * Add constraint * Start creating log sending loop * Add log sending to the agent * Add tests for streaming logs * Shorten notify channel name * Add FE * Improve bulk log performance * Finish UI display * Fix startup log visibility * Add warning for overflow * Fix agent queue logs overflow * Display staartup logs in a virtual DOM for performance * Fix agent queue with loads of logs * Fix authorize test * Remove faulty test * Fix startup and shutdown reporting error * Fix gen * Fix comments * Periodically purge old database entries * Add test fixture for migration * Add Storybook * Check if there are logs when displaying features * Fix startup component overflow gap * Fix startup log wrapping --------- Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
@@ -405,6 +405,8 @@ export const MockWorkspaceAgent: TypesGen.WorkspaceAgent = {
|
||||
troubleshooting_url: "https://coder.com/troubleshoot",
|
||||
lifecycle_state: "starting",
|
||||
login_before_ready: false,
|
||||
startup_logs_length: 0,
|
||||
startup_logs_overflowed: false,
|
||||
startup_script_timeout_seconds: 120,
|
||||
shutdown_script_timeout_seconds: 120,
|
||||
}
|
||||
@@ -470,6 +472,13 @@ export const MockWorkspaceAgentStarting: TypesGen.WorkspaceAgent = {
|
||||
lifecycle_state: "starting",
|
||||
}
|
||||
|
||||
export const MockWorkspaceAgentReady: TypesGen.WorkspaceAgent = {
|
||||
...MockWorkspaceAgent,
|
||||
id: "test-workspace-agent-ready",
|
||||
name: "a-ready-workspace-agent",
|
||||
lifecycle_state: "ready",
|
||||
}
|
||||
|
||||
export const MockWorkspaceAgentStartTimeout: TypesGen.WorkspaceAgent = {
|
||||
...MockWorkspaceAgent,
|
||||
id: "test-workspace-agent-start-timeout",
|
||||
@@ -655,6 +664,7 @@ export const MockWorkspace: TypesGen.Workspace = {
|
||||
MockTemplate.allow_user_cancel_workspace_jobs,
|
||||
outdated: false,
|
||||
owner_id: MockUser.id,
|
||||
organization_id: MockOrganization.id,
|
||||
owner_name: MockUser.username,
|
||||
autostart_schedule: MockWorkspaceAutostartEnabled.schedule,
|
||||
ttl_ms: 2 * 60 * 60 * 1000, // 2 hours as milliseconds
|
||||
|
||||
Reference in New Issue
Block a user