Skip to content

Commit e60e30a

Browse files
fixes part 2 and clean up
1 parent 5444c2b commit e60e30a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+513
-255
lines changed

datahub-web-react/src/alchemy-components/components/Breadcrumb/components.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Divider } from 'antd';
12
import { Link } from 'react-router-dom';
23
import styled from 'styled-components';
34

@@ -30,3 +31,10 @@ export const BreadcrumbButton = styled(Text)`
3031
color: ${colors.primary[500]};
3132
}
3233
`;
34+
35+
export const VerticalDivider = styled(Divider)`
36+
color: ${colors.gray[100]};
37+
height: 16px;
38+
width: 2px;
39+
margin: 0 4px;
40+
`;
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export { Checkbox, CheckboxGroup, checkboxDefaults } from './Checkbox';
2-
export { NativeCheckbox } from './NativeCheckbox';
32
export type { CheckboxProps } from './types';

datahub-web-react/src/app/entityV2/shared/EntitySearchSelect/EntitySearchDropdown.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,7 @@ export const EntitySearchDropdown: React.FC<EntitySearchDropdownProps> = ({
169169
<Input
170170
label=""
171171
value={searchQuery}
172-
setValue={(value) => {
173-
const newValue = typeof value === 'function' ? value(searchQuery) : value;
174-
handleSearchChange(newValue);
175-
}}
172+
setValue={handleSearchChange}
176173
placeholder={placeholder}
177174
icon={{ icon: 'Search' }}
178175
data-testid="entity-search-select-input"

datahub-web-react/src/app/ingestV2/hooks/useIngestionOnboardingRedesignV1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { useFeatureFlag } from '@app/sharedV2/hooks/useFeatureFlag';
22

33
export function useIngestionOnboardingRedesignV1() {
44
const ingestionOnboardingRedesignV1 = useFeatureFlag('ingestionOnboardingRedesignV1');
5-
return ingestionOnboardingRedesignV1;
5+
return !ingestionOnboardingRedesignV1;
66
}

datahub-web-react/src/app/ingestV2/runDetails/IngestionRunDetailsPage.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Breadcrumb, colors } from '@components';
2-
import { Divider } from 'antd';
1+
import { Breadcrumb } from '@components';
32
import React, { useEffect } from 'react';
43
import { useLocation, useParams } from 'react-router';
5-
import styled from 'styled-components';
4+
5+
import { VerticalDivider } from '@components/components/Breadcrumb/components';
66

77
import RunDetailsContent from '@app/ingestV2/runDetails/RunDetailsContent';
88
import { formatDateTime } from '@app/ingestV2/shared/components/columns/DateTimeColumn';
@@ -12,13 +12,6 @@ import { PageLayout } from '@app/sharedV2/layouts/PageLayout';
1212

1313
import { useGetIngestionExecutionRequestQuery } from '@graphql/ingestion.generated';
1414

15-
const VerticalDivider = styled(Divider)`
16-
color: ${colors.gray[100]};
17-
height: 16px;
18-
width: 2px;
19-
margin: 0 4px;
20-
`;
21-
2215
export default function IngestionRunDetailsPage() {
2316
const { urn } = useParams<{ urn: string }>();
2417

datahub-web-react/src/app/ingestV2/source/builder/IngestionSourceBuilderModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ import { DefineRecipeStep } from '@app/ingestV2/source/builder/DefineRecipeStep'
1111
import { NameSourceStep } from '@app/ingestV2/source/builder/NameSourceStep';
1212
import { SelectTemplateStep } from '@app/ingestV2/source/builder/SelectTemplateStep';
1313
import { SourceBuilderState, StepProps } from '@app/ingestV2/source/builder/types';
14+
import { useIngestionSources } from '@app/ingestV2/source/builder/useIngestionSources';
1415

1516
import { IngestionSource } from '@types';
1617

17-
import { useIngestionSources } from './useIngestionSources';
18-
1918
const StepsContainer = styled.div`
2019
margin-right: 20px;
2120
margin-left: 20px;

datahub-web-react/src/app/ingestV2/source/builder/NameSourceStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const NameSourceStep = ({ state, updateState, prev, submit, isEditing, se
6868
setOwners(defaultActors);
6969
setAreOwnersInStateInitializedWhileCreation(true);
7070
}
71-
}, [defaultActors, isEditing, me.loaded, areOwnersInStateInitializedWhileCreation]);
71+
}, [defaultActors, isEditing, me.loaded, areOwnersInStateInitializedWhileCreation, setOwners]);
7272

7373
const setExecutorId = (execId: string) => {
7474
const newState: SourceBuilderState = {

datahub-web-react/src/app/ingestV2/source/builder/RecipeForm/constants.ts

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -291,106 +291,6 @@ export const DEFAULT_DB: RecipeField = {
291291
placeholder: 'default_db',
292292
rules: [{ required: true, message: 'Default Database is required' }],
293293
};
294-
const dictFields = [PLATFORM, DEFAULT_DB];
295-
296-
const testingFields: RecipeField[] = [
297-
{
298-
name: 'credential.TEXT',
299-
label: 'TEXT',
300-
helper: 'Text field for testing',
301-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
302-
placeholder: '123456789098765432101',
303-
type: FieldType.TEXT,
304-
fieldPath: 'source.config.TEXT',
305-
rules: null,
306-
required: true,
307-
},
308-
{
309-
name: 'credential.TEXTAREA',
310-
label: 'TEXTAREA',
311-
helper: 'Textarea field for testing',
312-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
313-
placeholder: '123456789098765432101',
314-
type: FieldType.TEXTAREA,
315-
fieldPath: 'source.config.credential.TEXTAREA',
316-
rules: null,
317-
required: true,
318-
},
319-
{
320-
name: 'credential.DATE',
321-
label: 'DATE',
322-
helper: 'Date field for testing',
323-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
324-
placeholder: '123456789098765432101',
325-
type: FieldType.DATE,
326-
fieldPath: 'source.config.credential.DATE',
327-
rules: null,
328-
required: true,
329-
},
330-
{
331-
name: 'credential.BOOLEAN',
332-
label: 'BOOLEAN',
333-
helper: 'Boolean field for testing',
334-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
335-
placeholder: '123456789098765432101',
336-
type: FieldType.BOOLEAN,
337-
fieldPath: 'source.config.credential.BOOLEAN',
338-
rules: null,
339-
required: true,
340-
},
341-
{
342-
name: 'credential.LIST',
343-
label: 'LIST',
344-
helper: 'List field for testing',
345-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
346-
placeholder: '123456789098765432101',
347-
type: FieldType.LIST,
348-
buttonLabel: 'Add test item',
349-
fieldPath: 'source.config.credential.LIST',
350-
rules: null,
351-
required: true,
352-
},
353-
{
354-
name: 'credential.SECRET',
355-
label: 'SECRET',
356-
helper: 'Secret field for testing',
357-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
358-
placeholder: '123456789098765432101',
359-
type: FieldType.SECRET,
360-
fieldPath: 'source.config.credential.SECRET',
361-
rules: null,
362-
required: true,
363-
},
364-
{
365-
name: 'credential.DICT',
366-
label: 'DICT',
367-
helper: 'Dictionary field for testing',
368-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
369-
placeholder: '123456789098765432101',
370-
type: FieldType.DICT,
371-
buttonLabel: 'Add test mapping',
372-
fieldPath: 'source.config.credential.DICT',
373-
rules: null,
374-
required: true,
375-
fields: dictFields,
376-
},
377-
{
378-
name: 'credential.SELECT',
379-
label: 'SELECT',
380-
helper: 'Select field for testing',
381-
tooltip: "The Client ID, which can be found in your service account's JSON Key (client_id).",
382-
placeholder: '123456789098765432101',
383-
type: FieldType.SELECT,
384-
fieldPath: 'source.config.credential.SELECT',
385-
rules: null,
386-
required: true,
387-
options: [
388-
{ label: 'stl_scan_based', value: 'stl_scan_based' },
389-
{ label: 'sql_based', value: 'sql_based' },
390-
{ label: 'mixed', value: 'mixed' },
391-
],
392-
},
393-
];
394294

395295
export const RECIPE_FIELDS: RecipeFields = {
396296
[SNOWFLAKE]: {

datahub-web-react/src/app/ingestV2/source/builder/useIngestionSources.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { useMemo } from 'react';
22

33
import sourcesJson from '@app/ingestV2/source/builder/sources.json';
4-
5-
import { SourceConfig } from './types';
4+
import { SourceConfig } from '@app/ingestV2/source/builder/types';
65

76
export function useIngestionSources() {
87
// TODO: replace with call to server once we have access to dynamic list of sources

datahub-web-react/src/app/ingestV2/source/multiStepBuilder/IngestionSourceBottomPanel.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { Button } from '@components';
2-
import { useCallback, useState } from 'react';
2+
import React, { useCallback, useState } from 'react';
33

4+
import {
5+
IngestionSourceFormStep,
6+
MultiStepSourceBuilderState,
7+
SubmitOptions,
8+
} from '@app/ingestV2/source/multiStepBuilder/types';
49
import { MultiStepFormBottomPanel } from '@app/sharedV2/forms/multiStepForm/MultiStepFormBottomPanel';
510
import { useMultiStepContext } from '@app/sharedV2/forms/multiStepForm/MultiStepFormContext';
611

7-
import { IngestionSourceFormStep, MultiStepSourceBuilderState, SubmitOptions } from './types';
8-
912
export function IngestionSourceBottomPanel() {
1013
const { isFinalStep, isCurrentStepCompleted, submit } = useMultiStepContext<
1114
MultiStepSourceBuilderState,
@@ -52,7 +55,7 @@ export function IngestionSourceBottomPanel() {
5255
</Button>,
5356
];
5457
},
55-
[isFinalStep, isCurrentStepCompleted, onSaveAndRun, isSaveAndRunInProgress],
58+
[isFinalStep, isCurrentStepCompleted, onSave, onSaveAndRun, isSaveAndRunInProgress],
5659
);
5760

5861
return <MultiStepFormBottomPanel renderRightButtons={renderRightButtons} />;

0 commit comments

Comments
 (0)