diff --git a/src/components/Insights/SpanNexusInsight/index.tsx b/src/components/Insights/SpanNexusInsight/index.tsx index 48422d2f0..5ae7045f0 100644 --- a/src/components/Insights/SpanNexusInsight/index.tsx +++ b/src/components/Insights/SpanNexusInsight/index.tsx @@ -2,11 +2,9 @@ import { Tag } from "../../common/Tag"; import { InsightCard } from "../InsightCard"; import { Description } from "../styles"; import * as s from "./styles"; -import { SpanNexusInsightProps, } from "./types"; +import { SpanNexusInsightProps } from "./types"; -export const SpanNexusInsight = ( - props: SpanNexusInsightProps -) => { +export const SpanNexusInsight = (props: SpanNexusInsightProps) => { const { insight } = props; const { entries, flows, usage, services } = insight; return ( @@ -14,16 +12,14 @@ export const SpanNexusInsight = ( data={insight} content={ - - Multiple code flows depend on this location - + Multiple code flows depend on this location Services - Edpoints + Endpoints @@ -32,7 +28,7 @@ export const SpanNexusInsight = ( Usage - + diff --git a/src/components/Insights/SpanNexusInsight/mockData.ts b/src/components/Insights/SpanNexusInsight/mockData.ts index 00f55d922..5ce567c55 100644 --- a/src/components/Insights/SpanNexusInsight/mockData.ts +++ b/src/components/Insights/SpanNexusInsight/mockData.ts @@ -1,62 +1,57 @@ import { InsightType } from "../../../types"; -import { - InsightCategory, - InsightScope, - SpanNexusInsight -} from "../types"; +import { InsightCategory, InsightScope, SpanNexusInsight } from "../types"; -export const mockedSpanNexusInsight: SpanNexusInsight = - { - firstDetected: "2023-12-05T17:25:47.010Z", - lastDetected: "2024-01-05T13:14:47.010Z", - criticality: 0, - impact: 0, - firstCommitId: "b3f7b3f", - lastCommitId: "a1b2c3d", - deactivatedCommitId: null, - reopenCount: 0, - ticketLink: null, - name: "Code Nexus Point", - type: InsightType.SpanNexus, - category: InsightCategory.Usage, - specifity: 2, - importance: 3, - scope: InsightScope.Span, - spanInfo: { - name: "HTTP POST /owners/{ownerId}/pets/new", - displayName: "HTTP POST /owners/{ownerId}/pets/new", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP POST /owners/{ownerId}/pets/new", - methodCodeObjectId: - "method:org.springframework.samples.petclinic.owner.PetController$_$processCreationForm", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.owner.PetController$_$processCreationForm" - }, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - }, - codeObjectId: - "org.springframework.samples.petclinic.owner.PetController$_$processCreationForm", - decorators: [ - { - title: "Excessive HTTP Calls", - description: "Numerous Http calls to the same endpoint detected " - } - ], - environment: "BOB-LAPTOP[LOCAL]", - severity: 0.0, - isRecalculateEnabled: false, - prefixedCodeObjectId: +export const mockedSpanNexusInsight: SpanNexusInsight = { + firstDetected: "2023-12-05T17:25:47.010Z", + lastDetected: "2024-01-05T13:14:47.010Z", + criticality: 0, + impact: 0, + firstCommitId: "b3f7b3f", + lastCommitId: "a1b2c3d", + deactivatedCommitId: null, + reopenCount: 0, + ticketLink: null, + name: "Code Nexus Point", + type: InsightType.SpanNexus, + category: InsightCategory.Usage, + specifity: 2, + importance: 3, + scope: InsightScope.Span, + spanInfo: { + name: "HTTP POST /owners/{ownerId}/pets/new", + displayName: "HTTP POST /owners/{ownerId}/pets/new", + instrumentationLibrary: "io.opentelemetry.tomcat-10.0", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP POST /owners/{ownerId}/pets/new", + methodCodeObjectId: "method:org.springframework.samples.petclinic.owner.PetController$_$processCreationForm", - customStartTime: null, - actualStartTime: "2023-08-10T08:04:00Z", - flows :4, - services: 3, - usage: 'High', - entries: 5, - }; + kind: "Server", + codeObjectId: + "org.springframework.samples.petclinic.owner.PetController$_$processCreationForm" + }, + shortDisplayInfo: { + title: "", + targetDisplayName: "", + subtitle: "", + description: "" + }, + codeObjectId: + "org.springframework.samples.petclinic.owner.PetController$_$processCreationForm", + decorators: [ + { + title: "Excessive HTTP Calls", + description: "Numerous Http calls to the same endpoint detected " + } + ], + environment: "BOB-LAPTOP[LOCAL]", + severity: 0.0, + isRecalculateEnabled: false, + prefixedCodeObjectId: + "method:org.springframework.samples.petclinic.owner.PetController$_$processCreationForm", + customStartTime: null, + actualStartTime: "2023-08-10T08:04:00Z", + flows: 4, + services: 3, + usage: "High", + entries: 5 +}; diff --git a/src/components/Insights/SpanNexusInsight/types.ts b/src/components/Insights/SpanNexusInsight/types.ts index ee5a3f7f9..7771f501b 100644 --- a/src/components/Insights/SpanNexusInsight/types.ts +++ b/src/components/Insights/SpanNexusInsight/types.ts @@ -1,8 +1,4 @@ - -import { - InsightProps, - SpanNexusInsight, -} from "../types"; +import { InsightProps, SpanNexusInsight } from "../types"; export interface SpanNexusInsightProps extends InsightProps { insight: SpanNexusInsight; diff --git a/src/components/Insights/typeGuards.ts b/src/components/Insights/typeGuards.ts index 54eded626..7209e0e1f 100644 --- a/src/components/Insights/typeGuards.ts +++ b/src/components/Insights/typeGuards.ts @@ -136,6 +136,5 @@ export const isEndpointHighNumberOfQueriesInsight = ( insight.type === InsightType.EndpointHighNumberOfQueries; export const isSpanNexusInsight = ( - insight: CodeObjectInsight -): insight is SpanNexusInsight => - insight.type === InsightType.SpanNexus; + insight: CodeObjectInsight +): insight is SpanNexusInsight => insight.type === InsightType.SpanNexus; diff --git a/src/components/Insights/types.ts b/src/components/Insights/types.ts index d6ff4875d..e3cafe43f 100644 --- a/src/components/Insights/types.ts +++ b/src/components/Insights/types.ts @@ -690,4 +690,3 @@ export interface SpanNexusInsight extends SpanInsight { flows: number; usage: string | null; } - diff --git a/src/types.ts b/src/types.ts index 585dbd26f..26988fc9b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -32,7 +32,7 @@ export enum InsightType { EndpointSessionInView = "EndpointSessionInView", EndpointChattyApi = "EndpointChattyApi", EndpointHighNumberOfQueries = "EndpointHighNumberOfQueries", - SpanNexus = "SpanNexus", + SpanNexus = "SpanNexus" } export type PercentileKey = "p50" | "p95"; diff --git a/src/utils/getInsightTypeInfo.ts b/src/utils/getInsightTypeInfo.ts index 76f7f4197..973512de0 100644 --- a/src/utils/getInsightTypeInfo.ts +++ b/src/utils/getInsightTypeInfo.ts @@ -115,7 +115,7 @@ export const getInsightTypeInfo = ( label: "High number of queries" }, [InsightType.SpanNexus]: { - icon: BottleneckIcon, // todo changes + icon: BottleneckIcon, // todo changes label: "Code Nexus Point" } };