From 6a85b34e3cb71b0d041fb4662b29fc5cf2887139 Mon Sep 17 00:00:00 2001 From: Aniket Katkar <51777795+aniketkatkar97@users.noreply.github.com> Date: Fri, 26 Aug 2022 14:14:08 +0530 Subject: [PATCH] Fix #6893 : UI improvements and bug fixes 1 (#6934) * Fix #6893 : UI improvements and bug fixes * Fixed failing unit tests * worked on comments to make common styling for left panel --- .../ui/src/assets/svg/service-icon-mlflow.svg | 11 ++++ .../DatasetDetails.component.tsx | 7 ++- .../components/Explore/Explore.component.tsx | 62 +++++++++---------- .../GlobalSetting/GlobalSetting.less | 4 +- .../GlobalSetting/GlobalSettingLeftPanel.tsx | 2 +- .../Ingestion/Ingestion.component.tsx | 40 ++++++++---- .../MlModelDetail/MlModelFeaturesList.tsx | 3 +- .../TableProfiler/TableProfilerV1.test.tsx | 3 + .../TableProfiler/TableProfilerV1.tsx | 36 ++++++----- .../ui/src/constants/services.const.ts | 2 +- .../resources/ui/src/pages/tags/index.tsx | 1 + .../main/resources/ui/src/styles/x-master.css | 18 +++++- 12 files changed, 119 insertions(+), 70 deletions(-) create mode 100644 openmetadata-ui/src/main/resources/ui/src/assets/svg/service-icon-mlflow.svg diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/service-icon-mlflow.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/service-icon-mlflow.svg new file mode 100644 index 00000000000..575781a05b4 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/service-icon-mlflow.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx index f17b9c1ef41..1b10da5927a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DatasetDetails/DatasetDetails.component.tsx @@ -11,6 +11,7 @@ * limitations under the License. */ +import { Empty } from 'antd'; import classNames from 'classnames'; import { isEqual, isNil, isUndefined } from 'lodash'; import { ColumnJoins, EntityTags, ExtraInfo } from 'Models'; @@ -709,7 +710,7 @@ const DatasetDetails: React.FC = ({ )} {activeTab === 4 && (
{!isUndefined(tableQueries) && tableQueries.length > 0 ? ( @@ -722,9 +723,9 @@ const DatasetDetails: React.FC = ({ ) : (
- No queries data available. + No queries data available

} />
)}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx index fd486af738d..ab7d448097a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx @@ -669,38 +669,36 @@ const Explore: React.FC = ({ const fetchLeftPanel = () => { return ( -
- - -
- -
-
- {!error && ( - - )} - - -
+ + +
+ +
+
+ {!error && ( + + )} + + ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.less b/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.less index 97597c6663e..82d94f30ba6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.less @@ -19,9 +19,7 @@ .global-setting-left-panel.ant-menu-root.ant-menu-inline { background: @background-color; - border: 1px solid @left-panel-border-color; - border-radius: 4px; - box-shadow: 1px 1px 8px @box-shadow-color; + border: 0px; overflow: hidden; .ant-menu-item::after { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSettingLeftPanel.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSettingLeftPanel.tsx index a3049a956bc..f69b5a1d67d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSettingLeftPanel.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSettingLeftPanel.tsx @@ -55,7 +55,7 @@ const GlobalSettingLeftPanel = () => { }; return ( -
+
= ({ )}
) : ( -
- {isRequiredDetailsAvailable && ingestionList.length === 0 && ( -
-

- {`No ingestion workflows found ${ - searchText ? `for "${searchText}"` : '' - }`} -

-
- )} -
+ isRequiredDetailsAvailable && + ingestionList.length === 0 && ( +
+ +

No ingestion data available

+

+ To view Ingestion Data, run the MetaData Ingestion. Please + refer to this doc to schedule the{' '} + + MetaData Ingestion + +

+ + } + /> +
+ ) )}
); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelFeaturesList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelFeaturesList.tsx index 8936060d157..5fc9db7f729 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelFeaturesList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelFeaturesList.tsx @@ -12,6 +12,7 @@ */ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { Empty } from 'antd'; import classNames from 'classnames'; import { isEmpty, uniqueId } from 'lodash'; import { EntityTags, TagOption } from 'Models'; @@ -351,7 +352,7 @@ const MlModelFeaturesList: FC = ({ } else { return (
- No features data available + No features data available

} />
); } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.test.tsx index 3295f636fb3..5ded40bd256 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.test.tsx @@ -49,6 +49,9 @@ jest.mock('antd', () => ({ .mockImplementation(({ children, ...props }) => (
{children}
)), + Empty: jest + .fn() + .mockImplementation(({ description }) =>
{description}
), })); // mock internel imports diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx index dde41ba0bae..8df4eb6e6ca 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfilerV1.tsx @@ -11,7 +11,7 @@ * limitations under the License. */ -import { Button, Col, Row } from 'antd'; +import { Button, Col, Empty, Row } from 'antd'; import { AxiosError } from 'axios'; import classNames from 'classnames'; import { isEmpty, isUndefined } from 'lodash'; @@ -126,21 +126,27 @@ const TableProfilerV1: FC = ({ table, onAddTestClick }) => { if (isUndefined(profile)) { return (
- - Data Profiler is an optional configuration in Ingestion. Please enable - the data profiler by following the documentation - - - here. - + + + Data Profiler is an optional configuration in Ingestion. Please + enable the data profiler by following the documentation + + + here. + +

+ } + />
); } diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/services.const.ts b/openmetadata-ui/src/main/resources/ui/src/constants/services.const.ts index 88f061f4a2a..3a14e94ec4e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/constants/services.const.ts +++ b/openmetadata-ui/src/main/resources/ui/src/constants/services.const.ts @@ -34,7 +34,6 @@ import kafka from '../assets/img/service-icon-kafka.png'; import looker from '../assets/img/service-icon-looker.png'; import mariadb from '../assets/img/service-icon-mariadb.png'; import metabase from '../assets/img/service-icon-metabase.png'; -import mlflow from '../assets/img/service-icon-mlflow.png'; import mode from '../assets/img/service-icon-mode.png'; import mssql from '../assets/img/service-icon-mssql.png'; import oracle from '../assets/img/service-icon-oracle.png'; @@ -61,6 +60,7 @@ import dashboardDefault from '../assets/svg/dashboard.svg'; import iconDefaultService from '../assets/svg/default-service-icon.svg'; import pipelineDefault from '../assets/svg/pipeline.svg'; import plus from '../assets/svg/plus.svg'; +import mlflow from '../assets/svg/service-icon-mlflow.svg'; import topicDefault from '../assets/svg/topic.svg'; import { ServiceCategory } from '../enums/service.enum'; import { DashboardServiceType } from '../generated/entity/services/dashboardService'; diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx index bcbe4c1cb7c..8e234df2fad 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx @@ -415,6 +415,7 @@ const TagsPage = () => { const fetchLeftPanel = () => { return (