diff options
Diffstat (limited to 'csit.infra.dash/app/cdash')
-rw-r--r-- | csit.infra.dash/app/cdash/report/graphs.py | 30 | ||||
-rw-r--r-- | csit.infra.dash/app/cdash/report/layout.py | 10 | ||||
-rw-r--r-- | csit.infra.dash/app/cdash/routes.py | 3 | ||||
-rw-r--r-- | csit.infra.dash/app/cdash/templates/layout.jinja2 | 2 | ||||
-rw-r--r-- | csit.infra.dash/app/cdash/utils/constants.py | 5 |
5 files changed, 8 insertions, 42 deletions
diff --git a/csit.infra.dash/app/cdash/report/graphs.py b/csit.infra.dash/app/cdash/report/graphs.py index 0e278368ca..4d585f4811 100644 --- a/csit.infra.dash/app/cdash/report/graphs.py +++ b/csit.infra.dash/app/cdash/report/graphs.py @@ -24,36 +24,6 @@ from ..utils.constants import Constants as C from ..utils.utils import get_color -def get_short_version(version: str, dut_type: str="vpp") -> str: - """Returns the short version of DUT without build number. - - :param version: Original version string. - :param dut_type: DUT type. - :type version: str - :type dut_type: str - :returns: Short verion string. - :rtype: str - """ - - if dut_type in ("trex", "dpdk"): - return version - - s_version = str() - groups = re.search( - pattern=re.compile(r"^(\d{2}).(\d{2})-(rc0|rc1|rc2|release$)"), - string=version - ) - if groups: - try: - s_version = \ - f"{groups.group(1)}.{groups.group(2)}.{groups.group(3)}".\ - replace("release", "rls") - except IndexError: - pass - - return s_version - - def select_iterative_data(data: pd.DataFrame, itm:dict) -> pd.DataFrame: """Select the data for graphs and tables from the provided data frame. diff --git a/csit.infra.dash/app/cdash/report/layout.py b/csit.infra.dash/app/cdash/report/layout.py index 6f40019583..8391ed533c 100644 --- a/csit.infra.dash/app/cdash/report/layout.py +++ b/csit.infra.dash/app/cdash/report/layout.py @@ -34,7 +34,7 @@ from ..utils.utils import show_tooltip, label, sync_checklists, gen_new_url, \ generate_options, get_list_group_items from ..utils.url_processing import url_decode from ..data.data import Data -from .graphs import graph_iterative, get_short_version, select_iterative_data +from .graphs import graph_iterative, select_iterative_data # Control panel partameters and their default values. @@ -115,10 +115,10 @@ class Layout: self._data = pd.DataFrame() for rls in releases: data_mrr = Data(self._data_spec_file, True).\ - read_iterative_mrr(release=rls.replace("csit", "rls")) + read_iterative_mrr(release=rls) data_mrr["release"] = rls data_ndrpdr = Data(self._data_spec_file, True).\ - read_iterative_ndrpdr(release=rls.replace("csit", "rls")) + read_iterative_ndrpdr(release=rls) data_ndrpdr["release"] = rls self._data = pd.concat( [self._data, data_mrr, data_ndrpdr], @@ -133,7 +133,7 @@ class Layout: ttype = row["test_type"] lst_job = row["job"].split("-") dut = lst_job[1] - d_ver = get_short_version(row["dut_version"], dut) + d_ver = row["dut_version"] tbed = "-".join(lst_job[-2:]) lst_test_id = row["test_id"].split(".") if dut == "dpdk": @@ -1190,7 +1190,7 @@ class Layout: f"cl-{param}-val": val_sel, f"cl-{param}-all-val": val_all, }) - if all((ctrl_panel.get("cl-core-val"), + if all((ctrl_panel.get("cl-core-val"), ctrl_panel.get("cl-frmsize-val"), ctrl_panel.get("cl-tsttype-val"), )): ctrl_panel.set({"btn-add-dis": False}) diff --git a/csit.infra.dash/app/cdash/routes.py b/csit.infra.dash/app/cdash/routes.py index 81425692f2..e7f65ec0b0 100644 --- a/csit.infra.dash/app/cdash/routes.py +++ b/csit.infra.dash/app/cdash/routes.py @@ -31,6 +31,5 @@ def home(): trending_title=C.TREND_TITLE, report_title=C.REPORT_TITLE, stats_title=C.STATS_TITLE, - news_title=C.NEWS_TITLE, - template=C.TEMPLATE + news_title=C.NEWS_TITLE ) diff --git a/csit.infra.dash/app/cdash/templates/layout.jinja2 b/csit.infra.dash/app/cdash/templates/layout.jinja2 index b1f3a606b9..e681f77af3 100644 --- a/csit.infra.dash/app/cdash/templates/layout.jinja2 +++ b/csit.infra.dash/app/cdash/templates/layout.jinja2 @@ -18,7 +18,7 @@ <!-- Favicons --> <link rel="shortcut icon" href="{{ url_for('static', filename='dist/img/favicon.svg') }}" type="image/x-icon" /> </head> -<body class="{{template}}"> +<body class="d-flex h-100 text-center text-white bg-dark"> {% block content %}{% endblock %} </body> </html> diff --git a/csit.infra.dash/app/cdash/utils/constants.py b/csit.infra.dash/app/cdash/utils/constants.py index cf16491d6b..b3303ddf1c 100644 --- a/csit.infra.dash/app/cdash/utils/constants.py +++ b/csit.infra.dash/app/cdash/utils/constants.py @@ -44,9 +44,6 @@ class Constants: # External stylesheets. EXTERNAL_STYLESHEETS = ["/static/dist/css/bootstrap.css", ] - # Top level template for all pages. - TEMPLATE = "d-flex h-100 text-center text-white bg-dark" - # Path and name of the file specifying the HTML layout of the dash # application. MAIN_HTML_LAYOUT_FILE = "base_layout.jinja2" @@ -77,7 +74,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 = ["csit2210", "csit2206", "csit2202", ] + RELEASES = ["rls2210", "rls2206", "rls2202", ] ############################################################################ # General, application wide, layout affecting constants. |