feat: add auth extension points and one ssh connect pipeline

This commit is contained in:
LukeGus committed 2026-09-23 00:44:33 -05:00
1 parent d3c209af13
commit d774df8b41
159 files changed
+43243 -7451

No files matched your search

+7 -6
View File
@@ -1,4 +1,5 @@
import { useState, useRef, useCallback, useEffect } from "react";
import { useSshAuthProviders } from "@/hooks/useSshAuthProviders";
import { useIsMobile } from "@/hooks/use-mobile";
import { Button } from "@/components/button";
import { Card } from "@/components/card";
@@ -1380,6 +1381,9 @@ export function DashboardTab({
Map<string, { cpu: number | null; ram: number | null; disk: number | null }>
>(new Map());
const viewerSessionsRef = useRef<Map<number, string>>(new Map());
const sshAuthProviders = useSshAuthProviders();
const sshAuthProvidersRef = useRef(sshAuthProviders);
sshAuthProvidersRef.current = sshAuthProviders;
const statusCheckHosts = hosts.filter(isStatusCheckEnabled);
const fetchMetrics = useCallback(async (hostList: Host[]) => {
@@ -1399,12 +1403,9 @@ export function DashboardTab({
const hostId = Number(host.id);
const knownStatus = statuses?.[hostId]?.status;
if (knownStatus === "offline") return null;
if (
host.authType === "none" ||
host.authType === "opkssh" ||
host.authType === "stepca"
)
return null;
// Types that need a person or a browser sign-in cannot be polled.
const authOption = sshAuthProvidersRef.current.find(host.authType);
if (authOption && !authOption.supportsBackground) return null;
try {
const existing = newSessions.get(hostId);