From 5bc73ced2842bdee1cf99f1d8d7ce2bbb788e99b Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Fri, 3 Dec 2021 20:57:26 +0530 Subject: [PATCH] Fix #1537 UI : Remove search from service page and reposition Add service with different service tabs. (#1538) * Fix #1537 UI : Remove search from service page and reposition Add service with different service tabs. * Fixed name overflow issue on user card. --- .../resources/ui/src/pages/services/index.tsx | 48 +++++++++---------- .../resources/ui/src/pages/teams/index.tsx | 5 +- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/services/index.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/services/index.tsx index a08e63cc5cc..4d1a48102ca 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/services/index.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/services/index.tsx @@ -13,7 +13,7 @@ import { AxiosError, AxiosResponse } from 'axios'; import classNames from 'classnames'; -import { isNil, isNull, lowerCase } from 'lodash'; +import { isNil, isNull } from 'lodash'; import { Paging, ServiceCollection, ServiceData, ServiceTypes } from 'Models'; import React, { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; @@ -28,7 +28,6 @@ import { Button } from '../../components/buttons/Button/Button'; import NextPrevious from '../../components/common/next-previous/NextPrevious'; import NonAdminAction from '../../components/common/non-admin-action/NonAdminAction'; import RichTextEditorPreviewer from '../../components/common/rich-text-editor/RichTextEditorPreviewer'; -import Searchbar from '../../components/common/searchbar/Searchbar'; import PageContainer from '../../components/containers/PageContainer'; import Loader from '../../components/Loader/Loader'; import { @@ -169,17 +168,7 @@ const ServicesPage = () => { ); } }; - const handleSearchAction = (searchValue: string) => { - setSearchText(searchValue); - const curServ = services[serviceName]; - const updatedResult = (curServ as unknown as Array).filter( - (serv) => - lowerCase(serv.description)?.includes(lowerCase(searchValue)) || - lowerCase(serv.name)?.includes(lowerCase(searchValue)) - ); - setServiceList(updatedResult); - setServicesCount({ ...servicesCount, [serviceName]: updatedResult.length }); - }; + const handleAddService = () => { setEditData(undefined); setIsModalOpen(true); @@ -480,19 +469,28 @@ const ServicesPage = () => { )} ))} +
+ {serviceList.length > 0 ? ( + + + + ) : null} +
-
-
- {searchText || serviceList.length > 0 ? ( - - ) : null} -
+ {/*
{serviceList.length > 0 ? ( { ) : null}
-
+
*/} {serviceList.length ? (
{ {currentTeam?.users?.map((user, index) => { const User = { description: user.displayName || user.name || '', - name: user.name || '', + name: getNameFromEmail(user.name || '') || '', id: user.id, }; @@ -345,7 +346,7 @@ const TeamsPage = () => { description: user.displayName || '', id: user.id, href: user.href, - name: user.name, + name: getNameFromEmail(user.name), type: 'user', }; });