From d86d9ee4767480d677796ee74a93b52ea1631c3d Mon Sep 17 00:00:00 2001 From: shivam-bit Date: Fri, 19 Apr 2024 17:49:44 +0530 Subject: [PATCH 1/2] Remove unused variables and code in DoraMetricsBody.tsx --- web-server/src/content/DoraMetrics/DoraMetricsBody.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx b/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx index ab357370a..d94260bb6 100644 --- a/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx +++ b/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx @@ -79,9 +79,6 @@ export const DoraMetricsBody = () => { dispatch, orgId, singleTeamId, - memberFilter, - singleTeamProdBranchesConfig, - team?.manager_id, activeBranchMode ]); From ed6bf4998ae7789aad7f0a85664b4885b0340293 Mon Sep 17 00:00:00 2001 From: shivam-bit Date: Fri, 19 Apr 2024 17:53:32 +0530 Subject: [PATCH 2/2] Refactor DoraMetricsBody and MetricsClassificationsThreshold --- web-server/src/content/DoraMetrics/DoraMetricsBody.tsx | 8 +------- .../DoraMetrics/MetricsClassificationsThreshold.ts | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx b/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx index d94260bb6..2355a8318 100644 --- a/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx +++ b/web-server/src/content/DoraMetrics/DoraMetricsBody.tsx @@ -31,13 +31,7 @@ import { WeeklyDeliveryVolumeCard } from './DoraCards/WeeklyDeliveryVolumeCard'; export const DoraMetricsBody = () => { const dispatch = useDispatch(); const { orgId } = useAuth(); - const { - team, - singleTeamId, - dates, - memberFilter, - singleTeamProdBranchesConfig - } = useSingleTeamConfig(); + const { singleTeamId, dates } = useSingleTeamConfig(); const branches = useStateBranchConfig(); const isLoading = useSelector( (s) => s.doraMetrics.requests?.metrics_summary === FetchState.REQUEST diff --git a/web-server/src/content/DoraMetrics/MetricsClassificationsThreshold.ts b/web-server/src/content/DoraMetrics/MetricsClassificationsThreshold.ts index 2b2e65fb6..434fd9f47 100644 --- a/web-server/src/content/DoraMetrics/MetricsClassificationsThreshold.ts +++ b/web-server/src/content/DoraMetrics/MetricsClassificationsThreshold.ts @@ -25,15 +25,15 @@ export const updatedDeploymentFrequencyThresholds = (metric: { switch (metric.interval) { case 'day': if (metric.count > 1) return 'elite'; - break; + return 'high'; case 'week': if (metric.count > 1) return 'high'; - break; + return 'medium'; case 'month': if (metric.count > 1) return 'medium'; - break; + return 'low'; default: - return 'medium'; + return 'low'; } };