feat(hosts): Schluessel auf dem Host anzeigen und ausrollen (#016)
Die Hostseite listet, welche Public und Private Keys sshkv dort verwaltet - direkt oder ueber eine Hostgruppe - mit Zustand als Punkt und Text. Ein Dry-Run je Host zeigt das Diff aller Benutzer dieses Hosts und rollt nach Bestaetigung aus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import { useEffect, useState, useTransition } from "react";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import { DiffBox } from "@/components/ui/DiffBox";
|
||||
import { laeuftNoch, useVorgang } from "@/components/vorgang/useVorgang";
|
||||
import { ausrollenAktion, trockenlaufAktion } from "@/server/actions/verwendungen";
|
||||
import { ausrollenAktion, trockenlaufAktion, type AusrollAuswahl } from "@/server/actions/verwendungen";
|
||||
import type { DiffZeile } from "@/lib/ssh/zeilen-diff";
|
||||
|
||||
/**
|
||||
@@ -24,7 +24,7 @@ type PlanZiel = {
|
||||
fehler?: string;
|
||||
};
|
||||
|
||||
export function AusrollenPanel({ schluesselId, offen }: { schluesselId: string; offen: number }) {
|
||||
export function AusrollenPanel({ auswahl, offen }: { auswahl: AusrollAuswahl; offen: number }) {
|
||||
const router = useRouter();
|
||||
const [trockenlaufId, setTrockenlaufId] = useState<string>();
|
||||
const [ausrollenId, setAusrollenId] = useState<string>();
|
||||
@@ -52,7 +52,7 @@ export function AusrollenPanel({ schluesselId, offen }: { schluesselId: string;
|
||||
starten(async () => {
|
||||
setFehler(undefined);
|
||||
setAusrollenId(undefined);
|
||||
const antwort = await trockenlaufAktion(schluesselId);
|
||||
const antwort = await trockenlaufAktion(auswahl);
|
||||
if (antwort.fehler) setFehler(antwort.fehler);
|
||||
else setTrockenlaufId(antwort.vorgangId);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user