Skip to content

Commit cbd0287

Browse files
authored
Merge pull request #10 from EO-DataHub/qa-dashboard-app
latest deployed version of dashboard app
2 parents 4b0a511 + 223e139 commit cbd0287

34 files changed

Lines changed: 2087 additions & 1250 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,6 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
.idea/
161+
162+
# vscode
163+
.vscode

qa_dashboard_app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Elastic Beanstalk Files
23
.elasticbeanstalk/*
34
!.elasticbeanstalk/*.cfg.yml

qa_dashboard_app/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ WORKDIR /app
55

66
RUN pip install -r requirements.txt
77

8-
EXPOSE 5000
9-
10-
CMD [ "python3", "-m" , "app", "run", "--host=0.0.0.0"]
8+
EXPOSE 80
119

10+
CMD [ "python3", "-m" , "app"]

qa_dashboard_app/app.py

Lines changed: 103 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
import dash_bootstrap_components as dbc
44
import dash_mantine_components as dmc
55
from logging import Logger
6-
6+
import flask
7+
import urllib
78

89
# create app
910
app = Dash(
1011
__name__,
1112
# suppress_callback_exceptions=True,
1213
use_pages=True,
1314
external_stylesheets=[dbc.themes.SIMPLEX, dbc.icons.BOOTSTRAP],
14-
title="CEOS Calibration Dashboard",
15+
title="CEOS-PVP RadVAL Dashboard",
16+
serve_locally=True,
1517
)
1618

1719
application = app.server
@@ -20,13 +22,12 @@
2022

2123
log = Logger(__name__)
2224

23-
# add upper buttons based on pages
2425
page_buttons = dbc.Container(
25-
fluid="xs",
26+
fluid=True, # "xs",
2627
style={
2728
"width": "110vh",
28-
# 'margin-left': '1px',
29-
"margin-right": "3vh",
29+
# 'margin-left': '15vh',
30+
"margin-right": "5vh",
3031
},
3132
children=[
3233
html.Div(
@@ -67,7 +68,6 @@
6768
],
6869
)
6970

70-
# create header of logos and buttons
7171
header = dmc.Card(
7272
children=[
7373
dbc.Container(
@@ -84,7 +84,7 @@
8484
children=[
8585
html.A(
8686
href="https://ceos.org/",
87-
target="newPage", # https://calvalportal.ceos.org/web/guest
87+
target="newPage",
8888
children=[
8989
html.Img(
9090
alt="Link to CEOS portal",
@@ -100,39 +100,83 @@
100100
dbc.Col(
101101
dbc.Container(
102102
fluid="xs",
103+
style={"margin-left": "-5vh", "margin-top": "-1.5vh"},
104+
children=[
105+
html.A(
106+
href="https://ceos.org/",
107+
target="newPage",
108+
children=[
109+
html.Img(
110+
alt="Link to CEOS portal",
111+
src="assets/RadVAL_logo.png",
112+
height=100,
113+
)
114+
],
115+
)
116+
# width=100),
117+
],
118+
)
119+
),
120+
dbc.Col(
121+
dbc.Container(
122+
fluid="xs",
123+
children=[page_buttons],
103124
style={
104-
"width": "20vh",
105-
"margin-top": "0vh",
125+
"margin-top": "1vh",
126+
"margin-right": "-5vh",
106127
"margin-left": "-5vh",
107128
},
129+
) # update button margins here
130+
),
131+
]
132+
),
133+
dbc.Row(
134+
children=[
135+
dbc.Col(
136+
dbc.Container(
137+
fluid="xs",
138+
style={"margin-left": "0vh", "margin-top": "0vh"},
108139
children=[
109-
dmc.Text(
110-
"Calibration Dashboard",
111-
weight=500,
112-
align="left",
113-
inline=True,
140+
html.Div(
141+
"Operational Beta version welcoming inputs and users",
114142
style={
115-
"font-size": "2rem",
116-
"font-family": "Segoe UI",
117-
# 'position': 'absolute',
118-
"top": "12",
143+
"color": "red",
144+
"fontSize": 30,
145+
"font-weight": "bold",
146+
"align": "centre",
119147
},
120148
)
121149
],
122150
)
123151
),
152+
]
153+
),
154+
dbc.Row(
155+
children=[
124156
dbc.Col(
125-
page_buttons,
126-
style={"margin-top": "1vh", "margin-right": "1vh"},
157+
dbc.Container(
158+
fluid="xs",
159+
style={"margin-left": "0vh", "margin-top": "0vh"},
160+
children=[
161+
html.Div(
162+
"- Enhancements on-going",
163+
style={
164+
"color": "red",
165+
"fontSize": 30,
166+
"font-weight": "bold",
167+
"align": "centre",
168+
},
169+
)
170+
],
171+
)
127172
),
128173
]
129-
)
174+
),
130175
],
131176
)
132177
]
133178
)
134179

135-
# create footer of logos & links
136180
footer = dmc.Card(
137181
children=[
138182
dbc.Container(
@@ -143,7 +187,7 @@
143187
dbc.Col(
144188
html.A(
145189
href="https://ceos.org/",
146-
target="newPage", # https://calvalportal.ceos.org/web/guest
190+
target="newPage",
147191
children=[
148192
html.Img(
149193
alt="Link to CEOS portal",
@@ -196,7 +240,7 @@
196240
),
197241
dbc.Col(
198242
html.A(
199-
href="https://staging.eodatahub.org.uk/",
243+
href="https://eodatahub.org.uk/",
200244
target="newPage",
201245
children=[
202246
html.Img(
@@ -222,9 +266,7 @@
222266
),
223267
align="center",
224268
),
225-
dbc.Row(
226-
[html.Div([html.Br()])]
227-
), # add in empty row for spacing
269+
dbc.Row([html.Div([html.Br()])]), # empty row for spacing
228270
dbc.Row(
229271
[
230272
dbc.Col(
@@ -242,37 +284,41 @@
242284
)
243285

244286

245-
app.layout = html.Div(
246-
[
247-
dbc.Row(
248-
children=[
249-
dbc.Container(
250-
fluid=True,
251-
children=[
252-
dbc.Col(
253-
header,
254-
style={
255-
"margin-bottom": "5vh",
256-
"margin-left": "5vh",
257-
"margin-right": "5vh",
258-
},
259-
), # , xs=12, sm=12, md=12, lg=12)),
260-
],
261-
)
262-
]
263-
),
264-
dash.page_container,
265-
dbc.Row(
266-
dbc.Col(
267-
footer, style={"margin-bottom": "5vh", "margin-left": "5vh"}
268-
) # xs=12, sm=12, md=12, lg=12))
269-
),
270-
]
287+
app.layout = dmc.MantineProvider(
288+
html.Div(
289+
[
290+
dbc.Row(
291+
children=[
292+
dbc.Container(
293+
fluid=True,
294+
children=[
295+
dbc.Col(
296+
header,
297+
style={
298+
"margin-bottom": "5vh",
299+
"margin-left": "5vh",
300+
"margin-right": "5vh",
301+
},
302+
), # , xs=12, sm=12, md=12, lg=12)),
303+
],
304+
)
305+
]
306+
),
307+
dash.page_container,
308+
dbc.Row(
309+
dbc.Col(
310+
footer, style={"margin-bottom": "5vh", "margin-left": "5vh"}
311+
) # xs=12, sm=12, md=12, lg=12))
312+
),
313+
]
314+
)
271315
)
272316

273317
if __name__ == "__main__":
274318
app.run(
275-
debug=True, # for testing locally
276-
# dev_tools_ui=False, dev_tools_props_check=False # disables the blue marker that shows errors
319+
dev_tools_props_check=False,
320+
# debug=True,
321+
# dev_tools_ui=False, # disables the blue marker that shows errors
322+
host="0.0.0.0",
323+
port=80,
277324
)
278-
# app.run(debug=False, host='0.0.0.0', port=5000) # for running in Docker container
297 KB
Loading
295 KB
Loading
435 KB
Loading
271 KB
Loading
194 KB
Loading
378 KB
Loading

0 commit comments

Comments
 (0)