Fix formatting issues and optimize code

This commit is contained in:
Simon Larsen 2024-02-23 17:38:06 +00:00
parent 29092b23ba
commit 150e6b9207
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
3 changed files with 17 additions and 18 deletions

View File

@ -72,8 +72,7 @@ const Bar: FunctionComponent<ComponentProps> = (
barOpacity = 0.5; barOpacity = 0.5;
} }
if (isHovered) {
if(isHovered){
barOpacity = 1; barOpacity = 1;
} }

View File

@ -45,7 +45,6 @@ const GanttChart: FunctionComponent<ComponentProps> = (
setEachIntervalWidth(chartWidth / numberOfInterval); setEachIntervalWidth(chartWidth / numberOfInterval);
} }
const timelineWidth: number = chartWidth * 0.75; // 75 % of chart width, 25% for category spacer const timelineWidth: number = chartWidth * 0.75; // 75 % of chart width, 25% for category spacer
setTimelineWidth(timelineWidth); // 75 % of chart width, 25% for category spacer setTimelineWidth(timelineWidth); // 75 % of chart width, 25% for category spacer

View File

@ -53,21 +53,22 @@ const TraceView: FunctionComponent<PageComponentProps> = (
// get trace with this id and then get all the parentSpanId with this traceid. // get trace with this id and then get all the parentSpanId with this traceid.
const telemetryServices: ListResult<TelemetryService> = await ModelAPI.getList<TelemetryService>({ const telemetryServices: ListResult<TelemetryService> =
query: { await ModelAPI.getList<TelemetryService>({
projectId: DashboardNavigation.getProjectId()!, query: {
}, projectId: DashboardNavigation.getProjectId()!,
limit: LIMIT_PER_PROJECT, },
skip: 0, limit: LIMIT_PER_PROJECT,
modelType: TelemetryService, skip: 0,
sort: { modelType: TelemetryService,
name: SortOrder.Ascending, sort: {
}, name: SortOrder.Ascending,
select: { },
name: true, select: {
_id: true, name: true,
}, _id: true,
}); },
});
setTelemetryServices(telemetryServices.data); setTelemetryServices(telemetryServices.data);