File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ import { classNames } from '~/helpers/class-helper'
3333import AppLogo from '~/logos/AppLogo'
3434// mappers
3535import { serviceIconMapper } from '~/mappers/icon-mapper'
36+ // contexts
37+ import { useSystem } from '~/contexts/SystemContext'
3638
3739interface SidebarProps {
3840 sidebarOpen : boolean
@@ -54,15 +56,18 @@ const Sidebar: React.FC<any> = ({
5456 repoUrl = null ,
5557} : any ) => {
5658 const location = useLocation ( )
57-
59+ const { systems } = useSystem ( )
5860 const userNavigation = [ { name : 'Dashboard' , path : '/' , icon : HomeIcon } ]
5961
6062 const primaryNavigation : any = [
61- { name : LABEL_COMPUTE_TITLE , path : '/compute' , icon : serviceIconMapper ( 'compute' ) } ,
63+ { name : LABEL_COMPUTE_TITLE , path : '/compute' , icon : serviceIconMapper ( 'compute' ) ,
64+ children : systems . map ( system => ( { name : system . name , path : '/compute/systems/' + system . name } ) )
65+ } ,
6266 {
6367 name : LABEL_FILESYSTEM_TITLE ,
6468 path : '/filesystems' ,
6569 icon : serviceIconMapper ( 'filesystem' ) ,
70+ children : systems . map ( system => ( { name : system . name , path : '/filesystems/systems/' + system . name } ) )
6671 } ,
6772 ]
6873
You can’t perform that action at this time.
0 commit comments