Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

refactor(alert timeline): update TopContributorsCard and Table styles (#5881)

Sudeep MP7b5ff54f4799
diff --git a/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.styles.scss b/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.styles.scss
index 43d645efa5..144996ba38 100644
--- a/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.styles.scss
+++ b/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.styles.scss
@@ -1,3 +1,21 @@
-.alert-popover {
+.alert-popover-trigger-action {
cursor: pointer;
}
+
+.alert-history-popover {
+ .ant-popover-inner {
+ border: 1px solid var(--bg-slate-400);
+
+ .lightMode & {
+ background: var(--bg-vanilla-100) !important;
+ border: 1px solid var(--bg-vanilla-300);
+ }
+ }
+ .ant-popover-arrow {
+ &::before {
+ .lightMode & {
+ background: var(--bg-vanilla-100);
+ }
+ }
+ }
+}
diff --git a/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.tsx b/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.tsx
index 83605a61d3..d70da07903 100644
--- a/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.tsx
+++ b/frontend/src/container/AlertHistory/AlertPopover/AlertPopover.tsx
@@ -64,12 +64,13 @@ function AlertPopover({
relatedLogsLink,
}: Props): JSX.Element {
return (
- <div className="alert-popover">
+ <div className="alert-popover-trigger-action">
<Popover
showArrow={false}
placement="bottom"
color="linear-gradient(139deg, rgba(18, 19, 23, 1) 0%, rgba(18, 19, 23, 1) 98.68%)"
destroyTooltipOnHide
+ rootClassName="alert-history-popover"
content={
<PopoverContent
relatedTracesLink={relatedTracesLink}
diff --git a/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.styles.scss b/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.styles.scss
index 4b3c0a6069..0b0995fb3e 100644
--- a/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.styles.scss
+++ b/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.styles.scss
@@ -120,7 +120,6 @@
.contributor-row-popover-buttons {
display: flex;
flex-direction: column;
- border: 1px solid var(--bg-slate-400);
&__button {
display: flex;
@@ -133,13 +132,36 @@
width: 160px;
cursor: pointer;
+ .text,
+ .icon {
+ color: var(--text-vanilla-100);
+
+ .lightMode & {
+ color: var(--text-ink-500);
+ }
+ }
+
&:hover {
background: var(--bg-slate-400);
+
+ .text,
+ .icon {
+ color: var(--text-vanilla-100);
+
+ .lightMode & {
+ color: var(--text-ink-500);
+ }
+ }
}
.icon {
display: flex;
}
+
+ .lightMode & {
+ background: var(--bg-vanilla-100);
+ border-color: var(--bg-vanilla-400);
+ }
}
}
diff --git a/frontend/src/container/AlertHistory/Timeline/Table/Table.styles.scss b/frontend/src/container/AlertHistory/Timeline/Table/Table.styles.scss
index 9d31e0b0ea..26e2266ef6 100644
--- a/frontend/src/container/AlertHistory/Timeline/Table/Table.styles.scss
+++ b/frontend/src/container/AlertHistory/Timeline/Table/Table.styles.scss
@@ -19,20 +19,9 @@
font-size: 12px;
font-weight: 500;
padding: 12px 16px 8px !important;
- &:last-of-type
- // TODO(shaheer): uncomment when we display value column
- // ,
- // &:nth-last-of-type(2)
- {
- text-align: right;
- }
}
&-tbody > tr > td {
border: none;
- &:last-of-type,
- &:nth-last-of-type(2) {
- text-align: right;
- }
}
}
@@ -52,7 +41,7 @@
}
.alert-rule {
&-value,
- &-created-at {
+ &__created-at {
font-size: 14px;
color: var(--text-vanilla-400);
}
@@ -60,7 +49,7 @@
font-weight: 500;
line-height: 20px;
}
- &-created-at {
+ &__created-at {
line-height: 18px;
letter-spacing: -0.07px;
}
diff --git a/frontend/src/container/AlertHistory/Timeline/Table/useTimelineTable.tsx b/frontend/src/container/AlertHistory/Timeline/Table/useTimelineTable.tsx
index 5a42fcd5bd..1eb43fc417 100644
--- a/frontend/src/container/AlertHistory/Timeline/Table/useTimelineTable.tsx
+++ b/frontend/src/container/AlertHistory/Timeline/Table/useTimelineTable.tsx
@@ -1,3 +1,5 @@
+import { EllipsisOutlined } from '@ant-design/icons';
+import { Button } from 'antd';
import { ColumnsType } from 'antd/es/table';
import { ConditionalAlertPopover } from 'container/AlertHistory/AlertPopover/AlertPopover';
import AlertLabels from 'pages/AlertDetails/AlertHeader/AlertLabels/AlertLabels';
@@ -10,43 +12,42 @@ export const timelineTableColumns = (): ColumnsType<AlertRuleTimelineTableRespon
title: 'STATE',
dataIndex: 'state',
sorter: true,
- width: '12.5%',
- render: (value, record): JSX.Element => (
- <ConditionalAlertPopover
- relatedTracesLink={record.relatedTracesLink}
- relatedLogsLink={record.relatedLogsLink}
- >
- <div className="alert-rule-state">
- <AlertState state={value} showLabel />
- </div>
- </ConditionalAlertPopover>
+ width: 140,
+ render: (value): JSX.Element => (
+ <div className="alert-rule-state">
+ <AlertState state={value} showLabel />
+ </div>
),
},
{
title: 'LABELS',
dataIndex: 'labels',
- width: '54.5%',
- render: (labels, record): JSX.Element => (
- <ConditionalAlertPopover
- relatedTracesLink={record.relatedTracesLink}
- relatedLogsLink={record.relatedLogsLink}
- >
- <div className="alert-rule-labels">
- <AlertLabels labels={labels} />
- </div>
- </ConditionalAlertPopover>
+ render: (labels): JSX.Element => (
+ <div className="alert-rule-labels">
+ <AlertLabels labels={labels} />
+ </div>
),
},
{
title: 'CREATED AT',
dataIndex: 'unixMilli',
- width: '32.5%',
- render: (value, record): JSX.Element => (
+ width: 200,
+ render: (value): JSX.Element => (
+ <div className="alert-rule__created-at">{formatEpochTimestamp(value)}</div>
+ ),
+ },
+ {
+ title: 'ACTIONS',
+ width: 140,
+ align: 'right',
+ render: (record): JSX.Element => (
<ConditionalAlertPopover
relatedTracesLink={record.relatedTracesLink}
relatedLogsLink={record.relatedLogsLink}
>
- <div className="alert-rule-created-at">{formatEpochTimestamp(value)}</div>
+ <Button type="text" ghost>
+ <EllipsisOutlined className="dropdown-icon" />
+ </Button>
</ConditionalAlertPopover>
),
},