|
1 | | -from .utils import silence_warnings |
| 1 | +from Sisyphus.Gui.Dashboard.utils import silence_warnings |
2 | 2 |
|
3 | 3 | import threading, webbrowser |
4 | 4 | from threading import Timer |
5 | | -from dash import Dash |
| 5 | +from dash import Dash, html |
6 | 6 | import dash_bootstrap_components as dbc |
7 | 7 |
|
8 | 8 |
|
|
15 | 15 | from Sisyphus.Configuration import config |
16 | 16 | logger = config.getLogger(__name__) |
17 | 17 |
|
18 | | -from .layout.layout_main import layout, register_layout_callbacks |
19 | | -from .callbacks.callbacks_preferences import register_preferences_callbacks |
20 | | -from .callbacks.callbacks_jsonselect import register_jsonselect_callbacks |
| 18 | +from Sisyphus.Gui.Dashboard.layout.layout_main import layout, register_layout_callbacks |
| 19 | +from Sisyphus.Gui.Dashboard.callbacks.callbacks_preferences import register_preferences_callbacks |
| 20 | +from Sisyphus.Gui.Dashboard.callbacks.callbacks_jsonselect import register_jsonselect_callbacks |
| 21 | +from Sisyphus.Gui.Dashboard.callbacks.callbacks_typegetter import register_typegetter_callbacks |
21 | 22 |
|
22 | | -from .callbacks import ( |
| 23 | +from Sisyphus.Gui.Dashboard.callbacks import ( |
23 | 24 | register_conditions_callbacks, |
24 | 25 | register_filter_callbacks, |
25 | 26 | register_valuefilter_callbacks, |
|
28 | 29 | register_plot_callbacks, |
29 | 30 | register_sync_callbacks, |
30 | 31 | register_updatemenu_callbacks, |
| 32 | + register_shipment_callbacks, |
| 33 | + register_overlay_callbacks, |
31 | 34 | ) |
32 | 35 |
|
33 | 36 | #------------- create the website and interface ------- |
|
37 | 40 | suppress_callback_exceptions=True |
38 | 41 | ) |
39 | 42 | app.title = "HWDB Dashboard" |
40 | | -# Pass IsPro into layout generator |
41 | 43 | app.layout = layout |
| 44 | +# Force Dash to validate the layout before callback registration |
| 45 | +#app.validation_layout = layout |
| 46 | + |
| 47 | +#app.config.suppress_callback_exceptions = True |
| 48 | + |
| 49 | + |
| 50 | +# Now register layout-switching callback |
42 | 51 | register_layout_callbacks(app) |
43 | 52 |
|
44 | 53 | # Register all callback modules |
| 54 | +register_typegetter_callbacks(app) |
45 | 55 | register_preferences_callbacks(app) |
46 | 56 | register_conditions_callbacks(app) |
47 | 57 | register_filter_callbacks(app) |
|
52 | 62 | register_sync_callbacks(app) |
53 | 63 | register_updatemenu_callbacks(app) |
54 | 64 | register_jsonselect_callbacks(app) |
| 65 | +register_shipment_callbacks(app) |
| 66 | +register_overlay_callbacks(app) |
55 | 67 |
|
56 | 68 | logger.info("Dashboard is starting up...") |
57 | 69 | # Run the app |
|
0 commit comments