diff options
author | Tibor Frank <tifrank@cisco.com> | 2024-06-24 11:59:56 +0000 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2024-06-24 12:02:17 +0000 |
commit | 8e63a248c09cb36e725ffe4d28ccaaeb5cd27564 (patch) | |
tree | 66e28b4adc89efd298be3b50624c391b5f798b05 /csit.infra.dash | |
parent | f6672b034cdadfa82082ba34bd135ed4bef96446 (diff) |
C-Dash: fix telemetry
Change-Id: Ic30b27e0defd91ab2fdc979569485d9f9a01e78b
Signed-off-by: Tibor Frank <tifrank@cisco.com>
(cherry picked from commit 1089a589b2f7abe16d1de3d0afcdca1afdd16362)
Diffstat (limited to 'csit.infra.dash')
-rw-r--r-- | csit.infra.dash/app/cdash/utils/constants.py | 9 | ||||
-rw-r--r-- | csit.infra.dash/app/cdash/utils/telemetry_data.py | 7 | ||||
-rw-r--r-- | csit.infra.dash/docker-compose.yaml | 1 |
3 files changed, 11 insertions, 6 deletions
diff --git a/csit.infra.dash/app/cdash/utils/constants.py b/csit.infra.dash/app/cdash/utils/constants.py index 7cdfe76ee7..3b6e125d8e 100644 --- a/csit.infra.dash/app/cdash/utils/constants.py +++ b/csit.infra.dash/app/cdash/utils/constants.py @@ -118,15 +118,18 @@ class Constants: # External stylesheets. EXTERNAL_STYLESHEETS = ["/static/dist/css/bootstrap.css", ] - # URL to Jenkins + # CICD type. + CICD_TYPE = get_str_from_env("CICD_TYPE", "jenkins") + + # URL to CICD. URL_CICD = get_str_from_env("URL_CICD", "https://jenkins.fd.io/job/") - # URL to logs + # URL to logs. URL_LOGS = get_str_from_env( "URL_LOGS", "https://logs.fd.io/vex-yul-rot-jenkins-1/" ) - # URL to the documentation + # URL to the documentation. URL_DOC = get_str_from_env("URL_DOC", "https://csit.fd.io/cdocs/") URL_DOC_TRENDING = URL_DOC + "methodology/trending/analysis/" URL_DOC_REL_NOTES = URL_DOC + "release_notes/current/" diff --git a/csit.infra.dash/app/cdash/utils/telemetry_data.py b/csit.infra.dash/app/cdash/utils/telemetry_data.py index 9975874d96..c63ee0057a 100644 --- a/csit.infra.dash/app/cdash/utils/telemetry_data.py +++ b/csit.infra.dash/app/cdash/utils/telemetry_data.py @@ -64,7 +64,7 @@ class TelemetryData: df = pd.concat(lst_items, ignore_index=True, copy=False) # Use only neccessary data: - df = df[[ + df = df[df.columns.intersection([ "job", "build", "dut_type", @@ -81,7 +81,8 @@ class TelemetryData: "result_ndr_lower_rate_value", "result_ndr_lower_rate_unit", "telemetry" - ]] + ])] + # Transform metrics from strings to dataframes: lst_telemetry = list() for _, row in df.iterrows(): @@ -91,7 +92,7 @@ class TelemetryData: "value": list(), "timestamp": list() } - + # If there is no telemetry data, use empty dictionary if row["telemetry"] is None or isinstance(row["telemetry"], float): lst_telemetry.append(pd.DataFrame(data=d_telemetry)) diff --git a/csit.infra.dash/docker-compose.yaml b/csit.infra.dash/docker-compose.yaml index a3b5e1a683..8ec97fad0f 100644 --- a/csit.infra.dash/docker-compose.yaml +++ b/csit.infra.dash/docker-compose.yaml @@ -16,6 +16,7 @@ services: CSIT_START_DOC: "True" CSIT_TITLE: "FD.io CSIT" CSIT_BRAND: "CSIT-Dash" + CSIT_CICD_TYPE: "jenkins" CSIT_URL_CICD: "https://jenkins.fd.io/job/" CSIT_URL_LOGS: "https://logs.fd.io/vex-yul-rot-jenkins-1/" CSIT_URL_DOC: "https://csit.fd.io/cdocs/" |