From 150e6b920773ee710486668d6f984934a754348b Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Fri, 23 Feb 2024 17:38:06 +0000 Subject: [PATCH] Fix formatting issues and optimize code --- .../src/Components/GanttChart/Bar/Index.tsx | 3 +- CommonUI/src/Components/GanttChart/Index.tsx | 1 - .../Services/View/Traces/View/Index.tsx | 31 ++++++++++--------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/CommonUI/src/Components/GanttChart/Bar/Index.tsx b/CommonUI/src/Components/GanttChart/Bar/Index.tsx index f2f433356f..b3e723eba5 100644 --- a/CommonUI/src/Components/GanttChart/Bar/Index.tsx +++ b/CommonUI/src/Components/GanttChart/Bar/Index.tsx @@ -72,8 +72,7 @@ const Bar: FunctionComponent = ( barOpacity = 0.5; } - - if(isHovered){ + if (isHovered) { barOpacity = 1; } diff --git a/CommonUI/src/Components/GanttChart/Index.tsx b/CommonUI/src/Components/GanttChart/Index.tsx index f0a83fe57e..109a9303c4 100644 --- a/CommonUI/src/Components/GanttChart/Index.tsx +++ b/CommonUI/src/Components/GanttChart/Index.tsx @@ -45,7 +45,6 @@ const GanttChart: FunctionComponent = ( setEachIntervalWidth(chartWidth / numberOfInterval); } - const timelineWidth: number = chartWidth * 0.75; // 75 % of chart width, 25% for category spacer setTimelineWidth(timelineWidth); // 75 % of chart width, 25% for category spacer diff --git a/Dashboard/src/Pages/Telemetry/Services/View/Traces/View/Index.tsx b/Dashboard/src/Pages/Telemetry/Services/View/Traces/View/Index.tsx index 4b66d8f440..94b6230297 100644 --- a/Dashboard/src/Pages/Telemetry/Services/View/Traces/View/Index.tsx +++ b/Dashboard/src/Pages/Telemetry/Services/View/Traces/View/Index.tsx @@ -53,21 +53,22 @@ const TraceView: FunctionComponent = ( // get trace with this id and then get all the parentSpanId with this traceid. - const telemetryServices: ListResult = await ModelAPI.getList({ - query: { - projectId: DashboardNavigation.getProjectId()!, - }, - limit: LIMIT_PER_PROJECT, - skip: 0, - modelType: TelemetryService, - sort: { - name: SortOrder.Ascending, - }, - select: { - name: true, - _id: true, - }, - }); + const telemetryServices: ListResult = + await ModelAPI.getList({ + query: { + projectId: DashboardNavigation.getProjectId()!, + }, + limit: LIMIT_PER_PROJECT, + skip: 0, + modelType: TelemetryService, + sort: { + name: SortOrder.Ascending, + }, + select: { + name: true, + _id: true, + }, + }); setTelemetryServices(telemetryServices.data);