From 91df111c0a8745c0028124f1b87f2358e70c001f Mon Sep 17 00:00:00 2001 From: olehp Date: Mon, 29 Jan 2024 16:27:37 +0200 Subject: [PATCH 1/3] Added display name to for open histograms --- src/components/Insights/DurationInsight/index.tsx | 3 ++- src/components/Insights/DurationInsight/types.ts | 3 ++- src/components/Insights/InsightList/index.tsx | 6 ++++-- src/components/Insights/NoScalingIssueInsight/index.tsx | 3 ++- src/components/Insights/NoScalingIssueInsight/types.ts | 3 ++- src/components/Insights/PerformanceAtScaleInsight/index.tsx | 3 ++- src/components/Insights/PerformanceAtScaleInsight/types.ts | 3 ++- src/components/Insights/ScalingIssueInsight/index.tsx | 3 ++- src/components/Insights/ScalingIssueInsight/types.ts | 3 ++- 9 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/components/Insights/DurationInsight/index.tsx b/src/components/Insights/DurationInsight/index.tsx index 31c3e3151..ff09a80e2 100644 --- a/src/components/Insights/DurationInsight/index.tsx +++ b/src/components/Insights/DurationInsight/index.tsx @@ -149,7 +149,8 @@ export const DurationInsight = (props: DurationInsightProps) => { props.onHistogramButtonClick( props.insight.spanInfo.instrumentationLibrary, props.insight.spanInfo.name, - props.insight.type + props.insight.type, + props.insight.spanInfo.displayName ); }; diff --git a/src/components/Insights/DurationInsight/types.ts b/src/components/Insights/DurationInsight/types.ts index 5ee40ff45..f128df2e3 100644 --- a/src/components/Insights/DurationInsight/types.ts +++ b/src/components/Insights/DurationInsight/types.ts @@ -6,7 +6,8 @@ export interface DurationInsightProps extends InsightProps { onHistogramButtonClick: ( instrumentationLibrary: string, name: string, - insightType: InsightType + insightType: InsightType, + displayName?: string ) => void; onLiveButtonClick: (prefixedCodeObjectId: string) => void; onCompareButtonClick: ( diff --git a/src/components/Insights/InsightList/index.tsx b/src/components/Insights/InsightList/index.tsx index ab2fb0765..54222bac4 100644 --- a/src/components/Insights/InsightList/index.tsx +++ b/src/components/Insights/InsightList/index.tsx @@ -245,14 +245,16 @@ const renderInsightCard = ( const handleHistogramButtonClick = ( instrumentationLibrary: string, name: string, - insightType: InsightType + insightType: InsightType, + displayName?: string ) => { window.sendMessageToDigma({ action: actions.OPEN_HISTOGRAM, payload: { instrumentationLibrary, name, - insightType + insightType, + displayName } }); }; diff --git a/src/components/Insights/NoScalingIssueInsight/index.tsx b/src/components/Insights/NoScalingIssueInsight/index.tsx index 60dbcfac7..0dbe96cf8 100644 --- a/src/components/Insights/NoScalingIssueInsight/index.tsx +++ b/src/components/Insights/NoScalingIssueInsight/index.tsx @@ -9,7 +9,8 @@ export const NoScalingIssueInsight = (props: NoScalingIssueInsightProps) => { props.onHistogramButtonClick( props.insight.spanInfo.instrumentationLibrary, props.insight.spanInfo.name, - props.insight.type + props.insight.type, + props.insight.spanInfo.displayName ); }; diff --git a/src/components/Insights/NoScalingIssueInsight/types.ts b/src/components/Insights/NoScalingIssueInsight/types.ts index 3b732e000..4225beffc 100644 --- a/src/components/Insights/NoScalingIssueInsight/types.ts +++ b/src/components/Insights/NoScalingIssueInsight/types.ts @@ -6,6 +6,7 @@ export interface NoScalingIssueInsightProps extends InsightProps { onHistogramButtonClick: ( instrumentationLibrary: string, name: string, - insightType: InsightType + insightType: InsightType, + displayName?: string ) => void; } diff --git a/src/components/Insights/PerformanceAtScaleInsight/index.tsx b/src/components/Insights/PerformanceAtScaleInsight/index.tsx index d8cad43a2..3aa8f01cb 100644 --- a/src/components/Insights/PerformanceAtScaleInsight/index.tsx +++ b/src/components/Insights/PerformanceAtScaleInsight/index.tsx @@ -58,7 +58,8 @@ export const PerformanceAtScaleInsight = ( props.onHistogramButtonClick( props.insight.spanInfo.instrumentationLibrary, props.insight.spanInfo.name, - props.insight.type + props.insight.type, + props.insight.spanInfo.displayName ); }; diff --git a/src/components/Insights/PerformanceAtScaleInsight/types.ts b/src/components/Insights/PerformanceAtScaleInsight/types.ts index d8b780767..ac7139ae8 100644 --- a/src/components/Insights/PerformanceAtScaleInsight/types.ts +++ b/src/components/Insights/PerformanceAtScaleInsight/types.ts @@ -6,6 +6,7 @@ export interface PerformanceAtScaleInsightProps extends InsightProps { onHistogramButtonClick: ( instrumentationLibrary: string, name: string, - insightType: InsightType + insightType: InsightType, + displayName?: string ) => void; } diff --git a/src/components/Insights/ScalingIssueInsight/index.tsx b/src/components/Insights/ScalingIssueInsight/index.tsx index 51d22adfa..3e7e1da68 100644 --- a/src/components/Insights/ScalingIssueInsight/index.tsx +++ b/src/components/Insights/ScalingIssueInsight/index.tsx @@ -33,7 +33,8 @@ export const ScalingIssueInsight = (props: ScalingIssueInsightProps) => { props.onHistogramButtonClick( props.insight.spanInfo.instrumentationLibrary, props.insight.spanInfo.name, - props.insight.type + props.insight.type, + props.insight.spanInfo.displayName ); }; diff --git a/src/components/Insights/ScalingIssueInsight/types.ts b/src/components/Insights/ScalingIssueInsight/types.ts index 20f79e385..60478f80a 100644 --- a/src/components/Insights/ScalingIssueInsight/types.ts +++ b/src/components/Insights/ScalingIssueInsight/types.ts @@ -15,6 +15,7 @@ export interface ScalingIssueInsightProps extends InsightProps { onHistogramButtonClick: ( instrumentationLibrary: string, name: string, - insightType: InsightType + insightType: InsightType, + displayName?: string ) => void; } From 5bb3d446ae37bad48acbf4f3843d792c70c3f7f7 Mon Sep 17 00:00:00 2001 From: olehp Date: Mon, 29 Jan 2024 16:49:24 +0200 Subject: [PATCH 2/3] fixed type --- src/components/Insights/DurationInsight/types.ts | 2 +- src/components/Insights/NoScalingIssueInsight/types.ts | 2 +- src/components/Insights/PerformanceAtScaleInsight/types.ts | 2 +- src/components/Insights/ScalingIssueInsight/types.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Insights/DurationInsight/types.ts b/src/components/Insights/DurationInsight/types.ts index f128df2e3..d47c95425 100644 --- a/src/components/Insights/DurationInsight/types.ts +++ b/src/components/Insights/DurationInsight/types.ts @@ -7,7 +7,7 @@ export interface DurationInsightProps extends InsightProps { instrumentationLibrary: string, name: string, insightType: InsightType, - displayName?: string + displayName: string ) => void; onLiveButtonClick: (prefixedCodeObjectId: string) => void; onCompareButtonClick: ( diff --git a/src/components/Insights/NoScalingIssueInsight/types.ts b/src/components/Insights/NoScalingIssueInsight/types.ts index 4225beffc..b06e4f16b 100644 --- a/src/components/Insights/NoScalingIssueInsight/types.ts +++ b/src/components/Insights/NoScalingIssueInsight/types.ts @@ -7,6 +7,6 @@ export interface NoScalingIssueInsightProps extends InsightProps { instrumentationLibrary: string, name: string, insightType: InsightType, - displayName?: string + displayName: string ) => void; } diff --git a/src/components/Insights/PerformanceAtScaleInsight/types.ts b/src/components/Insights/PerformanceAtScaleInsight/types.ts index ac7139ae8..6c2e5691f 100644 --- a/src/components/Insights/PerformanceAtScaleInsight/types.ts +++ b/src/components/Insights/PerformanceAtScaleInsight/types.ts @@ -7,6 +7,6 @@ export interface PerformanceAtScaleInsightProps extends InsightProps { instrumentationLibrary: string, name: string, insightType: InsightType, - displayName?: string + displayName: string ) => void; } diff --git a/src/components/Insights/ScalingIssueInsight/types.ts b/src/components/Insights/ScalingIssueInsight/types.ts index 60478f80a..42dec60b9 100644 --- a/src/components/Insights/ScalingIssueInsight/types.ts +++ b/src/components/Insights/ScalingIssueInsight/types.ts @@ -16,6 +16,6 @@ export interface ScalingIssueInsightProps extends InsightProps { instrumentationLibrary: string, name: string, insightType: InsightType, - displayName?: string + displayName: string ) => void; } From fdf29b500c07a47602283c47e30e62a94d7643a4 Mon Sep 17 00:00:00 2001 From: opoliarush <156646693+opoliarush@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:51:04 +0200 Subject: [PATCH 3/3] Update src/components/Insights/InsightList/index.tsx Co-authored-by: Kyrylo Shmidt <119138536+kshmidt-digma@users.noreply.github.com> --- src/components/Insights/InsightList/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Insights/InsightList/index.tsx b/src/components/Insights/InsightList/index.tsx index 54222bac4..5c6079bc5 100644 --- a/src/components/Insights/InsightList/index.tsx +++ b/src/components/Insights/InsightList/index.tsx @@ -246,7 +246,7 @@ const renderInsightCard = ( instrumentationLibrary: string, name: string, insightType: InsightType, - displayName?: string + displayName: string ) => { window.sendMessageToDigma({ action: actions.OPEN_HISTOGRAM,