mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 00:40:58 +01:00
fix: system health monitoring gets proxmox id passed (#2094)
This commit is contained in:
@@ -1419,6 +1419,10 @@
|
||||
"healthMonitoring": {
|
||||
"name": "System Health Monitoring",
|
||||
"description": "Displays information showing the health and status of your system(s).",
|
||||
"tab": {
|
||||
"system": "System",
|
||||
"cluster": "Cluster"
|
||||
},
|
||||
"option": {
|
||||
"fahrenheit": {
|
||||
"label": "CPU Temp in Fahrenheit"
|
||||
|
||||
@@ -5,6 +5,7 @@ import dayjs from "dayjs";
|
||||
import duration from "dayjs/plugin/duration";
|
||||
|
||||
import { clientApi } from "@homarr/api/client";
|
||||
import { useI18n } from "@homarr/translation/client";
|
||||
|
||||
import type { WidgetComponentProps } from "../definition";
|
||||
import { ClusterHealthMonitoring } from "./cluster/cluster-health";
|
||||
@@ -14,6 +15,7 @@ dayjs.extend(duration);
|
||||
|
||||
export default function HealthMonitoringWidget(props: WidgetComponentProps<"healthMonitoring">) {
|
||||
const [integrations] = clientApi.integration.byIds.useSuspenseQuery(props.integrationIds);
|
||||
const t = useI18n();
|
||||
|
||||
const proxmoxIntegrationId = integrations.find((integration) => integration.kind === "proxmox")?.id;
|
||||
|
||||
@@ -43,14 +45,14 @@ export default function HealthMonitoringWidget(props: WidgetComponentProps<"heal
|
||||
<Tabs defaultValue={props.options.defaultTab} variant="outline">
|
||||
<Tabs.List grow>
|
||||
<Tabs.Tab value="system">
|
||||
<b>System</b>
|
||||
<b>{t("widget.healthMonitoring.tab.system")}</b>
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab value="cluster">
|
||||
<b>Cluster</b>
|
||||
<b>{t("widget.healthMonitoring.tab.cluster")}</b>
|
||||
</Tabs.Tab>
|
||||
</Tabs.List>
|
||||
<Tabs.Panel mt="lg" value="system">
|
||||
<SystemHealthMonitoring {...props} />
|
||||
<SystemHealthMonitoring {...props} integrationIds={otherIntegrationIds} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel mt="lg" value="cluster">
|
||||
<ClusterHealthMonitoring integrationId={proxmoxIntegrationId} {...props} />
|
||||
|
||||
Reference in New Issue
Block a user