mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-26 22:12:52 -05:00
Show Ack/Downtime icons in the node tiles for the handled nodes
In case the hosts/services are acknowleded or have scheduled downtime show Acknowledeged or Downtime icons respectively.
This commit is contained in:
parent
174abea6bd
commit
4a3b3e3657
2 changed files with 16 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ use Icinga\Module\Businessprocess\ServiceNode;
|
|||
use Icinga\Web\Url;
|
||||
use ipl\Html\BaseHtmlElement;
|
||||
use ipl\Html\Html;
|
||||
use ipl\Web\Widget\Icon;
|
||||
use ipl\Web\Widget\StateBall;
|
||||
|
||||
class NodeTile extends BaseHtmlElement
|
||||
|
|
@ -263,6 +264,12 @@ class NodeTile extends BaseHtmlElement
|
|||
));
|
||||
}
|
||||
}
|
||||
|
||||
if ($node->isAcknowledged()) {
|
||||
$this->actions()->add(new Icon('check', ['class' => 'handled-icon']));
|
||||
} elseif ($node->isInDowntime()) {
|
||||
$this->actions()->add(new Icon('plug', ['class' => 'handled-icon']));
|
||||
}
|
||||
}
|
||||
|
||||
protected function addActionLinks()
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ td > a > .state-badges {
|
|||
|
||||
.actions {
|
||||
opacity: 0.8;
|
||||
margin: 0.5em 0 0 0.5em;
|
||||
margin: 0.5em 0.5em 0 0.5em;
|
||||
font-size: 0.75em;
|
||||
height: 1.8em;
|
||||
|
||||
|
|
@ -498,6 +498,14 @@ td > a > .state-badges {
|
|||
line-height: normal;
|
||||
margin: 0;
|
||||
padding: 0 0 0 0.25em;
|
||||
|
||||
&.handled-icon {
|
||||
display: inline-block;
|
||||
margin-top: 0.15em;
|
||||
float: right;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
}
|
||||
}
|
||||
a {
|
||||
margin: 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue