ShowController: allow for wildcard filters

This commit is contained in:
Thomas Gelf 2016-02-10 20:19:37 +01:00
parent d372a4e798
commit 9eb91b059a

View file

@ -61,6 +61,7 @@ class ShowController extends Controller
$this->view->templateName = $this->params->get('templateName');
$optional = array(null => '- please choose -');
$any = array('*' => 'Show any');
$this->view->templates = $optional;
foreach ($this->loadTemplates() as $type => $template) {
@ -78,7 +79,7 @@ class ShowController extends Controller
if ($this->view->filterColumn) {
if (array_key_exists($this->view->filterColumn, $this->view->filterColumns)) {
$this->view->filterValues = $optional + $this->graphiteWeb->select()
$this->view->filterValues = $optional + $any + $this->graphiteWeb->select()
->from($base)
->listDistinct($this->view->filterColumn);
}