Skip to content

Commit

Permalink
rename getAwsCredentialsFormAgentlessOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcold committed Dec 5, 2023
1 parent a28c337 commit 2e6cd1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { i18n } from '@kbn/i18n';
import { cspIntegrationDocsNavigation } from '../../../common/navigation/constants';
import {
DEFAULT_AGENTLESS_AWS_CREDENTIALS_TYPE,
getAwsCredentialsFormManualOptionsAgentless,
getAwsCredentialsFormAgentlessOptions,
getAwsCredentialsFormOptions,
getInputVarsFields,
} from './get_aws_credentials_form_options';
Expand Down Expand Up @@ -49,7 +49,7 @@ export const AwsCredentialsFormAgentless = ({ input, newPolicy, updatePolicy }:
defaultMessage: 'Preferred method',
})}
type={awsCredentialsType}
options={getAwsCredentialsFormManualOptionsAgentless()}
options={getAwsCredentialsFormAgentlessOptions()}
onChange={(optionId) => {
updatePolicy(
getPosturePolicy(newPolicy, input.type, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ const getAwsCredentialsTypeSelectorOptions = (
export const getAwsCredentialsFormManualOptions = (): AwsCredentialsTypeOptions =>
getAwsCredentialsTypeSelectorOptions(({ value }) => value !== 'cloud_formation');

// TODO: move strings to constants
export const getAwsCredentialsFormManualOptionsAgentless = (): AwsCredentialsTypeOptions =>
export const getAwsCredentialsFormAgentlessOptions = (): AwsCredentialsTypeOptions =>
getAwsCredentialsTypeSelectorOptions(
({ value }) => value === 'direct_access_keys' || value === 'temporary_keys'
);
Expand Down

0 comments on commit 2e6cd1b

Please sign in to comment.