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:
keyhan
2026-04-05 17:48:15 +03:30
parent 2621dc0cc6
commit e97af36740
8 changed files with 564 additions and 69 deletions
+25
View File
@@ -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;
}