diff options
Diffstat (limited to 'library/Graphite/Web/Widget/IcingadbGraphs.php')
-rw-r--r-- | library/Graphite/Web/Widget/IcingadbGraphs.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/library/Graphite/Web/Widget/IcingadbGraphs.php b/library/Graphite/Web/Widget/IcingadbGraphs.php index e038e92..82bfe53 100644 --- a/library/Graphite/Web/Widget/IcingadbGraphs.php +++ b/library/Graphite/Web/Widget/IcingadbGraphs.php @@ -4,11 +4,9 @@ namespace Icinga\Module\Graphite\Web\Widget; -use Icinga\Data\Filter\Filter; use Icinga\Module\Graphite\Web\Widget\Graphs\Icingadb\IcingadbHost; use Icinga\Module\Graphite\Web\Widget\Graphs\Icingadb\IcingadbService; use Icinga\Module\Icingadb\Common\Links; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Icingadb\Model\Host; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -16,7 +14,7 @@ use ipl\Html\HtmlDocument; use ipl\Html\HtmlString; use ipl\Orm\ResultSet; use ipl\Stdlib\BaseFilter; -use ipl\Web\Filter\QueryString; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\Link; /** @@ -69,9 +67,10 @@ class IcingadbGraphs extends BaseHtmlElement } $hostUrl = Links::host($hostObj); + $baseFilter = $this->getBaseFilter(); - if ($this->hasBaseFilter()) { - $hostUrl->addFilter(Filter::fromQueryString(QueryString::render($this->getBaseFilter()))); + if ($baseFilter !== null) { + $hostUrl->setFilter($baseFilter); } $hostLink = new Link( @@ -84,8 +83,8 @@ class IcingadbGraphs extends BaseHtmlElement if ($graph->getObjectType() === 'service') { $serviceUrl = Links::service($object, $hostObj); - if ($this->hasBaseFilter()) { - $serviceUrl->addFilter(Filter::fromQueryString(QueryString::render($this->getBaseFilter()))); + if ($baseFilter !== null) { + $serviceUrl->setFilter($baseFilter); } $serviceLink = new Link( |