/* * Copyright (C) 2023 Red Hat, Inc. * SPDX-License-Identifier: LGPL-2.1-or-later */ import cockpit from "cockpit"; import React from "react"; import { Button } from "@patternfly/react-core/dist/esm/components/Button/index.js"; import { Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from "@patternfly/react-core/dist/esm/components/Modal/index.js"; import { PageSection } from "@patternfly/react-core/dist/esm/components/Page/index.js"; import { useMaybeBackdrop } from "../../hooks/CockpitIntegration.jsx"; import { CockpitNetworkIframe } from "./NetworkConfiguration.jsx"; import { useNetworkStatus } from "./useNetworkStatus.js"; import "./CockpitNetworkConfiguration.scss"; const _ = cockpit.gettext; export const CockpitNetworkConfiguration = ({ onCritFail, setIsNetworkOpen, }) => { const { hasActiveCheckpoint } = useNetworkStatus(); const backdropClass = useMaybeBackdrop(); const idPrefix = "cockpit-network-configuration"; const handleClose = () => { // Prevent closing if there's an active checkpoint if (hasActiveCheckpoint) { return; } setIsNetworkOpen(false); }; return (
); };