aegis_gui.layout
1import dash 2from dash import html, dcc 3import dash_bootstrap_components as dbc 4from aegis_gui.utilities import sim_tracker 5from aegis_gui.utilities.utilities import get_icon 6from aegis_gui import offcanvas 7from aegis_gui.guisettings.GuiSettings import gui_settings 8 9 10def get_app_layout(): 11 return html.Div( 12 id="body-container", 13 children=[ 14 dcc.Location(id="url", refresh=False), 15 get_sidebar(), 16 html.Div(id="main-container", children=[dash.page_container]), 17 ], 18 ) 19 20 21def get_sidebar(): 22 return dash.html.Div( 23 [ 24 dbc.Nav( 25 children=[ 26 html.A( 27 [ 28 html.Img( 29 src="assets/aegis-ager.svg", width="80%", style={"margin": "0 10%"}, id="aegis-logo" 30 ) 31 ], 32 href=gui_settings.wrap_href(""), 33 className="mb-5", 34 ), 35 dbc.NavItem( 36 [ 37 dbc.NavLink( 38 [ 39 dash.html.I(className="bi bi-house-door-fill"), 40 "Home", 41 # get_icon("house-door-fill"), 42 ], 43 href=gui_settings.wrap_href(""), 44 id="link-nav-home", 45 ) 46 ] 47 ), 48 dbc.NavItem( 49 [ 50 dbc.NavLink( 51 [dash.html.I(className="bi bi-rocket-takeoff-fill"), "Launch"], 52 href=gui_settings.wrap_href("config"), 53 id="link-nav-config", 54 ) 55 ] 56 ), 57 dbc.NavItem( 58 [ 59 dbc.NavLink( 60 [dash.html.I(className="bi bi-bar-chart-fill"), "Plot"], 61 href=gui_settings.wrap_href("plot"), 62 id="link-nav-plot", 63 ) 64 ] 65 ), 66 dbc.NavItem( 67 [ 68 dbc.NavLink( 69 [dash.html.I(className="bi bi-eye-fill"), "Control"], 70 href=gui_settings.wrap_href("simlog"), 71 id="link-nav-simlog", 72 ) 73 ] 74 ), 75 dbc.NavItem( 76 [ 77 dbc.NavLink( 78 [dash.html.I(className="bi bi-info-square-fill"), "Wiki"], 79 href=gui_settings.wrap_href("wiki"), 80 id="link-nav-wiki", 81 ) 82 ] 83 ), 84 ] 85 + sim_tracker.init_tracker_box() 86 + [offcanvas.get_offcanvas_trigger(), offcanvas.get_offcanvas()], 87 id="sidebar", 88 vertical="md", 89 pills=True, # TODO fix because it is not showing since i changed the href logic with gui_settings.wrap_href 90 # fill=True, 91 ), 92 ], 93 )
def
get_app_layout():