mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
FilterEditor: cache available columns
This commit is contained in:
parent
1d4ea88251
commit
2eb2fa51da
@ -30,6 +30,8 @@ class FilterEditor extends AbstractWidget
|
|||||||
|
|
||||||
protected $addTo;
|
protected $addTo;
|
||||||
|
|
||||||
|
protected $cachedColumnSelect;
|
||||||
|
|
||||||
protected $preserveParams = array();
|
protected $preserveParams = array();
|
||||||
|
|
||||||
protected $ignoreParams = array();
|
protected $ignoreParams = array();
|
||||||
@ -368,8 +370,11 @@ class FilterEditor extends AbstractWidget
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$cols = $this->arrayForSelect($this->query->getColumns());
|
if ($this->cachedColumnSelect === null) {
|
||||||
$active = $filter->getColumn();
|
$this->cachedColumnSelect = $this->arrayForSelect($this->query->getColumns());
|
||||||
|
asort($this->cachedColumnSelect);
|
||||||
|
}
|
||||||
|
$cols = $this->cachedColumnSelect;
|
||||||
$seen = false;
|
$seen = false;
|
||||||
foreach ($cols as $k => & $v) {
|
foreach ($cols as $k => & $v) {
|
||||||
$v = str_replace('_', ' ', ucfirst($v));
|
$v = str_replace('_', ' ', ucfirst($v));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user