Skip to content

Conversation

@konrad147
Copy link
Contributor

@konrad147 konrad147 commented Aug 1, 2025

This pull request introduces changes to enhance the display of metadata in alerting rule list items by adding support for data source icons and improving the visual layout. The most important changes include the addition of QuerySourceIcons to display queried data sources, updates to the ListItem component for better metadata separation, and the introduction of a reusable DataSourceLogo component.

image

Enhancements to Metadata Display:

  • Added a new QuerySourceIcons component to display icons for queried data sources in the metadata section. This component deduplicates data source UIDs and uses tooltips to show data source names. ([public/app/features/alerting/unified/rule-list/components/AlertRuleListItem.tsxR307-R329](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82R307-R329))
  • Included querySourceUIDs as a new prop in AlertRuleListItemProps and RecordingRuleListItemProps, allowing metadata to display queried data sources when provided. ([[1]](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82R52), [[2]](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82R79), [[3]](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82R99-R102), [[4]](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82R188), [[5]](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82R205-R208))

Visual Improvements:

  • Updated the ListItem component to use a pipe (|) separator instead of a dot (·) for better visual distinction between metadata items. ([public/app/features/alerting/unified/rule-list/components/ListItem.tsxL75-R75](https://github.com/grafana/grafana/pull/109033/files#diff-cf3f32cce00fda0d4bb7b0b303ca2b1904b791dba7f522a63fe53d9d803d091cL75-R75))
  • Adjusted the spacing in the ListItem metadata stack to improve readability. ([public/app/features/alerting/unified/rule-list/components/ListItem.tsxL42-R42](https://github.com/grafana/grafana/pull/109033/files#diff-cf3f32cce00fda0d4bb7b0b303ca2b1904b791dba7f522a63fe53d9d803d091cL42-R42))

Reusable Components:

  • Introduced a DataSourceLogo component to render data source logos with consistent styling, including support for light and dark themes. ([public/app/features/alerting/unified/rule-list/components/AlertRuleListItem.tsxR454-R483](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82R454-R483))

Codebase Refinements:

  • Added new imports (cx, DataSourceInstanceSettings, and getDataSourceByUid) to support the new functionality. ([[1]](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82L1-R5), [[2]](https://github.com/grafana/grafana/pull/109033/files#diff-8173c287466af2530acb215830e6e8fb6b94d9525eaadffd9ddc6e61fbb58b82L16-R16))

@konrad147 konrad147 added this to the 12.2.x milestone Aug 1, 2025
@konrad147 konrad147 self-assigned this Aug 1, 2025
@konrad147 konrad147 requested a review from a team as a code owner August 1, 2025 10:36
@konrad147 konrad147 removed the request for review from a team August 1, 2025 10:36
@konrad147 konrad147 added the area/alerting Grafana Alerting label Aug 1, 2025
@github-project-automation github-project-automation bot moved this to In review in Alerting Aug 1, 2025
Copy link
Contributor

@soniaAguilarPeiron soniaAguilarPeiron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! LGTM!

@konrad147 konrad147 merged commit b1cdd45 into main Aug 1, 2025
115 checks passed
@konrad147 konrad147 deleted the alerting/list-v2-display-query-sources branch August 1, 2025 13:36
@github-project-automation github-project-automation bot moved this from In review to Done in Alerting Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants