mirror of https://github.com/portainer/portainer
fix(edge/updates): hide sidebar item when disabled [EE-6294] (#10582)
parent
47c9e498f9
commit
e72671e4ab
|
@ -96,14 +96,7 @@ export function SettingsSidebar({ isAdmin, isTeamLeader }: Props) {
|
||||||
isSubMenu
|
isSubMenu
|
||||||
data-cy="portainerSidebar-environmentTags"
|
data-cy="portainerSidebar-environmentTags"
|
||||||
/>
|
/>
|
||||||
{isBE && (
|
<EdgeUpdatesSidebarItem />
|
||||||
<SidebarItem
|
|
||||||
to="portainer.endpoints.updateSchedules"
|
|
||||||
label="Update & Rollback"
|
|
||||||
isSubMenu
|
|
||||||
data-cy="portainerSidebar-updateSchedules"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</SidebarParent>
|
</SidebarParent>
|
||||||
|
|
||||||
<SidebarItem
|
<SidebarItem
|
||||||
|
@ -211,3 +204,20 @@ export function SettingsSidebar({ isAdmin, isTeamLeader }: Props) {
|
||||||
</SidebarSection>
|
</SidebarSection>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function EdgeUpdatesSidebarItem() {
|
||||||
|
const settingsQuery = usePublicSettings();
|
||||||
|
|
||||||
|
if (!isBE || !settingsQuery.data?.EnableEdgeComputeFeatures) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SidebarItem
|
||||||
|
to="portainer.endpoints.updateSchedules"
|
||||||
|
label="Update & Rollback"
|
||||||
|
isSubMenu
|
||||||
|
data-cy="portainerSidebar-updateSchedules"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue