Implement proper disk and memory quota detection
Replace misleading system total quotas with actual service-specific quota detection. Services now only show quotas when real limits exist. Changes: - Add get_service_disk_quota method with filesystem quota detection - Add check_filesystem_quota and docker storage quota helpers - Remove automatic assignment of system totals as fake quotas - Update dashboard formatting to show usage only when no quota exists Display behavior: - Services with real limits: "2.1/8.0" (usage/quota) - Services without limits: "2.1" (usage only) This provides accurate monitoring instead of misleading system capacity values that suggested all services had massive quotas.
This commit is contained in:
@@ -141,6 +141,7 @@ fn format_memory_value(used: f32, quota: f32) -> String {
|
||||
let used_gb = used / 1000.0;
|
||||
let quota_gb = quota / 1000.0;
|
||||
|
||||
// Show usage/quota format only if quota exists, otherwise just usage
|
||||
if quota > 0.05 {
|
||||
format!("{:.1}/{:.1}", used_gb, quota_gb)
|
||||
} else if used > 0.05 {
|
||||
@@ -159,7 +160,11 @@ fn format_cpu_value(cpu_percent: f32) -> String {
|
||||
}
|
||||
|
||||
fn format_disk_value(used: f32, quota: f32) -> String {
|
||||
// Always show in GB format with usage/quota, no units (units in column header)
|
||||
format!("{:.1}/{:.1}", used, quota)
|
||||
// Show usage/quota format only if quota exists, otherwise just usage
|
||||
if quota > 0.05 {
|
||||
format!("{:.1}/{:.1}", used, quota)
|
||||
} else {
|
||||
format!("{:.1}", used)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user