|
1 | 1 | import { html, nothing } from "lit"; |
2 | 2 | import { t } from "../../i18n/index.ts"; |
3 | | -import type { |
4 | | - DevicePairingList, |
5 | | - DeviceTokenSummary, |
6 | | - PairedDevice, |
7 | | - PendingDevice, |
8 | | -} from "../controllers/devices.ts"; |
9 | | -import type { ExecApprovalsFile, ExecApprovalsSnapshot } from "../controllers/exec-approvals.ts"; |
| 3 | +import type { DeviceTokenSummary, PairedDevice, PendingDevice } from "../controllers/devices.ts"; |
10 | 4 | import { formatRelativeTimestamp, formatList } from "../format.ts"; |
11 | 5 | import { normalizeOptionalString } from "../string-coerce.ts"; |
12 | 6 | import { renderExecApprovals, resolveExecApprovalsState } from "./nodes-exec-approvals.ts"; |
13 | 7 | import { resolveConfigAgents, resolveNodeTargets, type NodeTargetOption } from "./nodes-shared.ts"; |
14 | | -export type NodesProps = { |
15 | | - loading: boolean; |
16 | | - nodes: Array<Record<string, unknown>>; |
17 | | - devicesLoading: boolean; |
18 | | - devicesError: string | null; |
19 | | - devicesList: DevicePairingList | null; |
20 | | - configForm: Record<string, unknown> | null; |
21 | | - configLoading: boolean; |
22 | | - configSaving: boolean; |
23 | | - configDirty: boolean; |
24 | | - configFormMode: "form" | "raw"; |
25 | | - execApprovalsLoading: boolean; |
26 | | - execApprovalsSaving: boolean; |
27 | | - execApprovalsDirty: boolean; |
28 | | - execApprovalsSnapshot: ExecApprovalsSnapshot | null; |
29 | | - execApprovalsForm: ExecApprovalsFile | null; |
30 | | - execApprovalsSelectedAgent: string | null; |
31 | | - execApprovalsTarget: "gateway" | "node"; |
32 | | - execApprovalsTargetNodeId: string | null; |
33 | | - onRefresh: () => void; |
34 | | - onDevicesRefresh: () => void; |
35 | | - onDeviceApprove: (requestId: string) => void; |
36 | | - onDeviceReject: (requestId: string) => void; |
37 | | - onDeviceRotate: (deviceId: string, role: string, scopes?: string[]) => void; |
38 | | - onDeviceRevoke: (deviceId: string, role: string) => void; |
39 | | - onLoadConfig: () => void; |
40 | | - onLoadExecApprovals: () => void; |
41 | | - onBindDefault: (nodeId: string | null) => void; |
42 | | - onBindAgent: (agentIndex: number, nodeId: string | null) => void; |
43 | | - onSaveBindings: () => void; |
44 | | - onExecApprovalsTargetChange: (kind: "gateway" | "node", nodeId: string | null) => void; |
45 | | - onExecApprovalsSelectAgent: (agentId: string) => void; |
46 | | - onExecApprovalsPatch: (path: Array<string | number>, value: unknown) => void; |
47 | | - onExecApprovalsRemove: (path: Array<string | number>) => void; |
48 | | - onSaveExecApprovals: () => void; |
49 | | -}; |
| 8 | +export type { NodesProps } from "./nodes.types.ts"; |
| 9 | +import type { NodesProps } from "./nodes.types.ts"; |
50 | 10 |
|
51 | 11 | export function renderNodes(props: NodesProps) { |
52 | 12 | const bindingState = resolveBindingsState(props); |
|
0 commit comments