diff --git a/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/ConnectEnclaveModal.tsx b/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/ConnectEnclaveModal.tsx index 6e1c3b8264..286921e20c 100644 --- a/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/ConnectEnclaveModal.tsx +++ b/enclave-manager/web/packages/app/src/emui/enclaves/components/modals/ConnectEnclaveModal.tsx @@ -13,12 +13,14 @@ import { EnclaveFullInfo } from "../../types"; export type ConnectEnclaveModalProps = { enclave: EnclaveFullInfo; instanceUUID: string; + apiKey: string; isOpen: boolean; onClose: () => void; }; -export const ConnectEnclaveModal = ({ isOpen, onClose, enclave, instanceUUID }: ConnectEnclaveModalProps) => { +export const ConnectEnclaveModal = ({ isOpen, onClose, enclave, instanceUUID, apiKey }: ConnectEnclaveModalProps) => { const commands = ` + export KURTOSIS_CLOUD_API_KEY="${apiKey}" kurtosis cloud load ${instanceUUID} kurtosis enclave connect ${enclave.name} kurtosis enclave inspect ${enclave.name}`; diff --git a/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ConnectEnclaveButton.tsx b/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ConnectEnclaveButton.tsx index 295c025d08..322f63b742 100644 --- a/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ConnectEnclaveButton.tsx +++ b/enclave-manager/web/packages/app/src/emui/enclaves/components/widgets/ConnectEnclaveButton.tsx @@ -7,9 +7,10 @@ import { ConnectEnclaveModal } from "../modals/ConnectEnclaveModal"; type ConnectEnclaveButtonProps = ButtonProps & { enclave: EnclaveFullInfo; instanceUUID: string; + apiKey: string; }; -export const ConnectEnclaveButton = ({ enclave, instanceUUID, ...buttonProps }: ConnectEnclaveButtonProps) => { +export const ConnectEnclaveButton = ({ enclave, instanceUUID, apiKey, ...buttonProps }: ConnectEnclaveButtonProps) => { const [showModal, setShowModal] = useState(false); return ( @@ -29,6 +30,7 @@ export const ConnectEnclaveButton = ({ enclave, instanceUUID, ...buttonProps }: setShowModal(false)} /> diff --git a/enclave-manager/web/packages/app/src/emui/enclaves/enclave/Enclave.tsx b/enclave-manager/web/packages/app/src/emui/enclaves/enclave/Enclave.tsx index c3887e6e51..aa79049c07 100644 --- a/enclave-manager/web/packages/app/src/emui/enclaves/enclave/Enclave.tsx +++ b/enclave-manager/web/packages/app/src/emui/enclaves/enclave/Enclave.tsx @@ -46,6 +46,7 @@ const EnclaveImpl = ({ enclave }: EnclaveImplProps) => { }; const instanceUUID = Cookies.get("_kurtosis_instance_id") || ""; + const apiKey = Cookies.get("_kurtosis_api_key") || ""; return ( @@ -58,7 +59,7 @@ const EnclaveImpl = ({ enclave }: EnclaveImplProps) => { - +