From 3820cd0ca249982ec98ae72492dcb201397c830c Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Sun, 27 Oct 2024 14:42:06 -0400 Subject: [PATCH] make Build Organization configurable with custom value --- frontend/src/components/config/util.tsx | 84 +++++++++++++------------ 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/frontend/src/components/config/util.tsx b/frontend/src/components/config/util.tsx index 8d55eb361..9b05a9810 100644 --- a/frontend/src/components/config/util.tsx +++ b/frontend/src/components/config/util.tsx @@ -340,6 +340,8 @@ export const ProviderSelector = ({ if (value === "Custom") { onSelect(""); setCustomMode(true); + } else if (value === "None") { + onSelect(""); } else { onSelect(value); } @@ -365,7 +367,8 @@ export const ProviderSelector = ({ !providers.includes(selected) && ( {selected} )} - {showCustom && Custom} + {showCustom && Custom} + {!showCustom && None} ); @@ -908,44 +911,45 @@ export const ImageRegistryConfig = ({ /> - {organizations.length > 0 && ( - - - setRegistry({ - ...registry, - organization, - }) - } - disabled={disabled} - /> - - )} - {registry && ( - - - setRegistry({ - ...registry, - account, - }) - } - disabled={disabled} - /> - + + {registry?.domain && ( + <> + + + setRegistry({ + ...registry, + account, + }) + } + disabled={disabled} + /> + + + + setRegistry({ + ...registry, + organization, + }) + } + disabled={disabled} + /> + + )} ); @@ -963,7 +967,7 @@ const OrganizationSelector = ({ disabled: boolean; }) => { const [customMode, setCustomMode] = useState(false); - if (customMode || organizations.length === 0) { + if (customMode) { return (