mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(edge/updates): hide sidebar item when disabled [EE-6294] (#10582)
This commit is contained in:
parent
47c9e498f9
commit
e72671e4ab
1 changed files with 18 additions and 8 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue