mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
feat(sidebar): update menu structure [EE-5666] (#10418)
This commit is contained in:
parent
b468070945
commit
a0dbabcc5f
13 changed files with 519 additions and 146 deletions
|
@ -22,6 +22,7 @@ import { useApiVersion } from '@/react/docker/proxy/queries/useVersion';
|
|||
import { SidebarItem } from './SidebarItem';
|
||||
import { DashboardLink } from './items/DashboardLink';
|
||||
import { VolumesLink } from './items/VolumesLink';
|
||||
import { SidebarParent } from './SidebarItem/SidebarParent';
|
||||
|
||||
interface Props {
|
||||
environmentId: EnvironmentId;
|
||||
|
@ -72,21 +73,29 @@ export function DockerSidebar({ environmentId, environment }: Props) {
|
|||
platformPath="docker"
|
||||
data-cy="dockerSidebar-dashboard"
|
||||
/>
|
||||
|
||||
<SidebarItem
|
||||
label="App Templates"
|
||||
<SidebarParent
|
||||
icon={Edit}
|
||||
label="Templates"
|
||||
to="docker.templates"
|
||||
params={{ endpointId: environmentId }}
|
||||
data-cy="portainerSidebar-appTemplates"
|
||||
data-cy="portainerSidebar-templates"
|
||||
>
|
||||
<SidebarItem
|
||||
label="Custom Templates"
|
||||
label="Application"
|
||||
to="docker.templates"
|
||||
ignorePaths={['docker.templates.custom']}
|
||||
params={{ endpointId: environmentId }}
|
||||
isSubMenu
|
||||
data-cy="portainerSidebar-appTemplates"
|
||||
/>
|
||||
<SidebarItem
|
||||
label="Custom"
|
||||
to="docker.templates.custom"
|
||||
params={{ endpointId: environmentId }}
|
||||
isSubMenu
|
||||
data-cy="dockerSidebar-customTemplates"
|
||||
/>
|
||||
</SidebarItem>
|
||||
</SidebarParent>
|
||||
|
||||
{areStacksVisible && (
|
||||
<SidebarItem
|
||||
|
@ -168,31 +177,42 @@ export function DockerSidebar({ environmentId, environment }: Props) {
|
|||
/>
|
||||
)}
|
||||
|
||||
<SidebarItem
|
||||
<SidebarParent
|
||||
label={setupSubMenuProps.label}
|
||||
icon={setupSubMenuProps.icon}
|
||||
to={setupSubMenuProps.to}
|
||||
params={{ endpointId: environmentId }}
|
||||
data-cy={setupSubMenuProps.dataCy}
|
||||
data-cy="portainerSidebar-host"
|
||||
>
|
||||
<SidebarItem
|
||||
label="Details"
|
||||
isSubMenu
|
||||
to={setupSubMenuProps.to}
|
||||
params={{ endpointId: environmentId }}
|
||||
ignorePaths={[featSubMenuTo, registrySubMenuTo]}
|
||||
data-cy={setupSubMenuProps.dataCy}
|
||||
/>
|
||||
|
||||
<Authorized
|
||||
authorizations="PortainerEndpointUpdateSettings"
|
||||
adminOnlyCE
|
||||
environmentId={environmentId}
|
||||
>
|
||||
<SidebarItem
|
||||
label="Setup"
|
||||
isSubMenu
|
||||
to={featSubMenuTo}
|
||||
params={{ endpointId: environmentId }}
|
||||
label="Setup"
|
||||
/>
|
||||
</Authorized>
|
||||
|
||||
<SidebarItem
|
||||
label="Registries"
|
||||
isSubMenu
|
||||
to={registrySubMenuTo}
|
||||
params={{ endpointId: environmentId }}
|
||||
label="Registries"
|
||||
/>
|
||||
</SidebarItem>
|
||||
</SidebarParent>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue