Drop the Upgrade-to-Business banner, BE sidebar items (Licenses, Shared Credentials, Edge Configurations, Waiting Room, Update & Rollback), BE branding (BE logo/footer), and BE-only routed views (update-schedules, EdgeAutoCreateScript, WaitingRoom, TimeWindowDisplay/Picker). Prune the featureId/feature/BEFeatureID teaser props from shared components (Switch, SwitchField, BoxSelector, TooltipWithChildren, wizard Option) and fold isBE in useUser while preserving CE authorization semantics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
import { Clock, LayoutGrid, Layers, Edit } from 'lucide-react';
|
|
|
|
import { useSettings } from '../portainer/settings/queries';
|
|
|
|
import { SidebarItem } from './SidebarItem';
|
|
import { SidebarSection } from './SidebarSection';
|
|
import { SidebarParent } from './SidebarItem/SidebarParent';
|
|
|
|
export function EdgeComputeSidebar() {
|
|
// this sidebar is rendered only for admins, so we can safely assume that settingsQuery will succeed
|
|
const settingsQuery = useSettings();
|
|
|
|
if (!settingsQuery.data || !settingsQuery.data.EnableEdgeComputeFeatures) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<SidebarSection title="Edge compute">
|
|
<SidebarItem
|
|
to="edge.groups"
|
|
label="Edge Groups"
|
|
icon={LayoutGrid}
|
|
data-cy="portainerSidebar-edgeGroups"
|
|
/>
|
|
<SidebarItem
|
|
to="edge.stacks"
|
|
label="Edge Stacks"
|
|
icon={Layers}
|
|
data-cy="portainerSidebar-edgeStacks"
|
|
/>
|
|
<SidebarItem
|
|
to="edge.jobs"
|
|
label="Edge Jobs"
|
|
icon={Clock}
|
|
data-cy="portainerSidebar-edgeJobs"
|
|
/>
|
|
<SidebarParent
|
|
icon={Edit}
|
|
label="Edge Templates"
|
|
to="edge.templates"
|
|
data-cy="edgeSidebar-templates"
|
|
listId="edgeSidebar-templates"
|
|
>
|
|
<SidebarItem
|
|
label="Application"
|
|
to="edge.templates"
|
|
ignorePaths={['edge.templates.custom']}
|
|
isSubMenu
|
|
data-cy="edgeSidebar-appTemplates"
|
|
/>
|
|
<SidebarItem
|
|
label="Custom"
|
|
to="edge.templates.custom"
|
|
isSubMenu
|
|
data-cy="edgeSidebar-customTemplates"
|
|
/>
|
|
</SidebarParent>
|
|
</SidebarSection>
|
|
);
|
|
}
|