diff --git a/src/components/Assets/AssetsViewScopeConfiguration/AssetsViewScopeConfiguration.stories.tsx b/src/components/Assets/AssetsViewScopeConfiguration/AssetsViewScopeConfiguration.stories.tsx index 3007c9887..e750929bc 100644 --- a/src/components/Assets/AssetsViewScopeConfiguration/AssetsViewScopeConfiguration.stories.tsx +++ b/src/components/Assets/AssetsViewScopeConfiguration/AssetsViewScopeConfiguration.stories.tsx @@ -30,7 +30,7 @@ export const Default: Story = { codeDetailsList: [] }, hasErrors: false, - totalQueryResultCount: 0, + issuesInsightsCount: 0, analyticsInsightsCount: 0, unreadInsightsCount: 0 }, diff --git a/src/components/Insights/InsightsCatalog/InsightsCatalog.stories.tsx b/src/components/Insights/InsightsCatalog/InsightsCatalog.stories.tsx index 9cf89d81c..d0d2777bb 100644 --- a/src/components/Insights/InsightsCatalog/InsightsCatalog.stories.tsx +++ b/src/components/Insights/InsightsCatalog/InsightsCatalog.stories.tsx @@ -68,7 +68,7 @@ export const WithStats = { insightStats: { allIssuesCount: 100, criticalInsightsCount: 5, - totalQueryResultCount: 14, + issuesInsightsCount: 14, unreadInsightsCount: 20, analyticsInsightsCount: 10, scope: null diff --git a/src/components/Insights/InsightsCatalog/InsightsPage/InsightsPage.stories.tsx b/src/components/Insights/InsightsCatalog/InsightsPage/InsightsPage.stories.tsx index d8f2f275e..3b5faffdb 100644 --- a/src/components/Insights/InsightsCatalog/InsightsPage/InsightsPage.stories.tsx +++ b/src/components/Insights/InsightsCatalog/InsightsPage/InsightsPage.stories.tsx @@ -26,7 +26,7 @@ const scope: Scope = { codeDetailsList: [] }, hasErrors: false, - totalQueryResultCount: 0, + issuesInsightsCount: 0, analyticsInsightsCount: 0, unreadInsightsCount: 0 }; @@ -52,7 +52,7 @@ export const WithInsights: Story = { ...initialState, scope: { ...scope, - totalQueryResultCount: 1 + issuesInsightsCount: 1 } }} > diff --git a/src/components/Insights/InsightsCatalog/InsightsStats/InsightsStats.stories.tsx b/src/components/Insights/InsightsCatalog/InsightsStats/InsightsStats.stories.tsx index 144dbffc2..c8b15b1bf 100644 --- a/src/components/Insights/InsightsCatalog/InsightsStats/InsightsStats.stories.tsx +++ b/src/components/Insights/InsightsCatalog/InsightsStats/InsightsStats.stories.tsx @@ -22,3 +22,9 @@ export const Default: Story = { unreadCount: 12 } }; + +export const Old: Story = { + args: { + unreadCount: 12 + } +}; diff --git a/src/components/Insights/InsightsCatalog/InsightsStats/index.tsx b/src/components/Insights/InsightsCatalog/InsightsStats/index.tsx index d0ccac6c5..9993718dd 100644 --- a/src/components/Insights/InsightsCatalog/InsightsStats/index.tsx +++ b/src/components/Insights/InsightsCatalog/InsightsStats/index.tsx @@ -1,4 +1,6 @@ import { useState } from "react"; +import { sendUserActionTrackingEvent } from "../../../../utils/actions/sendUserActionTrackingEvent"; +import { Tooltip } from "../../../common/v3/Tooltip"; import { InsightFilterType } from "../types"; import * as s from "./styles"; import { InsightStatsProps } from "./types"; @@ -22,6 +24,8 @@ export const InsightStats = ({ } else { selection.push(selectedFilter); } + + sendUserActionTrackingEvent(`issues filter changed`, { selection }); setSelectedFilters(selection); onChange(selection); }; @@ -29,17 +33,19 @@ export const InsightStats = ({ return ( handleSelectionChange("criticality")} > - {criticalCount} + {criticalCount ? ( + {criticalCount} + ) : ( + + )} Critical issues handleSelectionChange("unread")} > @@ -47,9 +53,19 @@ export const InsightStats = ({ Unread issues - {allIssuesCount} + {allIssuesCount ? ( + {allIssuesCount} + ) : ( + + )} All issues ); }; + +const NotAssignedValue = () => ( + + N/A + +); diff --git a/src/components/Insights/InsightsCatalog/InsightsStats/types.ts b/src/components/Insights/InsightsCatalog/InsightsStats/types.ts index 557324f65..e92da8a8d 100644 --- a/src/components/Insights/InsightsCatalog/InsightsStats/types.ts +++ b/src/components/Insights/InsightsCatalog/InsightsStats/types.ts @@ -2,9 +2,9 @@ import { InsightFilterType } from "../types"; export interface InsightStatsProps { onChange: (selected: InsightFilterType[]) => void; - allIssuesCount: number; + allIssuesCount?: number; unreadCount: number; - criticalCount: number; + criticalCount?: number; } export interface StatsProps { diff --git a/src/components/Insights/InsightsCatalog/index.tsx b/src/components/Insights/InsightsCatalog/index.tsx index 09799f227..78ea1b023 100644 --- a/src/components/Insights/InsightsCatalog/index.tsx +++ b/src/components/Insights/InsightsCatalog/index.tsx @@ -249,10 +249,8 @@ export const InsightsCatalog = (props: InsightsCatalogProps) => { {!searchInputValue && (insights.length > 0 || selectedFilters.length > 0) && ( diff --git a/src/components/Navigation/ScopeBar/ScopeBar.stories.tsx b/src/components/Navigation/ScopeBar/ScopeBar.stories.tsx index e486b0a5e..f79c96fca 100644 --- a/src/components/Navigation/ScopeBar/ScopeBar.stories.tsx +++ b/src/components/Navigation/ScopeBar/ScopeBar.stories.tsx @@ -39,7 +39,7 @@ const mockedScope: Scope = { relatedCodeDetailsList: [] }, hasErrors: false, - totalQueryResultCount: 0, + issuesInsightsCount: 0, analyticsInsightsCount: 0, unreadInsightsCount: 0 }; diff --git a/src/components/common/App/types.ts b/src/components/common/App/types.ts index f42c23d36..b8d7462c5 100644 --- a/src/components/common/App/types.ts +++ b/src/components/common/App/types.ts @@ -60,7 +60,7 @@ export interface Scope { codeDetailsList: CodeDetails[]; }; hasErrors: boolean; - totalQueryResultCount: number; + issuesInsightsCount: number; analyticsInsightsCount: number; unreadInsightsCount: number; } @@ -119,11 +119,11 @@ export interface InsightStats { spanCodeObjectId: string; }; } | null; - totalQueryResultCount: number; + issuesInsightsCount: number; analyticsInsightsCount: number; unreadInsightsCount: number; - criticalInsightsCount: number; - allIssuesCount: number; + criticalInsightsCount?: number; + allIssuesCount?: number; } export interface UserInfo {