diff options
Diffstat (limited to 'library/Icingadb/Web/Navigation')
-rw-r--r-- | library/Icingadb/Web/Navigation/Action.php | 2 | ||||
-rw-r--r-- | library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/Icingadb/Web/Navigation/Action.php b/library/Icingadb/Web/Navigation/Action.php index d02f933..449e9d2 100644 --- a/library/Icingadb/Web/Navigation/Action.php +++ b/library/Icingadb/Web/Navigation/Action.php @@ -113,7 +113,7 @@ class Action extends NavigationItem public function getUrl(): ?\Icinga\Web\Url { $url = parent::getUrl(); - if (! $this->resolved && $url === null && $this->rawUrl !== null) { + if (! $this->resolved && $url === null && $this->rawUrl !== null && $this->object !== null) { $this->setUrl(Url::fromPath($this->expandMacros($this->rawUrl, $this->getObject()))); $this->resolved = true; return parent::getUrl(); diff --git a/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php b/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php index 658fa1c..5e0f555 100644 --- a/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php +++ b/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php @@ -52,7 +52,7 @@ abstract class ProblemsBadge extends NavigationItemRenderer return $this->count; } - $this->count = $this->round($count); + $this->count = $count; $this->setState(static::STATE_CRITICAL); } @@ -146,7 +146,7 @@ abstract class ProblemsBadge extends NavigationItemRenderer $count = $this->getProblemsCount(); if ($count) { - return (new StateBadge($count, $this->getState())) + return (new StateBadge($this->round($count), $this->getState())) ->addAttributes(['class' => 'badge', 'title' => $this->getTitle()]); } |