diff --git a/apps/frontend/src/components/ui/servers/ServerStats.vue b/apps/frontend/src/components/ui/servers/ServerStats.vue index 10ae20e12..9f8f6a4e2 100644 --- a/apps/frontend/src/components/ui/servers/ServerStats.vue +++ b/apps/frontend/src/components/ui/servers/ServerStats.vue @@ -166,7 +166,10 @@ const getPotentialWarning = (metric: (typeof metrics.value)[0]) => { return word.toLowerCase(); }) .join(" "); - const data = metric.data.at(-1) || 0; + let data = metric.data.at(-1) || 0; + if (userPrefrences.value.ramAsNumber) { + data = (props.data.current.ram_usage_bytes / props.data.current.ram_total_bytes) * 100; + } switch (true) { case data >= 90: return `Your server's ${title} is very high.`; @@ -177,7 +180,10 @@ const getPotentialWarning = (metric: (typeof metrics.value)[0]) => { const generateOptions = (metric: (typeof metrics.value)[0]) => { let color = "var(--color-brand)"; - const data = metric.data.at(-1) || 0; + let data = metric.data.at(-1) || 0; + if (userPrefrences.value.ramAsNumber) { + data = (props.data.current.ram_usage_bytes / props.data.current.ram_total_bytes) * 100; + } switch (true) { case data >= 90: color = "var(--color-red)";