From 4d095b586bc4e249ab4e30e1a3f17b310f52a229 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Wed, 5 Oct 2022 06:50:07 +0200 Subject: C-Dash: Improved improvements in layout Signed-off-by: Tibor Frank Change-Id: I50c16f3b5c8e71be6b38d97e9968d8538a1b5264 --- csit.infra.dash/app/pal/news/layout.py | 2 +- csit.infra.dash/app/pal/news/news.py | 3 ++- csit.infra.dash/app/pal/report/layout.py | 2 +- csit.infra.dash/app/pal/report/report.py | 3 ++- csit.infra.dash/app/pal/routes.py | 5 ++++ csit.infra.dash/app/pal/stats/layout.py | 2 +- csit.infra.dash/app/pal/stats/stats.py | 3 ++- .../app/pal/templates/index_layout.jinja2 | 12 +++++----- .../app/pal/templates/news_layout.jinja2 | 2 +- .../app/pal/templates/report_layout.jinja2 | 2 +- .../app/pal/templates/stats_layout.jinja2 | 2 +- .../app/pal/templates/trending_layout.jinja2 | 2 +- csit.infra.dash/app/pal/trending/layout.py | 2 +- csit.infra.dash/app/pal/trending/trending.py | 3 ++- csit.infra.dash/app/pal/utils/constants.py | 27 ++++++++++++++++++---- 15 files changed, 50 insertions(+), 22 deletions(-) (limited to 'csit.infra.dash/app') diff --git a/csit.infra.dash/app/pal/news/layout.py b/csit.infra.dash/app/pal/news/layout.py index e9ff4dc334..dfe6eba67a 100644 --- a/csit.infra.dash/app/pal/news/layout.py +++ b/csit.infra.dash/app/pal/news/layout.py @@ -324,7 +324,7 @@ class Layout: children=[ dbc.NavItem( dbc.NavLink( - "Continuous Performance News", + C.NEWS_TITLE, disabled=True, external_link=True, href="#" diff --git a/csit.infra.dash/app/pal/news/news.py b/csit.infra.dash/app/pal/news/news.py index a0d05f1483..aa8cd5fbdc 100644 --- a/csit.infra.dash/app/pal/news/news.py +++ b/csit.infra.dash/app/pal/news/news.py @@ -31,7 +31,8 @@ def init_news(server): dash_app = dash.Dash( server=server, routes_pathname_prefix=C.NEWS_ROUTES_PATHNAME_PREFIX, - external_stylesheets=C.EXTERNAL_STYLESHEETS + external_stylesheets=C.EXTERNAL_STYLESHEETS, + title=C.NEWS_TITLE ) layout = Layout( diff --git a/csit.infra.dash/app/pal/report/layout.py b/csit.infra.dash/app/pal/report/layout.py index 9397870e5e..ec33147744 100644 --- a/csit.infra.dash/app/pal/report/layout.py +++ b/csit.infra.dash/app/pal/report/layout.py @@ -291,7 +291,7 @@ class Layout: children=[ dbc.NavItem( dbc.NavLink( - "Iterative Test Runs", + C.REPORT_TITLE, disabled=True, external_link=True, href="#" diff --git a/csit.infra.dash/app/pal/report/report.py b/csit.infra.dash/app/pal/report/report.py index e4565731ec..573c9a93d4 100644 --- a/csit.infra.dash/app/pal/report/report.py +++ b/csit.infra.dash/app/pal/report/report.py @@ -31,7 +31,8 @@ def init_report(server, releases): dash_app = dash.Dash( server=server, routes_pathname_prefix=C.REPORT_ROUTES_PATHNAME_PREFIX, - external_stylesheets=C.EXTERNAL_STYLESHEETS + external_stylesheets=C.EXTERNAL_STYLESHEETS, + title=C.REPORT_TITLE ) layout = Layout( diff --git a/csit.infra.dash/app/pal/routes.py b/csit.infra.dash/app/pal/routes.py index 59af748168..8a47c04b61 100644 --- a/csit.infra.dash/app/pal/routes.py +++ b/csit.infra.dash/app/pal/routes.py @@ -28,5 +28,10 @@ def home(): C.MAIN_HTML_LAYOUT_FILE, title=C.TITLE, description=C.DESCRIPTION, + copyright=C.COPYRIGHT, + trending_title=C.TREND_TITLE, + report_title=C.REPORT_TITLE, + stats_title=C.STATS_TITLE, + news_title=C.NEWS_TITLE, template=C.TEMPLATE ) diff --git a/csit.infra.dash/app/pal/stats/layout.py b/csit.infra.dash/app/pal/stats/layout.py index 2f1b344613..8c86600412 100644 --- a/csit.infra.dash/app/pal/stats/layout.py +++ b/csit.infra.dash/app/pal/stats/layout.py @@ -301,7 +301,7 @@ class Layout: children=[ dbc.NavItem( dbc.NavLink( - "Continuous Performance Statistics", + C.STATS_TITLE, disabled=True, external_link=True, href="#" diff --git a/csit.infra.dash/app/pal/stats/stats.py b/csit.infra.dash/app/pal/stats/stats.py index 5b31faca44..56b36abab2 100644 --- a/csit.infra.dash/app/pal/stats/stats.py +++ b/csit.infra.dash/app/pal/stats/stats.py @@ -31,7 +31,8 @@ def init_stats(server, time_period=None): dash_app = dash.Dash( server=server, routes_pathname_prefix=C.STATS_ROUTES_PATHNAME_PREFIX, - external_stylesheets=C.EXTERNAL_STYLESHEETS + external_stylesheets=C.EXTERNAL_STYLESHEETS, + title=C.STATS_TITLE ) layout = Layout( diff --git a/csit.infra.dash/app/pal/templates/index_layout.jinja2 b/csit.infra.dash/app/pal/templates/index_layout.jinja2 index 5a5f876c80..17f9471324 100644 --- a/csit.infra.dash/app/pal/templates/index_layout.jinja2 +++ b/csit.infra.dash/app/pal/templates/index_layout.jinja2 @@ -5,7 +5,7 @@
-

CDash

+

CSIT-Dash

@@ -14,21 +14,21 @@

{{ title }}

{{ description }}

- Performance Trending + {{ trending_title }}

- Iterative Test Runs + {{ report_title }}

- Job Statistics + {{ stats_title }}

- News + {{ news_title }}

{% endblock %} diff --git a/csit.infra.dash/app/pal/templates/news_layout.jinja2 b/csit.infra.dash/app/pal/templates/news_layout.jinja2 index c3ac89f731..1275a99676 100644 --- a/csit.infra.dash/app/pal/templates/news_layout.jinja2 +++ b/csit.infra.dash/app/pal/templates/news_layout.jinja2 @@ -1,7 +1,7 @@ - Continuous Performance News + {%title%} {%metas%} {%favicon%} {%css%} diff --git a/csit.infra.dash/app/pal/templates/report_layout.jinja2 b/csit.infra.dash/app/pal/templates/report_layout.jinja2 index c535d37b03..1275a99676 100644 --- a/csit.infra.dash/app/pal/templates/report_layout.jinja2 +++ b/csit.infra.dash/app/pal/templates/report_layout.jinja2 @@ -1,7 +1,7 @@ - Iterative Test Runs + {%title%} {%metas%} {%favicon%} {%css%} diff --git a/csit.infra.dash/app/pal/templates/stats_layout.jinja2 b/csit.infra.dash/app/pal/templates/stats_layout.jinja2 index dae6f00c19..1275a99676 100644 --- a/csit.infra.dash/app/pal/templates/stats_layout.jinja2 +++ b/csit.infra.dash/app/pal/templates/stats_layout.jinja2 @@ -1,7 +1,7 @@ - Continuous Performance Statistics + {%title%} {%metas%} {%favicon%} {%css%} diff --git a/csit.infra.dash/app/pal/templates/trending_layout.jinja2 b/csit.infra.dash/app/pal/templates/trending_layout.jinja2 index 4881397cfd..1275a99676 100644 --- a/csit.infra.dash/app/pal/templates/trending_layout.jinja2 +++ b/csit.infra.dash/app/pal/templates/trending_layout.jinja2 @@ -1,7 +1,7 @@ - Continuous Performance Trending + {%title%} {%metas%} {%favicon%} {%css%} diff --git a/csit.infra.dash/app/pal/trending/layout.py b/csit.infra.dash/app/pal/trending/layout.py index 9b1965f937..14493ff2d9 100644 --- a/csit.infra.dash/app/pal/trending/layout.py +++ b/csit.infra.dash/app/pal/trending/layout.py @@ -298,7 +298,7 @@ class Layout: children=[ dbc.NavItem( dbc.NavLink( - "Continuous Performance Trending", + C.TREND_TITLE, disabled=True, external_link=True, href="#" diff --git a/csit.infra.dash/app/pal/trending/trending.py b/csit.infra.dash/app/pal/trending/trending.py index af1dc79722..1f96abf643 100644 --- a/csit.infra.dash/app/pal/trending/trending.py +++ b/csit.infra.dash/app/pal/trending/trending.py @@ -31,7 +31,8 @@ def init_trending(server, time_period=None): dash_app = dash.Dash( server=server, routes_pathname_prefix=C.TREND_ROUTES_PATHNAME_PREFIX, - external_stylesheets=C.EXTERNAL_STYLESHEETS + external_stylesheets=C.EXTERNAL_STYLESHEETS, + title=C.TREND_TITLE ) layout = Layout( diff --git a/csit.infra.dash/app/pal/utils/constants.py b/csit.infra.dash/app/pal/utils/constants.py index 73afb4c7a9..8807fec6ca 100644 --- a/csit.infra.dash/app/pal/utils/constants.py +++ b/csit.infra.dash/app/pal/utils/constants.py @@ -35,11 +35,18 @@ class Constants: LOG_DATE_FORMAT = "%Y/%m/%d %H:%M:%S" # The application title. - TITLE = "FD.io CDash" - BRAND = "CDash" + TITLE = "FD.io CSIT" + BRAND = "CSIT-Dash" # The application description. - DESCRIPTION = "Performance Dashboard" + DESCRIPTION = 'Performance Dashboard "CSIT-Dash"' + + # Copyright statement. + COPYRIGHT = ( + 'Copyright © 2016-2022 ' + 'The Fast Data Project, ' + 'a series of LF Projects, LLC.' + ) # External stylesheets. EXTERNAL_STYLESHEETS = ["/static/dist/css/bootstrap.css", ] @@ -73,7 +80,7 @@ class Constants: # List of releases used for iterative data processing. # The releases MUST be in the order from the current (newest) to the last # (oldest). - RELEASES = ["csit2206", "csit2202", ] + RELEASES = ["csit2210", "csit2206", "csit2202", ] ############################################################################ # General, application wide, layout affecting constants. @@ -248,6 +255,9 @@ class Constants: ############################################################################ # News. + # The title. + NEWS_TITLE = "CI TEST FAILURE AND ANOMALY STATISTICS" + # The pathname prefix for the application. NEWS_ROUTES_PATHNAME_PREFIX = "/news/" @@ -266,6 +276,9 @@ class Constants: ############################################################################ # Report. + # The title. + REPORT_TITLE = "PER RELEASE PERFORMANCE RESULTS" + # The pathname prefix for the application. REPORT_ROUTES_PATHNAME_PREFIX = "/report/" @@ -282,6 +295,9 @@ class Constants: ############################################################################ # Statistics. + # The title. + STATS_TITLE = "CI JOB EXECUTION STATISTICS" + # The pathname prefix for the application. STATS_ROUTES_PATHNAME_PREFIX = "/stats/" @@ -301,6 +317,9 @@ class Constants: ############################################################################ # Trending. + # The title. + TREND_TITLE = "PERFORMANCE TRENDING (DAILY, WEEKLY)" + # The pathname prefix for the application. TREND_ROUTES_PATHNAME_PREFIX = "/trending/" -- cgit 1.2.3-korg