-
- No Metrics
-
+
No Metrics
0 ? "bg-amber-50" : "bg-gray-50"}`}
>
@@ -454,9 +448,7 @@ const MetricsDashboard: FunctionComponent = (): ReactElement => {
{cat.count}
{cat.name}
-
+
{pct}%
@@ -467,9 +459,7 @@ const MetricsDashboard: FunctionComponent = (): ReactElement => {
{metricCategories.map((cat: MetricCategory) => {
const pct: number =
- totalMetricCount > 0
- ? (cat.count / totalMetricCount) * 100
- : 0;
+ totalMetricCount > 0 ? (cat.count / totalMetricCount) * 100 : 0;
const barColorMap: Record = {
System: "bg-blue-400",
Request: "bg-purple-400",
diff --git a/App/FeatureSet/Dashboard/src/Components/Profiles/ProfilesDashboard.tsx b/App/FeatureSet/Dashboard/src/Components/Profiles/ProfilesDashboard.tsx
index 1b4e12919c..6b2021ce36 100644
--- a/App/FeatureSet/Dashboard/src/Components/Profiles/ProfilesDashboard.tsx
+++ b/App/FeatureSet/Dashboard/src/Components/Profiles/ProfilesDashboard.tsx
@@ -165,10 +165,7 @@ const ProfilesDashboard: FunctionComponent = (): ReactElement => {
}
// Track global type stats
- typeCountMap.set(
- profileType,
- (typeCountMap.get(profileType) || 0) + 1,
- );
+ typeCountMap.set(profileType, (typeCountMap.get(profileType) || 0) + 1);
}
setTotalSampleCount(totalSamples);
@@ -185,20 +182,23 @@ const ProfilesDashboard: FunctionComponent = (): ReactElement => {
badgeColor: ProfileUtil.getProfileTypeBadgeColor(type),
};
})
- .sort(
- (a: ProfileTypeStats, b: ProfileTypeStats) => b.count - a.count,
- );
+ .sort((a: ProfileTypeStats, b: ProfileTypeStats) => {
+ return b.count - a.count;
+ });
setProfileTypeStats(typeStats);
// Only show services that have profiles
const summariesWithData: Array = Array.from(
summaryMap.values(),
- ).filter((s: ServiceProfileSummary) => s.profileCount > 0);
+ ).filter((s: ServiceProfileSummary) => {
+ return s.profileCount > 0;
+ });
summariesWithData.sort(
- (a: ServiceProfileSummary, b: ServiceProfileSummary) =>
- b.profileCount - a.profileCount,
+ (a: ServiceProfileSummary, b: ServiceProfileSummary) => {
+ return b.profileCount - a.profileCount;
+ },
);
setServiceSummaries(summariesWithData);
@@ -289,7 +289,9 @@ const ProfilesDashboard: FunctionComponent = (): ReactElement => {
}
const maxProfiles: number = Math.max(
- ...serviceSummaries.map((s: ServiceProfileSummary) => s.profileCount),
+ ...serviceSummaries.map((s: ServiceProfileSummary) => {
+ return s.profileCount;
+ }),
);
return (
diff --git a/App/FeatureSet/Dashboard/src/Components/Traces/TracesDashboard.tsx b/App/FeatureSet/Dashboard/src/Components/Traces/TracesDashboard.tsx
index c1fbd1d7a5..9764479b94 100644
--- a/App/FeatureSet/Dashboard/src/Components/Traces/TracesDashboard.tsx
+++ b/App/FeatureSet/Dashboard/src/Components/Traces/TracesDashboard.tsx
@@ -64,9 +64,9 @@ const getPercentile: (arr: Array, p: number) => number = (
if (arr.length === 0) {
return 0;
}
- const sorted: Array = [...arr].sort(
- (a: number, b: number) => a - b,
- );
+ const sorted: Array = [...arr].sort((a: number, b: number) => {
+ return a - b;
+ });
const idx: number = Math.ceil((p / 100) * sorted.length) - 1;
return sorted[Math.max(0, idx)] || 0;
};
@@ -197,8 +197,7 @@ const TracesDashboard: FunctionComponent = (): ReactElement => {
}
if (span.statusCode === SpanStatus.Error) {
- const errorSet: Set =
- serviceErrorTraceIds.get(serviceId)!;
+ const errorSet: Set = serviceErrorTraceIds.get(serviceId)!;
if (!errorSet.has(traceId)) {
errorSet.add(traceId);
summary.errorTraces += 1;
@@ -254,7 +253,9 @@ const TracesDashboard: FunctionComponent = (): ReactElement => {
const summariesWithData: Array = Array.from(
summaryMap.values(),
)
- .filter((s: ServiceTraceSummary) => s.totalTraces > 0)
+ .filter((s: ServiceTraceSummary) => {
+ return s.totalTraces > 0;
+ })
.map((s: ServiceTraceSummary) => {
return {
...s,
@@ -290,9 +291,9 @@ const TracesDashboard: FunctionComponent = (): ReactElement => {
setRecentErrorTraces(errorTraces.slice(0, 8));
const slowTraces: Array = [...allTraces]
- .sort(
- (a: RecentTrace, b: RecentTrace) => b.durationNano - a.durationNano,
- )
+ .sort((a: RecentTrace, b: RecentTrace) => {
+ return b.durationNano - a.durationNano;
+ })
.slice(0, 8);
setRecentSlowTraces(slowTraces);
} catch (err) {
@@ -309,9 +310,9 @@ const TracesDashboard: FunctionComponent = (): ReactElement => {
const getServiceName: (serviceId: string) => string = (
serviceId: string,
): string => {
- const service: Service | undefined = services.find(
- (s: Service) => s.id?.toString() === serviceId,
- );
+ const service: Service | undefined = services.find((s: Service) => {
+ return s.id?.toString() === serviceId;
+ });
return service?.name?.toString() || "Unknown";
};