feat(k8s): M14 Namespace 管理看板(资源配额 + 命名空间 CRUD)
- 后端: ListNamespacesDetailed/CreateNamespace/DeleteNamespace/ListResourceQuotas/ListLimitRanges - 后端: GetNamespacesDetail handler (6 API calls aggregate, not N×3) - 后端: CreateNamespaceHandler + DeleteNamespaceHandler (system NS protection) - 前端: NamespaceManagementPage.tsx (~280行) — 表格+概览卡片+创建/删除弹框 - 路由: GET/POST/DELETE /:clusterCode/namespaces + GET /namespace/:ns/detail - 验证: 9/9 通过 (urllib), TS 零错误, Vite 构建成功
This commit is contained in:
1 parent
c7b61968bc
commit
8240a88a84
33 files changed
+2029
-71
No files matched your search
@@ -28,6 +28,7 @@ type Report struct {
|
||||
// CPUStat CPU 相关指标
|
||||
type CPUStat struct {
|
||||
UsagePercent float64 `json:"usage_percent"` // CPU 总体使用率(百分比)
|
||||
IOWait float64 `json:"iowait"` // CPU 等待 IO 的时间占比(百分比)
|
||||
CoreCount int `json:"core_count"` // CPU 逻辑核心数
|
||||
Load1 float64 `json:"load1"` // 1 分钟平均负载
|
||||
Load5 float64 `json:"load5"` // 5 分钟平均负载
|
||||
@@ -39,16 +40,19 @@ type MemoryStat struct {
|
||||
TotalGB float64 `json:"total_gb"` // 总内存(GB)
|
||||
UsedGB float64 `json:"used_gb"` // 已用内存(GB)
|
||||
CachedGB float64 `json:"cached_gb"` // 缓存(Buffers + Cached,GB)
|
||||
AvailableGB float64 `json:"available_gb"` // 可用内存(GB),含可回收缓存 — 真实剩余可用
|
||||
SwapUsedGB float64 `json:"swap_used_gb"` // Swap 已用量(GB)— OOM 金标准
|
||||
UsagePercent float64 `json:"usage_percent"` // 内存使用率(百分比)
|
||||
}
|
||||
|
||||
// DiskStat 单个挂载点的磁盘使用情况
|
||||
type DiskStat struct {
|
||||
Mount string `json:"mount"` // 挂载点
|
||||
Device string `json:"device"` // 设备名
|
||||
TotalGB float64 `json:"total_gb"` // 总容量(GB)
|
||||
UsedGB float64 `json:"used_gb"` // 已用容量(GB)
|
||||
UsagePercent float64 `json:"usage_percent"` // 使用率(百分比)
|
||||
Mount string `json:"mount"` // 挂载点
|
||||
Device string `json:"device"` // 设备名
|
||||
TotalGB float64 `json:"total_gb"` // 总容量(GB)
|
||||
UsedGB float64 `json:"used_gb"` // 已用容量(GB)
|
||||
UsagePercent float64 `json:"usage_percent"` // 使用率(百分比)
|
||||
InodeUsagePct float64 `json:"inode_usage_pct"` // inode 使用率(百分比)— 防止文件数爆炸
|
||||
}
|
||||
|
||||
// PortStat 监听端口及其归属进程
|
||||
|
||||
Reference in new issue
Block a user