diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/ChartypeComponent.jsx b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/ChartypeComponent.jsx index dfe34b400e2..71409ddf8b8 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/ChartypeComponent.jsx +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/ChartypeComponent.jsx @@ -12,7 +12,7 @@ function ChartypeComponent({data, title,charTitle, chartSubtitle, reverse, isNor const filtersMap = PersistStore(state => state.filtersMap) const setFiltersMap = PersistStore(state => state.setFiltersMap) - const isLabelClickable = !!(navUrl === '/dashboard/issues' || onSegmentClick) + const isLabelClickable = !!(navUrl === '/dashboard/issues' || onSegmentClick || navUrlBuilder) function handleLabelClick(key) { const item = data[key] @@ -20,6 +20,13 @@ function ChartypeComponent({data, title,charTitle, chartSubtitle, reverse, isNor onSegmentClick(item?.filterValue || key) return } + if (navUrlBuilder) { + const builtUrl = navUrlBuilder(navUrl, item?.filterValue) + if (builtUrl) { + window.open(builtUrl, '_blank', 'noopener,noreferrer') + } + return + } if (navUrl === '/dashboard/issues') { const filterKey = item?.filterKey || key const filterType = ['CRITICAL','HIGH','MEDIUM','LOW'].includes(filterKey.toUpperCase()) ? 'severity' : 'issueCategory' @@ -56,6 +63,8 @@ function ChartypeComponent({data, title,charTitle, chartSubtitle, reverse, isNor handleLabelClick(key) : undefined} + style={isLabelClickable ? { cursor: 'pointer' } : undefined} > {observeFunc.formatNumberWithCommas(data[key]?.text)}