import { useRef } from 'react'; import { AlertDialog, AlertDialogBody, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, Button, useDisclosure, } from '@chakra-ui/react'; import { isLocalhost } from '../../../../common/api/constants'; import useElectronEvent from '../../../../common/hooks/useElectronEvent'; import * as Panel from '../PanelUtils'; export default function ShutdownPanel() { const { isElectron, sendToElectron } = useElectronEvent(); const { isOpen, onOpen, onClose } = useDisclosure(); const cancelRef = useRef(null); const sendShutdown = () => { sendToElectron('shutdown', 'now'); onClose(); }; return ( <> Shutdown Ontime This will shutdown the Ontime server.
The runtime state will be lost, but your project is kept for next time.
Note: Ontime can only be shutdown from the machine it is running in. Ontime Shutdown This will shutdown the Ontime server.
Are you sure?
); }