Add key expiry disable/enable toggle (#554)

This commit is contained in:
Julian Lehrhuber
2026-08-19 03:41:30 +02:00
committed by GitHub
parent 0feab692bd
commit cd59c310f6
9 changed files with 89 additions and 5 deletions
+14 -1
View File
@@ -66,6 +66,7 @@ export async function loader({ request, params, context }: Route.LoaderArgs) {
const [enhancedNode] = mapNodes([node], stats);
const tags = [...node.tags].toSorted();
const supportsNodeOwnerChange = !headscale.capabilities.nodeOwnerIsImmutable;
const supportsDisablingKeyExpiry = headscale.capabilities.keyExpiryCanBeDisabled;
const agentSync = agents?.lastSync();
const policy = policyResult.status === "fulfilled" ? policyResult.value.policy : undefined;
@@ -82,6 +83,7 @@ export async function loader({ request, params, context }: Route.LoaderArgs) {
node: enhancedNode,
stats: stats?.[enhancedNode.nodeKey],
supportsNodeOwnerChange: supportsNodeOwnerChange,
supportsDisablingKeyExpiry: supportsDisablingKeyExpiry,
tags,
users,
};
@@ -90,7 +92,17 @@ export async function loader({ request, params, context }: Route.LoaderArgs) {
export const action = machineAction;
export default function Page({
loaderData: { node, tags, users, magic, agent, stats, existingTags, supportsNodeOwnerChange },
loaderData: {
node,
tags,
users,
magic,
agent,
stats,
existingTags,
supportsNodeOwnerChange,
supportsDisablingKeyExpiry,
},
}: Route.ComponentProps) {
const [showRouting, setShowRouting] = useState(false);
@@ -125,6 +137,7 @@ export default function Page({
node={node}
users={users}
supportsNodeOwnerChange={supportsNodeOwnerChange}
supportsDisablingKeyExpiry={supportsDisablingKeyExpiry}
/>
</div>
<div className="mb-4 flex gap-1">