mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23: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
@@ -0,0 +1,12 @@
|
||||
import type { TemperatureSensor } from "@/types/stats-widgets";
|
||||
|
||||
export function selectTemperatureSensor(
|
||||
sensors: TemperatureSensor[],
|
||||
preferredLabel: string,
|
||||
) {
|
||||
return sensors.find((sensor) => sensor.label === preferredLabel) ?? null;
|
||||
}
|
||||
|
||||
export function temperaturePreferenceKey(hostId: number) {
|
||||
return `termix-host-metrics:${hostId}:temperature-sensor`;
|
||||
}
|
||||
Reference in new issue
Block a user