mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-13 16:32:53 -05:00
Merge pull request #282 from Icinga/fix/handled-node-rendering
Fix rendering of state-balls for critical-handled nodes
This commit is contained in:
commit
346ace79d0
3 changed files with 20 additions and 4 deletions
|
|
@ -88,10 +88,14 @@ class NodeTile extends BaseHtmlElement
|
|||
if (! $node instanceof ImportedNode || $node->getBpConfig()->hasNode($node->getName())) {
|
||||
$link = $this->getMainNodeLink();
|
||||
if ($renderer->isBreadcrumb()) {
|
||||
$link->prepend((new StateBall(strtolower($node->getStateName())))->addAttributes([
|
||||
$state = strtolower($node->getStateName());
|
||||
if ($node->isHandled()) {
|
||||
$state = $state . '-handled';
|
||||
}
|
||||
$link->prepend((new StateBall($state))->addAttributes([
|
||||
'title' => sprintf(
|
||||
'%s %s',
|
||||
$node->getStateName(),
|
||||
$state,
|
||||
DateFormatter::timeSince($node->getLastStateChange())
|
||||
)
|
||||
]));
|
||||
|
|
|
|||
|
|
@ -116,10 +116,14 @@ class TreeRenderer extends Renderer
|
|||
} else {
|
||||
$icons[] = $node->getIcon();
|
||||
}
|
||||
$icons[] = (new StateBall(strtolower($node->getStateName())))->addAttributes([
|
||||
$state = strtolower($node->getStateName());
|
||||
if ($node->isHandled()) {
|
||||
$state = $state . '-handled';
|
||||
}
|
||||
$icons[] = (new StateBall($state))->addAttributes([
|
||||
'title' => sprintf(
|
||||
'%s %s',
|
||||
$node->getStateName(),
|
||||
$state,
|
||||
DateFormatter::timeSince($node->getLastStateChange())
|
||||
)
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,14 @@
|
|||
background-color: @gray-light;
|
||||
}
|
||||
|
||||
&.state-critical-handled {
|
||||
background-color: @color-critical-handled;
|
||||
}
|
||||
|
||||
&.state-down-handled {
|
||||
background-color: @color-critical-handled;
|
||||
}
|
||||
|
||||
&.size-xs {
|
||||
line-height: 0.75em;
|
||||
height: 0.75em;
|
||||
|
|
|
|||
Loading…
Reference in a new issue