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:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:36 +0000
commit9a9ff27e57ad3eb60909f0a4d0bd74755df52662 (patch)
tree38d91ef37d115b2baffd54f40c74aef7a724d7b6 /library/Graphite/Web/Controller/IcingadbGraphiteController.php
parentReleasing progress-linux version 1.2.2-3~progress7.99u1. (diff)
downloadicingaweb2-module-graphite-9a9ff27e57ad3eb60909f0a4d0bd74755df52662.tar.xz
icingaweb2-module-graphite-9a9ff27e57ad3eb60909f0a4d0bd74755df52662.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);
- }
}