fix(edge): EE-3092 hide the ability to add edge agents in Docker Desktop extension (#7090)

pull/7168/head
congs 2022-07-01 17:22:40 +12:00 committed by GitHub
parent 6fe26a52dd
commit 975dc9c1da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 11 deletions

View File

@ -20,17 +20,19 @@ export function BoxSelector<T extends number | string>({
}: Props<T>) {
return (
<div className={clsx('boxselector_wrapper', styles.root)} role="radiogroup">
{options.map((option) => (
<BoxSelectorItem
key={option.id}
radioName={radioName}
option={option}
onChange={onChange}
selectedValue={value}
disabled={option.disabled && option.disabled()}
tooltip={option.tooltip && option.tooltip()}
/>
))}
{options.map((option) =>
option.hide ? null : (
<BoxSelectorItem
key={option.id}
radioName={radioName}
option={option}
onChange={onChange}
selectedValue={value}
disabled={option.disabled && option.disabled()}
tooltip={option.tooltip && option.tooltip()}
/>
)
)}
</div>
);
}

View File

@ -10,4 +10,5 @@ export interface BoxSelectorOption<T> extends IconProps {
disabled?: () => boolean;
tooltip?: () => string;
feature?: FeatureId;
hide?: boolean;
}

View File

@ -44,6 +44,7 @@ const options: BoxSelectorOption<'agent' | 'api' | 'socket' | 'edgeAgent'>[] = [
label: 'Edge Agent',
description: '',
value: 'edgeAgent',
hide: window.ddExtension,
},
];

View File

@ -39,6 +39,7 @@ const options: BoxSelectorOption<
label: 'Edge Agent',
description: '',
value: EnvironmentCreationTypes.EdgeAgentEnvironment,
hide: window.ddExtension,
},
{
id: 'kubeconfig_endpoint',