mirror of https://github.com/portainer/portainer
fix(edge): EE-3092 hide the ability to add edge agents in Docker Desktop extension (#7090)
parent
6fe26a52dd
commit
975dc9c1da
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,4 +10,5 @@ export interface BoxSelectorOption<T> extends IconProps {
|
|||
disabled?: () => boolean;
|
||||
tooltip?: () => string;
|
||||
feature?: FeatureId;
|
||||
hide?: boolean;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ const options: BoxSelectorOption<'agent' | 'api' | 'socket' | 'edgeAgent'>[] = [
|
|||
label: 'Edge Agent',
|
||||
description: '',
|
||||
value: 'edgeAgent',
|
||||
hide: window.ddExtension,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ const options: BoxSelectorOption<
|
|||
label: 'Edge Agent',
|
||||
description: '',
|
||||
value: EnvironmentCreationTypes.EdgeAgentEnvironment,
|
||||
hide: window.ddExtension,
|
||||
},
|
||||
{
|
||||
id: 'kubeconfig_endpoint',
|
||||
|
|
Loading…
Reference in New Issue