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
|
|
|
|
2024-06-02 01:33:40 -04:00
|
|
|
interface ExpireProps {
|
2025-01-26 15:04:13 -05:00
|
|
|
machine: Machine;
|
|
|
|
|
isOpen: boolean;
|
|
|
|
|
setIsOpen: (isOpen: boolean) => void;
|
2024-05-01 02:47:45 -04:00
|
|
|
}
|
|
|
|
|
|
2025-01-26 15:04:13 -05:00
|
|
|
export default function Expire({ machine, isOpen, setIsOpen }: ExpireProps) {
|
2024-05-01 02:47:45 -04:00
|
|
|
return (
|
2025-01-26 15:04:13 -05:00
|
|
|
<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>
|
2025-04-16 01:48:38 -04:00
|
|
|
<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
|
|
|
}
|