headplane/app/routes/machines/dialogs/expire.tsx

25 lines
757 B
TypeScript
Raw Normal View History

2024-12-31 10:30:14 +05:30
import Dialog from '~/components/Dialog';
2024-12-31 10:31:50 +05:30
import type { Machine } from '~/types';
2024-05-01 02:47:45 -04:00
interface ExpireProps {
machine: Machine;
isOpen: boolean;
setIsOpen: (isOpen: boolean) => void;
2024-05-01 02:47:45 -04:00
}
export default function Expire({ machine, isOpen, setIsOpen }: ExpireProps) {
2024-05-01 02:47:45 -04:00
return (
<Dialog isOpen={isOpen} onOpenChange={setIsOpen}>
<Dialog.Panel variant="destructive">
<Dialog.Title>Expire {machine.givenName}</Dialog.Title>
<Dialog.Text>
This will disconnect the machine from your Tailnet. In order to
reconnect, you will need to re-authenticate from the device.
</Dialog.Text>
<input type="hidden" name="action_id" value="expire" />
<input type="hidden" name="node_id" value={machine.id} />
2024-05-01 02:47:45 -04:00
</Dialog.Panel>
</Dialog>
2024-12-31 10:30:14 +05:30
);
2024-05-01 02:47:45 -04:00
}