Skip to content

Commit

Permalink
PMM-12971 Fix logic for RDS
Browse files Browse the repository at this point in the history
  • Loading branch information
YashSartanpara1 committed May 24, 2024
1 parent f116cb3 commit 142b957
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ export const PostgreSQLAdditionalOptions: FC<PostgreSQLAdditionalOptionsProps> =

useEffect(() => {
setMaxConnSelectedValue(maxConnSelectedOption);
form.change('maxExporterConnections', getMaxConnectionLimitValue(maxConnSelectedOption));
form.change(
isRDS ? 'maxPostgresqlExporterConnections' : 'maxExporterConnections',
getMaxConnectionLimitValue(maxConnSelectedOption)
);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [maxConnSelectedOption]);

Expand Down Expand Up @@ -120,8 +123,8 @@ export const PostgreSQLAdditionalOptions: FC<PostgreSQLAdditionalOptionsProps> =
fullWidth
/>
<NumberInputField
key={isRDS ? 'MaxPostgresqlExporterConnections' : 'maxExporterConnections'}
name={isRDS ? 'MaxPostgresqlExporterConnections' : 'maxExporterConnections'}
key={isRDS ? 'maxPostgresqlExporterConnections' : 'maxExporterConnections'}
name={isRDS ? 'maxPostgresqlExporterConnections' : 'maxExporterConnections'}
defaultValue={5}
placeholder={'5'}
validators={
Expand Down

0 comments on commit 142b957

Please sign in to comment.