X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fdash%2Fapp%2Fpal%2Freport%2Freport.py;h=e4565731ec08579004bc7823d370427fd91ee712;hb=refs%2Fchanges%2F62%2F36762%2F2;hp=8330f8721eb8999ff40f0a4ae9ccc5024e656881;hpb=3343fe81729eb4005319ca15b1e6881630d38c5b;p=csit.git diff --git a/resources/tools/dash/app/pal/report/report.py b/resources/tools/dash/app/pal/report/report.py index 8330f8721e..e4565731ec 100644 --- a/resources/tools/dash/app/pal/report/report.py +++ b/resources/tools/dash/app/pal/report/report.py @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Instantiate the Report Dash applocation. +"""Instantiate the Report Dash application. """ import dash -import dash_bootstrap_components as dbc +from ..utils.constants import Constants as C from .layout import Layout @@ -30,18 +30,17 @@ def init_report(server, releases): dash_app = dash.Dash( server=server, - routes_pathname_prefix=u"/report/", - external_stylesheets=[dbc.themes.LUX], + routes_pathname_prefix=C.REPORT_ROUTES_PATHNAME_PREFIX, + external_stylesheets=C.EXTERNAL_STYLESHEETS ) - # Custom HTML layout layout = Layout( app=dash_app, releases=releases, - html_layout_file="pal/templates/report_layout.jinja2", - graph_layout_file="pal/report/layout.yaml", - data_spec_file="pal/data/data.yaml", - tooltip_file="pal/data/tooltips.yaml" + html_layout_file=C.REPORT_HTML_LAYOUT_FILE, + graph_layout_file=C.REPORT_GRAPH_LAYOUT_FILE, + data_spec_file=C.DATA_SPEC_FILE, + tooltip_file=C.TOOLTIP_FILE, ) dash_app.index_string = layout.html_layout dash_app.layout = layout.add_content()