mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Use new "Label" components for alert instance labels (#70997)
This commit is contained in:
@@ -26,7 +26,7 @@ export const AlertGroup = ({ alertManagerSourceName, group, expandAll }: Props)
|
||||
return (
|
||||
<div className={styles.group} data-testid="alert-group">
|
||||
{Object.keys(group.labels).length > 0 ? (
|
||||
<AlertLabels labels={group.labels} />
|
||||
<AlertLabels labels={group.labels} size="sm" />
|
||||
) : (
|
||||
<div className={styles.noGroupingText}>No grouping</div>
|
||||
)}
|
||||
@@ -49,7 +49,7 @@ export const AlertGroup = ({ alertManagerSourceName, group, expandAll }: Props)
|
||||
<span className={textStyles[alert.status.state]}>{state} </span>for {interval}
|
||||
</div>
|
||||
<div>
|
||||
<AlertLabels labels={alert.labels} />
|
||||
<AlertLabels labels={alert.labels} size="sm" />
|
||||
</div>
|
||||
<div className={styles.actionsRow}>
|
||||
{alert.status.state === AlertState.Suppressed && (
|
||||
|
||||
@@ -123,7 +123,7 @@ describe('AlertGroupsPanel', () => {
|
||||
expect(groups).toHaveLength(2);
|
||||
|
||||
expect(groups[0]).toHaveTextContent('No grouping');
|
||||
expect(groups[1]).toHaveTextContent('severity=warningregion=US-Central');
|
||||
expect(groups[1]).toHaveTextContent('severitywarning regionUS-Central');
|
||||
|
||||
const alerts = ui.alert.queryAll();
|
||||
expect(alerts).toHaveLength(0);
|
||||
|
||||
Reference in New Issue
Block a user