diff --git a/backend/app/api/api.py b/backend/app/api/api.py index 48743aed..2c4106c8 100644 --- a/backend/app/api/api.py +++ b/backend/app/api/api.py @@ -10,6 +10,7 @@ from app.api.v1.endpoints.telco import telcoJobs from app.api.v1.endpoints.telco import telcoGraphs + router = APIRouter() # OCP endpoints diff --git a/backend/app/api/v1/commons/example_responses.py b/backend/app/api/v1/commons/example_responses.py index da95c682..c320a089 100644 --- a/backend/app/api/v1/commons/example_responses.py +++ b/backend/app/api/v1/commons/example_responses.py @@ -136,7 +136,7 @@ def response_422(): "formal": "true", "startDate": "2024-05-16 19:39:48+00:00", "endDate": "2024-05-16 20:41:48+00:00", - "buildUrl": "https://ci-jenkins-csb-kniqe.apps.ocp-c1.prod.psi.redhat.com/job/ocp-far-edge-vran-tests/10506", + "buildUrl": "https://xxx.jenkins.redhat.com/job/your-jobs/23", "jobStatus": "success", "jobDuration": 3720 }, diff --git a/backend/app/api/v1/commons/telco.py b/backend/app/api/v1/commons/telco.py index c2af92fd..49a055cd 100644 --- a/backend/app/api/v1/commons/telco.py +++ b/backend/app/api/v1/commons/telco.py @@ -1,5 +1,6 @@ from datetime import date import pandas as pd +from app import config from app.services.splunk import SplunkService import app.api.v1.commons.hasher as hasher from datetime import datetime, timezone @@ -8,7 +9,11 @@ async def getData(start_datetime: date, end_datetime: date, configpath: str): test_types = ["oslat", "cyclictest", "cpu_util", "deployment", "ptp", "reboot", "rfc-2544"] - jenkins_url = "https://ci-jenkins-csb-kniqe.apps.ocp-c1.prod.psi.redhat.com/job/ocp-far-edge-vran-tests/" + cfg = config.get_config() + try: + jenkins_url = cfg.get('telco.config.job_url') + except Exception as e: + print(f"Error reading telco configuration: {e}") test_type_execution_times = { "oslat": 3720, "cyclictest": 3720, diff --git a/backend/app/services/search.py b/backend/app/services/search.py index 818ceca6..f0a98ac1 100644 --- a/backend/app/services/search.py +++ b/backend/app/services/search.py @@ -93,14 +93,14 @@ async def post(self, query, indice=None, size=10000, start_date=None, end_date=N query['query']['bool']['filter']['range'][timestamp_field]['gte'] = str(new_start_date) if end_date: query['query']['bool']['filter']['range'][timestamp_field]['lte'] = str(end_date) - if end_date is None: - response = await self.new_es.search( - index=self.new_index+"*", - body=jsonable_encoder(query), - size=size) - new_results = response['hits']['hits'] - else: - new_results = await self.scan_indices(self.new_es, self.new_index, query, timestamp_field, new_start_date, end_date, size) + if end_date is None: + response = await self.new_es.search( + index=self.new_index+"*", + body=jsonable_encoder(query), + size=size) + new_results = response['hits']['hits'] + else: + new_results = await self.scan_indices(self.new_es, self.new_index, query, timestamp_field, new_start_date, end_date, size) return await self.remove_duplicates(previous_results + new_results) else: if start_date and end_date: diff --git a/frontend/src/components/Telco/DisplayGraph.js b/frontend/src/components/Telco/DisplayGraph.js index 000e4d7f..53d61ad1 100644 --- a/frontend/src/components/Telco/DisplayGraph.js +++ b/frontend/src/components/Telco/DisplayGraph.js @@ -45,13 +45,13 @@ export const DisplayGraph = ({ uuid, encryptedData, benchmark, heading }) => { <> {benchmark === 'oslat' || benchmark === 'cyclictest' ? ( <> - {renderCard('number_of_nines', `${benchmark} results`)} - {renderCard('max_latency', `${benchmark} results`)} + {renderCard('number_of_nines', `${benchmark} number of nines results`)} + {renderCard('max_latency', `${benchmark} latency results`)} ) : benchmark === 'deployment' ? ( <> - {renderCard('total_minutes', `${benchmark} results`)} - {renderCard('total_reboot_count', `${benchmark} results`)} + {renderCard('total_minutes', `${benchmark} timing results`)} + {renderCard('total_reboot_count', `${benchmark} reboot count results`)} ) : ( renderCard(null, `${benchmark} results`)