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