mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-10 07:53:35 +00:00
MINOR: added beta tag for png and pdf export (#20761)
* added beta tag for png and pdf export * fix playwright changes * fix the playwright test
This commit is contained in:
parent
e9545324c1
commit
503ffc1986
@ -660,7 +660,7 @@ export const verifyExportLineagePNG = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByTestId('export-type-select').getByTitle('PNG')
|
page.getByTestId('export-type-select').getByText('PNGBeta')
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|
||||||
const [download] = await Promise.all([
|
const [download] = await Promise.all([
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { Form, Input, Modal, Select } from 'antd';
|
import { Badge, Form, Input, Modal, Select } from 'antd';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { isString, lowerCase } from 'lodash';
|
import { isString, lowerCase } from 'lodash';
|
||||||
@ -24,7 +24,10 @@ import React, {
|
|||||||
} from 'react';
|
} from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
import { ExportTypes } from '../../../constants/Export.constants';
|
import {
|
||||||
|
BETA_EXPORT_TYPES,
|
||||||
|
ExportTypes,
|
||||||
|
} from '../../../constants/Export.constants';
|
||||||
import { getCurrentISODate } from '../../../utils/date-time/DateTimeUtils';
|
import { getCurrentISODate } from '../../../utils/date-time/DateTimeUtils';
|
||||||
import { isBulkEditRoute } from '../../../utils/EntityBulkEdit/EntityBulkEditUtils';
|
import { isBulkEditRoute } from '../../../utils/EntityBulkEdit/EntityBulkEditUtils';
|
||||||
import exportUtilClassBase from '../../../utils/ExportUtilClassBase';
|
import exportUtilClassBase from '../../../utils/ExportUtilClassBase';
|
||||||
@ -274,9 +277,25 @@ export const EntityExportModalProvider = ({
|
|||||||
<Form.Item label={`${t('label.export-type')}:`} name="exportType">
|
<Form.Item label={`${t('label.export-type')}:`} name="exportType">
|
||||||
<Select
|
<Select
|
||||||
data-testid="export-type-select"
|
data-testid="export-type-select"
|
||||||
disabled={exportData.exportTypes.length === 1}
|
disabled={exportData.exportTypes.length === 1}>
|
||||||
options={exportTypesOptions}
|
{exportTypesOptions.map((type) => (
|
||||||
/>
|
<Select.Option
|
||||||
|
key={type.value}
|
||||||
|
title={type.value}
|
||||||
|
value={type.value}>
|
||||||
|
<div className="d-flex items-center">
|
||||||
|
{type.label}
|
||||||
|
{BETA_EXPORT_TYPES.includes(type.value) && (
|
||||||
|
<Badge
|
||||||
|
className="m-l-xs service-beta-tag"
|
||||||
|
count={t('label.beta')}
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</Select.Option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@ -16,5 +16,7 @@ export enum ExportTypes {
|
|||||||
PDF = 'PDF',
|
PDF = 'PDF',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const BETA_EXPORT_TYPES = [ExportTypes.PNG, ExportTypes.PDF];
|
||||||
|
|
||||||
export const LINEAGE_EXPORT_SELECTOR =
|
export const LINEAGE_EXPORT_SELECTOR =
|
||||||
'#lineage-container .react-flow__viewport';
|
'#lineage-container .react-flow__viewport';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user