diff --git a/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentBrowseButtons.tsx b/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentBrowseButtons.tsx index 9c5a00217..36390a53e 100644 --- a/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentBrowseButtons.tsx +++ b/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentBrowseButtons.tsx @@ -23,6 +23,8 @@ export function EnvironmentBrowseButtons({ }) { const isEdgeAsync = checkEdgeAsync(environment); const browseStatus = getStatus(isActive, isEdgeAsync); + + const dashboardRoute = getDashboardRoute(environment); return (
{isBE && ( @@ -44,10 +46,8 @@ export function EnvironmentBrowseButtons({ title="Live connection is not available for async environments" icon={Wifi} disabled={isEdgeAsync || browseStatus === 'connected'} - to={getDashboardRoute(environment)} - params={{ - endpointId: environment.Id, - }} + to={dashboardRoute.to} + params={dashboardRoute.params} onClick={onClickBrowse} color="primary" className="w-full !py-0 !m-0" diff --git a/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx b/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx index c71d2c3a4..56ca35c56 100644 --- a/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx +++ b/app/react/portainer/HomeView/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx @@ -47,15 +47,13 @@ export function EnvironmentItem({ const snapshotTime = getSnapshotTime(environment); const tags = useEnvironmentTagNames(environment.TagIds); + const dashboardRoute = getDashboardRoute(environment); return (