summaryrefslogtreecommitdiffstats
path: root/library/Graphite/Web/Controller/IcingadbGraphiteController.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:35 +0000
commit8adc969fb08ffab5f8e9e0b05b081046bdc2ad9a (patch)
tree555499bc0262c29210c706b44e0fb23c0ddd8b92 /library/Graphite/Web/Controller/IcingadbGraphiteController.php
parentAdding debian version 1.2.2-3. (diff)
downloadicingaweb2-module-graphite-8adc969fb08ffab5f8e9e0b05b081046bdc2ad9a.tar.xz
icingaweb2-module-graphite-8adc969fb08ffab5f8e9e0b05b081046bdc2ad9a.zip
Merging upstream version 1.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/Graphite/Web/Controller/IcingadbGraphiteController.php')
-rw-r--r--library/Graphite/Web/Controller/IcingadbGraphiteController.php59
1 files changed, 2 insertions, 57 deletions
diff --git a/library/Graphite/Web/Controller/IcingadbGraphiteController.php b/library/Graphite/Web/Controller/IcingadbGraphiteController.php
index 36bc026..58c2382 100644
--- a/library/Graphite/Web/Controller/IcingadbGraphiteController.php
+++ b/library/Graphite/Web/Controller/IcingadbGraphiteController.php
@@ -28,8 +28,8 @@ class IcingadbGraphiteController extends CompatController
/** @var bool Whether to use icingadb as the backend */
protected $useIcingadbAsBackend;
- /** @var string[] Graph parameters */
- protected $graphParams = ['graphs_limit', 'graph_range', 'graph_start', 'graph_end', 'legacyParams'];
+ /** @var string[] Preserved graph parameters */
+ protected $preservedParams = ['graphs_limit', 'graph_range', 'graph_start', 'graph_end', 'legacyParams', 'format'];
/** @var Filter\Rule Filter from query string parameters */
private $filter;
@@ -52,59 +52,4 @@ class IcingadbGraphiteController extends CompatController
return $this->filter;
}
-
- /**
- * Create and return the LimitControl
- *
- * This automatically shifts the limit URL parameter from {@link $params}.
- *
- * @return LimitControl
- */
- public function createLimitControl(): LimitControl
- {
- $limitControl = new LimitControl(Url::fromRequest());
- $limitControl->setDefaultLimit($this->getPageSize(null));
-
- $this->params->shift($limitControl->getLimitParam());
-
- return $limitControl;
- }
-
- /**
- * Create and return the PaginationControl
- *
- * This automatically shifts the pagination URL parameters from {@link $params}.
- *
- * @return PaginationControl
- */
- public function createPaginationControl(Paginatable $paginatable): PaginationControl
- {
- $paginationControl = new PaginationControl($paginatable, Url::fromRequest());
- $paginationControl->setDefaultPageSize($this->getPageSize(null));
- $paginationControl->setAttribute('id', $this->getRequest()->protectId('pagination-control'));
-
- $this->params->shift($paginationControl->getPageParam());
- $this->params->shift($paginationControl->getPageSizeParam());
-
- return $paginationControl->apply();
- }
-
- /**
- * Create and return the SortControl
- *
- * This automatically shifts the sort URL parameter from {@link $params}.
- *
- * @param Query $query
- * @param array $columns Possible sort columns as sort string-label pairs
- *
- * @return SortControl
- */
- public function createSortControl(Query $query, array $columns): SortControl
- {
- $sortControl = SortControl::create($columns);
-
- $this->params->shift($sortControl->getSortParam());
-
- return $sortControl->apply($query);
- }
}