Skip to content

Commit

Permalink
Merge main to ploty changes
Browse files Browse the repository at this point in the history
Signed-off-by: vishnuchalla <[email protected]>
  • Loading branch information
vishnuchalla committed May 23, 2024
2 parents 22d672a + e3c39d5 commit b79e261
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions backend/app/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from app.api.v1.endpoints.telco import telcoJobs
from app.api.v1.endpoints.telco import telcoGraphs


router = APIRouter()

# OCP endpoints
Expand Down
2 changes: 1 addition & 1 deletion backend/app/api/v1/commons/example_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
7 changes: 6 additions & 1 deletion backend/app/api/v1/commons/telco.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions backend/app/services/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Telco/DisplayGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down

0 comments on commit b79e261

Please sign in to comment.