Skip to content

Commit f75d397

Browse files
committed
rename fn
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent 87f374f commit f75d397

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

public/pages/workflow_detail/workflow_inputs/processors_list.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
import {
3333
formikToUiConfig,
3434
getDataSourceFromURL,
35-
getEffectiveVersion,
35+
getDataSourceVersion,
3636
} from '../../../utils';
3737
import {
3838
CollapseProcessor,
@@ -120,7 +120,7 @@ export function ProcessorsList(props: ProcessorsListProps) {
120120
}
121121

122122
if (dataSourceId !== undefined) {
123-
getEffectiveVersion(dataSourceId)
123+
getDataSourceVersion(dataSourceId)
124124
.then((ver) => {
125125
setVersion(ver || MIN_SUPPORTED_VERSION);
126126
})

public/pages/workflow_detail/workflow_inputs/search_inputs/search_inputs.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
WorkflowConfig,
1717
} from '../../../../../common';
1818
import { catIndices, useAppDispatch } from '../../../../store';
19-
import { getDataSourceId, getEffectiveVersion } from '../../../../utils';
19+
import { getDataSourceId, getDataSourceVersion } from '../../../../utils';
2020

2121
interface SearchInputsProps {
2222
uiConfig: WorkflowConfig;
@@ -44,7 +44,7 @@ export function SearchInputs(props: SearchInputsProps) {
4444
try {
4545
if (dataSourceId !== undefined) {
4646
const version =
47-
(await getEffectiveVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
47+
(await getDataSourceVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
4848
setShowTransformQuery(semver.gte(version, '2.19.0'));
4949
} else {
5050
setShowTransformQuery(true);

public/pages/workflows/new_workflow/new_workflow.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { enrichPresetWorkflowWithUiMetadata } from './utils';
3030
import {
3131
getDataSourceId,
3232
isDataSourceReady,
33-
getEffectiveVersion,
33+
getDataSourceVersion,
3434
} from '../../../utils';
3535
import { getDataSourceEnabled } from '../../../services';
3636
import semver from 'semver';
@@ -65,7 +65,7 @@ const filterPresetsByVersion = async (
6565
];
6666

6767
const version =
68-
(await getEffectiveVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
68+
(await getDataSourceVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
6969

7070
if (semver.lt(version, MIN_SUPPORTED_VERSION)) {
7171
return [];
@@ -161,7 +161,7 @@ export function NewWorkflow(props: NewWorkflowProps) {
161161
}
162162

163163
const version =
164-
(await getEffectiveVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
164+
(await getDataSourceVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
165165

166166
const enrichedWorkflows = presetWorkflows.map((presetWorkflow) =>
167167
enrichPresetWorkflowWithUiMetadata(presetWorkflow, version)

public/utils/utils.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export async function isCompatibleWorkflow(
175175
}
176176

177177
const dataSourceVersion =
178-
(await getEffectiveVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
178+
(await getDataSourceVersion(dataSourceId)) || MIN_SUPPORTED_VERSION;
179179
const [
180180
effectiveMajorVersion,
181181
effectiveMinorVersion,
@@ -573,7 +573,7 @@ export function useDataSourceVersion(
573573
useEffect(() => {
574574
async function getVersion() {
575575
if (dataSourceId !== undefined) {
576-
setDataSourceVersion(await getEffectiveVersion(dataSourceId));
576+
setDataSourceVersion(await getDataSourceVersion(dataSourceId));
577577
}
578578
}
579579
getVersion();
@@ -946,7 +946,7 @@ export function getFieldValue(jsonObj: {}, fieldName: string): any | undefined {
946946
}
947947

948948
// Get the version from the selected data source, if found
949-
export const getEffectiveVersion = async (
949+
export const getDataSourceVersion = async (
950950
dataSourceId: string | undefined
951951
): Promise<string | undefined> => {
952952
try {

0 commit comments

Comments
 (0)