mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-28 02:46:09 +00:00
feat(ui): support debug option for dbt config (#10538)
* feat(ui): support debug option for dbt config * fix tests and address comments
This commit is contained in:
parent
83a1858434
commit
8a5b54aebb
@ -24,6 +24,7 @@ const mockDbtCloudProjectId = jest.fn();
|
|||||||
const mockDbtCloudJobId = jest.fn();
|
const mockDbtCloudJobId = jest.fn();
|
||||||
const mockUpdateDBTClassification = jest.fn();
|
const mockUpdateDBTClassification = jest.fn();
|
||||||
const mockUpdateDBTCloudUrl = jest.fn();
|
const mockUpdateDBTCloudUrl = jest.fn();
|
||||||
|
const mockHandleEnableDebugLogCheck = jest.fn();
|
||||||
|
|
||||||
const mockProps = {
|
const mockProps = {
|
||||||
dbtCloudAccountId: '',
|
dbtCloudAccountId: '',
|
||||||
@ -41,6 +42,8 @@ const mockProps = {
|
|||||||
handleDbtCloudJobId: mockDbtCloudJobId,
|
handleDbtCloudJobId: mockDbtCloudJobId,
|
||||||
handleDbtCloudUrl: mockUpdateDBTCloudUrl,
|
handleDbtCloudUrl: mockUpdateDBTCloudUrl,
|
||||||
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
||||||
|
enableDebugLog: false,
|
||||||
|
handleEnableDebugLogCheck: mockHandleEnableDebugLogCheck,
|
||||||
};
|
};
|
||||||
|
|
||||||
jest.mock('./DBTCommonFields.component', () =>
|
jest.mock('./DBTCommonFields.component', () =>
|
||||||
|
@ -37,6 +37,8 @@ interface Props extends DBTFormCommonProps, DbtConfigCloud {
|
|||||||
handleDbtCloudJobId: (value: string) => void;
|
handleDbtCloudJobId: (value: string) => void;
|
||||||
handleUpdateDBTClassification: (value: string) => void;
|
handleUpdateDBTClassification: (value: string) => void;
|
||||||
handleDbtCloudUrl: (value: string) => void;
|
handleDbtCloudUrl: (value: string) => void;
|
||||||
|
enableDebugLog: boolean;
|
||||||
|
handleEnableDebugLogCheck: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DBTCloudConfig: FunctionComponent<Props> = ({
|
export const DBTCloudConfig: FunctionComponent<Props> = ({
|
||||||
@ -58,6 +60,8 @@ export const DBTCloudConfig: FunctionComponent<Props> = ({
|
|||||||
dbtClassificationName,
|
dbtClassificationName,
|
||||||
handleDbtCloudUrl,
|
handleDbtCloudUrl,
|
||||||
handleUpdateDBTClassification,
|
handleUpdateDBTClassification,
|
||||||
|
enableDebugLog,
|
||||||
|
handleEnableDebugLogCheck,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [errors, setErrors] = useState<ErrorDbtCloud>();
|
const [errors, setErrors] = useState<ErrorDbtCloud>();
|
||||||
|
|
||||||
@ -185,6 +189,8 @@ export const DBTCloudConfig: FunctionComponent<Props> = ({
|
|||||||
dbtClassificationName={dbtClassificationName}
|
dbtClassificationName={dbtClassificationName}
|
||||||
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
||||||
descriptionId="cloud-update-description"
|
descriptionId="cloud-update-description"
|
||||||
|
enableDebugLog={enableDebugLog}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
||||||
handleUpdateDescriptions={handleUpdateDescriptions}
|
handleUpdateDescriptions={handleUpdateDescriptions}
|
||||||
/>
|
/>
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import { Input, Space, Switch, Typography } from 'antd';
|
import { Input, Space, Switch, Typography } from 'antd';
|
||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { getSeparator } from 'utils/CommonUtils';
|
||||||
import { Field } from '../../Field/Field';
|
import { Field } from '../../Field/Field';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -22,6 +23,8 @@ interface Props {
|
|||||||
handleUpdateDBTClassification: (value: string) => void;
|
handleUpdateDBTClassification: (value: string) => void;
|
||||||
dbtUpdateDescriptions: boolean;
|
dbtUpdateDescriptions: boolean;
|
||||||
handleUpdateDescriptions: (value: boolean) => void;
|
handleUpdateDescriptions: (value: boolean) => void;
|
||||||
|
enableDebugLog: boolean;
|
||||||
|
handleEnableDebugLogCheck: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
function DBTCommonFields({
|
function DBTCommonFields({
|
||||||
@ -30,15 +33,37 @@ function DBTCommonFields({
|
|||||||
dbtClassificationName,
|
dbtClassificationName,
|
||||||
handleUpdateDescriptions,
|
handleUpdateDescriptions,
|
||||||
handleUpdateDBTClassification,
|
handleUpdateDBTClassification,
|
||||||
|
handleEnableDebugLogCheck,
|
||||||
|
enableDebugLog,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
<Field>
|
||||||
|
<Space align="end" className="m-b-xs">
|
||||||
|
<label className="tw-form-label m-b-0" htmlFor="enable-dbt-debug-log">
|
||||||
|
{t('label.enable-debug-log')}
|
||||||
|
</label>
|
||||||
|
<Switch
|
||||||
|
checked={enableDebugLog}
|
||||||
|
data-testid="enable-dbt-debug-log"
|
||||||
|
id="enable-dbt-debug-log"
|
||||||
|
onChange={handleEnableDebugLogCheck}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
<Typography.Text
|
||||||
|
className="d-block text-grey-muted m-b-xs text-xs"
|
||||||
|
data-testid="dbt-enable-debug-logging">
|
||||||
|
{t('message.enable-debug-logging')}
|
||||||
|
</Typography.Text>
|
||||||
|
{getSeparator('')}
|
||||||
|
</Field>
|
||||||
|
|
||||||
<Field>
|
<Field>
|
||||||
<Space align="end" className="m-b-xs">
|
<Space align="end" className="m-b-xs">
|
||||||
<label
|
<label
|
||||||
className="tw-form-label m-b-0 tw-mb-1"
|
className="tw-form-label m-b-0"
|
||||||
data-testid={descriptionId}
|
data-testid={descriptionId}
|
||||||
htmlFor={descriptionId}>
|
htmlFor={descriptionId}>
|
||||||
{t('label.update-description')}
|
{t('label.update-description')}
|
||||||
|
@ -15,12 +15,16 @@ import { getByTestId, render } from '@testing-library/react';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import DBTCommonFields from './DBTCommonFields.component';
|
import DBTCommonFields from './DBTCommonFields.component';
|
||||||
|
|
||||||
|
const mockHandleEnableDebugLogCheck = jest.fn();
|
||||||
|
|
||||||
const mockProps = {
|
const mockProps = {
|
||||||
dbtUpdateDescriptions: false,
|
dbtUpdateDescriptions: false,
|
||||||
descriptionId: 'test-id',
|
descriptionId: 'test-id',
|
||||||
dbtClassificationName: 'DBT',
|
dbtClassificationName: 'DBT',
|
||||||
handleUpdateDescriptions: jest.fn(),
|
handleUpdateDescriptions: jest.fn(),
|
||||||
handleUpdateDBTClassification: jest.fn(),
|
handleUpdateDBTClassification: jest.fn(),
|
||||||
|
enableDebugLog: false,
|
||||||
|
handleEnableDebugLogCheck: mockHandleEnableDebugLogCheck,
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('DBTCommonFields', () => {
|
describe('DBTCommonFields', () => {
|
||||||
|
@ -81,6 +81,11 @@ const DBTConfigFormBuilder: FunctionComponent<DBTConfigFormProps> = ({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleEnableDebugLogCheck = (value: boolean) =>
|
||||||
|
onChange({
|
||||||
|
enableDebugLog: value,
|
||||||
|
});
|
||||||
|
|
||||||
const getCloudConfigFields = () => {
|
const getCloudConfigFields = () => {
|
||||||
return (
|
return (
|
||||||
<DBTCloudConfig
|
<DBTCloudConfig
|
||||||
@ -92,6 +97,7 @@ const DBTConfigFormBuilder: FunctionComponent<DBTConfigFormProps> = ({
|
|||||||
dbtCloudProjectId={dbtConfig?.dbtCloudProjectId}
|
dbtCloudProjectId={dbtConfig?.dbtCloudProjectId}
|
||||||
dbtCloudUrl={dbtConfig.dbtCloudUrl}
|
dbtCloudUrl={dbtConfig.dbtCloudUrl}
|
||||||
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
||||||
|
enableDebugLog={data.enableDebugLog}
|
||||||
handleCloudAccountIdChange={(val) => {
|
handleCloudAccountIdChange={(val) => {
|
||||||
updateDbtConfig('dbtCloudAccountId', val);
|
updateDbtConfig('dbtCloudAccountId', val);
|
||||||
}}
|
}}
|
||||||
@ -105,6 +111,7 @@ const DBTConfigFormBuilder: FunctionComponent<DBTConfigFormProps> = ({
|
|||||||
updateDbtConfig('dbtCloudProjectId', val);
|
updateDbtConfig('dbtCloudProjectId', val);
|
||||||
}}
|
}}
|
||||||
handleDbtCloudUrl={(val) => updateDbtConfig('dbtCloudUrl', val)}
|
handleDbtCloudUrl={(val) => updateDbtConfig('dbtCloudUrl', val)}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleUpdateDBTClassification={(val) => {
|
handleUpdateDBTClassification={(val) => {
|
||||||
updateDbtConfig('dbtClassificationName', val);
|
updateDbtConfig('dbtClassificationName', val);
|
||||||
}}
|
}}
|
||||||
@ -127,9 +134,11 @@ const DBTConfigFormBuilder: FunctionComponent<DBTConfigFormProps> = ({
|
|||||||
dbtManifestFilePath={dbtConfig?.dbtManifestFilePath}
|
dbtManifestFilePath={dbtConfig?.dbtManifestFilePath}
|
||||||
dbtRunResultsFilePath={dbtConfig?.dbtRunResultsFilePath}
|
dbtRunResultsFilePath={dbtConfig?.dbtRunResultsFilePath}
|
||||||
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
||||||
|
enableDebugLog={data.enableDebugLog}
|
||||||
handleCatalogFilePathChange={(val) => {
|
handleCatalogFilePathChange={(val) => {
|
||||||
updateDbtConfig('dbtCatalogFilePath', val);
|
updateDbtConfig('dbtCatalogFilePath', val);
|
||||||
}}
|
}}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleManifestFilePathChange={(val) => {
|
handleManifestFilePathChange={(val) => {
|
||||||
updateDbtConfig('dbtManifestFilePath', val);
|
updateDbtConfig('dbtManifestFilePath', val);
|
||||||
}}
|
}}
|
||||||
@ -158,9 +167,11 @@ const DBTConfigFormBuilder: FunctionComponent<DBTConfigFormProps> = ({
|
|||||||
dbtManifestHttpPath={dbtConfig?.dbtManifestHttpPath}
|
dbtManifestHttpPath={dbtConfig?.dbtManifestHttpPath}
|
||||||
dbtRunResultsHttpPath={dbtConfig?.dbtRunResultsHttpPath}
|
dbtRunResultsHttpPath={dbtConfig?.dbtRunResultsHttpPath}
|
||||||
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
||||||
|
enableDebugLog={data.enableDebugLog}
|
||||||
handleCatalogHttpPathChange={(val) => {
|
handleCatalogHttpPathChange={(val) => {
|
||||||
updateDbtConfig('dbtCatalogHttpPath', val);
|
updateDbtConfig('dbtCatalogHttpPath', val);
|
||||||
}}
|
}}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleManifestHttpPathChange={(val) => {
|
handleManifestHttpPathChange={(val) => {
|
||||||
updateDbtConfig('dbtManifestHttpPath', val);
|
updateDbtConfig('dbtManifestHttpPath', val);
|
||||||
}}
|
}}
|
||||||
@ -188,6 +199,8 @@ const DBTConfigFormBuilder: FunctionComponent<DBTConfigFormProps> = ({
|
|||||||
dbtPrefixConfig={dbtConfig?.dbtPrefixConfig}
|
dbtPrefixConfig={dbtConfig?.dbtPrefixConfig}
|
||||||
dbtSecurityConfig={dbtConfig?.dbtSecurityConfig}
|
dbtSecurityConfig={dbtConfig?.dbtSecurityConfig}
|
||||||
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
||||||
|
enableDebugLog={data.enableDebugLog}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handlePrefixConfigChange={(val) => {
|
handlePrefixConfigChange={(val) => {
|
||||||
updateDbtConfig('dbtPrefixConfig', val);
|
updateDbtConfig('dbtPrefixConfig', val);
|
||||||
}}
|
}}
|
||||||
@ -231,7 +244,9 @@ const DBTConfigFormBuilder: FunctionComponent<DBTConfigFormProps> = ({
|
|||||||
dbtPrefixConfig={dbtConfig?.dbtPrefixConfig}
|
dbtPrefixConfig={dbtConfig?.dbtPrefixConfig}
|
||||||
dbtSecurityConfig={dbtConfig?.dbtSecurityConfig}
|
dbtSecurityConfig={dbtConfig?.dbtSecurityConfig}
|
||||||
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtConfig?.dbtUpdateDescriptions}
|
||||||
|
enableDebugLog={data.enableDebugLog}
|
||||||
gcsType={gcsConfigType}
|
gcsType={gcsConfigType}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleGcsTypeChange={handleGcsTypeChange}
|
handleGcsTypeChange={handleGcsTypeChange}
|
||||||
handlePrefixConfigChange={(val) => {
|
handlePrefixConfigChange={(val) => {
|
||||||
updateDbtConfig('dbtPrefixConfig', val);
|
updateDbtConfig('dbtPrefixConfig', val);
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { fireEvent, getByTestId, render } from '@testing-library/react';
|
import { fireEvent, getByTestId, render } from '@testing-library/react';
|
||||||
|
import {
|
||||||
|
DBTBucketDetails,
|
||||||
|
SCredentials,
|
||||||
|
} from 'generated/metadataIngestion/dbtPipeline';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { GCS_CONFIG } from './DBTFormEnum';
|
import { GCS_CONFIG } from './DBTFormEnum';
|
||||||
import { DBTGCSConfig } from './DBTGCSConfig';
|
import { DBTGCSConfig } from './DBTGCSConfig';
|
||||||
@ -22,6 +26,7 @@ const mockPrefixConfigChange = jest.fn();
|
|||||||
const mockSecurityConfigChange = jest.fn();
|
const mockSecurityConfigChange = jest.fn();
|
||||||
const mockUpdateDescriptions = jest.fn();
|
const mockUpdateDescriptions = jest.fn();
|
||||||
const mockUpdateDBTClassification = jest.fn();
|
const mockUpdateDBTClassification = jest.fn();
|
||||||
|
const mockHandleEnableDebugLogCheck = jest.fn();
|
||||||
|
|
||||||
const gsConfig = {
|
const gsConfig = {
|
||||||
authProviderX509CertUrl: 'url',
|
authProviderX509CertUrl: 'url',
|
||||||
@ -56,6 +61,11 @@ const mockProps = {
|
|||||||
handleSecurityConfigChange: mockSecurityConfigChange,
|
handleSecurityConfigChange: mockSecurityConfigChange,
|
||||||
handleUpdateDescriptions: mockUpdateDescriptions,
|
handleUpdateDescriptions: mockUpdateDescriptions,
|
||||||
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
||||||
|
enableDebugLog: false,
|
||||||
|
handleEnableDebugLogCheck: mockHandleEnableDebugLogCheck,
|
||||||
|
dbtClassificationName: '',
|
||||||
|
dbtSecurityConfig: {} as SCredentials,
|
||||||
|
dbtPrefixConfig: {} as DBTBucketDetails,
|
||||||
};
|
};
|
||||||
|
|
||||||
jest.mock('./DBTCommonFields.component', () =>
|
jest.mock('./DBTCommonFields.component', () =>
|
||||||
|
@ -46,6 +46,8 @@ interface Props extends DBTFormCommonProps, DbtConfigS3GCS {
|
|||||||
handlePrefixConfigChange: (value: DBTBucketDetails) => void;
|
handlePrefixConfigChange: (value: DBTBucketDetails) => void;
|
||||||
handleUpdateDescriptions: (value: boolean) => void;
|
handleUpdateDescriptions: (value: boolean) => void;
|
||||||
handleUpdateDBTClassification: (value: string) => void;
|
handleUpdateDBTClassification: (value: string) => void;
|
||||||
|
enableDebugLog: boolean;
|
||||||
|
handleEnableDebugLogCheck: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DBTGCSConfig: FunctionComponent<Props> = ({
|
export const DBTGCSConfig: FunctionComponent<Props> = ({
|
||||||
@ -63,6 +65,8 @@ export const DBTGCSConfig: FunctionComponent<Props> = ({
|
|||||||
handleUpdateDescriptions,
|
handleUpdateDescriptions,
|
||||||
dbtClassificationName,
|
dbtClassificationName,
|
||||||
handleUpdateDBTClassification,
|
handleUpdateDBTClassification,
|
||||||
|
enableDebugLog,
|
||||||
|
handleEnableDebugLogCheck,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const isMounted = useRef<boolean>(false);
|
const isMounted = useRef<boolean>(false);
|
||||||
const updateGCSCredsConfig = (
|
const updateGCSCredsConfig = (
|
||||||
@ -439,6 +443,8 @@ export const DBTGCSConfig: FunctionComponent<Props> = ({
|
|||||||
dbtClassificationName={dbtClassificationName}
|
dbtClassificationName={dbtClassificationName}
|
||||||
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
||||||
descriptionId="gcs-update-description"
|
descriptionId="gcs-update-description"
|
||||||
|
enableDebugLog={enableDebugLog}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
||||||
handleUpdateDescriptions={handleUpdateDescriptions}
|
handleUpdateDescriptions={handleUpdateDescriptions}
|
||||||
/>
|
/>
|
||||||
|
@ -22,6 +22,7 @@ const mockManifestChange = jest.fn();
|
|||||||
const mockRunResultsHttpPathChange = jest.fn();
|
const mockRunResultsHttpPathChange = jest.fn();
|
||||||
const mockUpdateDescriptions = jest.fn();
|
const mockUpdateDescriptions = jest.fn();
|
||||||
const mockUpdateDBTClassification = jest.fn();
|
const mockUpdateDBTClassification = jest.fn();
|
||||||
|
const mockHandleEnableDebugLogCheck = jest.fn();
|
||||||
|
|
||||||
jest.mock('./DBTCommonFields.component', () =>
|
jest.mock('./DBTCommonFields.component', () =>
|
||||||
jest.fn().mockImplementation(() => <div>DBT Common Fields</div>)
|
jest.fn().mockImplementation(() => <div>DBT Common Fields</div>)
|
||||||
@ -41,6 +42,8 @@ const mockProps = {
|
|||||||
handleRunResultsHttpPathChange: mockRunResultsHttpPathChange,
|
handleRunResultsHttpPathChange: mockRunResultsHttpPathChange,
|
||||||
handleUpdateDescriptions: mockUpdateDescriptions,
|
handleUpdateDescriptions: mockUpdateDescriptions,
|
||||||
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
||||||
|
enableDebugLog: false,
|
||||||
|
handleEnableDebugLogCheck: mockHandleEnableDebugLogCheck,
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('Test DBT Http Config Form', () => {
|
describe('Test DBT Http Config Form', () => {
|
||||||
|
@ -35,6 +35,8 @@ interface Props extends DBTFormCommonProps, DbtConfigHttp {
|
|||||||
handleRunResultsHttpPathChange: (value: string) => void;
|
handleRunResultsHttpPathChange: (value: string) => void;
|
||||||
handleUpdateDescriptions: (value: boolean) => void;
|
handleUpdateDescriptions: (value: boolean) => void;
|
||||||
handleUpdateDBTClassification: (value: string) => void;
|
handleUpdateDBTClassification: (value: string) => void;
|
||||||
|
enableDebugLog: boolean;
|
||||||
|
handleEnableDebugLogCheck: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DBTHttpConfig: FunctionComponent<Props> = ({
|
export const DBTHttpConfig: FunctionComponent<Props> = ({
|
||||||
@ -52,6 +54,8 @@ export const DBTHttpConfig: FunctionComponent<Props> = ({
|
|||||||
handleUpdateDescriptions,
|
handleUpdateDescriptions,
|
||||||
dbtClassificationName,
|
dbtClassificationName,
|
||||||
handleUpdateDBTClassification,
|
handleUpdateDBTClassification,
|
||||||
|
enableDebugLog,
|
||||||
|
handleEnableDebugLogCheck,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [errors, setErrors] = useState<ErrorDbtHttp>();
|
const [errors, setErrors] = useState<ErrorDbtHttp>();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@ -143,6 +147,8 @@ export const DBTHttpConfig: FunctionComponent<Props> = ({
|
|||||||
dbtClassificationName={dbtClassificationName}
|
dbtClassificationName={dbtClassificationName}
|
||||||
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
||||||
descriptionId="http-update-description"
|
descriptionId="http-update-description"
|
||||||
|
enableDebugLog={enableDebugLog}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
||||||
handleUpdateDescriptions={handleUpdateDescriptions}
|
handleUpdateDescriptions={handleUpdateDescriptions}
|
||||||
/>
|
/>
|
||||||
|
@ -22,6 +22,7 @@ const mockManifestChange = jest.fn();
|
|||||||
const mockRunResultsFilePathChange = jest.fn();
|
const mockRunResultsFilePathChange = jest.fn();
|
||||||
const mockUpdateDescriptions = jest.fn();
|
const mockUpdateDescriptions = jest.fn();
|
||||||
const mockUpdateDBTClassification = jest.fn();
|
const mockUpdateDBTClassification = jest.fn();
|
||||||
|
const mockHandleEnableDebugLogCheck = jest.fn();
|
||||||
|
|
||||||
const mockProps = {
|
const mockProps = {
|
||||||
dbtCatalogFilePath: '',
|
dbtCatalogFilePath: '',
|
||||||
@ -37,6 +38,8 @@ const mockProps = {
|
|||||||
handleRunResultsFilePathChange: mockRunResultsFilePathChange,
|
handleRunResultsFilePathChange: mockRunResultsFilePathChange,
|
||||||
handleUpdateDescriptions: mockUpdateDescriptions,
|
handleUpdateDescriptions: mockUpdateDescriptions,
|
||||||
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
||||||
|
enableDebugLog: false,
|
||||||
|
handleEnableDebugLogCheck: mockHandleEnableDebugLogCheck,
|
||||||
};
|
};
|
||||||
|
|
||||||
jest.mock('./DBTCommonFields.component', () =>
|
jest.mock('./DBTCommonFields.component', () =>
|
||||||
|
@ -35,6 +35,8 @@ interface Props extends DBTFormCommonProps, DbtConfigLocal {
|
|||||||
handleRunResultsFilePathChange: (value: string) => void;
|
handleRunResultsFilePathChange: (value: string) => void;
|
||||||
handleUpdateDescriptions: (value: boolean) => void;
|
handleUpdateDescriptions: (value: boolean) => void;
|
||||||
handleUpdateDBTClassification: (value: string) => void;
|
handleUpdateDBTClassification: (value: string) => void;
|
||||||
|
enableDebugLog: boolean;
|
||||||
|
handleEnableDebugLogCheck: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DBTLocalConfig: FunctionComponent<Props> = ({
|
export const DBTLocalConfig: FunctionComponent<Props> = ({
|
||||||
@ -52,6 +54,8 @@ export const DBTLocalConfig: FunctionComponent<Props> = ({
|
|||||||
handleUpdateDescriptions,
|
handleUpdateDescriptions,
|
||||||
dbtClassificationName,
|
dbtClassificationName,
|
||||||
handleUpdateDBTClassification,
|
handleUpdateDBTClassification,
|
||||||
|
enableDebugLog,
|
||||||
|
handleEnableDebugLogCheck,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [errors, setErrors] = useState<ErrorDbtLocal>();
|
const [errors, setErrors] = useState<ErrorDbtLocal>();
|
||||||
|
|
||||||
@ -144,6 +148,8 @@ export const DBTLocalConfig: FunctionComponent<Props> = ({
|
|||||||
dbtClassificationName={dbtClassificationName}
|
dbtClassificationName={dbtClassificationName}
|
||||||
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
||||||
descriptionId="local-update-description"
|
descriptionId="local-update-description"
|
||||||
|
enableDebugLog={enableDebugLog}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
||||||
handleUpdateDescriptions={handleUpdateDescriptions}
|
handleUpdateDescriptions={handleUpdateDescriptions}
|
||||||
/>
|
/>
|
||||||
|
@ -21,6 +21,7 @@ const mockPrefixConfigChange = jest.fn();
|
|||||||
const mockSecurityConfigChange = jest.fn();
|
const mockSecurityConfigChange = jest.fn();
|
||||||
const mockUpdateDescriptions = jest.fn();
|
const mockUpdateDescriptions = jest.fn();
|
||||||
const mockUpdateDBTClassification = jest.fn();
|
const mockUpdateDBTClassification = jest.fn();
|
||||||
|
const mockHandleEnableDebugLogCheck = jest.fn();
|
||||||
|
|
||||||
const mockProps = {
|
const mockProps = {
|
||||||
okText: 'Next',
|
okText: 'Next',
|
||||||
@ -32,6 +33,8 @@ const mockProps = {
|
|||||||
handleSecurityConfigChange: mockSecurityConfigChange,
|
handleSecurityConfigChange: mockSecurityConfigChange,
|
||||||
handleUpdateDescriptions: mockUpdateDescriptions,
|
handleUpdateDescriptions: mockUpdateDescriptions,
|
||||||
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
handleUpdateDBTClassification: mockUpdateDBTClassification,
|
||||||
|
enableDebugLog: false,
|
||||||
|
handleEnableDebugLogCheck: mockHandleEnableDebugLogCheck,
|
||||||
};
|
};
|
||||||
|
|
||||||
jest.mock('./DBTCommonFields.component', () =>
|
jest.mock('./DBTCommonFields.component', () =>
|
||||||
|
@ -41,6 +41,8 @@ interface Props extends DBTFormCommonProps, DbtConfigS3GCS {
|
|||||||
handlePrefixConfigChange: (value: DBTBucketDetails) => void;
|
handlePrefixConfigChange: (value: DBTBucketDetails) => void;
|
||||||
handleUpdateDescriptions: (value: boolean) => void;
|
handleUpdateDescriptions: (value: boolean) => void;
|
||||||
handleUpdateDBTClassification: (value: string) => void;
|
handleUpdateDBTClassification: (value: string) => void;
|
||||||
|
enableDebugLog: boolean;
|
||||||
|
handleEnableDebugLogCheck: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DBTS3Config: FunctionComponent<Props> = ({
|
export const DBTS3Config: FunctionComponent<Props> = ({
|
||||||
@ -56,6 +58,8 @@ export const DBTS3Config: FunctionComponent<Props> = ({
|
|||||||
handlePrefixConfigChange,
|
handlePrefixConfigChange,
|
||||||
handleUpdateDescriptions,
|
handleUpdateDescriptions,
|
||||||
handleUpdateDBTClassification,
|
handleUpdateDBTClassification,
|
||||||
|
enableDebugLog,
|
||||||
|
handleEnableDebugLogCheck,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const updateS3Creds = (key: keyof SCredentials, val: string) => {
|
const updateS3Creds = (key: keyof SCredentials, val: string) => {
|
||||||
const updatedCreds: SCredentials = {
|
const updatedCreds: SCredentials = {
|
||||||
@ -239,6 +243,8 @@ export const DBTS3Config: FunctionComponent<Props> = ({
|
|||||||
dbtClassificationName={dbtClassificationName}
|
dbtClassificationName={dbtClassificationName}
|
||||||
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
dbtUpdateDescriptions={dbtUpdateDescriptions}
|
||||||
descriptionId="s3-update-description"
|
descriptionId="s3-update-description"
|
||||||
|
enableDebugLog={enableDebugLog}
|
||||||
|
handleEnableDebugLogCheck={handleEnableDebugLogCheck}
|
||||||
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
handleUpdateDBTClassification={handleUpdateDBTClassification}
|
||||||
handleUpdateDescriptions={handleUpdateDescriptions}
|
handleUpdateDescriptions={handleUpdateDescriptions}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user