From 85122b61558f94d2a5277ea4b18e8c968cdb14ab Mon Sep 17 00:00:00 2001 From: olehp Date: Mon, 4 Mar 2024 18:04:41 +0200 Subject: [PATCH 1/2] Fixed jira ticket ui Fixed style for trace btn --- .../InsightCard/InsightCard.stories.tsx | 29 +++++++++++++++++++ .../common/insights/TopUsageInsight/index.tsx | 5 ++-- .../common/insights/TopUsageInsight/styles.ts | 7 +---- src/components/common/v3/JiraButton/index.tsx | 6 +--- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/components/Insights/common/InsightCard/InsightCard.stories.tsx b/src/components/Insights/common/InsightCard/InsightCard.stories.tsx index 2fc7c207f..759aff60f 100644 --- a/src/components/Insights/common/InsightCard/InsightCard.stories.tsx +++ b/src/components/Insights/common/InsightCard/InsightCard.stories.tsx @@ -22,3 +22,32 @@ export const Default: Story = { insight: { ...mockedEndpointNPlusOneInsight, criticality: 0.9 } } }; + +export const JiraButtonIsPrimary: Story = { + args: { + isAsync: true, + insight: { ...mockedEndpointNPlusOneInsight, criticality: 0.9 }, + onGoToLive: undefined, + onDismiss: undefined, + onPin: undefined, + onGoToTrace: undefined, + onOpenHistogram: undefined + } +}; + +export const LinkedJiraTicket: Story = { + args: { + isAsync: true, + insight: { ...mockedEndpointNPlusOneInsight, criticality: 0.9 }, + jiraTicketInfo: { + ticketLink: "some", + spanCodeObjectId: "test", + isHintEnabled: false + }, + onGoToLive: undefined, + onDismiss: undefined, + onPin: undefined, + onGoToTrace: undefined, + onOpenHistogram: undefined + } +}; diff --git a/src/components/Insights/common/insights/TopUsageInsight/index.tsx b/src/components/Insights/common/insights/TopUsageInsight/index.tsx index cb209fc56..7b438acbf 100644 --- a/src/components/Insights/common/insights/TopUsageInsight/index.tsx +++ b/src/components/Insights/common/insights/TopUsageInsight/index.tsx @@ -12,6 +12,7 @@ import { ConfigContext } from "../../../../common/App/ConfigContext"; import { TraceIcon } from "../../../../common/icons/12px/TraceIcon"; import { ArrowDashedLineIcon } from "../../../../common/icons/ArrowDashedLineIcon"; import { Direction } from "../../../../common/icons/types"; +import { Button } from "../../../../common/v3/Button"; import { Pagination } from "../../../../common/v3/Pagination"; import { Tag } from "../../../../common/v3/Tag"; import { Tooltip } from "../../../../common/v3/Tooltip"; @@ -153,8 +154,8 @@ export const TopUsageInsight = (props: TopUsageInsightProps) => { <> {config.isJaegerEnabled && traceId && ( - handleTraceButtonClick( diff --git a/src/components/Insights/common/insights/TopUsageInsight/styles.ts b/src/components/Insights/common/insights/TopUsageInsight/styles.ts index 88e008d20..a419c3d51 100644 --- a/src/components/Insights/common/insights/TopUsageInsight/styles.ts +++ b/src/components/Insights/common/insights/TopUsageInsight/styles.ts @@ -4,7 +4,6 @@ import { footnoteRegularTypography } from "../../../../common/App/typographies"; import { Link as CommonLink } from "../../../../common/Link"; -import { Button as CommonButton } from "../../../../common/v3/Button"; export const Container = styled.div` display: flex; @@ -34,10 +33,6 @@ export const SpanNamePart = styled.span` text-overflow: ellipsis; `; -export const Button = styled(CommonButton)` - margin-right: 10px; -`; - export const Link = styled(CommonLink)` ${footnoteRegularTypography} @@ -95,7 +90,7 @@ export const TableBodyRow = styled.div` export const TableBodyCell = styled.div` display: flex; - align-items: center; + align-items: start; overflow: hidden; &:first-child { diff --git a/src/components/common/v3/JiraButton/index.tsx b/src/components/common/v3/JiraButton/index.tsx index c77b05b6e..33ddf2eef 100644 --- a/src/components/common/v3/JiraButton/index.tsx +++ b/src/components/common/v3/JiraButton/index.tsx @@ -75,11 +75,7 @@ export const JiraButtonComponent = ( )} /> From 1d5ba45d5037b8d2fb6954532d0068c328a0e149 Mon Sep 17 00:00:00 2001 From: olehp Date: Mon, 4 Mar 2024 18:12:32 +0200 Subject: [PATCH 2/2] clean-up --- .../Insights/common/insights/TopUsageInsight/styles.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Insights/common/insights/TopUsageInsight/styles.ts b/src/components/Insights/common/insights/TopUsageInsight/styles.ts index a419c3d51..53b70a738 100644 --- a/src/components/Insights/common/insights/TopUsageInsight/styles.ts +++ b/src/components/Insights/common/insights/TopUsageInsight/styles.ts @@ -90,7 +90,6 @@ export const TableBodyRow = styled.div` export const TableBodyCell = styled.div` display: flex; - align-items: start; overflow: hidden; &:first-child {