-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: experimental enclave building in the EMUI (#2137)
## Description: This PR adds an experimental switch to the 'about' dialog, which allows a 'Build Enclave' option to be enabled in the EMUI. This option presents a graphical interface for drawing out an enclave of services and artifacts, which can then be repeatedly executed to populate/modify an enclave. ## Is this change user facing? YES (but behind a feature switch) ## References (if applicable): * Brief on slack.
- Loading branch information
Showing
44 changed files
with
2,437 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
enclave-manager/web/packages/app/src/emui/catalog/storage.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
enclave-manager/web/packages/app/src/emui/enclaves/components/BuildEnclave.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { isDefined } from "kurtosis-ui-components"; | ||
import { useEffect, useState } from "react"; | ||
import { useLocation, useNavigate } from "react-router-dom"; | ||
import { useSettings } from "../../settings"; | ||
import { KURTOSIS_BUILD_ENCLAVE_URL_ARG } from "./configuration/drawer/constants"; | ||
import { EnclaveBuilderModal } from "./modals/EnclaveBuilderModal"; | ||
|
||
export const BuildEnclave = () => { | ||
const { settings } = useSettings(); | ||
const navigate = useNavigate(); | ||
const location = useLocation(); | ||
|
||
const [buildEnclaveOpen, setBuildEnclaveOpen] = useState(false); | ||
|
||
useEffect(() => { | ||
setBuildEnclaveOpen(location.hash === `#${KURTOSIS_BUILD_ENCLAVE_URL_ARG}`); | ||
}, [location]); | ||
|
||
const handleCloseBuildEnclave = () => { | ||
setBuildEnclaveOpen(false); | ||
if (isDefined(location.hash)) { | ||
navigate(`${location.pathname}${location.search}`); | ||
} | ||
}; | ||
|
||
if (!settings.ENABLE_EXPERIMENTAL_BUILD_ENCLAVE) { | ||
return null; | ||
} | ||
|
||
return <EnclaveBuilderModal isOpen={buildEnclaveOpen} onClose={handleCloseBuildEnclave} />; | ||
}; |
Oops, something went wrong.