-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.py
35 lines (26 loc) · 795 Bytes
/
index.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from app import app
from apps import GLA,DVA,NTC,TIM,OVP
app.layout = html.Div([
dcc.Location(id='url', refresh=False),
html.Div(id='page-content')
])
@app.callback(Output('page-content', 'children'),
[Input('url', 'pathname')])
def display_page(pathname):
if pathname == '/apps/GLA':
return GLA.layout
elif pathname == '/apps/DVA':
return DVA.layout
elif pathname == '/apps/NTC':
return NTC.layout
elif pathname == '/apps/TIM':
return TIM.layout
elif pathname == '/apps/OVP':
return OVP.layout
else:
return '404'
if __name__ == '__main__':
app.run_server(debug=True)