aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-10-04 13:43:10 +0200
committerTibor Frank <tifrank@cisco.com>2022-10-04 14:19:50 +0200
commit287fae853accd3782200c21a08345b7d88a936c8 (patch)
tree80be091068c2fb17d38071124c5542fcab114ab5 /csit.infra.dash/app
parent59734b2f72358f6315cbfadc1b1a0ef56b7e23ec (diff)
CSIT-Dash: Improvements in layout
Signed-off-by: Tibor Frank <tifrank@cisco.com> Change-Id: Idf043551122ceb54af08f161d0c4f3ab736156dd
Diffstat (limited to 'csit.infra.dash/app')
-rw-r--r--csit.infra.dash/app/pal/news/layout.py5
-rw-r--r--csit.infra.dash/app/pal/report/layout.py5
-rw-r--r--csit.infra.dash/app/pal/routes.py5
-rw-r--r--csit.infra.dash/app/pal/stats/layout.py5
-rw-r--r--csit.infra.dash/app/pal/templates/index_layout.jinja212
-rw-r--r--csit.infra.dash/app/pal/templates/news_layout.jinja22
-rw-r--r--csit.infra.dash/app/pal/templates/report_layout.jinja22
-rw-r--r--csit.infra.dash/app/pal/templates/stats_layout.jinja22
-rw-r--r--csit.infra.dash/app/pal/templates/trending_layout.jinja22
-rw-r--r--csit.infra.dash/app/pal/trending/layout.py5
-rw-r--r--csit.infra.dash/app/pal/utils/constants.py27
11 files changed, 50 insertions, 22 deletions
diff --git a/csit.infra.dash/app/pal/news/layout.py b/csit.infra.dash/app/pal/news/layout.py
index e9ff4dc334..f21ea68021 100644
--- a/csit.infra.dash/app/pal/news/layout.py
+++ b/csit.infra.dash/app/pal/news/layout.py
@@ -230,7 +230,8 @@ class Layout:
try:
with open(self._html_layout_file, "r") as file_read:
- self._html_layout = file_read.read()
+ self._html_layout = file_read.read().\
+ replace("_title_", C.NEWS_TITLE)
except IOError as err:
raise RuntimeError(
f"Not possible to open the file {self._html_layout_file}\n{err}"
@@ -324,7 +325,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/report/layout.py b/csit.infra.dash/app/pal/report/layout.py
index 9397870e5e..143e56bbff 100644
--- a/csit.infra.dash/app/pal/report/layout.py
+++ b/csit.infra.dash/app/pal/report/layout.py
@@ -162,7 +162,8 @@ class Layout:
try:
with open(self._html_layout_file, "r") as file_read:
- self._html_layout = file_read.read()
+ self._html_layout = file_read.read().\
+ replace("_title_", C.REPORT_TITLE)
except IOError as err:
raise RuntimeError(
f"Not possible to open the file {self._html_layout_file}\n{err}"
@@ -291,7 +292,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/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..c0e1d52bd0 100644
--- a/csit.infra.dash/app/pal/stats/layout.py
+++ b/csit.infra.dash/app/pal/stats/layout.py
@@ -165,7 +165,8 @@ class Layout:
try:
with open(self._html_layout_file, "r") as file_read:
- self._html_layout = file_read.read()
+ self._html_layout = file_read.read().\
+ replace("_title_", C.STATS_TITLE)
except IOError as err:
raise RuntimeError(
f"Not possible to open the file {self._html_layout_file}\n{err}"
@@ -301,7 +302,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/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 @@
<header class="mb-auto">
<div>
- <h3 class="float-md-start mb-0 text-white">CDash</h3>
+ <h3 class="float-md-start mb-0 text-white">CSIT-Dash</h3>
</div>
</header>
@@ -14,21 +14,21 @@
<h1 class="text-white">{{ title }}</h1>
<p class="lead">{{ description }}</p>
<p class="lead">
- <a href="/trending/" class="btn btn-primary fw-bold">Performance Trending</a>
+ <a href="/trending/" class="btn btn-primary fw-bold">{{ trending_title }}</a>
</p>
<p class="lead">
- <a href="/report/" class="btn btn-primary fw-bold">Iterative Test Runs</a>
+ <a href="/report/" class="btn btn-primary fw-bold">{{ report_title }}</a>
</p>
<p class="lead">
- <a href="/stats/" class="btn btn-primary fw-bold">Job Statistics</a>
+ <a href="/stats/" class="btn btn-primary fw-bold">{{ stats_title }}</a>
</p>
<p class="lead">
- <a href="/news/" class="btn btn-primary fw-bold">News</a>
+ <a href="/news/" class="btn btn-primary fw-bold">{{ news_title }}</a>
</p>
</main>
<footer class="mt-auto text-white-50">
- <p>Copyright © 2016-2022 <a href="https://fd.io" class="text-white">The Fast Data Project</a>, a series of LF Projects, LLC.</p>
+ <p>{{ copyright }}</p>
</footer>
</div>
{% 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..a86d26dd4d 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 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <title>Continuous Performance News</title>
+ <title>_title_</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..a86d26dd4d 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 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <title>Iterative Test Runs</title>
+ <title>_title_</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..a86d26dd4d 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 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <title>Continuous Performance Statistics</title>
+ <title>_title_</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..a86d26dd4d 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 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <title>Continuous Performance Trending</title>
+ <title>_title_</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..eea9042b3e 100644
--- a/csit.infra.dash/app/pal/trending/layout.py
+++ b/csit.infra.dash/app/pal/trending/layout.py
@@ -165,7 +165,8 @@ class Layout:
try:
with open(self._html_layout_file, "r") as file_read:
- self._html_layout = file_read.read()
+ self._html_layout = file_read.read().\
+ replace("_title_", C.TREND_TITLE)
except IOError as err:
raise RuntimeError(
f"Not possible to open the file {self._html_layout_file}\n{err}"
@@ -298,7 +299,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/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 '
+ '<a href="https://fd.io" class="text-white">The Fast Data Project</a>, '
+ '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/"