mirror of
https://github.com/Icinga/icingaweb2-module-graphite.git
synced 2026-02-03 20:40:06 -05:00
Shift graph_debug URL parameter in graphs overview
- This also adds the InternalProcessTracker to all the graphs in the overview
This commit is contained in:
parent
f3252bbee7
commit
cc8690fdda
2 changed files with 14 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
namespace Icinga\Module\Graphite\Controllers;
|
||||
|
||||
use GuzzleHttp\Psr7\ServerRequest;
|
||||
use Icinga\Module\Graphite\Util\InternalProcessTracker as IPT;
|
||||
use Icinga\Module\Graphite\Web\Controller\IcingadbGraphiteController;
|
||||
use Icinga\Module\Graphite\Web\Controller\TimeRangePickerTrait;
|
||||
use Icinga\Module\Graphite\Web\Widget\IcingadbGraphs;
|
||||
|
|
@ -28,7 +29,13 @@ class HostsController extends IcingadbGraphiteController
|
|||
}
|
||||
|
||||
// shift graph params to avoid exception
|
||||
$graphDebug = $this->params->shift('graph_debug');
|
||||
$graphRange = $this->params->shift('graph_range');
|
||||
|
||||
if ($graphDebug) {
|
||||
IPT::enable();
|
||||
}
|
||||
|
||||
$baseFilter = $graphRange ? Filter::equal('graph_range', $graphRange) : null;
|
||||
foreach ($this->preservedParams as $param) {
|
||||
$this->params->shift($param);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Icinga\Module\Graphite\Controllers;
|
||||
|
||||
use GuzzleHttp\Psr7\ServerRequest;
|
||||
use Icinga\Module\Graphite\Util\InternalProcessTracker as IPT;
|
||||
use Icinga\Module\Graphite\Web\Controller\IcingadbGraphiteController;
|
||||
use Icinga\Module\Graphite\Web\Controller\TimeRangePickerTrait;
|
||||
use Icinga\Module\Graphite\Web\Widget\IcingadbGraphs;
|
||||
|
|
@ -26,7 +27,13 @@ class ServicesController extends IcingadbGraphiteController
|
|||
}
|
||||
|
||||
// shift graph params to avoid exception
|
||||
$graphDebug = $this->params->shift('graph_debug');
|
||||
$graphRange = $this->params->shift('graph_range');
|
||||
|
||||
if ($graphDebug) {
|
||||
IPT::enable();
|
||||
}
|
||||
|
||||
$baseFilter = $graphRange ? Filter::equal('graph_range', $graphRange) : null;
|
||||
foreach ($this->preservedParams as $param) {
|
||||
$this->params->shift($param);
|
||||
|
|
|
|||
Loading…
Reference in a new issue