SuggestController: temporarily add locations

This commit is contained in:
Thomas Gelf 2016-12-07 08:26:15 +01:00
parent 5e09753622
commit 87bd531f2a

View File

@ -61,6 +61,24 @@ class SuggestController extends ActionController
$this->view->suggestions = $suggestions;
}
/**
* One more dummy helper for tests
*
* TODO: Should not remain here
*
* @return array
*/
protected function suggestLocations()
{
$db = $this->db()->getDbAdapter();
$query = $db->select()
->distinct()
->from('icinga_host_var', 'varvalue')
->where('varname = ?', 'location')
->order('varvalue');
return $db->fetchCol($query);
}
protected function suggestHostnames()
{
$db = $this->db()->getDbAdapter();