diff --git a/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js
index a20537e946e..8e45fc3c18b 100644
--- a/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js
+++ b/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js
@@ -11,7 +11,7 @@
* limitations under the License.
*/
-import { addNewTagToEntity } from '../../common/common';
+import { searchEntity } from '../../common/common';
import { DELETE_TERM, NEW_GLOSSARY, NEW_GLOSSARY_TERMS, SEARCH_ENTITY_TABLE } from '../../constants/constants';
const createGlossaryTerm = (term) => {
@@ -227,6 +227,11 @@ describe('Glossary page should work properly', () => {
.as('synonyms');
cy.get('@synonyms').clear();
cy.get('@synonyms').type(uSynonyms);
+
+ cy.intercept({ method: 'PATCH', url: '/api/v1/glossaryTerms/*' }).as(
+ 'getGlossary'
+ );
+
cy.get('[data-testid="saveAssociatedTag"]').should('be.visible').click();
cy.wait(100);
cy.get('[data-testid="synonyms-container"]')
@@ -237,6 +242,8 @@ describe('Glossary page should work properly', () => {
cy.get('@synonyms-container').contains(synonym).should('be.visible');
});
+ cy.wait('@getGlossary').its('response.statusCode').should('eq', 200);
+
// updating References
cy.get('[data-testid="section-references"] [data-testid="add-button"]')
.should('exist')
@@ -316,6 +323,7 @@ describe('Glossary page should work properly', () => {
});
it('Assets Tab should work properly', () => {
+ const glossary = NEW_GLOSSARY.name;
const term = NEW_GLOSSARY_TERMS.term_1.name;
const entity = SEARCH_ENTITY_TABLE.table_3.term;
goToAssetsTab(term);
@@ -323,7 +331,46 @@ describe('Glossary page should work properly', () => {
.contains('No assets available.')
.should('be.visible');
- addNewTagToEntity(entity, term);
+ searchEntity(entity);
+ cy.wait(500);
+ cy.get('[data-testid="table-link"]').first().contains(entity).click();
+
+ //Add tag to breadcrumb
+ cy.get('[data-testid="tag-container"] [data-testid="tags"]')
+ .eq(0)
+ .should('be.visible')
+ .click();
+ cy.get('[class*="-control"]').should('be.visible').type(term);
+ cy.wait(500);
+ cy.get('[id*="-option-0"]').should('be.visible').click();
+ cy.get(
+ '[data-testid="tags-wrapper"] [data-testid="tag-container"]'
+ ).contains(term);
+ cy.get('[data-testid="saveAssociatedTag"]').should('be.visible').click();
+ cy.wait(1000);
+
+ cy.get('[data-testid="entity-tags"]')
+ .scrollIntoView()
+ .should('be.visible')
+ .contains(term);
+
+ //Add tag to schema table
+ cy.get('[data-testid="tag-container"] [data-testid="tags"]')
+ .eq(0)
+ .should('be.visible')
+ .click();
+ cy.get('[class*="-control"]').should('be.visible').type(term);
+ cy.wait(500);
+ cy.get('[id*="-option-0"]').should('be.visible').click();
+ cy.get(
+ '[data-testid="tags-wrapper"] [data-testid="tag-container"]'
+ ).contains(term);
+ cy.get('[data-testid="saveAssociatedTag"]').should('be.visible').click();
+ cy.wait(1000);
+ cy.get(`[data-testid="tag-${glossary}.${term}"]`)
+ .scrollIntoView()
+ .should('be.visible')
+ .contains(term);
cy.get('[data-testid="appbar-item-glossary"]')
.should('exist')
@@ -353,34 +400,17 @@ describe('Glossary page should work properly', () => {
.scrollIntoView()
.should('be.visible')
.click();
- cy.get(':nth-child(1) > .css-xb97g8')
- .scrollIntoView()
- .should('be.visible')
- .click();
- cy.get(':nth-child(1) > .css-xb97g8')
- .scrollIntoView()
- .should('be.visible')
- .click();
+ cy.get('[role="button"]').eq(0).should('be.visible').click();
+ cy.get('[role="button"]').eq(0).should('be.visible').click();
cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click();
//Remove the added column tag from entity
- cy.get(
- ':nth-child(1) > :nth-child(5) span.tw-text-primary > [data-testid="tags"]'
- )
- .scrollIntoView()
- .should('be.visible')
- .click();
- cy.get(':nth-child(1) > .css-xb97g8')
- .scrollIntoView()
- .should('be.visible')
- .click();
- cy.get(':nth-child(1) > .css-xb97g8')
- .scrollIntoView()
- .should('be.visible')
- .click();
- cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click();
+ cy.get('[data-testid="remove"]').eq(0).should('be.visible').click();
+
+ cy.wait(500);
+ cy.get('[data-testid="remove"]').eq(0).should('be.visible').click();
cy.get('[data-testid="appbar-item-glossary"]')
.should('exist')
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 60b4e0eccbf..568edf5ca67 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
@@ -16,12 +16,14 @@ import { ItemType } from 'antd/lib/menu/hooks/useItems';
import { camelCase } from 'lodash';
import React, { useMemo } from 'react';
import { useHistory, useParams } from 'react-router-dom';
+import { GlobalSettingOptions } from '../../constants/globalSettings.constants';
+import { TeamType } from '../../generated/entity/teams/team';
import {
getGlobalSettingMenuItem,
getGlobalSettingsMenuWithPermission,
MenuList,
} from '../../utils/GlobalSettingsUtils';
-import { getSettingPath } from '../../utils/RouterUtils';
+import { getSettingPath, getTeamsWithFqnPath } from '../../utils/RouterUtils';
import { usePermissionProvider } from '../PermissionProvider/PermissionProvider';
const GlobalSettingLeftPanel = () => {
@@ -56,7 +58,11 @@ const GlobalSettingLeftPanel = () => {
const onClick: MenuProps['onClick'] = (e) => {
// As we are setting key as "category.option" and extracting here category and option
const [category, option] = e.key.split('.');
- history.push(getSettingPath(category, option));
+ if (option === GlobalSettingOptions.TEAMS) {
+ history.push(getTeamsWithFqnPath(TeamType.Organization));
+ } else {
+ history.push(getSettingPath(category, option));
+ }
};
return menuItems.length ? (
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx
index c760330bc82..a8ab2f22ebd 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx
@@ -15,6 +15,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
Button as ButtonAntd,
Col,
+ Empty,
Modal,
Row,
Space,
@@ -24,6 +25,7 @@ import {
Typography,
} from 'antd';
import { ColumnsType } from 'antd/lib/table';
+import { AxiosError } from 'axios';
import classNames from 'classnames';
import { compare } from 'fast-json-patch';
import { cloneDeep, isEmpty, isUndefined, orderBy } from 'lodash';
@@ -35,13 +37,15 @@ import {
getTeamAndUserDetailsPath,
getUserPath,
PAGE_SIZE,
- TITLE_FOR_NON_ADMIN_ACTION,
- TITLE_FOR_NON_OWNER_ACTION,
} from '../../constants/constants';
import {
GlobalSettingOptions,
GlobalSettingsMenuCategory,
} from '../../constants/globalSettings.constants';
+import {
+ NO_PERMISSION_FOR_ACTION,
+ NO_PERMISSION_TO_VIEW,
+} from '../../constants/HelperTextUtil';
import { EntityType } from '../../enums/entity.enum';
import { OwnerType } from '../../enums/user.enum';
import { Operation } from '../../generated/entity/policies/policy';
@@ -51,8 +55,8 @@ import {
User,
} from '../../generated/entity/teams/user';
import { EntityReference } from '../../generated/type/entityReference';
-import { useAuth } from '../../hooks/authHooks';
import { TeamDetailsProp } from '../../interface/teamsAndUsers.interface';
+import jsonData from '../../jsons/en';
import AddAttributeModal from '../../pages/RolesPage/AddAttributeModal/AddAttributeModal';
import UserCard from '../../pages/teams/UserCard';
import {
@@ -61,9 +65,10 @@ import {
hasEditAccess,
} from '../../utils/CommonUtils';
import { filterEntityAssets } from '../../utils/EntityUtils';
-import { hasPemission } from '../../utils/PermissionsUtils';
+import { checkPermission } from '../../utils/PermissionsUtils';
import { getSettingPath, getTeamsWithFqnPath } from '../../utils/RouterUtils';
import SVGIcons, { Icons } from '../../utils/SvgUtils';
+import { showErrorToast } from '../../utils/ToastUtils';
import { Button } from '../buttons/Button/Button';
import Description from '../common/description/Description';
import Ellipses from '../common/Ellipses/Ellipses';
@@ -71,14 +76,19 @@ import ManageButton from '../common/entityPageInfo/ManageButton/ManageButton';
import EntitySummaryDetails from '../common/EntitySummaryDetails/EntitySummaryDetails';
import ErrorPlaceHolder from '../common/error-with-placeholder/ErrorPlaceHolder';
import NextPrevious from '../common/next-previous/NextPrevious';
-import NonAdminAction from '../common/non-admin-action/NonAdminAction';
import Searchbar from '../common/searchbar/Searchbar';
import TabsPane from '../common/TabsPane/TabsPane';
import TitleBreadcrumb from '../common/title-breadcrumb/title-breadcrumb.component';
import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrumb.interface';
import Loader from '../Loader/Loader';
import ConfirmationModal from '../Modals/ConfirmationModal/ConfirmationModal';
+import { usePermissionProvider } from '../PermissionProvider/PermissionProvider';
+import {
+ OperationPermission,
+ ResourceEntity,
+} from '../PermissionProvider/PermissionProvider.interface';
import ListEntities from './RolesAndPoliciesList';
+import { getTabs } from './TeamDetailsV1.utils';
import TeamHierarchy from './TeamHierarchy';
import './teams.less';
interface AddAttribute {
@@ -109,14 +119,13 @@ const TeamDetailsV1 = ({
removeUserFromTeam,
afterDeleteAction,
}: TeamDetailsProp) => {
- const isOrganization =
- currentTeam.name === TeamType.Organization.toLowerCase();
+ const isOrganization = currentTeam.name === TeamType.Organization;
const DELETE_USER_INITIAL_STATE = {
user: undefined,
state: false,
leave: false,
};
- const { userPermissions } = useAuth();
+ const { permissions, getEntityPermission } = usePermissionProvider();
const [currentTab, setCurrentTab] = useState(1);
const [isHeadingEditing, setIsHeadingEditing] = useState(false);
const [currentUser, setCurrentUser] = useState
Would like to start adding some?
- - > - ) : null} +Would like to start adding some?
+ ) : (No Teams Added.