Force RAM to be listed by bytes instead of percent when in dev mode (#3853)
* Force RAM to be listed by bytes instead of percent when in dev mode Makes things easier for support. * fix lint
This commit is contained in:
parent
240cccf8a1
commit
479aaf503b
@ -74,6 +74,7 @@ import { FolderOpenIcon, CPUIcon, DatabaseIcon, IssuesIcon } from "@modrinth/ass
|
|||||||
import { useStorage } from "@vueuse/core";
|
import { useStorage } from "@vueuse/core";
|
||||||
import type { Stats } from "@modrinth/utils";
|
import type { Stats } from "@modrinth/utils";
|
||||||
|
|
||||||
|
const flags = useFeatureFlags();
|
||||||
const route = useNativeRoute();
|
const route = useNativeRoute();
|
||||||
const serverId = route.params.id;
|
const serverId = route.params.id;
|
||||||
const VueApexCharts = defineAsyncComponent(() => import("vue3-apexcharts"));
|
const VueApexCharts = defineAsyncComponent(() => import("vue3-apexcharts"));
|
||||||
@ -165,10 +166,14 @@ const metrics = computed(() => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Memory usage",
|
title: "Memory usage",
|
||||||
value: userPreferences.value.ramAsNumber
|
value:
|
||||||
|
userPreferences.value.ramAsNumber || flags.developerMode
|
||||||
? formatBytes(stats.value.ram_usage_bytes)
|
? formatBytes(stats.value.ram_usage_bytes)
|
||||||
: `${ramPercent.toFixed(2)}%`,
|
: `${ramPercent.toFixed(2)}%`,
|
||||||
max: userPreferences.value.ramAsNumber ? formatBytes(stats.value.ram_total_bytes) : "100%",
|
max:
|
||||||
|
userPreferences.value.ramAsNumber || flags.developerMode
|
||||||
|
? formatBytes(stats.value.ram_total_bytes)
|
||||||
|
: "100%",
|
||||||
icon: DatabaseIcon,
|
icon: DatabaseIcon,
|
||||||
data: ramData.value,
|
data: ramData.value,
|
||||||
showGraph: true,
|
showGraph: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user