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
|
||||
data-cy="portainerSidebar-environmentTags"
|
||||
/>
|
||||
{isBE && (
|
||||
<SidebarItem
|
||||
to="portainer.endpoints.updateSchedules"
|
||||
label="Update & Rollback"
|
||||
isSubMenu
|
||||
data-cy="portainerSidebar-updateSchedules"
|
||||
/>
|
||||
)}
|
||||
<EdgeUpdatesSidebarItem />
|
||||
</SidebarParent>
|
||||
|
||||
<SidebarItem
|
||||
|
@ -211,3 +204,20 @@ export function SettingsSidebar({ isAdmin, isTeamLeader }: Props) {
|
|||
</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