Add server health endpoint and status page
Backend: - New /api/server/health endpoint returning server, paths, disk, mods, steamcmd, and frontend status - Health endpoint checks directory existence/writability, disk usage, server binary, and frontend dist availability Frontend: - New Status page (route /status) with sections for Server, SteamCMD, Mods, Frontend, Directories (with exists/writable badges), and Disk Usage (with size formatting and used-percent coloring) - Paths are clickable to copy and use start-truncation (ellipsis on the left) with native hover tooltip - Health API client integration with 10s auto-refresh Misc: - Update .gitignore and Makefile, minor Layout nav addition
This commit is contained in:
@@ -51,6 +51,36 @@ export interface ServerPaths {
|
||||
profiles_dir: string
|
||||
}
|
||||
|
||||
export interface ServerHealth {
|
||||
server: {
|
||||
running: boolean
|
||||
installed: boolean
|
||||
binary_path: string
|
||||
}
|
||||
paths: {
|
||||
path: string
|
||||
exists: boolean
|
||||
writable: boolean
|
||||
}[]
|
||||
mods: {
|
||||
workshop_count: number
|
||||
local_count: number
|
||||
}
|
||||
disk: {
|
||||
path: string
|
||||
total_bytes: number
|
||||
free_bytes: number
|
||||
used_percent: number
|
||||
}[]
|
||||
steamcmd: {
|
||||
running: boolean
|
||||
}
|
||||
frontend: {
|
||||
served: boolean
|
||||
path: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface ModInfo {
|
||||
id: string
|
||||
name: string
|
||||
|
||||
Reference in New Issue
Block a user