feat: ship host metrics as a first-party in-process plugin

This commit is contained in:
LukeGus committed 2026-09-21 11:30:46 -05:00
1 parent a2479c19b0
commit 19b70430a1
145 files changed
+675 -349

No files matched your search

@@ -56,7 +56,7 @@ vi.mock("@/hooks/use-confirmation.ts", () => ({
}));
vi.mock(
"../../../features/host-metrics/hooks/useHostMetricsPreferences.ts",
"../../../../../plugins/host-metrics/frontend/hooks/useHostMetricsPreferences.ts",
() => ({
useHostMetricsPreferences: () => ({
layout: {
@@ -69,7 +69,7 @@ vi.mock(
}),
);
import { HostMetricsTab } from "../../../features/host-metrics/HostMetricsTab";
import { HostMetricsTab } from "../../../../../plugins/host-metrics/frontend/HostMetricsTab";
beforeAll(() => {
globalThis.ResizeObserver ??= class {
@@ -8,7 +8,7 @@ vi.mock("react-i18next", () => ({
useTranslation: () => ({ t: (key: string) => key }),
}));
import { GpuCard } from "../../../features/host-metrics/cards/GpuCard";
import { GpuCard } from "../../../../../../plugins/host-metrics/frontend/cards/GpuCard";
const GPU_METRICS: GpuMetrics = {
source: "nvidia-smi",
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import type { GpuDevice } from "@/types/stats-widgets";
import { appendGpuHistories } from "../../../features/host-metrics/cards/gpu-history";
import { appendGpuHistories } from "../../../../../../plugins/host-metrics/frontend/cards/gpu-history";
function gpu(
index: number,
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest";
import type { ServerMetrics } from "@/main-axios";
import type { GpuMetrics } from "@/types/stats-widgets";
import { metricsChangeKey } from "../../../features/host-metrics/metrics-change-key";
import { metricsChangeKey } from "../../../../../plugins/host-metrics/frontend/metrics-change-key";
function poll(gpu: GpuMetrics): ServerMetrics {
return {
@@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest";
import {
selectTemperatureSensor,
temperaturePreferenceKey,
} from "../../../features/host-metrics/temperature-preference";
} from "../../../../../plugins/host-metrics/frontend/temperature-preference";
const sensors = [
{ label: "k10temp: Tctl", celsius: 55 },