mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: fix layout with long words / numbers (#49882)
This commit is contained in:
parent
f69c9bd704
commit
e04f84fd1b
@ -34,15 +34,22 @@ export const AnnotationDetailsField: FC<Props> = ({ annotationKey, value }) => {
|
||||
|
||||
const AnnotationValue: FC<Props> = ({ annotationKey, value }) => {
|
||||
const styles = useStyles(getStyles);
|
||||
if (wellableAnnotationKeys.includes(annotationKey)) {
|
||||
return <Well>{value}</Well>;
|
||||
} else if (value && value.startsWith('http')) {
|
||||
|
||||
const needsWell = wellableAnnotationKeys.includes(annotationKey);
|
||||
const needsLink = value && value.startsWith('http');
|
||||
|
||||
if (needsWell) {
|
||||
return <Well className={styles.well}>{value}</Well>;
|
||||
}
|
||||
|
||||
if (needsLink) {
|
||||
return (
|
||||
<a href={value} target="__blank" className={styles.link}>
|
||||
{value}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
return <>{value}</>;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user