mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-05 12:26:14 +02:00
Tighter spacing for /alerts and /rules pages (#16359)
As discussed in https://github.com/prometheus/prometheus/issues/15717, this should help show more information on one screen, to be more similar to the old UI in this regard. Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
a721daf981
commit
ad3e200e9a
@ -12,6 +12,7 @@ import {
|
||||
TextInput,
|
||||
Anchor,
|
||||
Pagination,
|
||||
rem,
|
||||
} from "@mantine/core";
|
||||
import { useSuspenseAPIQuery } from "../api/api";
|
||||
import { AlertingRule, AlertingRulesResult } from "../api/responseTypes/rules";
|
||||
@ -222,7 +223,7 @@ export default function AlertsPage() {
|
||||
p="md"
|
||||
key={i} // TODO: Find a stable and definitely unique key.
|
||||
>
|
||||
<Group mb="md" mt="xs" ml="xs" justify="space-between">
|
||||
<Group mb="sm" justify="space-between">
|
||||
<Group align="baseline">
|
||||
<Text fz="xl" fw={600} c="var(--mantine-primary-color-filled)">
|
||||
{g.name}
|
||||
@ -280,6 +281,7 @@ export default function AlertsPage() {
|
||||
{items.map((r, j) => {
|
||||
return (
|
||||
<Accordion.Item
|
||||
mt={rem(5)}
|
||||
styles={{
|
||||
item: {
|
||||
// TODO: This transparency hack is an OK workaround to make the collapsed items
|
||||
@ -299,7 +301,9 @@ export default function AlertsPage() {
|
||||
: panelClasses.panelHealthOk
|
||||
}
|
||||
>
|
||||
<Accordion.Control>
|
||||
<Accordion.Control
|
||||
styles={{ label: { paddingBlock: rem(10) } }}
|
||||
>
|
||||
<Group wrap="nowrap" justify="space-between" mr="lg">
|
||||
<Text>{r.rule.name}</Text>
|
||||
<Group gap="xs">
|
||||
|
||||
@ -91,10 +91,9 @@ export default function RulesPage() {
|
||||
shadow="xs"
|
||||
withBorder
|
||||
p="md"
|
||||
mb="md"
|
||||
key={i} // TODO: Find a stable and definitely unique key.
|
||||
>
|
||||
<Group mb="md" mt="xs" ml="xs" justify="space-between">
|
||||
<Group mb="sm" justify="space-between">
|
||||
<Group align="baseline">
|
||||
<Text fz="xl" fw={600} c="var(--mantine-primary-color-filled)">
|
||||
{g.name}
|
||||
@ -147,6 +146,7 @@ export default function RulesPage() {
|
||||
<Accordion multiple variant="separated">
|
||||
{items.map((r, j) => (
|
||||
<Accordion.Item
|
||||
mt={rem(5)}
|
||||
styles={{
|
||||
item: {
|
||||
// TODO: This transparency hack is an OK workaround to make the collapsed items
|
||||
@ -167,7 +167,9 @@ export default function RulesPage() {
|
||||
: "5px solid var(--mantine-color-green-4)",
|
||||
}}
|
||||
>
|
||||
<Accordion.Control>
|
||||
<Accordion.Control
|
||||
styles={{ label: { paddingBlock: rem(10) } }}
|
||||
>
|
||||
<Group justify="space-between" mr="lg">
|
||||
<Group gap="xs" wrap="nowrap">
|
||||
{r.type === "alerting" ? (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user