mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-28 19:05:53 +00:00
fix(ui): remove teams root route and redirect it to Organization (#8767)
* fix(ui): remove teams root route and redirect it to Organization * update local string
This commit is contained in:
parent
345bd6c3ee
commit
89a12f3c05
@ -170,7 +170,7 @@ const TeamDetailsV1 = ({
|
||||
TitleBreadcrumbProps['titleLinks']
|
||||
>([]);
|
||||
const [addAttribute, setAddAttribute] = useState<AddAttribute>();
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [selectedEntity, setEntity] = useState<{
|
||||
attribute: 'defaultRoles' | 'policies';
|
||||
record: EntityReference;
|
||||
|
@ -275,6 +275,7 @@
|
||||
"data-insight-chart": "Data insight chart",
|
||||
"data-assets": "Data Assets",
|
||||
"app-analytics": "App Analytics",
|
||||
"no-team-found": "No team found.",
|
||||
"quality": "Quality",
|
||||
"insight": "Insight",
|
||||
"govern": "Govern"
|
||||
|
@ -36,7 +36,6 @@ import {
|
||||
ResourceEntity,
|
||||
} from '../../components/PermissionProvider/PermissionProvider.interface';
|
||||
import TeamDetailsV1 from '../../components/TeamDetails/TeamDetailsV1';
|
||||
import Teams from '../../components/TeamDetails/Teams';
|
||||
import {
|
||||
INITIAL_PAGING_VALUE,
|
||||
LIST_SIZE,
|
||||
@ -216,8 +215,9 @@ const TeamsPage = () => {
|
||||
}
|
||||
} catch (error) {
|
||||
showErrorToast(error as AxiosError, t('server.unexpected-response'));
|
||||
}
|
||||
} finally {
|
||||
setIsPageLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -545,18 +545,10 @@ const TeamsPage = () => {
|
||||
return <Loader />;
|
||||
}
|
||||
|
||||
return (
|
||||
return entityPermissions.ViewAll || entityPermissions.ViewBasic ? (
|
||||
<>
|
||||
{entityPermissions.ViewAll || entityPermissions.ViewBasic ? (
|
||||
<>
|
||||
{isUndefined(fqn) ? (
|
||||
<Teams
|
||||
data={allTeam}
|
||||
showDeletedTeam={showDeletedTeam}
|
||||
onAddTeamClick={handleAddTeam}
|
||||
onShowDeletedTeamChange={handleShowDeletedTeam}
|
||||
onTeamExpand={fetchAllTeams}
|
||||
/>
|
||||
{isEmpty(selectedTeam) ? (
|
||||
<ErrorPlaceHolder>{t('label.no-team-found')}</ErrorPlaceHolder>
|
||||
) : (
|
||||
<TeamDetailsV1
|
||||
afterDeleteAction={afterDeleteAction}
|
||||
@ -606,8 +598,6 @@ const TeamsPage = () => {
|
||||
</>
|
||||
) : (
|
||||
<ErrorPlaceHolder>{NO_PERMISSION_TO_VIEW}</ErrorPlaceHolder>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -91,14 +91,6 @@ const GlobalSettingRouter = () => {
|
||||
<Route exact path={getSettingPath()}>
|
||||
<Redirect to={getTeamsWithFqnPath(TeamType.Organization)} />
|
||||
</Route>
|
||||
<Route
|
||||
exact
|
||||
component={TeamsPage}
|
||||
path={getSettingPath(
|
||||
GlobalSettingsMenuCategory.MEMBERS,
|
||||
GlobalSettingOptions.TEAMS
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
component={TeamsPage}
|
||||
@ -108,6 +100,13 @@ const GlobalSettingRouter = () => {
|
||||
true
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
path={getSettingPath(
|
||||
GlobalSettingsMenuCategory.MEMBERS,
|
||||
GlobalSettingOptions.TEAMS
|
||||
)}>
|
||||
<Redirect to={getTeamsWithFqnPath(TeamType.Organization)} />
|
||||
</Route>
|
||||
{/* Roles route start
|
||||
* Do not change the order of these route
|
||||
*/}
|
||||
|
Loading…
x
Reference in New Issue
Block a user