mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 22:25:24 +00:00
feat: ship host metrics as a first-party in-process plugin
This commit is contained in:
1 parent
a2479c19b0
commit
19b70430a1
145 files changed
+675
-349
No files matched your search
+2
-2
@@ -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 {
|
||||
+1
-1
@@ -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
-1
@@ -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
-1
@@ -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 {
|
||||
+1
-1
@@ -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 },
|
||||
Reference in new issue
Block a user