mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-24 12:13:28 +00:00
Polish: Fix type errors in App and Node Tables
This commit is contained in:
@@ -522,15 +522,7 @@ function App() {
|
||||
// Parse security data to get hideLocalLogin, oidcEnabled, etc.
|
||||
if (securityRes.ok) {
|
||||
const securityData = await securityRes.json();
|
||||
setSecurityStatus({
|
||||
hasAuthentication: securityData.hasAuthentication || false,
|
||||
oidcEnabled: securityData.oidcEnabled,
|
||||
oidcIssuer: securityData.oidcIssuer,
|
||||
oidcClientId: securityData.oidcClientId,
|
||||
oidcEnvOverrides: securityData.oidcEnvOverrides,
|
||||
hideLocalLogin: securityData.hideLocalLogin,
|
||||
deprecatedDisableAuth: securityData.deprecatedDisableAuth,
|
||||
});
|
||||
setSecurityStatus(securityData as SecurityStatus);
|
||||
}
|
||||
setHasAuth(true); // Force showing login instead of setup
|
||||
setNeedsAuth(true);
|
||||
@@ -546,15 +538,7 @@ function App() {
|
||||
logger.debug('[App] Security status fetched', securityData);
|
||||
|
||||
// Store full security status for Login component
|
||||
setSecurityStatus({
|
||||
hasAuthentication: securityData.hasAuthentication || false,
|
||||
oidcEnabled: securityData.oidcEnabled,
|
||||
oidcIssuer: securityData.oidcIssuer,
|
||||
oidcClientId: securityData.oidcClientId,
|
||||
oidcEnvOverrides: securityData.oidcEnvOverrides,
|
||||
hideLocalLogin: securityData.hideLocalLogin,
|
||||
deprecatedDisableAuth: securityData.deprecatedDisableAuth,
|
||||
});
|
||||
setSecurityStatus(securityData as SecurityStatus);
|
||||
|
||||
// Detect legacy DISABLE_AUTH flag (now ignored) so we can surface a warning
|
||||
if (securityData.deprecatedDisableAuth === true) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, For, Show, createMemo } from 'solid-js';
|
||||
import type { NodeConfig } from '@/types/nodes';
|
||||
import type { Node, PBSInstance, PMGInstance, Host } from '@/types/api';
|
||||
import { Card } from '@/components/shared/Card';
|
||||
|
||||
type NodeConfigWithStatus = NodeConfig & {
|
||||
@@ -28,8 +29,8 @@ interface HostAgentInfo {
|
||||
|
||||
interface PveNodesTableProps {
|
||||
nodes: NodeConfigWithStatus[];
|
||||
stateNodes: { instance: string; status?: string; connectionHealth?: string }[];
|
||||
stateHosts?: HostAgentInfo[];
|
||||
stateNodes: Node[];
|
||||
stateHosts?: Host[];
|
||||
globalTemperatureMonitoringEnabled?: boolean;
|
||||
temperatureTransports?: TemperatureTransportInfo | null;
|
||||
onTestConnection: (nodeId: string) => void;
|
||||
@@ -111,7 +112,7 @@ const resolveTemperatureTransport = (
|
||||
node: NodeConfigWithStatus,
|
||||
info: TemperatureTransportInfo | null | undefined,
|
||||
globalEnabled: boolean,
|
||||
hostAgent?: HostAgentInfo,
|
||||
hostAgent?: Host,
|
||||
): TemperatureTransportBadge => {
|
||||
const monitoringEnabled = isTemperatureMonitoringEnabled(node, globalEnabled);
|
||||
const normalizedTransport = (node.temperatureTransport || '').toLowerCase();
|
||||
@@ -291,8 +292,8 @@ const resolvePveStatusMeta = (
|
||||
// Helper to find matching host agent for a node by hostname matching
|
||||
const findMatchingHostAgent = (
|
||||
nodeName: string,
|
||||
hosts: HostAgentInfo[] | undefined,
|
||||
): HostAgentInfo | undefined => {
|
||||
hosts: Host[] | undefined,
|
||||
): Host | undefined => {
|
||||
if (!hosts || hosts.length === 0) return undefined;
|
||||
const nodeNameLower = nodeName.toLowerCase().trim();
|
||||
return hosts.find((h) => h.hostname.toLowerCase().trim() === nodeNameLower);
|
||||
@@ -559,7 +560,7 @@ export const PveNodesTable: Component<PveNodesTableProps> = (props) => {
|
||||
|
||||
interface PbsNodesTableProps {
|
||||
nodes: NodeConfigWithStatus[];
|
||||
statePbs: { name: string; status?: string; connectionHealth?: string }[];
|
||||
statePbs: PBSInstance[];
|
||||
globalTemperatureMonitoringEnabled?: boolean;
|
||||
onTestConnection: (nodeId: string) => void;
|
||||
onEdit: (node: NodeConfigWithStatus) => void;
|
||||
@@ -755,7 +756,7 @@ export const PbsNodesTable: Component<PbsNodesTableProps> = (props) => {
|
||||
|
||||
interface PmgNodesTableProps {
|
||||
nodes: NodeConfigWithStatus[];
|
||||
statePmg: { name: string; status?: string; connectionHealth?: string }[];
|
||||
statePmg: PMGInstance[];
|
||||
globalTemperatureMonitoringEnabled?: boolean;
|
||||
onTestConnection: (nodeId: string) => void;
|
||||
onEdit: (node: NodeConfigWithStatus) => void;
|
||||
|
||||
Reference in New Issue
Block a user