feat: admin user management (create/search/role) and cluster resource monitoring
- Add POST /users endpoint for admin to create users with hashed passwords - Add GET /users?search= with ILike search on email/firstName/lastName - Add PATCH /users/:id/role for role assignment (user/admin) - Return appCount per user in the users list - Add GET /clusters/:id/resources for node, CPU, memory, pod monitoring - Parse K8s node capacity/allocatable with CPU millicores and memory MiB helpers - Frontend: admin users page with search bar, create form, role dropdown, app count - Frontend: cluster resource panel with nodes table, CPU/memory bars, summary cards
This commit is contained in:
@@ -156,3 +156,28 @@ export interface ResourceUsage {
|
||||
pods: PodInfo[];
|
||||
metrics: PodMetric[];
|
||||
}
|
||||
|
||||
export interface AdminUser extends User {
|
||||
appCount?: number;
|
||||
}
|
||||
|
||||
export interface ClusterNode {
|
||||
name: string;
|
||||
status: string;
|
||||
roles: string;
|
||||
cpuCapacity: string;
|
||||
memoryCapacity: string;
|
||||
cpuAllocatable: string;
|
||||
memoryAllocatable: string;
|
||||
}
|
||||
|
||||
export interface ClusterResources {
|
||||
nodes: ClusterNode[];
|
||||
totalCpuCapacity: string;
|
||||
totalMemoryCapacity: string;
|
||||
totalCpuAllocatable: string;
|
||||
totalMemoryAllocatable: string;
|
||||
podCount: number;
|
||||
nodeCount: number;
|
||||
appCount: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user