Skip to content

Commit

Permalink
PMM-12608 Add option to disable autodiscovery
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkubinec committed Nov 15, 2023
1 parent c4be97e commit 7b22fc4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const autoDiscoveryOptions = [
value: AutoDiscoveryOptionsInterface.enabled,
label: Messages.form.autoDiscoveryOptions.enabled,
},
{
value: AutoDiscoveryOptionsInterface.disabled,
label: Messages.form.autoDiscoveryOptions.disabled,
},
{
value: AutoDiscoveryOptionsInterface.custom,
label: Messages.form.autoDiscoveryOptions.custom,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const Messages = {
},
autoDiscoveryOptions: {
enabled: 'Enabled',
disabled: 'Disabled',
custom: 'Custom',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const PostgreSQLAdditionalOptions: FC<PostgreSQLAdditionalOptionsProps> =
const validators = [platformCoreValidators.containsNumber, ...platformCoreValidators.int32];

const getAutoDiscoveryLimitValue = (type: AutoDiscoveryOptionsInterface) =>
type === AutoDiscoveryOptionsInterface.enabled ? 0 : 10;
type === AutoDiscoveryOptionsInterface.enabled ? 0 : type === AutoDiscoveryOptionsInterface.disabled ? -1 : 10;

useEffect(() => {
setSelectedValue(selectedOption);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export enum TablestatOptionsInterface {

export enum AutoDiscoveryOptionsInterface {
enabled = 'enabled',
disabled = 'disabled',
custom = 'custom',
}

0 comments on commit 7b22fc4

Please sign in to comment.