import { Component, Show } from 'solid-js'; import type { Node } from '@/types/api'; import { getNodeDisplayName, hasAlternateDisplayName } from '@/utils/nodes'; import { StatusDot } from '@/components/shared/StatusDot'; import { getNodeStatusIndicator } from '@/utils/status'; interface NodeGroupHeaderProps { node: Node; colspan?: number; renderAs?: 'tr' | 'div'; } export const NodeGroupHeader: Component = (props) => { const nodeStatus = () => getNodeStatusIndicator(props.node); const isOnline = () => nodeStatus().variant === 'success'; const nodeUrl = () => props.node.guestURL || props.node.host || `https://${props.node.name}:8006`; const displayName = () => getNodeDisplayName(props.node); const showActualName = () => hasAlternateDisplayName(props.node); const InnerContent = () => (
{displayName()} ({props.node.name}) {props.node.isClusterMember ? props.node.clusterName : 'Standalone'}
); return (
} >
); };