mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 12:39:01 +00:00
* Fix #8993 Add Datainsight ingestion option available even after a pipeline already running * Remove tailwind class * Remove tailwind * refactor : the code to check if Data InSight Ingestion Exists
This commit is contained in:
parent
ee21654342
commit
317a8f1711
@ -252,6 +252,14 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const isDataSightIngestionExists = useMemo(
|
||||
() =>
|
||||
ingestionData.some(
|
||||
(ingestion) => ingestion.pipelineType === PipelineType.DataInsight
|
||||
),
|
||||
[ingestionData]
|
||||
);
|
||||
|
||||
const getAddIngestionButton = (type: PipelineType) => {
|
||||
return (
|
||||
<Button
|
||||
@ -297,6 +305,10 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
<DropDownList
|
||||
horzPosRight
|
||||
dropDownList={types.map((type) => ({
|
||||
disabled:
|
||||
type === PipelineType.DataInsight
|
||||
? isDataSightIngestionExists
|
||||
: false,
|
||||
name: `${t('label.add')} ${startCase(type)} ${
|
||||
type === PipelineType.ElasticSearchReindex
|
||||
? ''
|
||||
|
@ -137,10 +137,11 @@ const DropDownList: FunctionComponent<DropDownListProp> = ({
|
||||
<div
|
||||
aria-disabled={item.disabled as boolean}
|
||||
className={classNames(
|
||||
'tw-text-gray-700 tw-flex tw-px-4 tw-py-2 tw-text-sm hover:tw-bg-body-hover tw-cursor-pointer',
|
||||
'text-body flex px-4 py-2 text-sm hover:tw-bg-body-hover',
|
||||
!isNil(value) && item.value === value ? 'tw-bg-primary-lite' : null,
|
||||
{
|
||||
'tw-cursor-not-allowed': item.disabled,
|
||||
'opacity-60 cursor-not-allowed': item.disabled,
|
||||
'cursor-pointer': !item.disabled,
|
||||
}
|
||||
)}
|
||||
data-testid="list-item"
|
||||
|
@ -417,6 +417,17 @@
|
||||
.p-b-lg {
|
||||
padding-bottom: @padding-lg;
|
||||
}
|
||||
|
||||
.px-4 {
|
||||
padding-left: @padding-md;
|
||||
padding-right: @padding-md;
|
||||
}
|
||||
|
||||
.py-2 {
|
||||
padding-top: @padding-xs;
|
||||
padding-bottom: @padding-xs;
|
||||
}
|
||||
|
||||
.take-to-right {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user