From d071da89508b2f7e67c3b1f58cb1fae5ef4e0dca Mon Sep 17 00:00:00 2001 From: olehp Date: Mon, 5 Feb 2024 19:21:35 +0200 Subject: [PATCH 1/3] filter icons --- .../Assets/AssetList/AssetEntry/index.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/Assets/AssetList/AssetEntry/index.tsx b/src/components/Assets/AssetList/AssetEntry/index.tsx index d4bd6956b..b9e325c58 100644 --- a/src/components/Assets/AssetList/AssetEntry/index.tsx +++ b/src/components/Assets/AssetList/AssetEntry/index.tsx @@ -49,13 +49,15 @@ export const AssetEntry = (props: AssetEntryProps) => { const lastSeenDateTime = props.entry.latestSpanTimestamp; // Do not show unimplemented insights - const filteredInsights = props.entry.insights.filter( - (x) => - ![ - InsightType.SpanScalingWell, - InsightType.SpanScalingInsufficientData - ].includes(x.type as InsightType) - ); + const filteredInsights = props.entry.insights + .filter( + (x) => + ![ + InsightType.SpanScalingWell, + InsightType.SpanScalingInsufficientData + ].includes(x.type as InsightType) + ) + .filter((x) => x.importance < 6); // show icon that has importance grater that Info const sortedInsights = [...filteredInsights].sort( (a, b) => From 529dd6842001da3c13f927f13a3b1637f5b054d5 Mon Sep 17 00:00:00 2001 From: opoliarush <156646693+opoliarush@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:40:50 +0200 Subject: [PATCH 2/3] Update src/components/Assets/AssetList/AssetEntry/index.tsx Co-authored-by: Kyrylo Shmidt <119138536+kshmidt-digma@users.noreply.github.com> --- src/components/Assets/AssetList/AssetEntry/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Assets/AssetList/AssetEntry/index.tsx b/src/components/Assets/AssetList/AssetEntry/index.tsx index b9e325c58..c8732869b 100644 --- a/src/components/Assets/AssetList/AssetEntry/index.tsx +++ b/src/components/Assets/AssetList/AssetEntry/index.tsx @@ -57,7 +57,7 @@ export const AssetEntry = (props: AssetEntryProps) => { InsightType.SpanScalingInsufficientData ].includes(x.type as InsightType) ) - .filter((x) => x.importance < 6); // show icon that has importance grater that Info + .filter((x) => x.importance < InsightImportance.Info); const sortedInsights = [...filteredInsights].sort( (a, b) => From d03f02b11d25c02c8e8762545b82cf88a387b4c7 Mon Sep 17 00:00:00 2001 From: olehp Date: Tue, 6 Feb 2024 09:44:22 +0200 Subject: [PATCH 3/3] fix comments --- src/components/Assets/AssetList/AssetEntry/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Assets/AssetList/AssetEntry/index.tsx b/src/components/Assets/AssetList/AssetEntry/index.tsx index c8732869b..d3c0f2eec 100644 --- a/src/components/Assets/AssetList/AssetEntry/index.tsx +++ b/src/components/Assets/AssetList/AssetEntry/index.tsx @@ -7,6 +7,7 @@ import { formatTimeDistance } from "../../../../utils/formatTimeDistance"; import { getInsightImportanceColor } from "../../../../utils/getInsightImportanceColor"; import { getInsightTypeInfo } from "../../../../utils/getInsightTypeInfo"; import { getInsightTypeOrderPriority } from "../../../../utils/getInsightTypeOrderPriority"; +import { InsightImportance } from "../../../Insights/types"; import { ConfigContext } from "../../../common/App/ConfigContext"; import { ImpactScore } from "../../../common/ImpactScore"; import { Tag } from "../../../common/Tag";