handle service status

This commit is contained in:
2021-03-15 03:37:05 +03:00
parent 3e0b3cdbaa
commit 374b3febc8
12 changed files with 164 additions and 29 deletions

View File

@ -11,7 +11,7 @@
<body>
<div class="root">
<h1>ahriman {{ version|e }} ({{ architecture|e }})</h1>
<h1>ahriman {{ version|e }} ({{ architecture|e }})<sup class="service-{{ service.status|e }}" title="{{ service.timestamp }}">{{ service.status|e }}</sup></h1>
{% include "search-line.jinja2" %}

View File

@ -75,4 +75,26 @@
td.package-success {
background-color: rgba(var(--color-success), 1.0);
}
sup.service-unknown {
font-weight: lighter;
background-color: rgba(var(--color-unknown), 1.0);
}
sup.service-building {
font-weight: lighter;
background-color: rgba(var(--color-building), 1.0);
animation-name: blink-building;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
sup.service-failed {
font-weight: lighter;
background-color: rgba(var(--color-failed), 1.0);
}
sup.service-success {
font-weight: lighter;
background-color: rgba(var(--color-success), 1.0);
}
</style>