mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore metrics: Fix long metrics and labels in landing page (#92443)
* word wrap long metric names * trunctate long labels * use css for filters
This commit is contained in:
parent
ff5ed75ea9
commit
d41ee6bbc3
@ -51,7 +51,7 @@ export function DataTrailCard(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Card onClick={onSelect} className={styles.card}>
|
<Card onClick={onSelect} className={styles.card}>
|
||||||
<Card.Heading>{getMetricName(metric)}</Card.Heading>
|
<Card.Heading className={styles.wordwrap}>{getMetricName(metric)}</Card.Heading>
|
||||||
<div className={styles.description}>
|
<div className={styles.description}>
|
||||||
<Stack gap={1.5} wrap="wrap">
|
<Stack gap={1.5} wrap="wrap">
|
||||||
{filters.map((f) => (
|
{filters.map((f) => (
|
||||||
@ -106,9 +106,16 @@ function getStyles(theme: GrafanaTheme2) {
|
|||||||
margin: theme.spacing(1, 0, 0),
|
margin: theme.spacing(1, 0, 0),
|
||||||
color: theme.colors.text.secondary,
|
color: theme.colors.text.secondary,
|
||||||
lineHeight: theme.typography.body.lineHeight,
|
lineHeight: theme.typography.body.lineHeight,
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
}),
|
}),
|
||||||
actions: css({
|
actions: css({
|
||||||
marginRight: theme.spacing(1),
|
marginRight: theme.spacing(1),
|
||||||
}),
|
}),
|
||||||
|
wordwrap: css({
|
||||||
|
overflow: 'hidden',
|
||||||
|
overflowWrap: 'anywhere',
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user