admin-console: implement Dynamic client CRD counting, S3 storage metrics, CSV export

This commit is contained in:
“Naeel”
2026-05-25 10:11:13 +04:00
parent 55758b6280
commit 190361ab0c
6 changed files with 186 additions and 45 deletions
+11 -11
View File
@@ -12,8 +12,8 @@ type NamespaceInfo struct {
CreatedAt string `json:"created_at,omitempty"`
// счётчики ресурсов Fission
Functions int `json:"functions"`
Packages int `json:"packages"`
Functions int `json:"functions"`
Packages int `json:"packages"`
Environments int `json:"environments"`
HTTPTriggers int `json:"http_triggers"`
TimeTriggers int `json:"time_triggers"`
@@ -21,15 +21,15 @@ type NamespaceInfo struct {
// UsageEntry — строка использования для одного namespace (для бухгалтерии).
type UsageEntry struct {
Namespace string `json:"namespace"`
UserEmail string `json:"user_email,omitempty"`
Functions int `json:"functions"`
Invocations int64 `json:"invocations_total"` // TODO: из Prometheus/logs
StorageGB float64 `json:"storage_gb"` // TODO: из storagesvc/S3
CPUMilliCores int64 `json:"cpu_millicores"` // TODO: из metrics-server
MemoryMB int64 `json:"memory_mb"` // TODO: из metrics-server
PeriodStart string `json:"period_start"`
PeriodEnd string `json:"period_end"`
Namespace string `json:"namespace"`
UserEmail string `json:"user_email,omitempty"`
Functions int `json:"functions"`
Invocations int64 `json:"invocations_total"` // TODO: из Prometheus/logs
StorageGB float64 `json:"storage_gb"` // TODO: из storagesvc/S3
CPUMilliCores int64 `json:"cpu_millicores"` // TODO: из metrics-server
MemoryMB int64 `json:"memory_mb"` // TODO: из metrics-server
PeriodStart string `json:"period_start"`
PeriodEnd string `json:"period_end"`
}
// UserInfo — пользователь из secret fission-console-users.