mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-12 03:29:53 +00:00

* initial setup for data quality form * added stepper and form component * added select/add test suite step form * added form for table test and cron step * added data quality table test form flow * added test suite listing page * bug fix for profiler * added column test form * render right panel information dynamically * updated test as per new changes * updated data test id * Fixed ingestionPipeline * Fixed pytest + python format * miner fix, added sql editor * removed filter for duplicate test check * miner fix * updated all API call for test suite ingestion page * updated test suite view redirection * updated ingestion infinite loader * added edit action for test case * added edit/add ingestion flow * added after action for form * remove duplicate close action * fixed alignment issue * added expand on row click functionality and change expand/collapse icon * used antd component * resolving conflict * Fixed#7040: Test-suite count support in counts API (#7041) * updated test suite count * fixed failing unit test Co-authored-by: Teddy Crepineau <teddy.crepineau@gmail.com> Co-authored-by: Parth Panchal <83201188+parthp2107@users.noreply.github.com>
70 lines
1.6 KiB
TypeScript
70 lines
1.6 KiB
TypeScript
import { Button, Col, Row } from 'antd';
|
|
import { isUndefined } from 'lodash';
|
|
import React from 'react';
|
|
import { PAGE_SIZE } from '../../constants/constants';
|
|
import { Paging } from '../../generated/type/paging';
|
|
import NextPrevious from '../common/next-previous/NextPrevious';
|
|
|
|
const TestCaseCommonTabContainer = ({
|
|
buttonName,
|
|
children,
|
|
paging,
|
|
currentPage,
|
|
testCasePageHandler,
|
|
onButtonClick,
|
|
showButton = true,
|
|
isPaging = false,
|
|
}: {
|
|
buttonName: string;
|
|
showButton?: boolean;
|
|
children?: JSX.Element;
|
|
paging?: Paging;
|
|
onButtonClick?: () => void;
|
|
currentPage?: number;
|
|
testCasePageHandler?: (
|
|
cursorValue: string | number,
|
|
activePage?: number | undefined
|
|
) => void;
|
|
isPaging?: boolean;
|
|
}) => {
|
|
const NextPreviousComponent = () => {
|
|
if (
|
|
isPaging &&
|
|
!isUndefined(paging) &&
|
|
paging?.total > PAGE_SIZE &&
|
|
!isUndefined(currentPage) &&
|
|
testCasePageHandler
|
|
) {
|
|
return (
|
|
<Col span={24}>
|
|
<NextPrevious
|
|
currentPage={currentPage}
|
|
pageSize={PAGE_SIZE}
|
|
paging={paging}
|
|
pagingHandler={testCasePageHandler}
|
|
totalCount={paging.total}
|
|
/>
|
|
</Col>
|
|
);
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
return (
|
|
<Row className="tw-mt-4" gutter={[16, 16]}>
|
|
{showButton && (
|
|
<Col className="tw-flex tw-justify-end" span={24}>
|
|
<Button type="primary" onClick={onButtonClick}>
|
|
{buttonName}
|
|
</Button>
|
|
</Col>
|
|
)}
|
|
{children}
|
|
<NextPreviousComponent />
|
|
</Row>
|
|
);
|
|
};
|
|
|
|
export default TestCaseCommonTabContainer;
|