mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 05:03:10 +00:00
This commit is contained in:
parent
2f3a50e95f
commit
ae71a11a8c
@ -36,7 +36,6 @@ import { getEntityBreadcrumbs, getEntityName } from 'utils/EntityUtils';
|
|||||||
import { getEncodedFqn } from 'utils/StringsUtils';
|
import { getEncodedFqn } from 'utils/StringsUtils';
|
||||||
import { getTableTabPath } from '../../constants/constants';
|
import { getTableTabPath } from '../../constants/constants';
|
||||||
import {
|
import {
|
||||||
allowedServiceForOperationGraph,
|
|
||||||
DEFAULT_RANGE_DATA,
|
DEFAULT_RANGE_DATA,
|
||||||
STEPS_FOR_ADD_TEST_CASE,
|
STEPS_FOR_ADD_TEST_CASE,
|
||||||
} from '../../constants/profiler.constant';
|
} from '../../constants/profiler.constant';
|
||||||
@ -232,10 +231,6 @@ const AddDataQualityTestV1: React.FC<AddDataQualityTestProps> = ({
|
|||||||
<TableProfilerChart
|
<TableProfilerChart
|
||||||
dateRangeObject={DEFAULT_RANGE_DATA}
|
dateRangeObject={DEFAULT_RANGE_DATA}
|
||||||
entityFqn={entityTypeFQN}
|
entityFqn={entityTypeFQN}
|
||||||
showOperationGraph={
|
|
||||||
table.serviceType &&
|
|
||||||
allowedServiceForOperationGraph.includes(table.serviceType)
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isColumnFqn && (
|
{isColumnFqn && (
|
||||||
|
@ -47,12 +47,7 @@ describe('TableProfilerChart component test', () => {
|
|||||||
const mockGetSystemProfileList = getSystemProfileList as jest.Mock;
|
const mockGetSystemProfileList = getSystemProfileList as jest.Mock;
|
||||||
const mockGetTableProfilesList = getTableProfilesList as jest.Mock;
|
const mockGetTableProfilesList = getTableProfilesList as jest.Mock;
|
||||||
act(() => {
|
act(() => {
|
||||||
render(
|
render(<TableProfilerChart dateRangeObject={mockDateRangeObject} />);
|
||||||
<TableProfilerChart
|
|
||||||
showOperationGraph
|
|
||||||
dateRangeObject={mockDateRangeObject}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
@ -77,12 +72,7 @@ describe('TableProfilerChart component test', () => {
|
|||||||
const mockGetSystemProfileList = getSystemProfileList as jest.Mock;
|
const mockGetSystemProfileList = getSystemProfileList as jest.Mock;
|
||||||
const mockGetTableProfilesList = getTableProfilesList as jest.Mock;
|
const mockGetTableProfilesList = getTableProfilesList as jest.Mock;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
render(
|
render(<TableProfilerChart dateRangeObject={mockDateRangeObject} />);
|
||||||
<TableProfilerChart
|
|
||||||
showOperationGraph
|
|
||||||
dateRangeObject={mockDateRangeObject}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// API should be call once
|
// API should be call once
|
||||||
@ -111,12 +101,7 @@ describe('TableProfilerChart component test', () => {
|
|||||||
const mockGetTableProfilesList = getTableProfilesList as jest.Mock;
|
const mockGetTableProfilesList = getTableProfilesList as jest.Mock;
|
||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
render(
|
render(<TableProfilerChart dateRangeObject={mockDateRangeObject} />);
|
||||||
<TableProfilerChart
|
|
||||||
showOperationGraph
|
|
||||||
dateRangeObject={mockDateRangeObject}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// API should be call with proper Param value
|
// API should be call with proper Param value
|
||||||
|
@ -38,7 +38,6 @@ import { TableProfilerChartProps } from '../TableProfiler.interface';
|
|||||||
const TableProfilerChart = ({
|
const TableProfilerChart = ({
|
||||||
dateRangeObject,
|
dateRangeObject,
|
||||||
entityFqn = '',
|
entityFqn = '',
|
||||||
showOperationGraph = false,
|
|
||||||
}: TableProfilerChartProps) => {
|
}: TableProfilerChartProps) => {
|
||||||
const { datasetFQN } = useParams<{ datasetFQN: string }>();
|
const { datasetFQN } = useParams<{ datasetFQN: string }>();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@ -116,59 +115,53 @@ const TableProfilerChart = ({
|
|||||||
title={t('label.data-volume')}
|
title={t('label.data-volume')}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
{showOperationGraph && (
|
<Col span={24}>
|
||||||
<>
|
<Card
|
||||||
<Col span={24}>
|
className="shadow-none global-border-radius"
|
||||||
<Card
|
data-testid="operation-date-metrics">
|
||||||
className="shadow-none global-border-radius"
|
<Row gutter={[16, 16]}>
|
||||||
data-testid="operation-date-metrics">
|
<Col span={24}>
|
||||||
<Row gutter={[16, 16]}>
|
<Typography.Title level={5}>
|
||||||
<Col span={24}>
|
{t('label.table-update-plural')}
|
||||||
<Typography.Title level={5}>
|
</Typography.Title>
|
||||||
{t('label.table-update-plural')}
|
</Col>
|
||||||
</Typography.Title>
|
<Col span={4}>
|
||||||
</Col>
|
<ProfilerLatestValue
|
||||||
<Col span={4}>
|
stringValue
|
||||||
<ProfilerLatestValue
|
information={operationDateMetrics.information}
|
||||||
stringValue
|
/>
|
||||||
information={operationDateMetrics.information}
|
</Col>
|
||||||
/>
|
<Col span={20}>
|
||||||
</Col>
|
<OperationDateBarChart
|
||||||
<Col span={20}>
|
chartCollection={operationDateMetrics}
|
||||||
<OperationDateBarChart
|
name="operationDateMetrics"
|
||||||
chartCollection={operationDateMetrics}
|
/>
|
||||||
name="operationDateMetrics"
|
</Col>
|
||||||
/>
|
</Row>
|
||||||
</Col>
|
</Card>
|
||||||
</Row>
|
</Col>
|
||||||
</Card>
|
<Col span={24}>
|
||||||
</Col>
|
<Card
|
||||||
<Col span={24}>
|
className="shadow-none global-border-radius"
|
||||||
<Card
|
data-testid="operation-metrics">
|
||||||
className="shadow-none global-border-radius"
|
<Row gutter={[16, 16]}>
|
||||||
data-testid="operation-metrics">
|
<Col span={24}>
|
||||||
<Row gutter={[16, 16]}>
|
<Typography.Title level={5}>
|
||||||
<Col span={24}>
|
{t('label.volume-change')}
|
||||||
<Typography.Title level={5}>
|
</Typography.Title>
|
||||||
{t('label.volume-change')}
|
</Col>
|
||||||
</Typography.Title>
|
<Col span={4}>
|
||||||
</Col>
|
<ProfilerLatestValue information={operationMetrics.information} />
|
||||||
<Col span={4}>
|
</Col>
|
||||||
<ProfilerLatestValue
|
<Col span={20}>
|
||||||
information={operationMetrics.information}
|
<CustomBarChart
|
||||||
/>
|
chartCollection={operationMetrics}
|
||||||
</Col>
|
name="operationMetrics"
|
||||||
<Col span={20}>
|
/>
|
||||||
<CustomBarChart
|
</Col>
|
||||||
chartCollection={operationMetrics}
|
</Row>
|
||||||
name="operationMetrics"
|
</Card>
|
||||||
/>
|
</Col>
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</Card>
|
|
||||||
</Col>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -86,7 +86,6 @@ export type TableProfilerData = {
|
|||||||
export type TableProfilerChartProps = {
|
export type TableProfilerChartProps = {
|
||||||
dateRangeObject: DateRangeObject;
|
dateRangeObject: DateRangeObject;
|
||||||
entityFqn?: string;
|
entityFqn?: string;
|
||||||
showOperationGraph?: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ProfilerSettingModalState {
|
export interface ProfilerSettingModalState {
|
||||||
|
@ -70,7 +70,6 @@ import { ReactComponent as TableProfileIcon } from '../../assets/svg/table-profi
|
|||||||
import { API_RES_MAX_SIZE } from '../../constants/constants';
|
import { API_RES_MAX_SIZE } from '../../constants/constants';
|
||||||
import { PAGE_HEADERS } from '../../constants/PageHeaders.constant';
|
import { PAGE_HEADERS } from '../../constants/PageHeaders.constant';
|
||||||
import {
|
import {
|
||||||
allowedServiceForOperationGraph,
|
|
||||||
DEFAULT_RANGE_DATA,
|
DEFAULT_RANGE_DATA,
|
||||||
INITIAL_TEST_RESULT_SUMMARY,
|
INITIAL_TEST_RESULT_SUMMARY,
|
||||||
} from '../../constants/profiler.constant';
|
} from '../../constants/profiler.constant';
|
||||||
@ -141,14 +140,6 @@ const TableProfilerV1: FC<TableProfilerProps> = ({
|
|||||||
const [dateRangeObject, setDateRangeObject] =
|
const [dateRangeObject, setDateRangeObject] =
|
||||||
useState<DateRangeObject>(DEFAULT_RANGE_DATA);
|
useState<DateRangeObject>(DEFAULT_RANGE_DATA);
|
||||||
|
|
||||||
const showOperationGraph = useMemo(() => {
|
|
||||||
if (table?.serviceType) {
|
|
||||||
return allowedServiceForOperationGraph.includes(table.serviceType);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}, [table]);
|
|
||||||
|
|
||||||
const isColumnProfile = activeTab === TableProfilerTab.COLUMN_PROFILE;
|
const isColumnProfile = activeTab === TableProfilerTab.COLUMN_PROFILE;
|
||||||
const isDataQuality = activeTab === TableProfilerTab.DATA_QUALITY;
|
const isDataQuality = activeTab === TableProfilerTab.DATA_QUALITY;
|
||||||
const isTableProfile = activeTab === TableProfilerTab.TABLE_PROFILE;
|
const isTableProfile = activeTab === TableProfilerTab.TABLE_PROFILE;
|
||||||
@ -694,10 +685,7 @@ const TableProfilerV1: FC<TableProfilerProps> = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{isTableProfile && (
|
{isTableProfile && (
|
||||||
<TableProfilerChart
|
<TableProfilerChart dateRangeObject={dateRangeObject} />
|
||||||
dateRangeObject={dateRangeObject}
|
|
||||||
showOperationGraph={showOperationGraph}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{settingModalVisible && (
|
{settingModalVisible && (
|
||||||
|
@ -22,7 +22,6 @@ import { CSMode } from '../enums/codemirror.enum';
|
|||||||
import { DMLOperationType } from '../generated/api/data/createTableProfile';
|
import { DMLOperationType } from '../generated/api/data/createTableProfile';
|
||||||
import {
|
import {
|
||||||
ColumnProfilerConfig,
|
ColumnProfilerConfig,
|
||||||
DatabaseServiceType,
|
|
||||||
DataType,
|
DataType,
|
||||||
PartitionIntervalType,
|
PartitionIntervalType,
|
||||||
PartitionIntervalUnit,
|
PartitionIntervalUnit,
|
||||||
@ -395,9 +394,3 @@ export const TIME_BASED_PARTITION = [
|
|||||||
PartitionIntervalType.IngestionTime,
|
PartitionIntervalType.IngestionTime,
|
||||||
PartitionIntervalType.TimeUnit,
|
PartitionIntervalType.TimeUnit,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const allowedServiceForOperationGraph = [
|
|
||||||
DatabaseServiceType.BigQuery,
|
|
||||||
DatabaseServiceType.Redshift,
|
|
||||||
DatabaseServiceType.Snowflake,
|
|
||||||
];
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user