diff --git a/src/components/Insights/InsightsCatalog/index.tsx b/src/components/Insights/InsightsCatalog/index.tsx
index f761b5c09..29a7c98fc 100644
--- a/src/components/Insights/InsightsCatalog/index.tsx
+++ b/src/components/Insights/InsightsCatalog/index.tsx
@@ -88,6 +88,7 @@ export const InsightsCatalog = (props: InsightsCatalogProps) => {
diff --git a/src/components/Insights/InsightsPage/index.tsx b/src/components/Insights/InsightsPage/index.tsx
index 0e8a30d59..3f2aa8de2 100644
--- a/src/components/Insights/InsightsPage/index.tsx
+++ b/src/components/Insights/InsightsPage/index.tsx
@@ -528,6 +528,13 @@ export const InsightsPage = (props: InsightPageProps) => {
j === insightIndexWithJiraHint
);
})
+ ) : props.isFilteringEnabled ? (
+ No data found>}
+ content={
+ There are no insights for this criteria
+ }
+ />
) : (
No data yet>}
diff --git a/src/components/Insights/InsightsPage/types.ts b/src/components/Insights/InsightsPage/types.ts
index 05b444be8..2736fb55a 100644
--- a/src/components/Insights/InsightsPage/types.ts
+++ b/src/components/Insights/InsightsPage/types.ts
@@ -2,6 +2,7 @@ import { GenericCodeObjectInsight } from "../types";
export interface InsightPageProps {
insights: GenericCodeObjectInsight[];
+ isFilteringEnabled: boolean;
onJiraTicketCreate: (
insight: GenericCodeObjectInsight,
spanCodeObjectId?: string
diff --git a/src/components/Insights/common/useInsightsData.ts b/src/components/Insights/common/useInsightsData.ts
index c8bbab4eb..6e818879a 100644
--- a/src/components/Insights/common/useInsightsData.ts
+++ b/src/components/Insights/common/useInsightsData.ts
@@ -54,6 +54,7 @@ export const useInsightsData = (props: UseInsightDataProps) => {
});
setIsInitialLoading(true);
+ setIsLoading(true);
const handleInsightsData = (data: unknown, timeStamp: number) => {
const insightsData = data as InsightsData;
insightsData.insightsStatus = InsightsStatus.DEFAULT;
diff --git a/src/components/Insights/index.tsx b/src/components/Insights/index.tsx
index d8c9e8119..10ac7ca90 100644
--- a/src/components/Insights/index.tsx
+++ b/src/components/Insights/index.tsx
@@ -132,7 +132,7 @@ const renderInsightTicket = (
return null;
};
-const sendMessage = (action: string, data?: any) => {
+const sendMessage = (action: string, data?: object) => {
return window.sendMessageToDigma({
action,
payload: {
@@ -233,19 +233,12 @@ export const Insights = (props: InsightsProps) => {
};
const renderDefaultContent = (data: InsightsData): JSX.Element => {
- if (data.insights.length === 0 && !isLoading) {
- const emptyMsg =
- query.searchQuery?.length === 0
- ? "No insights"
- : "There are no insights for this criteria";
- return ;
- }
return (
{
+ onQueryChange={(query: InsightsQuery) => {
setQuery(query);
}}
defaultQuery={DEFAULT_QUERY}