Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: a header bell with the count of firing alerts opens a list of them and a link to Grafana

This commit is contained in:
iris 2026-11-21 15:01:16 +01:00
commit 70e5de5571

View file

@ -0,0 +1,77 @@
/* <AlertsMenu> — the header bell (the shared icon button) with a count badge,
and a popover shaped like the links menu's. */
.alerts-menu {
position: relative;
}
.alerts-menu .ui-icon-button {
position: relative;
color: var(--red);
}
.alerts-menu-count {
position: absolute;
top: 0.15em;
right: 0.1em;
min-width: 1.35em;
padding: 0.1em 0.3em;
border-radius: 1em;
background: var(--red);
color: var(--bg);
font-size: 0.7em;
font-weight: 700;
line-height: 1.2;
text-align: center;
}
.alerts-menu-popover {
position: absolute;
top: calc(100% + 0.4em);
right: 0;
z-index: 10;
display: flex;
flex-direction: column;
gap: 0.4em;
width: min(26em, calc(100vw - 2em));
max-height: 70vh;
padding: 0.4em;
overflow-y: auto;
border: 1px solid var(--border);
border-radius: 0.5em;
background: var(--bg-elev);
box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.3);
}
.alerts-menu-list {
display: flex;
flex-direction: column;
margin: 0;
padding: 0;
list-style: none;
}
.alerts-menu-item {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.1em 0.6em;
padding: 0.4em 0.6em;
border-left: 3px solid var(--red);
border-radius: 0.35em;
}
.alerts-menu-name {
font-weight: 600;
}
.alerts-menu-since {
color: var(--muted);
font-size: 0.85em;
}
.alerts-menu-summary {
flex-basis: 100%;
overflow-wrap: anywhere;
}
.alerts-menu-link {
display: flex;
align-items: center;
min-height: 2.75em;
padding: 0.4em 0.6em;
border-radius: 0.35em;
}
.alerts-menu-link:hover {
background: var(--bg);
}