diff --git a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php index b3937240..8c16ed58 100644 --- a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php +++ b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php @@ -88,10 +88,14 @@ public function render() 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()) ) ])); diff --git a/library/Businessprocess/Renderer/TreeRenderer.php b/library/Businessprocess/Renderer/TreeRenderer.php index 8cfed61a..9322c261 100644 --- a/library/Businessprocess/Renderer/TreeRenderer.php +++ b/library/Businessprocess/Renderer/TreeRenderer.php @@ -116,10 +116,14 @@ public function getNodeIcons(Node $node, array $path = null) } 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()) ) ]); diff --git a/public/css/state-ball.less b/public/css/state-ball.less index bc050595..98245778 100644 --- a/public/css/state-ball.less +++ b/public/css/state-ball.less @@ -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;