From db122d527a9ececef4545f7987ebddec87b4fc9d Mon Sep 17 00:00:00 2001 From: e-for-eshaan Date: Wed, 15 May 2024 19:05:03 +0530 Subject: [PATCH 1/2] update links for dora-metrics --- .../DoraMetrics/DoraCards/ChangeFailureRateCard.tsx | 2 +- .../DoraMetrics/DoraCards/ChangeTimeCard.tsx | 13 ++----------- .../DoraCards/WeeklyDeliveryVolumeCard.tsx | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx b/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx index c32704d0a..e06f3d267 100644 --- a/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx +++ b/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx @@ -126,7 +126,7 @@ export const ChangeFailureRateCard = () => { Change Failure Rate diff --git a/web-server/src/content/DoraMetrics/DoraCards/ChangeTimeCard.tsx b/web-server/src/content/DoraMetrics/DoraCards/ChangeTimeCard.tsx index dc214f076..127e7e0cb 100644 --- a/web-server/src/content/DoraMetrics/DoraCards/ChangeTimeCard.tsx +++ b/web-server/src/content/DoraMetrics/DoraCards/ChangeTimeCard.tsx @@ -1,15 +1,7 @@ import { ArrowForwardRounded, WarningAmberRounded } from '@mui/icons-material'; import CheckCircleOutlineRoundedIcon from '@mui/icons-material/CheckCircleOutlineRounded'; import ErrorOutlineRoundedIcon from '@mui/icons-material/ErrorOutlineRounded'; -import { - alpha, - Button, - Chip, - darken, - List, - ListItem, - useTheme -} from '@mui/material'; +import { alpha, Button, Chip, darken, List, ListItem } from '@mui/material'; import Link from 'next/link'; import pluralize from 'pluralize'; import { useMemo } from 'react'; @@ -62,7 +54,6 @@ const chartOptions = { export const ChangeTimeCard = () => { const { addPage } = useOverlayPage(); - const theme = useTheme(); const { role } = useAuth(); const isEng = isRoleLessThanEM(role); @@ -135,7 +126,7 @@ export const ChangeTimeCard = () => { Lead Time for Changes {isSufficientDataAvailable && diff --git a/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx b/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx index 099bf2c57..8b0261776 100644 --- a/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx +++ b/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx @@ -116,7 +116,7 @@ export const WeeklyDeliveryVolumeCard = () => { Deployment Frequency From 8ac1cebf4099582b6bdc2eb217b99b97ce695484 Mon Sep 17 00:00:00 2001 From: e-for-eshaan Date: Wed, 15 May 2024 19:18:26 +0530 Subject: [PATCH 2/2] prevent propagation of event, disables clicks when clicking link --- .../DoraCards/ChangeFailureRateCard.tsx | 14 +- .../DoraMetrics/DoraCards/ChangeTimeCard.tsx | 208 +++++++++--------- .../DoraCards/MeanTimeToRestoreCard.tsx | 14 +- .../DoraCards/WeeklyDeliveryVolumeCard.tsx | 14 +- 4 files changed, 137 insertions(+), 113 deletions(-) diff --git a/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx b/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx index e06f3d267..928d7287f 100644 --- a/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx +++ b/web-server/src/content/DoraMetrics/DoraCards/ChangeFailureRateCard.tsx @@ -125,10 +125,16 @@ export const ChangeFailureRateCard = () => { Change Failure Rate - + { + e.stopPropagation(); + }} + > + + { Lead Time for Changes - { + e.stopPropagation(); + }} > - {isSufficientDataAvailable && - !isAllAssignedReposHaveDeploymentsConfigured && ( - - - Insight based on data from{' '} - {reposCountWithWorkflowConfigured} out of{' '} - {allAssignedRepos.length}{' '} - {pluralize('repo', allAssignedRepos.length)} which - have workflow configured. - - - Following{' '} - {pluralize( - 'repo', - reposWithNoDeploymentsConfigured.length - )}{' '} - {reposWithNoDeploymentsConfigured.length > 1 - ? "don't" - : "doesn't"}{' '} - have any workflow assigned : - - {reposWithNoDeploymentsConfigured.map((r) => ( - + {isSufficientDataAvailable && + !isAllAssignedReposHaveDeploymentsConfigured && ( + + + Insight based on data from{' '} + {reposCountWithWorkflowConfigured} out of{' '} + {allAssignedRepos.length}{' '} + {pluralize('repo', allAssignedRepos.length)} which + have workflow configured. + + + Following{' '} + {pluralize( + 'repo', + reposWithNoDeploymentsConfigured.length + )}{' '} + {reposWithNoDeploymentsConfigured.length > 1 + ? "don't" + : "doesn't"}{' '} + have any workflow assigned : + + {reposWithNoDeploymentsConfigured.map((r) => ( + + {r.name} + + ))} + + + {!isEng && ( + + - - )} - - } - darkTip - > - - - )} - {isSufficientDataAvailable && - isAllAssignedReposHaveDeploymentsConfigured && ( - - - All assigned{' '} - {pluralize('repo', allAssignedRepos.length)} have - deployment configured. - - {!isEng && ( - - - - )} - - } - darkTip - > - - - )} - + Configure deployment workflows here + + + )} + + } + darkTip + > + + + )} + {isSufficientDataAvailable && + isAllAssignedReposHaveDeploymentsConfigured && ( + + + All assigned{' '} + {pluralize('repo', allAssignedRepos.length)} have + deployment configured. + + {!isEng && ( + + + + )} + + } + darkTip + > + + + )} + + diff --git a/web-server/src/content/DoraMetrics/DoraCards/MeanTimeToRestoreCard.tsx b/web-server/src/content/DoraMetrics/DoraCards/MeanTimeToRestoreCard.tsx index fecbb1b9b..1814cf1c4 100644 --- a/web-server/src/content/DoraMetrics/DoraCards/MeanTimeToRestoreCard.tsx +++ b/web-server/src/content/DoraMetrics/DoraCards/MeanTimeToRestoreCard.tsx @@ -98,10 +98,16 @@ export const MeanTimeToRestoreCard = () => { Mean Time to Recovery - + { + e.stopPropagation(); + }} + > + + { Deployment Frequency - + { + e.stopPropagation(); + }} + > + + {isCodeProviderIntegrationEnabled && (