X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fdash%2Fapp%2Fpal%2Ftrending%2Ftrending.py;h=68dc42055606fa2467d559cbd58d0cc89eeff955;hp=7801e9cfebaa583412cf40c9edb22d29f56e73a7;hb=d3f16c6ceaa5b475a9c8dc13d21817735e087869;hpb=47962ee624efeaec469473a5569b59bfd230babf diff --git a/resources/tools/dash/app/pal/trending/trending.py b/resources/tools/dash/app/pal/trending/trending.py index 7801e9cfeb..68dc420556 100644 --- a/resources/tools/dash/app/pal/trending/trending.py +++ b/resources/tools/dash/app/pal/trending/trending.py @@ -14,11 +14,12 @@ """Instantiate the Trending Dash applocation. """ import dash +import dash_bootstrap_components as dbc from .layout import Layout -def init_trending(server): +def init_trending(server, time_period=None): """Create a Plotly Dash dashboard. :param server: Flask server. @@ -30,19 +31,18 @@ def init_trending(server): dash_app = dash.Dash( server=server, routes_pathname_prefix=u"/trending/", - external_stylesheets=[ - u"/static/dist/css/styles.css", - u"https://fonts.googleapis.com/css?family=Lato", - ], + external_stylesheets=[dbc.themes.LUX], ) # Custom HTML layout layout = Layout( app=dash_app, - html_layout_file="pal/trending/html_layout.txt", + html_layout_file="pal/templates/trending_layout.jinja2", spec_file="pal/trending/spec_test_selection.yaml", graph_layout_file="pal/trending/layout.yaml", - data_spec_file="pal/data/data.yaml" + data_spec_file="pal/data/data.yaml", + tooltip_file="pal/data/tooltips.yaml", + time_period=time_period ) dash_app.index_string = layout.html_layout dash_app.layout = layout.add_content()