mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-01-30 15:19:32 +08:00
Fix: display system load avg
This commit is contained in:
parent
6a6a8e0022
commit
525a04793f
@ -4,6 +4,7 @@ import { t } from "@/lang/i18n";
|
|||||||
import { useOverviewInfo } from "@/hooks/useOverviewInfo";
|
import { useOverviewInfo } from "@/hooks/useOverviewInfo";
|
||||||
import type { LayoutCard } from "@/types";
|
import type { LayoutCard } from "@/types";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
import { arrayFilter } from "@/tools/array";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
card: LayoutCard;
|
card: LayoutCard;
|
||||||
@ -25,7 +26,7 @@ const overviewList = computed(() => {
|
|||||||
const total = Number((system.totalmem / 1024 / 1024 / 1024).toFixed(1));
|
const total = Number((system.totalmem / 1024 / 1024 / 1024).toFixed(1));
|
||||||
const used = Number(total - free).toFixed(1);
|
const used = Number(total - free).toFixed(1);
|
||||||
|
|
||||||
return [
|
return arrayFilter([
|
||||||
{
|
{
|
||||||
title: t("TXT_CODE_413b9c01"),
|
title: t("TXT_CODE_413b9c01"),
|
||||||
value: system.node
|
value: system.node
|
||||||
@ -64,7 +65,8 @@ const overviewList = computed(() => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("TXT_CODE_190ecd56"),
|
title: t("TXT_CODE_190ecd56"),
|
||||||
value: system.loadavg.map((v) => Number(v).toFixed(2)).join("-")
|
value: system.loadavg.map((v) => Number(v).toFixed(2)).join("-"),
|
||||||
|
condition: () => !system.type.toLowerCase().includes("windows")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("TXT_CODE_77d038f7"),
|
title: t("TXT_CODE_77d038f7"),
|
||||||
@ -82,7 +84,7 @@ const overviewList = computed(() => {
|
|||||||
title: t("TXT_CODE_edf84830"),
|
title: t("TXT_CODE_edf84830"),
|
||||||
value: `${system.type} ${system.platform}`
|
value: `${system.type} ${system.platform}`
|
||||||
}
|
}
|
||||||
];
|
]);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user