X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fdash%2Fapp%2Fpal%2Futils%2Fconstants.py;h=8f39fc89912121985b56d48f4543f052347a4d8e;hb=d2ef7bc01df66f6a27f25d061db064cf4a463267;hp=cc4a9e0f23454fab32aa5ea6996f0e6051e132f0;hpb=808797d2d913eac7581a4e4cba3fb826ddbff775;p=csit.git diff --git a/resources/tools/dash/app/pal/utils/constants.py b/resources/tools/dash/app/pal/utils/constants.py index cc4a9e0f23..8f39fc8991 100644 --- a/resources/tools/dash/app/pal/utils/constants.py +++ b/resources/tools/dash/app/pal/utils/constants.py @@ -17,7 +17,7 @@ does not need to be hard coded here, but can be read from environment variables. """ - +import logging import dash_bootstrap_components as dbc from dash import html @@ -30,6 +30,11 @@ class Constants: ############################################################################ # General, application wide constants. + # Logging settings. + LOG_LEVEL = logging.INFO + LOG_FORMAT = "%(asctime)s: %(levelname)s: %(message)s" + LOG_DATE_FORMAT = "%Y/%m/%d %H:%M:%S" + # The application title. TITLE = "FD.io CSIT" @@ -37,7 +42,7 @@ class Constants: DESCRIPTION = "Performance Dashboard" # External stylesheets. - EXTERNAL_STYLESHEETS = [dbc.themes.LUX, ] + EXTERNAL_STYLESHEETS = [ "/static/dist/css/bootstrap.css" ] # Top level template for all pages. TEMPLATE = "d-flex h-100 text-center text-white bg-dark" @@ -250,15 +255,13 @@ class Constants: # application. NEWS_HTML_LAYOUT_FILE = "pal/templates/news_layout.jinja2" - # The default job displayed when the page is loaded first time. - NEWS_DEFAULT_JOB = "csit-vpp-perf-mrr-daily-master-2n-icx" - - # Time period for regressions and progressions. Be CAREFULL with this - # number. Setting it too high causes long processing time during the - # application start-up. - # If NEWS_TIME_PERIOD = 180, it takes approx. 35 minutes to calculate - # annomalies for all tests. - NEWS_TIME_PERIOD = 21 # [days] + # Time period for regressions and progressions. + NEWS_TIME_PERIOD = TIME_PERIOD # [days] + + # Time periods for summary tables. + NEWS_LAST = 1 # [days] + NEWS_SHORT = 7 # [days] + NEWS_LONG = NEWS_TIME_PERIOD # [days] ############################################################################ # Report.