Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

feat(frontend): update Settings UI after sensor proxy removal

rcourtman9d574355bf62
diff --git a/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx b/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx
index c27e12da79..c336a7098d 100644
--- a/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx
+++ b/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx
@@ -3,26 +3,11 @@ import type { NodeConfig, NodeConfigWithStatus } from '@/types/nodes';
import type { Node, PBSInstance, PMGInstance, Host } from '@/types/api';
import { Card } from '@/components/shared/Card';
-export interface TemperatureTransportInfo {
- httpMap: Record<string, { reachable: boolean; error?: string; url?: string }>;
- socketStatus: 'healthy' | 'error' | 'missing';
- socketCooldowns?: Record<string, TemperatureSocketCooldownInfo>;
-}
-
-type TemperatureSocketCooldownInfo = {
- secondsRemaining?: number;
- until?: string;
- lastError?: string;
-};
-
-
-
interface PveNodesTableProps {
nodes: NodeConfigWithStatus[];
stateNodes: Node[];
stateHosts?: Host[];
globalTemperatureMonitoringEnabled?: boolean;
- temperatureTransports?: TemperatureTransportInfo | null;
onTestConnection: (nodeId: string) => void;
onEdit: (node: NodeConfigWithStatus) => void;
onDelete: (node: NodeConfigWithStatus) => void;
@@ -31,45 +16,6 @@ interface PveNodesTableProps {
type StatusMeta = { dotClass: string; label: string; labelClass: string };
-type TemperatureTransportBadge = {
- label: string;
- badgeClass: string;
- description?: string;
-};
-
-const normalizeHostKey = (value?: string) => {
- if (!value) {
- return '';
- }
- let result = value.trim().toLowerCase();
- if (!result) {
- return '';
- }
- result = result.replace(/^https?:\/\//, '');
- const slashIndex = result.indexOf('/');
- if (slashIndex !== -1) {
- result = result.slice(0, slashIndex);
- }
- const colonIndex = result.indexOf(':');
- if (colonIndex !== -1) {
- result = result.slice(0, colonIndex);
- }
- return result;
-};
-
-const formatCooldown = (seconds?: number) => {
- if (!seconds || seconds <= 0) {
- return '0s';
- }
- if (seconds >= 3600) {
- return `${Math.round(seconds / 3600)}h`;
- }
- if (seconds >= 60) {
- return `${Math.round(seconds / 60)}m`;
- }
- return `${Math.round(seconds)}s`;
-};
-
const STATUS_META: Record<string, StatusMeta> = {
online: {
dotClass: 'bg-green-500',
@@ -98,142 +44,6 @@ const STATUS_META: Record<string, StatusMeta> = {
},
};
-const resolveTemperatureTransport = (
- node: NodeConfigWithStatus,
- info: TemperatureTransportInfo | null | undefined,
- globalEnabled: boolean,
- hostAgent?: Host,
-): TemperatureTransportBadge => {
- const monitoringEnabled = isTemperatureMonitoringEnabled(node, globalEnabled);
- const normalizedTransport = (node.temperatureTransport || '').toLowerCase();
- const nodeKey = normalizeHostKey(node.name);
- const hostKey = normalizeHostKey(node.host);
- const socketCooldownEntry =
- (nodeKey && info?.socketCooldowns?.[nodeKey]) ||
- (hostKey && info?.socketCooldowns?.[hostKey]);
- if (!monitoringEnabled) {
- return {
- label: 'Temp disabled',
- badgeClass: 'bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300',
- };
- }
- if (normalizedTransport === 'disabled') {
- return {
- label: 'Temp disabled',
- badgeClass: 'bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300',
- };
- }
-
- // If a host agent is connected and online, it provides temperatures directly
- if (hostAgent?.status === 'online') {
- return {
- label: 'Via agent',
- badgeClass: 'bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300',
- description: 'Temperature data from Pulse agent',
- };
- }
-
- const key = nodeKey;
- const httpEntry = key ? info?.httpMap?.[key] : undefined;
- const socketStatus = info?.socketStatus;
-
- const buildSocketBadge = (): TemperatureTransportBadge => {
- if (socketCooldownEntry) {
- const retryText = `Retrying in ${formatCooldown(socketCooldownEntry.secondsRemaining)}`;
- return {
- label: 'Socket cooldown',
- badgeClass: 'bg-amber-100 dark:bg-amber-900 text-amber-700 dark:text-amber-300',
- description: socketCooldownEntry.lastError
- ? `${socketCooldownEntry.lastError} (${retryText})`
- : retryText,
- };
- }
- if (socketStatus === 'error') {
- return {
- label: 'Socket error',
- badgeClass: 'bg-amber-100 dark:bg-amber-900 text-amber-700 dark:text-amber-300',
- description: 'Proxy socket not responding',
- };
- }
- if (socketStatus === 'missing') {
- return {
- label: 'Socket missing',
- badgeClass: 'bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300',
- description: 'Mount /mnt/pulse-proxy inside the container',
- };
- }
- return {
- label: 'Socket proxy',
- badgeClass: 'bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300',
- };
- };
-
- if (normalizedTransport) {
- switch (normalizedTransport) {
- case 'https-proxy':
- if (httpEntry) {
- if (httpEntry.reachable) {
- return {
- label: 'HTTPS proxy',
- badgeClass: 'bg-emerald-100 dark:bg-emerald-900 text-emerald-700 dark:text-emerald-300',
- description: httpEntry.url,
- };
- }
- return {
- label: 'HTTPS error',
- badgeClass: 'bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300',
- description: httpEntry.error || 'Proxy unreachable',
- };
- }
- return {
- label: 'HTTPS proxy',
- badgeClass: 'bg-emerald-100 dark:bg-emerald-900 text-emerald-700 dark:text-emerald-300',
- };
- case 'socket-proxy':
- return buildSocketBadge();
- case 'ssh-blocked':
- return {
- label: 'Agent required',
- badgeClass: 'bg-amber-100 dark:bg-amber-900 text-amber-700 dark:text-amber-300',
- description: 'Install agent on node for temperature monitoring',
- };
- case 'ssh':
- return {
- label: 'SSH fallback',
- badgeClass: 'bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300',
- };
- default:
- break;
- }
- }
-
- if (httpEntry) {
- if (httpEntry.reachable) {
- return {
- label: 'HTTPS proxy',
- badgeClass: 'bg-emerald-100 dark:bg-emerald-900 text-emerald-700 dark:text-emerald-300',
- description: httpEntry.url,
- };
- }
- return {
- label: 'HTTPS error',
- badgeClass: 'bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300',
- description: httpEntry.error || 'Proxy unreachable',
- };
- }
-
- if (info) {
- if (info.socketStatus === 'healthy' || info.socketStatus === 'error' || info.socketStatus === 'missing') {
- return buildSocketBadge();
- }
- }
-
- return {
- label: 'Proxy (SSH)',
- badgeClass: 'bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300',
- };
-};
-
const isTemperatureMonitoringEnabled = (
node: NodeConfigWithStatus,
globalEnabled: boolean,
@@ -341,14 +151,6 @@ export const PveNodesTable: Component<PveNodesTableProps> = (props) => {
'clusterName' in node && node.clusterName ? node.clusterName : 'Unknown',
);
const hostAgent = createMemo(() => findMatchingHostAgent(node.name, props.stateHosts, props.stateNodes));
- const transportMeta = createMemo(() =>
- resolveTemperatureTransport(
- node,
- props.temperatureTransports,
- props.globalTemperatureMonitoringEnabled ?? true,
- hostAgent(),
- ),
- );
return (
<tr class="even:bg-gray-50/60 dark:even:bg-gray-800/30 hover:bg-blue-50/40 dark:hover:bg-blue-900/20 transition-colors">
<td class="align-top py-3 pl-4 pr-3">
@@ -500,19 +302,7 @@ export const PveNodesTable: Component<PveNodesTableProps> = (props) => {
Temperature
</span>
)}
- <Show when={transportMeta()}>
- <span
- class={`text-xs px-2 py-1 rounded ${transportMeta().badgeClass}`}
- >
- {transportMeta().label}
- </span>
- </Show>
</div>
- <Show when={transportMeta()?.description}>
- <div class="mt-1 text-[0.65rem] text-gray-500 dark:text-gray-400">
- {transportMeta()?.description}
- </div>
- </Show>
</td>
<td class="align-top px-3 py-3 whitespace-nowrap">
<span class={`inline-flex items-center gap-2 text-xs font-medium ${statusMeta().labelClass}`}>
diff --git a/frontend-modern/src/components/Settings/DiagnosticsPanel.tsx b/frontend-modern/src/components/Settings/DiagnosticsPanel.tsx
index d2fd0df6f4..4643e40b85 100644
--- a/frontend-modern/src/components/Settings/DiagnosticsPanel.tsx
+++ b/frontend-modern/src/components/Settings/DiagnosticsPanel.tsx
@@ -63,19 +63,6 @@ interface DiscoveryDiagnostic {
lastResultErrors?: number;
}
-interface TemperatureProxyDiagnostic {
- legacySSHDetected: boolean;
- recommendProxyUpgrade: boolean;
- socketFound: boolean;
- socketPath?: string;
- socketPermissions?: string;
- socketOwner?: string;
- socketGroup?: string;
- proxyReachable?: boolean;
- proxyVersion?: string;
- notes?: string[];
-}
-
interface APITokenDiagnostic {
enabled: boolean;
tokenCount: number;
@@ -131,7 +118,6 @@ interface DiagnosticsData {
nodes: DiagnosticsNode[];
pbs: DiagnosticsPBS[];
system: SystemDiagnostic;
- temperatureProxy?: TemperatureProxyDiagnostic | null;
apiTokens?: APITokenDiagnostic | null;
dockerAgents?: DockerAgentDiagnostic | null;
alerts?: AlertsDiagnostic | null;
@@ -299,8 +285,6 @@ export const DiagnosticsPanel: Component = () => {
// Check for errors
if (data.errors?.length > 0) issues.push('errors');
- // Check temperature proxy
- if (data.temperatureProxy?.legacySSHDetected) issues.push('temperature');
// Check alerts config
if (data.alerts?.legacyThresholdsDetected || data.alerts?.missingCooldown) issues.push('alerts');
@@ -514,52 +498,6 @@ export const DiagnosticsPanel: Component = () => {
{/* Detailed Status Cards */}
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
- {/* Temperature Proxy */}
- <Show when={diagnosticsData()?.temperatureProxy}>
- <Card padding="md">
- <div class="flex items-center gap-3 mb-4 pb-3 border-b border-gray-200 dark:border-gray-700">
- <div class="p-2 rounded-lg bg-orange-100 dark:bg-orange-900/30">
- <Activity class="w-4 h-4 text-orange-600 dark:text-orange-400" />
- </div>
- <div>
- <h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100">Temperature Proxy</h4>
- <p class="text-xs text-gray-500 dark:text-gray-400">Hardware temperature monitoring</p>
- </div>
- <div class="ml-auto">
- <StatusBadge
- status={diagnosticsData()?.temperatureProxy?.socketFound ? 'online' : 'warning'}
- label={diagnosticsData()?.temperatureProxy?.socketFound ? 'Connected' : 'Not Found'}
- />
- </div>
- </div>
- <div class="grid grid-cols-2 gap-3 text-xs">
- <div class="flex items-center gap-2">
- {diagnosticsData()?.temperatureProxy?.socketFound ?
- <CheckCircle class="w-4 h-4 text-green-500" /> :
- <XCircle class="w-4 h-4 text-red-500" />
- }
- <span>Proxy Socket</span>
- </div>
- <div class="flex items-center gap-2">
- {diagnosticsData()?.temperatureProxy?.proxyReachable ?
- <CheckCircle class="w-4 h-4 text-green-500" /> :
- <AlertTriangle class="w-4 h-4 text-amber-500" />
- }
- <span>Daemon</span>
- </div>
- </div>
- <Show when={diagnosticsData()?.temperatureProxy?.proxyVersion}>
- <div class="mt-3 pt-3 border-t border-gray-100 dark:border-gray-700/50 text-xs text-gray-500 dark:text-gray-400">
- Version: {diagnosticsData()?.temperatureProxy?.proxyVersion}
- </div>
- </Show>
- <Show when={diagnosticsData()?.temperatureProxy?.legacySSHDetected}>
- <div class="mt-3 p-2 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 rounded text-xs text-amber-700 dark:text-amber-300">
- ⚠️ Legacy SSH temperature collection detected - consider upgrading
- </div>
- </Show>
- </Card>
- </Show>
{/* API Tokens */}
<Show when={diagnosticsData()?.apiTokens}>
diff --git a/frontend-modern/src/components/Settings/NodeModal.tsx b/frontend-modern/src/components/Settings/NodeModal.tsx
index 12d8e478e3..dbc08f4cad 100644
--- a/frontend-modern/src/components/Settings/NodeModal.tsx
+++ b/frontend-modern/src/components/Settings/NodeModal.tsx
@@ -35,11 +35,6 @@ interface NodeModalProps {
onToggleTemperatureMonitoring?: (enabled: boolean) => Promise<void> | void;
}
-type TemperatureTransportDetail = {
- tone: 'info' | 'success' | 'warning' | 'danger';
- message: string;
- disable?: boolean;
-};
const deriveNameFromHost = (host: string): string => {
let value = host.trim();
@@ -100,63 +95,6 @@ export const NodeModal: Component<NodeModalProps> = (props) => {
const showTemperatureMonitoringSection = () =>
typeof props.temperatureMonitoringEnabled === 'boolean';
const temperatureMonitoringEnabledValue = () => props.temperatureMonitoringEnabled ?? true;
- const temperatureTransportDetail = createMemo<TemperatureTransportDetail | null>(() => {
- const transport = props.editingNode?.temperatureTransport;
- if (!transport) {
- return null;
- }
-
- switch (transport.toLowerCase()) {
- case 'socket-proxy':
- return {
- tone: 'success',
- message: 'Temperatures flow through the socket proxy mounted at /run/pulse-sensor-proxy.',
- };
- case 'https-proxy':
- return {
- tone: 'success',
- message: 'Temperatures are collected via the HTTPS proxy registered for this node.',
- };
- case 'ssh-blocked':
- return {
- tone: 'danger',
- disable: true,
- message:
- 'Pulse is running in a container. Install the Pulse agent on this node for temperature monitoring (Settings → Agents).',
- };
- case 'ssh':
- return {
- tone: 'info',
- message: 'Pulse will SSH directly into this node for temperature collection.',
- };
- default:
- return null;
- }
- });
- const temperatureToggleDisabled = () =>
- props.temperatureMonitoringLocked ||
- props.savingTemperatureSetting ||
- Boolean(temperatureTransportDetail()?.disable);
- const temperatureTransportMessageClass = () => {
- const tone = temperatureTransportDetail()?.tone ?? 'info';
- switch (tone) {
- case 'success':
- return 'text-green-600 dark:text-green-300';
- case 'warning':
- return 'text-amber-600 dark:text-amber-300';
- case 'danger':
- return 'text-red-600 dark:text-red-300';
- default:
- return 'text-gray-600 dark:text-gray-400';
- }
- };
- const temperatureToggleTitle = () => {
- const detail = temperatureTransportDetail();
- if (detail?.disable) {
- return detail.message;
- }
- return undefined;
- };
const quickSetupExpiryLabel = () => {
const expiry = quickSetupExpiry();
if (!expiry) {
@@ -2066,7 +2004,6 @@ export const NodeModal: Component<NodeModalProps> = (props) => {
props.onToggleTemperatureMonitoring?.(event.currentTarget.checked);
}}
disabled={temperatureToggleDisabled()}
- title={temperatureToggleTitle()}
ariaLabel={
temperatureMonitoringEnabledValue()
? 'Disable temperature monitoring'
@@ -2074,11 +2011,6 @@ export const NodeModal: Component<NodeModalProps> = (props) => {
}
/>
</div>
- <Show when={temperatureTransportDetail()}>
- <p class={`mt-2 text-xs ${temperatureTransportMessageClass()}`}>
- {temperatureTransportDetail()?.message}
- </p>
- </Show>
<Show when={!temperatureMonitoringEnabledValue()}>
<p class="mt-3 rounded border border-blue-200 bg-blue-50 p-2 text-xs text-blue-700 dark:border-blue-700 dark:bg-blue-900/20 dark:text-blue-200">
Pulse will skip SSH temperature polling for this node. Existing dashboard readings will stop refreshing.
diff --git a/frontend-modern/src/components/Settings/ProxmoxAgentNodesPanel.tsx b/frontend-modern/src/components/Settings/ProxmoxAgentNodesPanel.tsx
index 8c3d988cff..2d2fe7ebb2 100644
--- a/frontend-modern/src/components/Settings/ProxmoxAgentNodesPanel.tsx
+++ b/frontend-modern/src/components/Settings/ProxmoxAgentNodesPanel.tsx
@@ -6,7 +6,6 @@ import {
PveNodesTable,
PbsNodesTable,
PmgNodesTable,
- type TemperatureTransportInfo,
} from './ConfiguredNodeTables';
import { notificationStore } from '@/stores/notifications';
import Server from 'lucide-solid/icons/server';
@@ -49,7 +48,6 @@ interface ProxmoxAgentNodesPanelProps {
// Temperature monitoring
temperatureMonitoringEnabled: Accessor<boolean>;
- temperatureTransports?: Accessor<TemperatureTransportInfo | null>;
// Discovery settings
discoveryEnabled: Accessor<boolean>;
@@ -202,7 +200,6 @@ export const ProxmoxAgentNodesPanel: Component<ProxmoxAgentNodesPanelProps> = (p
stateNodes={props.stateNodes ?? []}
stateHosts={props.stateHosts ?? []}
globalTemperatureMonitoringEnabled={props.temperatureMonitoringEnabled()}
- temperatureTransports={props.temperatureTransports?.() ?? null}
onTestConnection={props.testNodeConnection}
onEdit={(node) => {
props.setEditingNode(node as NodeConfigWithStatus);
diff --git a/frontend-modern/src/types/config.ts b/frontend-modern/src/types/config.ts
index 10fa4c505b..9c1dcbd543 100644
--- a/frontend-modern/src/types/config.ts
+++ b/frontend-modern/src/types/config.ts
@@ -18,8 +18,6 @@ export interface AuthConfig {
PULSE_AUTH_PASS: string; // Bcrypt hashed password
API_TOKEN: string; // Legacy API authentication token (hashed)
API_TOKENS?: string; // Optional comma-separated list of hashed tokens
- ENABLE_AUDIT_LOG?: boolean; // @deprecated - use PULSE_AUDIT_LOG
- PULSE_AUDIT_LOG?: boolean; // Enable audit logging
}
/**
@@ -70,8 +68,6 @@ export interface NodeInstance {
*/
export interface PVENodeConfig extends NodeInstance {
realm?: string; // Authentication realm (pam, pve, etc.)
- temperatureProxyURL?: string; // Optional HTTPS URL to pulse-sensor-proxy
- temperatureProxyToken?: string; // Bearer token for proxy authentication
}
/**
diff --git a/frontend-modern/src/types/nodes.ts b/frontend-modern/src/types/nodes.ts
index d3ed434110..ae414d1dd2 100644
--- a/frontend-modern/src/types/nodes.ts
+++ b/frontend-modern/src/types/nodes.ts
@@ -1,12 +1,5 @@
import type { Temperature } from '@/types/api';
-export type TemperatureTransport =
- | 'disabled'
- | 'socket-proxy'
- | 'https-proxy'
- | 'ssh'
- | 'ssh-blocked';
-
// Node configuration types
export interface ClusterEndpoint {
@@ -93,7 +86,6 @@ export type NodeConfig = (PVENodeConfig | PBSNodeConfig | PMGNodeConfig) & {
status?: 'connected' | 'disconnected' | 'offline' | 'error' | 'pending';
temperature?: Temperature;
displayName?: string;
- temperatureTransport?: TemperatureTransport;
source?: 'agent' | 'script' | ''; // How this node was registered
};