-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.py
More file actions
71 lines (47 loc) · 1.59 KB
/
index.py
File metadata and controls
71 lines (47 loc) · 1.59 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 app1, app2, landingapp
server = app.server
def get_logo():
logo = html.Div([
html.Div([
html.Img(src='https://www.toladata.com/wp-content/uploads/2017/11/logo-colors-large.png', height='100', width='120')
], className="ten columns padded"),
html.Div([
dcc.Link('Full View ', href='/full-view')
], className="two columns page-view no-print")
], className="row gs-header")
return logo
def print_button():
printButton = html.A(['Print PDF'],className="button no-print print",style={'position': "absolute", 'top': '-40', 'right': '0'})
return printButton
def get_header():
header = html.Div([
html.Div([
html.H5(
'TolaReports: MEL')
], className="twelve columns padded")
], className="row gs-header gs-text-header")
return header
def get_menu():
menu = html.Div([
dcc.Link('Overview ', href='/overview', className="tab first"),
], className="row ")
return menu
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/app1':
return app1.layout
elif pathname == '/apps/app2':
return app2.layout
else:
return landingapp.layout
if __name__ == '__main__':
app.run_server(debug=True)