feat: add ComponentGrid and ComponentTable components for displaying components in grid and table formats
feat: implement HealthBadge and RoleBadge components for displaying health status and roles feat: create LogViewer component for streaming logs of services feat: develop SecretsEditor for managing secrets with CRUD operations feat: introduce ToolCard component for displaying tool information style: add global CSS variables and styles for consistent theming feat: set up API client for handling requests to the backend feat: implement hooks for fetching components, statuses, and tools feat: create routes for dashboard, component details, and tools feat: add service management endpoints for starting, stopping, and restarting services feat: implement event bus for handling real-time updates via SSE feat: create health check and logs endpoints for monitoring services feat: add tests for health and tools endpoints to ensure functionality chore: update project configuration files and dependencies for better development experience
This commit is contained in:
79
app/src/types/index.ts
Normal file
79
app/src/types/index.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
export interface SystemdInfo {
|
||||
unit_name: string
|
||||
unit_path: string
|
||||
timer: boolean
|
||||
}
|
||||
|
||||
export interface ComponentSummary {
|
||||
id: string
|
||||
description: string | null
|
||||
roles: string[]
|
||||
runner: string | null
|
||||
port: number | null
|
||||
health_path: string | null
|
||||
proxy_path: string | null
|
||||
managed: boolean
|
||||
systemd: SystemdInfo | null
|
||||
version: string | null
|
||||
source: string | null
|
||||
system_dependencies: string[]
|
||||
schedule: string | null
|
||||
installed: boolean | null
|
||||
}
|
||||
|
||||
export interface ComponentDetail extends ComponentSummary {
|
||||
manifest: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface HealthStatus {
|
||||
id: string
|
||||
status: "up" | "down" | "unknown"
|
||||
latency_ms: number | null
|
||||
}
|
||||
|
||||
export interface StatusResponse {
|
||||
statuses: HealthStatus[]
|
||||
}
|
||||
|
||||
export interface GatewayInfo {
|
||||
port: number
|
||||
component_count: number
|
||||
service_count: number
|
||||
managed_count: number
|
||||
}
|
||||
|
||||
export interface ServiceActionResponse {
|
||||
component: string
|
||||
action: string
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface SSEHealthEvent {
|
||||
statuses: HealthStatus[]
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
export interface SSEServiceActionEvent {
|
||||
action: string
|
||||
component: string
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface ToolSummary {
|
||||
id: string
|
||||
description: string | null
|
||||
source: string | null
|
||||
version: string | null
|
||||
runner: string | null
|
||||
system_dependencies: string[]
|
||||
installed: boolean
|
||||
}
|
||||
|
||||
export interface ToolCategory {
|
||||
name: string
|
||||
tools: ToolSummary[]
|
||||
}
|
||||
|
||||
export interface ToolDetail extends ToolSummary {
|
||||
docs: string | null
|
||||
}
|
||||
Reference in New Issue
Block a user