diff --git a/src/components/storage/InstallationDestination.jsx b/src/components/storage/InstallationDestination.jsx index 54f23a020e..4924e93cfa 100644 --- a/src/components/storage/InstallationDestination.jsx +++ b/src/components/storage/InstallationDestination.jsx @@ -433,7 +433,7 @@ export const InstallationDestination = ({ : _("No usable disks detected") )} {rescanDisksButton} - {!isBootIso && } + diff --git a/src/components/storage/ModifyStorage.jsx b/src/components/storage/ModifyStorage.jsx index a731685f9f..edb0a214b8 100644 --- a/src/components/storage/ModifyStorage.jsx +++ b/src/components/storage/ModifyStorage.jsx @@ -29,19 +29,24 @@ import { WrenchIcon, ExternalLinkAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; const N_ = cockpit.noop; -const startBlivetGUI = (onStart, onStarted, errorHandler) => { - console.log("Spawning blivet-gui."); - // We don't have an event informing that blivet-gui started so just wait a bit. - const timeoutId = window.setTimeout(onStarted, 3000); - cockpit.spawn(["blivet-gui", "--keep-above", "--auto-dev-updates"], { err: "message" }) - .then(() => { - console.log("blivet-gui exited."); - // If the blivet-gui exits earlier cancel the delay - window.clearTimeout(timeoutId); - return onStarted(); - }) - .catch((error) => { window.clearTimeout(timeoutId); errorHandler(error) }); +let cockpit_window = null; + +const startCockpitStorage = (onStart, onStarted, errorHandler) => { + window.localStorage.setItem("cockpit_anaconda", + JSON.stringify({ + mount_point_prefix: "/mnt/sysimage", + ignore_devices: ["/dev/sr0", "/dev/loop0"] + })); + cockpit_window = window.open("/cockpit/@localhost/storage/index.html", "storage-tab"); onStart(); + onStarted(); +}; + +const stopCockpitStorage = () => { + if (cockpit_window) { + cockpit_window.close(); + cockpit_window = null; + } }; const StorageModifiedModal = ({ onClose, onRescan }) => { @@ -55,7 +60,7 @@ const StorageModifiedModal = ({ onClose, onRescan }) => { footer={ <>