mirror of
https://github.com/grafana/grafana.git
synced 2025-09-20 00:00:43 +08:00
18 lines
488 B
TypeScript
18 lines
488 B
TypeScript
import React from 'react';
|
|
|
|
import { TagList } from '@grafana/ui';
|
|
|
|
interface Props {
|
|
labels: Record<string, string>;
|
|
className?: string;
|
|
}
|
|
|
|
export const AlertLabels = ({ labels, className }: Props) => {
|
|
const pairs = Object.entries(labels).filter(([key]) => !(key.startsWith('__') && key.endsWith('__')));
|
|
return (
|
|
<div className={className}>
|
|
<TagList tags={Object.values(pairs).map(([label, value]) => `${label}=${value}`)} className={className} />
|
|
</div>
|
|
);
|
|
};
|