diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx index de4450acd767..44ec2338af5d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx @@ -1045,13 +1045,7 @@ const TeamDetailsV1 = ({ const tabs = useMemo( () => - getTabs( - currentTeam, - isGroupType, - isOrganization, - teamCount, - assetsCount - ).map((tab) => ({ + getTabs(currentTeam, isGroupType, teamCount, assetsCount).map((tab) => ({ ...tab, label: ( { @@ -52,13 +51,9 @@ export const getTabs = ( const commonTabs = [tabs.roles, tabs.policies]; - if (isOrganization) { - return [tabs.teams, ...commonTabs]; - } - if (isGroupType) { return [tabs.users, tabs.assets, ...commonTabs]; } - return [tabs.teams, tabs.users, ...commonTabs]; + return [tabs.teams, ...commonTabs]; }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.component.tsx index 3b770c933c78..86f6c7e199fa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.component.tsx @@ -10,7 +10,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { CheckOutlined, CloseOutlined } from '@ant-design/icons'; +import { + CheckOutlined, + CloseOutlined, + InfoCircleOutlined, +} from '@ant-design/icons'; import { Button, Divider, Form, Input, Space, Tooltip, Typography } from 'antd'; import { isEmpty, last } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; @@ -18,6 +22,7 @@ import { useTranslation } from 'react-i18next'; import { ReactComponent as EditIcon } from '../../../../../assets/svg/edit-new.svg'; import { DE_ACTIVE_COLOR, + GRAYED_OUT_COLOR, ICON_DIMENSION, NO_DATA_PLACEHOLDER, } from '../../../../../constants/constants'; @@ -314,6 +319,29 @@ const TeamsInfo = ({ updateTeamSubscription={updateTeamSubscription} /> {teamTypeElement} + + + + + + + {t('label.total-user-plural')} + + + + {' : '} + + + + {currentTeam.userCount} + + ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.test.tsx index cfe41383333d..93bfc192e34e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsInfo.test.tsx @@ -93,8 +93,10 @@ describe('TeamsInfo', () => { render(); }); const domainLabel = screen.getByText('DomainLabel'); + const userCount = screen.getByTestId('team-user-count'); expect(domainLabel).toBeInTheDocument(); + expect(userCount).toContainHTML('1'); }); it('should handle edit team email', () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json index 7ede75ac2c73..093cf689ee6f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "Gesamte {{entity}}", "total-index-sent": "Gesamtindex gesendet", + "total-user-plural": "Total Users", "tour": "Tour", "tracking": "Verfolgung", "transportation-strategy": "Transportstrategie", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "Das Löschen von systemgenerierten Tags ist nicht zulässig. Sie können versuchen, den Tag stattdessen zu deaktivieren.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "Machen Sie eine Produkttour, um loszulegen!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "Team erfolgreich verschoben!", "team-no-asset": "Ihr Team hat keine Vermögenswerte.", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 7cf7279dd766..21385e8474bd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "Total {{entity}}", "total-index-sent": " Total index sent", + "total-user-plural": "Total Users", "tour": "Tour", "tracking": "Tracking", "transportation-strategy": "Transportation Strategy", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "Deleting a system generated tags is not allowed. You can try disabling the tag instead.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "Take a product tour to get started!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "Team moved successfully!", "team-no-asset": "Your team does not have any assets.", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json index a7b6c3eb2ea1..01cd9c0a69e9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "Total de {{entity}}", "total-index-sent": "Total de índices enviados", + "total-user-plural": "Total Users", "tour": "Recorrido", "tracking": "Seguimiento", "transportation-strategy": "Estrategia de transporte", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "No se permite eliminar una etiqueta generada por el sistema. Puedes intentar desactivar la etiqueta en su lugar.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "¡Realiza un recorrido rápido del producto para comenzar!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "¡Equipo movido con éxito!", "team-no-asset": "Tu equipo no tiene ningún activo.", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json index f7c323534b53..d05554dda413 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "Total {{entity}}", "total-index-sent": "Total d'Index Envoyés", + "total-user-plural": "Total Users", "tour": "Visite", "tracking": "Suivi", "transportation-strategy": "Stratégie de Transport", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "Supprimer un tag système n'est pas permis. Tentez plutôt de désactiver ce tag.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "Faites une visite guidée pour vous lancer!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "L'équipe a été déplacée avec succès !", "team-no-asset": "Votre équipe n'a pas d'actifs de données", "test-case-schedule-description": "Les tests de quelité de données peuvent être planifiés pour tourner à la fréquence désirée. La timezone est en UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json index 7e6b4580c659..3aee20bbada1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "סך הכל {{entity}}", "total-index-sent": "סך הכל שלח אינדקס", + "total-user-plural": "Total Users", "tour": "סיור", "tracking": "מעקב", "transportation-strategy": "אסטרטגיית הובלה", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "מחיקת תגיות שנוצרו באופן מערכתי אינה מותרת. ניתן לנסות לנטרל את התג במקום.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "התחל סיור במוצר כדי להתחיל!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "הקבוצה הועברה בהצלחה!", "team-no-asset": "לקבוצתך אין נכסים.", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json index b810ae443db0..161da826fb29 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "合計 {{entity}}", "total-index-sent": " Total index sent", + "total-user-plural": "Total Users", "tour": "ツアー", "tracking": "トラッキング", "transportation-strategy": "Transportation Strategy", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "Deleting a system generated tags is not allowed. You can try disabling the tag instead.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "Take a product tour to get started!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "チームの移動が成功しました!", "team-no-asset": "あなたのチームはアセットを持っていません。", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json index 9a8df974dc79..b2771ca336a2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "{{entity}} totaal", "total-index-sent": "Index verzonden totaal", + "total-user-plural": "Total Users", "tour": "Rondleiding", "tracking": "Tracking", "transportation-strategy": "Transportstrategie", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "Het verwijderen van door het systeem gegenereerde tags is niet toegestaan. Je kunt proberen de tag uit te schakelen.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "Maak een producttour om aan de slag te gaan!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "Team succesvol verplaatst!", "team-no-asset": "Je team heeft geen assets.", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json index 219d7edd97d7..5be70353807e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json @@ -1238,6 +1238,7 @@ "total": "مجموع", "total-entity": "مجموع {{entity}}", "total-index-sent": "مجموع ایندکس ارسال‌شده", + "total-user-plural": "Total Users", "tour": "تور", "tracking": "ردیابی", "transportation-strategy": "استراتژی حمل و نقل", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "حذف برچسب‌های تولید شده توسط سیستم مجاز نیست. می‌توانید برچسب را غیرفعال کنید.", "tag-update-confirmation": "آیا می‌خواهید به‌روزرسانی برچسب‌ها را ادامه دهید؟", "take-quick-product-tour": "یک تور محصولی برای شروع بگذارید!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "تیم با موفقیت منتقل شد!", "team-no-asset": "تیم شما هیچ دارایی ندارد.", "test-case-schedule-description": "آزمون‌های کیفیت داده می‌توانند به صورت دوره‌ای برنامه‌ریزی شوند. منطقه زمانی به صورت UTC است.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json index d10839ef589b..1064f642ea9e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "Total de {{entity}}", "total-index-sent": " Total de índice enviado", + "total-user-plural": "Total Users", "tour": "Tour", "tracking": "Rastreamento", "transportation-strategy": "Estratégia de Transporte", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "Não é permitido excluir tags geradas pelo sistema. Você pode tentar desativar a tag em vez disso.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "Faça um tour pelo produto para começar!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "Equipe movida com sucesso!", "team-no-asset": "Sua equipe não possui ativos.", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json index c057687dc212..16bae15c91d7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "Все {{entity}}", "total-index-sent": "Все индексы отправлены", + "total-user-plural": "Total Users", "tour": "Руководство пользователя", "tracking": "Отслеживание", "transportation-strategy": "Стратегия транспортировки", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "Удаление сгенерированных системой тегов не допускается. Вместо этого вы можете попробовать отключить тег.", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "Ознакомьтесь с продуктом, чтобы начать работу!", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "Команда успешно переехала!", "team-no-asset": "У вашей команды нет объектов.", "test-case-schedule-description": "The data quality tests can be scheduled to run at the desired frequency. The timezone is in UTC.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json index b3d2e527c351..48c81a510e9f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json @@ -1238,6 +1238,7 @@ "total": "Total", "total-entity": "所有{{entity}}", "total-index-sent": "已发送的索引", + "total-user-plural": "Total Users", "tour": "导览", "tracking": "跟踪", "transportation-strategy": "传输协议", @@ -1821,6 +1822,7 @@ "system-tag-delete-disable-message": "无法删除系统默认的标签, 您可以尝试禁用标签", "tag-update-confirmation": "Would you like to proceed with updating the tags?", "take-quick-product-tour": "快速查看产品导览", + "team-distinct-user-description": "The total number of distinct users belongs to this team.", "team-moved-success": "团队移动成功", "team-no-asset": "您的团队没有任何资产", "test-case-schedule-description": "数据质控测试可按所需频率安排运行, 时区为 UTC", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.test.tsx index 8bf748ceefff..3be4d2ebe3b7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.test.tsx @@ -154,13 +154,17 @@ describe('Test Teams Page', () => { expect(mockGetTeamByName.mock.calls[0]).toEqual([ 'test', - { fields: ['users', 'parents', 'profile', 'owners'], include: 'all' }, + { + fields: ['users', 'userCount', 'parents', 'profile', 'owners'], + include: 'all', + }, ]); expect(mockGetTeamByName.mock.calls[1]).toEqual([ 'test', { fields: [ 'users', + 'userCount', 'defaultRoles', 'policies', 'childrenCount', diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.tsx index 5ac5f79e0ce6..810db6799832 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TeamsPage/TeamsPage.tsx @@ -218,6 +218,7 @@ const TeamsPage = () => { const data = await getTeamByName(name, { fields: [ TabSpecificField.USERS, + TabSpecificField.USER_COUNT, TabSpecificField.PARENTS, TabSpecificField.PROFILE, TabSpecificField.OWNERS, @@ -242,6 +243,7 @@ const TeamsPage = () => { const data = await getTeamByName(name, { fields: [ TabSpecificField.USERS, + TabSpecificField.USER_COUNT, TabSpecificField.DEFAULT_ROLES, TabSpecificField.POLICIES, TabSpecificField.CHILDREN_COUNT,