diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyV1.tsx deleted file mode 100644 index c9ffef742bd3..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyV1.tsx +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2023 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Button } from 'antd'; -import classNames from 'classnames'; -import { useCallback, useMemo, useState } from 'react'; -import { useTranslation } from 'react-i18next'; -import { Link } from 'react-router-dom'; -import ActivityFeedEditor from '../../../../components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor'; -import { ASSET_CARD_STYLES } from '../../../../constants/Feeds.constants'; -import { EntityType } from '../../../../enums/entity.enum'; -import { CardStyle } from '../../../../generated/entity/feed/thread'; -import { - AlertType, - EventSubscription, -} from '../../../../generated/events/eventSubscription'; -import entityUtilClassBase from '../../../../utils/EntityUtilClassBase'; -import { - getEntityFQN, - getEntityType, - getFrontEndFormat, - MarkdownToHTMLConverter, -} from '../../../../utils/FeedUtils'; -import RichTextEditorPreviewerV1 from '../../../common/RichTextEditor/RichTextEditorPreviewerV1'; -import ExploreSearchCard from '../../../ExploreV1/ExploreSearchCard/ExploreSearchCard'; -import DescriptionFeed from '../../ActivityFeedCardV2/FeedCardBody/DescriptionFeed/DescriptionFeed'; -import TagsFeed from '../../ActivityFeedCardV2/FeedCardBody/TagsFeed/TagsFeed'; -import './feed-card-body-v1.less'; -import { FeedCardBodyV1Props } from './FeedCardBodyV1.interface'; - -const FeedCardBodyV1 = ({ - isPost = false, - feed, - isEditPost, - className, - message, - onUpdate, - onEditCancel, -}: FeedCardBodyV1Props) => { - const { t } = useTranslation(); - const [postMessage, setPostMessage] = useState(message); - - const { entityFQN, entityType, cardStyle } = useMemo(() => { - return { - entityFQN: getEntityFQN(feed?.about ?? '') ?? '', - entityType: getEntityType(feed?.about ?? '') ?? '', - cardStyle: feed?.cardStyle ?? '', - }; - }, [feed]); - - const handleSave = useCallback(() => { - onUpdate?.(postMessage ?? ''); - }, [onUpdate, postMessage]); - - const getDefaultValue = (defaultMessage: string) => { - return MarkdownToHTMLConverter.makeHtml(getFrontEndFormat(defaultMessage)); - }; - - const feedBodyStyleCardsRender = useMemo(() => { - if (!isPost && feed) { - if (cardStyle === CardStyle.Description) { - return ; - } - - if (cardStyle === CardStyle.Tags) { - return ; - } - - if (ASSET_CARD_STYLES.includes(cardStyle as CardStyle)) { - const entityInfo = feed?.feedInfo?.entitySpecificInfo?.entity; - const isExecutableTestSuite = - entityType === EntityType.TEST_SUITE && entityInfo.basic; - const isObservabilityAlert = - entityType === EntityType.EVENT_SUBSCRIPTION && - (entityInfo as EventSubscription).alertType === - AlertType.Observability; - - const entityCard = ( - - ); - - return cardStyle === CardStyle.EntityDeleted ? ( -
{entityCard}
- ) : ( - - {entityCard} - - ); - } - } - - return ( - - ); - }, [isPost, message, postMessage, cardStyle, feed, entityType, entityFQN]); - - const feedBodyRender = useMemo(() => { - if (isEditPost) { - return ( - - - - - } - editorClass="is_edit_post" - onSave={handleSave} - onTextChange={(message) => setPostMessage(message)} - /> - ); - } - - return feedBodyStyleCardsRender; - }, [isEditPost, message, feedBodyStyleCardsRender]); - - return ( -
-
{feedBodyRender}
-
- ); -}; - -export default FeedCardBodyV1; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/ActivityFeedCardV2.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/ActivityFeedCardV2.interface.ts deleted file mode 100644 index 6a28dc036f1f..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/ActivityFeedCardV2.interface.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Post, Thread } from '../../../generated/entity/feed/thread'; - -export interface ActivityFeedCardV2Props { - post: Post; - feed: Thread; - className?: string; - isPost?: boolean; - isOpenInDrawer?: boolean; - showThread?: boolean; - isActive?: boolean; - componentsVisibility?: { - showThreadIcon?: boolean; - showRepliesContainer?: boolean; - }; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/ActivityFeedCardV2.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/ActivityFeedCardV2.tsx deleted file mode 100644 index 15802e14f02d..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/ActivityFeedCardV2.tsx +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Col, Row } from 'antd'; -import classNames from 'classnames'; -import { compare } from 'fast-json-patch'; -import { useMemo, useState } from 'react'; -import { EntityField } from '../../../constants/Feeds.constants'; -import { GeneratedBy } from '../../../generated/entity/feed/thread'; -import ProfilePicture from '../../common/ProfilePicture/ProfilePicture'; -import FeedCardBodyV1 from '../ActivityFeedCard/FeedCardBody/FeedCardBodyV1'; -import { useActivityFeedProvider } from '../ActivityFeedProvider/ActivityFeedProvider'; -import ActivityFeedActions from '../Shared/ActivityFeedActions'; -import './activity-feed-card-v2.less'; -import { ActivityFeedCardV2Props } from './ActivityFeedCardV2.interface'; -import FeedCardFooter from './FeedCardFooter/FeedCardFooter'; -import FeedCardHeaderV2 from './FeedCardHeader/FeedCardHeaderV2'; - -const ActivityFeedCardV2 = ({ - post, - feed, - className = '', - isPost = false, - isActive = false, - showThread = false, - isOpenInDrawer = false, - componentsVisibility = { - showThreadIcon: true, - showRepliesContainer: true, - }, -}: Readonly) => { - const [isEditPost, setIsEditPost] = useState(false); - const [showActions, setShowActions] = useState(false); - const { updateFeed } = useActivityFeedProvider(); - - const postLength = useMemo( - () => feed?.posts?.length ?? 0, - [feed?.posts?.length] - ); - - const onEditPost = () => { - setIsEditPost(!isEditPost); - }; - - const handleMouseEnter = () => { - setShowActions(true); - }; - - const handleMouseLeave = () => { - setShowActions(false); - }; - - const onUpdate = (message: string) => { - const updatedPost = { ...feed, message }; - const patch = compare(feed, updatedPost); - updateFeed(feed.id, post.id, !isPost, patch); - setIsEditPost(!isEditPost); - }; - - return ( -
-
- -
- - - - - - - - setIsEditPost(false)} - onUpdate={onUpdate} - /> - - - - - - {showActions && - (feed.generatedBy !== GeneratedBy.System || isPost) && ( - - )} - - {showThread && postLength > 0 && ( - - {feed?.posts?.map((reply) => ( - - ))} - - )} - -
- ); -}; - -export default ActivityFeedCardV2; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardBody/CustomPropertyFeed/CustomPropertyFeed.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardBody/CustomPropertyFeed/CustomPropertyFeed.component.tsx deleted file mode 100644 index 88bb6ff0cb1d..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardBody/CustomPropertyFeed/CustomPropertyFeed.component.tsx +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { useMemo } from 'react'; -import { getTextDiffCustomProperty } from '../../../../../utils/EntityVersionUtils'; -import RichTextEditorPreviewerV1 from '../../../../common/RichTextEditor/RichTextEditorPreviewerV1'; -import { CustomPropertyFeedProps } from './CustomPropertyFeed.interface'; - -function CustomPropertyFeed({ feed }: Readonly) { - const message = useMemo( - () => - getTextDiffCustomProperty( - feed.feedInfo?.fieldName ?? '', - feed.feedInfo?.entitySpecificInfo?.previousValue ?? '', - feed.feedInfo?.entitySpecificInfo?.updatedValue ?? '' - ), - [feed] - ); - - return ( - - ); -} - -export default CustomPropertyFeed; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardBody/CustomPropertyFeed/CustomPropertyFeed.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardBody/CustomPropertyFeed/CustomPropertyFeed.interface.ts deleted file mode 100644 index a9475e86df4a..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardBody/CustomPropertyFeed/CustomPropertyFeed.interface.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Thread } from '../../../../../generated/entity/feed/thread'; - -export interface CustomPropertyFeedProps { - feed: Thread; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooter.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooter.tsx deleted file mode 100644 index 3f9730de10c6..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooter.tsx +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Avatar, Button, Col, Row, Space, Tooltip, Typography } from 'antd'; -import { min, noop, sortBy } from 'lodash'; -import { useCallback, useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; -import { ReactComponent as ThreadIcon } from '../../../../assets/svg/thread-icon.svg'; -import { ReactionOperation } from '../../../../enums/reactions.enum'; -import { ReactionType } from '../../../../generated/type/reaction'; -import { - formatDateTime, - getRelativeTime, -} from '../../../../utils/date-time/DateTimeUtils'; -import ProfilePicture from '../../../common/ProfilePicture/ProfilePicture'; -import { useActivityFeedProvider } from '../../ActivityFeedProvider/ActivityFeedProvider'; -import Reactions from '../../Reactions/Reactions'; -import { FeedCardFooterProps } from './FeedCardFooter.interface'; - -function FeedCardFooter({ - feed, - post, - isPost = false, - componentsVisibility = { - showThreadIcon: true, - showRepliesContainer: true, - }, -}: Readonly) { - const { t } = useTranslation(); - const { showDrawer, updateReactions, fetchUpdatedThread } = - useActivityFeedProvider(); - - // The number of posts in the thread - const postLength = useMemo(() => feed?.postsCount ?? 0, [feed?.postsCount]); - - // The latest reply timestamp and the list of unique users who replied - const { latestReplyTimeStamp, repliedUniqueUsersList } = useMemo(() => { - const posts = sortBy(feed?.posts, 'postTs').reverse(); - const latestReplyTimeStamp = posts[0]?.postTs; - - const repliedUsers = [...new Set((feed?.posts ?? []).map((f) => f.from))]; - - const repliedUniqueUsersList = repliedUsers.slice( - 0, - min([3, repliedUsers.length]) - ); - - return { latestReplyTimeStamp, repliedUniqueUsersList }; - }, [feed?.posts]); - - const onReactionUpdate = useCallback( - async (reaction: ReactionType, operation: ReactionOperation) => { - if (!post) { - return; - } - await updateReactions(post, feed.id, !isPost, reaction, operation); - await fetchUpdatedThread(feed.id); - }, - [updateReactions, post, feed.id, isPost, fetchUpdatedThread] - ); - - const showReplies = useCallback(() => { - showDrawer?.(feed); - }, [showDrawer, feed]); - - return ( - - - - {componentsVisibility.showThreadIcon && postLength === 0 && ( - - )} - - - ); -} - -export default FeedCardFooter; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedListV1.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedListV1.component.tsx deleted file mode 100644 index bf3398b59719..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedListV1.component.tsx +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2023 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Typography } from 'antd'; -import { isEmpty } from 'lodash'; -import { ReactNode, useEffect, useMemo, useState } from 'react'; -import { ReactComponent as FeedEmptyIcon } from '../../../assets/svg/activity-feed-no-data-placeholder.svg'; -import ErrorPlaceHolder from '../../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; -import { ERROR_PLACEHOLDER_TYPE, SIZE } from '../../../enums/common.enum'; -import { Thread } from '../../../generated/entity/feed/thread'; -import { getFeedListWithRelativeDays } from '../../../utils/FeedUtils'; -import Loader from '../../common/Loader/Loader'; -import FeedPanelBodyV1 from '../ActivityFeedPanel/FeedPanelBodyV1'; - -interface ActivityFeedListV1Props { - feedList: Thread[]; - isLoading: boolean; - showThread?: boolean; - onFeedClick?: (feed: Thread) => void; - activeFeedId?: string; - hidePopover: boolean; - isForFeedTab?: boolean; - emptyPlaceholderText: ReactNode; - componentsVisibility?: { - showThreadIcon?: boolean; - showRepliesContainer?: boolean; - }; - selectedThread?: Thread; -} - -const ActivityFeedListV1 = ({ - feedList, - isLoading, - showThread = true, - componentsVisibility = { - showThreadIcon: true, - showRepliesContainer: true, - }, - onFeedClick, - activeFeedId, - hidePopover = false, - isForFeedTab = false, - emptyPlaceholderText, - selectedThread, -}: ActivityFeedListV1Props) => { - const [entityThread, setEntityThread] = useState([]); - - useEffect(() => { - const { updatedFeedList } = getFeedListWithRelativeDays(feedList); - setEntityThread(updatedFeedList); - }, [feedList]); - - useEffect(() => { - if (onFeedClick) { - onFeedClick( - entityThread.find((feed) => feed.id === selectedThread?.id) ?? - entityThread[0] - ); - } - }, [entityThread, selectedThread, onFeedClick]); - - const feeds = useMemo( - () => - entityThread.map((feed) => ( - - )), - [ - entityThread, - activeFeedId, - componentsVisibility, - hidePopover, - isForFeedTab, - showThread, - ] - ); - - if (isLoading) { - return ; - } - - if (isEmpty(entityThread)) { - return ( -
- } - type={ERROR_PLACEHOLDER_TYPE.CUSTOM}> - - {emptyPlaceholderText} - - -
- ); - } - - return ( -
- {feeds} -
- ); -}; - -export default ActivityFeedListV1; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Shared/TaskBadge.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Shared/TaskBadge.tsx deleted file mode 100644 index 7b24e82e04da..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Shared/TaskBadge.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Icon from '@ant-design/icons'; -import { Space, Tooltip, Typography } from 'antd'; -import { isEqual } from 'lodash'; -import { useTranslation } from 'react-i18next'; -import { ReactComponent as IconTaskClose } from '../../../assets/svg/complete.svg'; -import { ReactComponent as IconTaskOpen } from '../../../assets/svg/in-progress.svg'; -import { TEXT_BODY_COLOR } from '../../../constants/constants'; -import { ThreadTaskStatus } from '../../../generated/entity/feed/thread'; -import './task-badge.less'; - -const TaskBadge = ({ status }: { status: ThreadTaskStatus }) => { - const { t } = useTranslation(); - const isTaskOpen = isEqual(status, ThreadTaskStatus.Open); - - const tooltipContent = isTaskOpen - ? `${t('label.status')}: ${t('label.open-lowercase')}` - : `${t('label.status')}: ${t('label.closed-lowercase')}`; - - return ( - - - - {t('label.task')} - - - ); -}; - -export default TaskBadge; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.interface.ts deleted file mode 100644 index b3285933037b..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.interface.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export interface DiagnosticItem { - key: string; - value: string | number | boolean; - description: string; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceNav/MarketplaceNav.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceNav/MarketplaceNav.component.tsx deleted file mode 100644 index 3b87ee0c1827..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceNav/MarketplaceNav.component.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2026 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Dropdown } from '@openmetadata/ui-core-components'; -import { ChevronDown } from '@untitledui/icons'; -import { Key, useMemo } from 'react'; -import { Button as AriaButton } from 'react-aria-components'; -import { useTranslation } from 'react-i18next'; -import { useNavigate } from 'react-router-dom'; -import { MARKETPLACE_NAV_ITEMS } from '../../../constants/MarketplaceNav.constants'; - -const MarketplaceNav = () => { - const { t } = useTranslation(); - const navigate = useNavigate(); - - const navItems = useMemo( - () => - MARKETPLACE_NAV_ITEMS.map((item) => ({ - id: item.redirect_url ?? item.children?.[0]?.redirect_url ?? item.key, - label: t(item.title), - icon: item.icon, - })), - [t] - ); - - const handleAction = (key: Key) => { - navigate(key.toString()); - }; - - return ( - - - {t('label.data-marketplace')} - - - - - {navItems.map((item) => ( - - ))} - - - - ); -}; - -export default MarketplaceNav; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceNavBar/MarketplaceNavBar.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceNavBar/MarketplaceNavBar.component.tsx deleted file mode 100644 index 8d6c103601ca..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceNavBar/MarketplaceNavBar.component.tsx +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright 2026 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Alert, Badge, Button, Dropdown, Tooltip } from 'antd'; -import { Header } from 'antd/lib/layout/layout'; -import { AxiosError } from 'axios'; -import { CookieStorage } from 'cookie-storage'; -import { startCase, upperCase } from 'lodash'; -import { MenuInfo } from 'rc-menu/lib/interface'; -import { useCallback, useEffect, useMemo, useState } from 'react'; -import { useTranslation } from 'react-i18next'; -import { useNavigate } from 'react-router-dom'; -import { ReactComponent as DropDownIcon } from '../../../assets/svg/drop-down.svg'; -import { ReactComponent as IconBell } from '../../../assets/svg/ic-alert-bell.svg'; -import { ReactComponent as Help } from '../../../assets/svg/ic-help.svg'; -import { ReactComponent as RefreshIcon } from '../../../assets/svg/ic-refresh.svg'; -import { ReactComponent as SidebarCollapsedIcon } from '../../../assets/svg/ic-sidebar-collapsed.svg'; -import { ReactComponent as SidebarExpandedIcon } from '../../../assets/svg/ic-sidebar-expanded.svg'; -import { - LAST_VERSION_FETCH_TIME_KEY, - NOTIFICATION_READ_TIMER, - ONE_HOUR_MS, - SOCKET_EVENTS, -} from '../../../constants/constants'; -import { GlobalSettingsMenuCategory } from '../../../constants/GlobalSettings.constants'; -import { useAsyncDeleteProvider } from '../../../context/AsyncDeleteProvider/AsyncDeleteProvider'; -import { AsyncDeleteWebsocketResponse } from '../../../context/AsyncDeleteProvider/AsyncDeleteProvider.interface'; -import { useTourProvider } from '../../../context/TourProvider/TourProvider'; -import { useWebSocketConnector } from '../../../context/WebSocketProvider/WebSocketProvider'; -import { EntityTabs, EntityType } from '../../../enums/entity.enum'; -import { BackgroundJob, JobType } from '../../../generated/jobs/backgroundJob'; -import { useCurrentUserPreferences } from '../../../hooks/currentUserStore/useCurrentUserStore'; -import { useApplicationStore } from '../../../hooks/useApplicationStore'; -import useCustomLocation from '../../../hooks/useCustomLocation/useCustomLocation'; -import { getVersion } from '../../../rest/miscAPI'; -import applicationRoutesClass from '../../../utils/ApplicationRoutesClassBase'; -import brandClassBase from '../../../utils/BrandData/BrandClassBase'; -import { - hasNotificationPermission, - shouldRequestPermission, -} from '../../../utils/BrowserNotificationUtils'; -import { getCustomPropertyEntityPathname } from '../../../utils/CustomProperty.utils'; -import entityUtilClassBase from '../../../utils/EntityUtilClassBase'; -import { - getEntityFQN, - getEntityType, - prepareFeedLink, -} from '../../../utils/FeedUtils'; -import { languageSelectOptions } from '../../../utils/i18next/i18nextUtil'; -import i18n from '../../../utils/i18next/LocalUtil'; -import localUtilClassBase from '../../../utils/i18next/LocalUtilClassBase'; -import { getHelpDropdownItems } from '../../../utils/NavbarUtils'; -import { getSettingPath } from '../../../utils/RouterUtils'; -import { showErrorToast } from '../../../utils/ToastUtils'; -import { ActivityFeedTabs } from '../../ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface'; -import { useEntityExportModalProvider } from '../../Entity/EntityExportModalProvider/EntityExportModalProvider.component'; -import { CSVExportWebsocketResponse } from '../../Entity/EntityExportModalProvider/EntityExportModalProvider.interface'; -import '../../NavBar/nav-bar.less'; -import popupAlertsCardsClassBase from '../../NavBar/PopupAlertClassBase'; -import NotificationBox from '../../NotificationBox/NotificationBox.component'; -import { UserProfileIcon } from '../../Settings/Users/UserProfileIcon/UserProfileIcon.component'; -import MarketplaceNav from '../MarketplaceNav/MarketplaceNav.component'; - -const cookieStorage = new CookieStorage(); - -const MarketplaceNavBar = () => { - const { isTourOpen: isTourRoute } = useTourProvider(); - const { onUpdateCSVExportJob } = useEntityExportModalProvider(); - const { handleDeleteEntityWebsocketResponse } = useAsyncDeleteProvider(); - const Logo = useMemo(() => brandClassBase.getMonogram().src, []); - const [showVersionMissMatchAlert, setShowVersionMissMatchAlert] = - useState(false); - const location = useCustomLocation(); - const navigate = useNavigate(); - const { t } = useTranslation(); - const [hasTaskNotification, setHasTaskNotification] = - useState(false); - const [hasMentionNotification, setHasMentionNotification] = - useState(false); - const [activeTab, setActiveTab] = useState('Task'); - const { appVersion: version, setAppVersion } = useApplicationStore(); - const { - preferences: { isSidebarCollapsed }, - setPreference, - } = useCurrentUserPreferences(); - - const fetchOMVersion = async () => { - try { - const res = await getVersion(); - - const now = Date.now(); - cookieStorage.setItem(LAST_VERSION_FETCH_TIME_KEY, String(now), { - expires: new Date(Date.now() + ONE_HOUR_MS), - }); - - setAppVersion(res.version.replace('-SNAPSHOT', '')); - } catch (err) { - showErrorToast( - err as AxiosError, - t('server.entity-fetch-error', { - entity: t('label.version'), - }) - ); - } - }; - - const renderAlertCards = useMemo(() => { - const cardList = popupAlertsCardsClassBase.alertsCards(); - - return cardList.map(({ key, component }) => { - const Component = component; - - return ; - }); - }, []); - - const { socket } = useWebSocketConnector(); - - const handleTaskNotificationRead = () => { - setHasTaskNotification(false); - }; - - const handleMentionsNotificationRead = () => { - setHasMentionNotification(false); - }; - - const handleBellClick = useCallback( - (visible: boolean) => { - if (visible) { - switch (activeTab) { - case 'Task': - hasTaskNotification && - setTimeout(() => { - handleTaskNotificationRead(); - }, NOTIFICATION_READ_TIMER); - - break; - - case 'Conversation': - hasMentionNotification && - setTimeout(() => { - handleMentionsNotificationRead(); - }, NOTIFICATION_READ_TIMER); - - break; - } - } - }, - [hasTaskNotification, hasMentionNotification, activeTab] - ); - - const handleActiveTab = (key: string) => { - setActiveTab(key); - }; - - const showBrowserNotification = ( - about: string, - createdBy: string, - type: string, - backgroundJobData?: BackgroundJob - ) => { - if (!hasNotificationPermission()) { - return; - } - - const entityType = getEntityType(about); - const entityFQN = getEntityFQN(about) ?? ''; - let body; - let path: string; - - switch (type) { - case 'Task': - body = t('message.user-assign-new-task', { - user: createdBy, - }); - - path = entityUtilClassBase.getEntityLink( - entityType as EntityType, - entityFQN, - EntityTabs.ACTIVITY_FEED, - ActivityFeedTabs.TASKS - ); - - break; - case 'Conversation': - body = t('message.user-mentioned-in-comment', { - user: createdBy, - }); - path = prepareFeedLink(entityType as string, entityFQN as string); - - break; - - case 'BackgroundJob': { - if (!backgroundJobData) { - break; - } - - const { jobArgs, status, jobType } = backgroundJobData; - - if (jobType === JobType.CustomPropertyEnumCleanup) { - const enumCleanupArgs = jobArgs; - if (!enumCleanupArgs.entityType) { - showErrorToast( - { - isAxiosError: true, - message: 'Invalid job arguments: entityType is required', - } as AxiosError, - t('message.unexpected-error') - ); - - break; - } - body = t('message.custom-property-update', { - propertyName: jobArgs.propertyName, - entityName: jobArgs.entityType, - status: startCase(status.toLowerCase()), - }); - - path = getSettingPath( - GlobalSettingsMenuCategory.CUSTOM_PROPERTIES, - getCustomPropertyEntityPathname(enumCleanupArgs.entityType) - ); - } - - break; - } - } - const notification = new Notification('Notification From OpenMetadata', { - body: body, - icon: Logo, - }); - notification.onclick = () => { - const isChrome = globalThis.navigator.userAgent.indexOf('Chrome'); - if (isChrome > -1) { - globalThis.open(path); - } else { - navigate(path); - } - }; - }; - - useEffect(() => { - if (shouldRequestPermission()) { - Notification.requestPermission(); - } - - const handleDocumentVisibilityChange = async () => { - if ( - applicationRoutesClass.isProtectedRoute(location.pathname) && - isTourRoute - ) { - return; - } - - const lastFetchTime = cookieStorage.getItem(LAST_VERSION_FETCH_TIME_KEY); - const now = Date.now(); - - if (lastFetchTime) { - const timeSinceLastFetch = now - Number.parseInt(lastFetchTime); - if (timeSinceLastFetch < ONE_HOUR_MS) { - return; - } - } - - const newVersion = await getVersion(); - const cleanedVersion = newVersion.version?.replace('-SNAPSHOT', ''); - - cookieStorage.setItem(LAST_VERSION_FETCH_TIME_KEY, String(now), { - expires: new Date(Date.now() + ONE_HOUR_MS), - }); - - if (version && version !== cleanedVersion) { - setShowVersionMissMatchAlert(true); - } - }; - - addEventListener('focus', handleDocumentVisibilityChange); - - return () => { - removeEventListener('focus', handleDocumentVisibilityChange); - }; - }, [isTourRoute, version]); - - useEffect(() => { - if (socket) { - socket.on(SOCKET_EVENTS.TASK_CHANNEL, (newActivity) => { - if (newActivity) { - const activity = JSON.parse(newActivity); - setHasTaskNotification(true); - showBrowserNotification( - activity.about, - activity.createdBy, - activity.type - ); - } - }); - - socket.on(SOCKET_EVENTS.MENTION_CHANNEL, (newActivity) => { - if (newActivity) { - const activity = JSON.parse(newActivity); - setHasMentionNotification(true); - showBrowserNotification( - activity.about, - activity.createdBy, - activity.type - ); - } - }); - - socket.on(SOCKET_EVENTS.CSV_EXPORT_CHANNEL, (exportResponse) => { - if (exportResponse) { - const exportResponseData = JSON.parse( - exportResponse - ) as CSVExportWebsocketResponse; - - onUpdateCSVExportJob(exportResponseData); - } - }); - socket.on(SOCKET_EVENTS.BACKGROUND_JOB_CHANNEL, (jobResponse) => { - if (jobResponse) { - const jobResponseData: BackgroundJob = JSON.parse(jobResponse); - showBrowserNotification( - '', - jobResponseData.createdBy, - 'BackgroundJob', - jobResponseData - ); - } - }); - - socket.on(SOCKET_EVENTS.DELETE_ENTITY_CHANNEL, (deleteResponse) => { - if (deleteResponse) { - const deleteResponseData = JSON.parse( - deleteResponse - ) as AsyncDeleteWebsocketResponse; - handleDeleteEntityWebsocketResponse(deleteResponseData); - } - }); - } - - return () => { - if (socket) { - socket.off(SOCKET_EVENTS.TASK_CHANNEL); - socket.off(SOCKET_EVENTS.MENTION_CHANNEL); - socket.off(SOCKET_EVENTS.CSV_EXPORT_CHANNEL); - socket.off(SOCKET_EVENTS.BACKGROUND_JOB_CHANNEL); - socket.off(SOCKET_EVENTS.DELETE_ENTITY_CHANNEL); - } - }; - }, [socket, onUpdateCSVExportJob]); - - useEffect(() => { - fetchOMVersion(); - }, []); - - const handleLanguageChange = useCallback(async ({ key }: MenuInfo) => { - await localUtilClassBase.loadLocales(key); - await i18n.changeLanguage(key); - navigate(0); - }, []); - - const currentLanguage = i18n.language - ? upperCase(i18n.language.split('-')[0]) - : ''; - - return ( - <> -
-
-
- -
- -
- - - - ( - - )} - overlayStyle={{ - width: '425px', - minHeight: '375px', - }} - placement="bottomRight" - trigger={['click']} - onOpenChange={handleBellClick}> -
-
-
- {showVersionMissMatchAlert && ( - { - navigate(0); - }}> - {t('label.refresh')} - - } - className="refresh-alert slide-in-top" - description="For a seamless experience recommend you to refresh the page" - icon={} - message="A new version is available" - type="info" - /> - )} - {renderAlertCards} - - ); -}; - -export default MarketplaceNavBar; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddSubDomainModal/AddSubDomainModal.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddSubDomainModal/AddSubDomainModal.component.tsx deleted file mode 100644 index 6503e6daa2fd..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddSubDomainModal/AddSubDomainModal.component.tsx +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Button, Modal } from 'antd'; -import { useCallback } from 'react'; -import { useForm } from 'react-hook-form'; -import { useTranslation } from 'react-i18next'; -import { CreateDomain } from '../../../generated/api/domains/createDomain'; -import AddDomainForm, { - DOMAIN_FORM_DEFAULTS, - transformDomainFormData, -} from '../AddDomainForm/AddDomainForm.component'; -import { DomainFormValues } from '../AddDomainForm/AddDomainForm.interface'; -import { DomainFormType } from '../DomainPage.interface'; -import { AddSubDomainModalProps } from './AddSubDomainModal.interface'; - -const AddSubDomainModal = ({ - open, - onSubmit, - onCancel, -}: AddSubDomainModalProps) => { - const { t } = useTranslation(); - const form = useForm({ - defaultValues: DOMAIN_FORM_DEFAULTS, - }); - - const handleFormSubmit = useCallback( - async (data: DomainFormValues) => { - const payload = transformDomainFormData( - data, - DomainFormType.SUBDOMAIN - ) as CreateDomain; - await onSubmit(payload); - form.reset(); - }, - [form, onSubmit] - ); - - const handleSave = form.handleSubmit(handleFormSubmit); - - return ( - - {t('label.cancel')} - , - , - ]} - maskClosable={false} - okText={t('label.submit')} - open={open} - styles={{ - body: { padding: '48px' }, - }} - title={t('label.add-entity', { entity: t('label.sub-domain') })} - width={670} - onCancel={onCancel}> - - - ); -}; - -export default AddSubDomainModal; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddSubDomainModal/AddSubDomainModal.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddSubDomainModal/AddSubDomainModal.interface.ts deleted file mode 100644 index 40ac9f276999..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/AddSubDomainModal/AddSubDomainModal.interface.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2024 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { CreateDomain } from '../../../generated/api/domains/createDomain'; -import { Domain } from '../../../generated/entity/domains/domain'; - -export interface AddSubDomainModalProps { - open: boolean; - data?: Domain; - onCancel: () => void; - onSubmit: (data: CreateDomain) => Promise; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailPage/DomainDetailPage.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailPage/DomainDetailPage.interface.ts deleted file mode 100644 index 93be83a37862..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailPage/DomainDetailPage.interface.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2023 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Domain } from '../../../generated/entity/domains/domain'; - -export interface DomainDetailPageProps { - domain?: Domain; - loading?: boolean; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DriveService/File/FileColumnsTable/index.ts b/openmetadata-ui/src/main/resources/ui/src/components/DriveService/File/FileColumnsTable/index.ts deleted file mode 100644 index 64b9d2edc2e7..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/DriveService/File/FileColumnsTable/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2025 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export { default } from './FileColumnsTable'; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/LineageControlButtons/LineageControlButtons.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/LineageControlButtons/LineageControlButtons.interface.ts deleted file mode 100644 index 395ef9e44eaf..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/LineageControlButtons/LineageControlButtons.interface.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2025 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { EntityType } from '../../../../enums/entity.enum'; - -export interface LineageControlButtonsProps { - deleted?: boolean; - hasEditAccess: boolean; - entityType?: EntityType; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityList/EntityList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityList/EntityList.tsx deleted file mode 100644 index f36fcf3165eb..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityList/EntityList.tsx +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2022 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Button, Col, Row, Typography } from 'antd'; -import { isEmpty } from 'lodash'; -import { FunctionComponent } from 'react'; -import { Link } from 'react-router-dom'; -import { EntityReference } from '../../../generated/entity/type'; -import entityUtilClassBase from '../../../utils/EntityUtilClassBase'; -import { getEntityName } from '../../../utils/EntityUtils'; -import searchClassBase from '../../../utils/SearchClassBase'; -import EntityListSkeleton from '../../common/Skeleton/MyData/EntityListSkeleton/EntityListSkeleton.component'; -import './entity.less'; - -interface AntdEntityListProp { - loading?: boolean; - entityList: Array; - headerText?: string | JSX.Element; - headerTextLabel: string; - noDataPlaceholder: JSX.Element; - testIDText: string; -} - -export const EntityListWithV1: FunctionComponent = ({ - entityList = [], - headerText, - headerTextLabel, - noDataPlaceholder, - testIDText, - loading, -}: AntdEntityListProp) => { - return ( - - <> - - - - {headerTextLabel} - - - - {headerText} - - - {isEmpty(entityList) ? ( -
{noDataPlaceholder}
- ) : ( -
- {entityList.map((item) => { - return ( -
-
- -
- } - title={getEntityName( - item as unknown as EntityReference - )} - type="text"> - - {getEntityName(item as unknown as EntityReference)} - - - -
-
- ); - })} - - )} - -
- ); -}; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/TasktabIncidentManagerHeaderNew.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/TasktabIncidentManagerHeaderNew.tsx deleted file mode 100644 index c624c272b62f..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/TasktabIncidentManagerHeaderNew.tsx +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright 2023 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Col, Row, Skeleton, Steps, Typography } from 'antd'; -import { last, toLower } from 'lodash'; -import { ReactNode, useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; -import { ReactComponent as AssigneesIcon } from '../../../../assets/svg/ic-assignees.svg'; -import { ReactComponent as FailureCommentIcon } from '../../../../assets/svg/ic-failure-comment.svg'; -import { ReactComponent as FailureReasonIcon } from '../../../../assets/svg/ic-failure-reason.svg'; -import { ReactComponent as SeverityIcon } from '../../../../assets/svg/ic-severity.svg'; -import { ReactComponent as UserIcon } from '../../../../assets/svg/ic-user-profile.svg'; -import { NO_DATA_PLACEHOLDER } from '../../../../constants/constants'; -import { - TEST_CASE_RESOLUTION_STATUS_LABELS, - TEST_CASE_STATUS, -} from '../../../../constants/TestSuite.constant'; -import { Thread } from '../../../../generated/entity/feed/thread'; -import { TestCaseResolutionStatusTypes } from '../../../../generated/tests/testCaseResolutionStatus'; -import { formatDateTime } from '../../../../utils/date-time/DateTimeUtils'; -import { getEntityName } from '../../../../utils/EntityUtils'; -import { useActivityFeedProvider } from '../../../ActivityFeed/ActivityFeedProvider/ActivityFeedProvider'; - -import { OwnerType } from '../../../../enums/user.enum'; -import { OwnerLabel } from '../../../common/OwnerLabel/OwnerLabel.component'; -import UserPopOverCard from '../../../common/PopOverCard/UserPopOverCard'; -import ProfilePicture from '../../../common/ProfilePicture/ProfilePicture'; -import RichTextEditorPreviewerV1 from '../../../common/RichTextEditor/RichTextEditorPreviewerV1'; -import Severity from '../../../DataQuality/IncidentManager/Severity/Severity.component'; -import './task-tab-incident-manager-header.style.less'; - -const TaskTabIncidentManagerHeaderNew = ({ thread }: { thread: Thread }) => { - const { t } = useTranslation(); - const { testCaseResolutionStatus, isTestCaseResolutionLoading } = - useActivityFeedProvider(); - const testCaseResolutionStepper = useMemo(() => { - const updatedData = [...testCaseResolutionStatus]; - const lastStatusType = last( - testCaseResolutionStatus - )?.testCaseResolutionStatusType; - - if (lastStatusType && TEST_CASE_STATUS[lastStatusType]) { - updatedData.push( - ...TEST_CASE_STATUS[lastStatusType].map((type) => ({ - testCaseResolutionStatusType: type, - })) - ); - } - - return updatedData.map((status) => { - let details: ReactNode = null; - - switch (status.testCaseResolutionStatusType) { - case TestCaseResolutionStatusTypes.ACK: - details = status.updatedBy ? ( - - {`${t('label.by-entity', { - entity: getEntityName(status.updatedBy), - })} ${t('label.on-lowercase')} `} - - ) : null; - - break; - case TestCaseResolutionStatusTypes.Assigned: - details = status.testCaseResolutionStatusDetails?.assignee ? ( - - {`${t('label.to-lowercase')} ${getEntityName( - status.testCaseResolutionStatusDetails?.assignee - )} ${t('label.on-lowercase')} `} - - ) : null; - - break; - case TestCaseResolutionStatusTypes.Resolved: - details = status.testCaseResolutionStatusDetails?.resolvedBy ? ( - - {`${t('label.by-entity', { - entity: getEntityName( - status.testCaseResolutionStatusDetails.resolvedBy - ), - })} ${t('label.on-lowercase')} `} - - ) : null; - - break; - - default: - break; - } - - return { - className: toLower(status.testCaseResolutionStatusType), - title: ( -
- - { - TEST_CASE_RESOLUTION_STATUS_LABELS[ - status.testCaseResolutionStatusType - ] - } - - - {details} - {status.updatedAt && ( - - {formatDateTime(status.updatedAt)} - - )} - -
- ), - key: status.testCaseResolutionStatusType, - }; - }); - }, [testCaseResolutionStatus, t]); - - const latestTestCaseResolutionStatus = useMemo( - () => last(testCaseResolutionStatus), - [testCaseResolutionStatus] - ); - - const isResolved = - latestTestCaseResolutionStatus?.testCaseResolutionStatusType === - TestCaseResolutionStatusTypes.Resolved; - - return ( - - - - - - {t('label.created-by')} - - - - -
- -
-
- {thread.createdBy} - - - - - {`${t('label.assignee-plural')} `} - - - - {thread?.task?.assignees?.length === 1 ? ( -
- -
- -
-
- - {getEntityName(thread?.task?.assignees[0])} - -
- ) : ( - - )} - - - - - - {' '} - {`${t('label.severity')} `} - - - - - - - {isResolved && ( - - - {`${t( - 'label.failure-reason' - )}: `} - - )} - {isResolved && ( - - - {latestTestCaseResolutionStatus?.testCaseResolutionStatusDetails - ?.testCaseFailureReason ?? NO_DATA_PLACEHOLDER} - - - )} - {isResolved && ( - - - - {' '} - {`${t('label.failure-comment')} `} - - - )} - {isResolved && ( - - - - )} - -
- {isTestCaseResolutionLoading ? ( - - ) : ( - - )} -
- -
-
- ); -}; - -export default TaskTabIncidentManagerHeaderNew; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/mocks/SearchIndexSummary.mock.ts b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/mocks/SearchIndexSummary.mock.ts deleted file mode 100644 index 2f9d3ad9ef59..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/mocks/SearchIndexSummary.mock.ts +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright 2023 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - DataType, - LabelType, - SearchIndex, - SearchServiceType, - State, - TagSource, -} from '../../../../generated/entity/data/searchIndex'; - -export const mockSearchIndexEntityDetails: SearchIndex = { - id: 'e157b054-e9d1-428b-97b6-12a36d6c1146', - name: 'table_search_index', - fullyQualifiedName: 'testES.table_search_index', - displayName: 'table_search_index_new', - version: 1.6, - updatedAt: 1694592004058, - updatedBy: 'ingestion-bot', - service: { - id: 'fb1bd626-d560-4a7f-8db1-aba7d2e6698b', - type: 'searchService', - name: 'testES', - fullyQualifiedName: 'testES', - description: '', - deleted: false, - href: 'http://localhost:8585/api/v1/services/storageServices/fb1bd626-d560-4a7f-8db1-aba7d2e6698b', - }, - serviceType: SearchServiceType.ElasticSearch, - fields: [ - { - name: 'column_suggest', - dataType: DataType.Completion, - fullyQualifiedName: 'testES.table_search_index.column_suggest', - tags: [], - }, - { - name: 'columns', - dataType: DataType.Object, - fullyQualifiedName: 'testES.table_search_index.columns', - tags: [], - children: [ - { - name: 'arrayDataType', - dataType: DataType.Text, - fullyQualifiedName: 'testES.table_search_index.columns.arrayDataType', - tags: [], - }, - { - name: 'children', - dataType: DataType.Object, - fullyQualifiedName: 'testES.table_search_index.columns.children', - tags: [], - children: [ - { - name: 'children', - dataType: DataType.Object, - fullyQualifiedName: - 'testES.table_search_index.columns.children.children', - tags: [], - children: [ - { - name: 'dataLength', - dataType: DataType.Unknown, - fullyQualifiedName: - 'testES.table_search_index.columns.children.children.dataLength', - tags: [], - }, - { - name: 'dataType', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.children.children.dataType', - tags: [], - }, - ], - }, - { - name: 'constraint', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.children.constraint', - tags: [], - }, - { - name: 'dataLength', - dataType: DataType.Unknown, - fullyQualifiedName: - 'testES.table_search_index.columns.children.dataLength', - tags: [], - }, - { - name: 'dataType', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.children.dataType', - tags: [], - }, - { - name: 'dataTypeDisplay', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.children.dataTypeDisplay', - tags: [], - }, - { - name: 'description', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.children.description', - tags: [], - }, - { - name: 'fullyQualifiedName', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.children.fullyQualifiedName', - tags: [], - }, - { - name: 'name', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.children.name', - tags: [], - }, - ], - }, - { - name: 'constraint', - dataType: DataType.Text, - fullyQualifiedName: 'testES.table_search_index.columns.constraint', - tags: [], - }, - { - name: 'dataLength', - dataType: DataType.Unknown, - fullyQualifiedName: 'testES.table_search_index.columns.dataLength', - tags: [], - }, - { - name: 'dataType', - dataType: DataType.Text, - fullyQualifiedName: 'testES.table_search_index.columns.dataType', - tags: [], - }, - { - name: 'dataTypeDisplay', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.dataTypeDisplay', - tags: [], - }, - { - name: 'description', - dataType: DataType.Text, - fullyQualifiedName: 'testES.table_search_index.columns.description', - tags: [], - }, - { - name: 'fullyQualifiedName', - dataType: DataType.Text, - fullyQualifiedName: - 'testES.table_search_index.columns.fullyQualifiedName', - tags: [], - }, - { - name: 'name', - dataType: DataType.Keyword, - fullyQualifiedName: 'testES.table_search_index.columns.name', - tags: [], - }, - { - name: 'ordinalPosition', - dataType: DataType.Unknown, - fullyQualifiedName: - 'testES.table_search_index.columns.ordinalPosition', - tags: [], - }, - ], - }, - { - name: 'dataProducts', - dataType: DataType.Keyword, - fullyQualifiedName: 'testES.table_search_index.dataProducts', - tags: [], - }, - { - name: 'database', - dataType: DataType.Object, - fullyQualifiedName: 'testES.table_search_index.database', - tags: [], - }, - { - name: 'name', - dataType: DataType.Text, - fullyQualifiedName: 'testES.table_search_index.name', - tags: [], - }, - ], - searchIndexSettings: { - index: { - uuid: '3DqvLSVTRR2Cc8biJleHaA', - routing: { - allocation: { - include: { - _tier_preference: 'data_content', - }, - }, - }, - version: { - created: '7160399', - }, - analysis: { - filter: { - om_stemmer: { - name: 'english', - type: 'stemmer', - }, - }, - analyzer: { - om_ngram: { - filter: ['lowercase'], - max_gram: '2', - min_gram: '1', - tokenizer: 'ngram', - }, - om_analyzer: { - filter: ['lowercase', 'om_stemmer'], - tokenizer: 'letter', - }, - }, - normalizer: { - lowercase_normalizer: { - type: 'custom', - filter: ['lowercase'], - char_filter: [], - }, - }, - }, - creation_date: '1694572027496', - provided_name: 'table_search_index', - number_of_shards: '1', - number_of_replicas: '1', - }, - }, - followers: [], - tags: [ - { - tagFQN: 'PersonalData.Personal', - description: - 'Data that can be used to directly or indirectly identify a person.', - source: TagSource.Classification, - labelType: LabelType.Manual, - state: State.Confirmed, - }, - { - tagFQN: 'PII.Sensitive', - description: - 'PII which if lost, compromised, or disclosed without authorization, could result in substantial harm, embarrassment, inconvenience, or unfairness to an individual.', - source: TagSource.Classification, - labelType: LabelType.Manual, - state: State.Confirmed, - }, - ], - href: 'http://localhost:8585/api/v1/searchIndexes/e157b054-e9d1-428b-97b6-12a36d6c1146', - changeDescription: { - fieldsAdded: [], - fieldsUpdated: [], - fieldsDeleted: [ - { - name: 'fields.column_suggest.description', - oldValue: '', - }, - ], - previousVersion: 1.5, - }, - deleted: false, -}; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/WorkFlowTab/WorkFlowHistory.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/WorkFlowTab/WorkFlowHistory.interface.ts deleted file mode 100644 index 77e11a047ae1..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/WorkFlowTab/WorkFlowHistory.interface.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2025 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -interface WorkflowStage { - name: string; - startedAt: number; - endedAt: number; - tasks: string[]; - variables: Record; -} - -export interface WorkflowHistoryItem { - id: string; - workflowInstanceId: string; - workflowInstanceExecutionId: string; - workflowDefinitionId: string; - stage: WorkflowStage; - timestamp: number; - status: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'CANCELLED'; - exception?: string; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePageOwners/KnowledgePageOwners.tsx b/openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePageOwners/KnowledgePageOwners.tsx deleted file mode 100644 index 0499fb8544fa..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePageOwners/KnowledgePageOwners.tsx +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2026 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Button, Space, Tooltip, Typography } from 'antd'; -import classNames from 'classnames'; -import { FC } from 'react'; -import { useTranslation } from 'react-i18next'; -import { ReactComponent as EditIcon } from '../../../assets/svg/edit-new.svg'; -import { ReactComponent as PlusIcon } from '../../../assets/svg/plus-primary.svg'; -import TagButton from '../../../components/common/TagButton/TagButton.component'; -import { UserTeamSelectableList } from '../../../components/common/UserTeamSelectableList/UserTeamSelectableList.component'; -import { DE_ACTIVE_COLOR } from '../../../constants/constants'; -import { OperationPermission } from '../../../context/PermissionProvider/PermissionProvider.interface'; -import { TabSpecificField } from '../../../enums/entity.enum'; -import { Glossary } from '../../../generated/entity/data/glossary'; -import { EntityReference } from '../../../generated/entity/data/page'; -import { KnowledgePage } from '../../../interface/knowledge-center.interface'; -import { getOwnerVersionLabel } from '../../../utils/EntityVersionUtils'; - -interface KnowledgePageOwnersProps { - permissions: OperationPermission; - knowledgePage?: KnowledgePage; - onOwnerUpdate: (updatedOwners?: EntityReference[]) => Promise; -} - -const KnowledgePageOwners: FC = ({ - knowledgePage, - permissions, - onOwnerUpdate, -}) => { - const { t } = useTranslation(); - const hasOwners = knowledgePage?.owners && knowledgePage?.owners.length > 0; - const canEditOwners = permissions.EditOwners || permissions.EditAll; - const owners = knowledgePage?.owners ?? []; - - return ( - -
- - {t('label.owner-plural')} - - {canEditOwners && ( - - {hasOwners ? ( - -
- {hasOwners && ( - - {getOwnerVersionLabel( - knowledgePage as unknown as Glossary, - false, - TabSpecificField.OWNERS, - canEditOwners - )} - - )} -
- ); -}; - -export default KnowledgePageOwners; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModel.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModel.interface.ts deleted file mode 100644 index 913a232618d0..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModel.interface.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2023 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { OperationPermission } from '../../../context/PermissionProvider/PermissionProvider.interface'; -import { Mlmodel } from '../../../generated/entity/data/mlmodel'; - -export interface MlModelFeaturesListProp { - mlFeatures: Mlmodel['mlFeatures']; - permissions: OperationPermission; - handleFeaturesUpdate: (features: Mlmodel['mlFeatures']) => Promise; - isDeleted?: boolean; - entityFqn: string; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Modals/VersionIndicatorIcon.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Modals/VersionIndicatorIcon.component.tsx deleted file mode 100644 index 881dc6f1d6bb..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Modals/VersionIndicatorIcon.component.tsx +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2022 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { VersionIndicatorInterface } from './VersionIndicatorIcon.interface'; - -export const VersionIndicatorIcon = ({ - fill, - style, -}: VersionIndicatorInterface) => { - return ( - - - - ); -}; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Modals/VersionIndicatorIcon.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Modals/VersionIndicatorIcon.interface.ts deleted file mode 100644 index 72b86844336f..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/Modals/VersionIndicatorIcon.interface.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2022 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { CSSProperties } from 'react'; - -export interface VersionIndicatorInterface { - fill: string; - style?: CSSProperties; -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/MyTaskWidget/MyTaskWidget.constants.ts b/openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/MyTaskWidget/MyTaskWidget.constants.ts deleted file mode 100644 index d3a23ef5b59b..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/MyTaskWidget/MyTaskWidget.constants.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2025 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { t } from '../../../../utils/i18next/LocalUtil'; - -export const MY_TASK_SORT_BY_KEYS = { - LATEST: 'latest', - A_TO_Z: 'a-to-z', - Z_TO_A: 'z-to-a', -}; - -export const MY_TASK_SORT_BY_OPTIONS = [ - { - key: MY_TASK_SORT_BY_KEYS.LATEST, - label: t('label.latest'), - }, - { - key: MY_TASK_SORT_BY_KEYS.A_TO_Z, - label: t('label.a-to-z'), - }, - { - key: MY_TASK_SORT_BY_KEYS.Z_TO_A, - label: t('label.z-to-a'), - }, -]; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV2/PageLayoutV2.tsx b/openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV2/PageLayoutV2.tsx deleted file mode 100644 index ad79d6571d60..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV2/PageLayoutV2.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2026 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import classNames from 'classnames'; -import { FC, ReactNode } from 'react'; -import DocumentTitle from '../common/DocumentTitle/DocumentTitle'; - -interface PageLayoutV2Props { - children: ReactNode; - pageTitle: string; - className?: string; - mainContainerClassName?: string; -} - -const PageLayoutV2: FC = ({ - children, - pageTitle, - className, - mainContainerClassName, -}) => { - return ( - <> - -
-
- {children} -
-
- - ); -}; - -export default PageLayoutV2; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FilterConfiguration/FilterConfiguration.tsx b/openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FilterConfiguration/FilterConfiguration.tsx deleted file mode 100644 index c8e327255ce3..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FilterConfiguration/FilterConfiguration.tsx +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2025 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import Icon from '@ant-design/icons'; -import { - Button, - Checkbox, - Col, - Divider, - Dropdown, - Row, - Typography, -} from 'antd'; -import { startCase } from 'lodash'; -import { useMemo, useState } from 'react'; -import { useTranslation } from 'react-i18next'; -import { ReactComponent as CloseIcon } from '../../../assets/svg/close.svg'; -import { ReactComponent as FilterIcon } from '../../../assets/svg/filter-primary.svg'; -import { DATA_ASSET_DROPDOWN_ITEMS } from '../../../constants/AdvancedSearch.constants'; -import { EntityFields } from '../../../enums/AdvancedSearch.enum'; -import './filter-configuration.less'; - -const FilterConfiguration = () => { - const { t } = useTranslation(); - const [visible, setVisible] = useState(false); - const [checkedItems, setCheckedItems] = useState([]); - - const entityFields = useMemo( - () => - Object.entries(EntityFields).map(([key, field]) => ({ - fieldName: field, - label: startCase(key.toLowerCase()), - })), - [] - ); - - const menuItems = useMemo( - () => ({ - items: entityFields.map((field) => ({ - key: field.fieldName, - label: ( - handleCheckboxChange(field.fieldName)}> - {field.label} - - ), - })), - className: 'menu-items', - }), - [entityFields, checkedItems] - ); - - const handleCheckboxChange = (fieldName: string) => { - setCheckedItems((prev) => - prev.includes(fieldName) - ? prev.filter((item) => item !== fieldName) - : [...prev, fieldName] - ); - }; - - return ( - - - - {t('label.filters-configuration')} - - - - triggerNode.parentElement!} - menu={menuItems} - open={visible} - placement="bottomLeft" - trigger={['click']} - onOpenChange={(flag) => setVisible(flag)}> - - - - {DATA_ASSET_DROPDOWN_ITEMS.map((value) => ( -
- {t(value.label)} - -
- ))} - -
- ); -}; - -export default FilterConfiguration; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOObjectFieldTemplate/SSOObjectFieldTemplate.tsx b/openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOObjectFieldTemplate/SSOObjectFieldTemplate.tsx deleted file mode 100644 index b38928692b21..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOObjectFieldTemplate/SSOObjectFieldTemplate.tsx +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright 2025 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { PlusOutlined } from '@ant-design/icons'; -import { - ObjectFieldTemplatePropertyType, - ObjectFieldTemplateProps, -} from '@rjsf/utils'; -import { Button, Space } from 'antd'; -import classNames from 'classnames'; -import { isEmpty, isUndefined } from 'lodash'; -import { createElement, Fragment, FunctionComponent } from 'react'; -import { ADVANCED_PROPERTIES } from '../../../constants/Services.constant'; -import serviceUtilClassBase from '../../../utils/ServiceUtilClassBase'; -import './sso-object-field-template.less'; - -interface PropertyMap { - advancedProperties: ObjectFieldTemplatePropertyType[]; - normalProperties: ObjectFieldTemplatePropertyType[]; -} - -interface FieldGroup { - title: string; - properties: ObjectFieldTemplatePropertyType[]; - className?: string; -} - -export const SSOObjectFieldTemplate: FunctionComponent< - ObjectFieldTemplateProps -> = (props: ObjectFieldTemplateProps) => { - const { formContext, idSchema, title, onAddClick, schema, properties } = - props; - - const { advancedProperties, normalProperties } = properties.reduce( - (propertyMap, currentProperty) => { - const isAdvancedProperty = ADVANCED_PROPERTIES.includes( - currentProperty.name - ); - - let advancedProperties = [...propertyMap.advancedProperties]; - let normalProperties = [...propertyMap.normalProperties]; - - if (isAdvancedProperty) { - advancedProperties = [...advancedProperties, currentProperty]; - } else { - normalProperties = [...normalProperties, currentProperty]; - } - - return { ...propertyMap, advancedProperties, normalProperties }; - }, - { - advancedProperties: [], - normalProperties: [], - } as PropertyMap - ); - - const { - properties: updatedNormalProperties, - additionalField: AdditionalField, - additionalFieldContent, - } = serviceUtilClassBase.getProperties(normalProperties); - - // Define field groups for SSO forms - const getFieldGroups = ( - properties: ObjectFieldTemplatePropertyType[] - ): FieldGroup[] => { - const groups: FieldGroup[] = []; - - // Basic Configuration Group - const basicFields = properties.filter((prop) => - ['clientType', 'clientId', 'callbackUrl'].includes(prop.name) - ); - if (basicFields.length > 0) { - groups.push({ - title: 'Basic Configuration', - properties: basicFields, - className: 'sso-field-group', - }); - } - - // Token & Security Group - const securityFields = properties.filter((prop) => - [ - 'publicKeyUrls', - 'tokenValidationAlgorithm', - 'authority', - 'secret', - 'clientSecret', - 'secretKey', - ].includes(prop.name) - ); - if (securityFields.length > 0) { - groups.push({ - title: 'Token & Security', - properties: securityFields, - className: 'sso-field-group', - }); - } - - // User Management Group - const userFields = properties.filter((prop) => - [ - 'jwtPrincipalClaims', - 'principalDomain', - 'adminPrincipals', - 'enableSelfSignup', - ].includes(prop.name) - ); - if (userFields.length > 0) { - groups.push({ - title: 'User Management', - properties: userFields, - className: 'sso-field-group', - }); - } - - // Any remaining fields go into "Other Configuration" - const groupedFieldNames = [ - ...basicFields, - ...securityFields, - ...userFields, - ].map((p) => p.name); - const otherFields = properties.filter( - (prop) => !groupedFieldNames.includes(prop.name) - ); - if (otherFields.length > 0) { - groups.push({ - title: 'Other Configuration', - properties: otherFields, - className: 'sso-field-group', - }); - } - - return groups; - }; - - const fieldGroups = getFieldGroups(updatedNormalProperties); - - const fieldElement = ( - - - - - {schema.additionalProperties && ( -