SuggestController: don't suggest command templates

...where commands are required

fixes #1414
This commit is contained in:
Da Rold Valentina 2018-05-04 11:28:39 +02:00 committed by Thomas Gelf
parent cd2de241dd
commit 69d3675b34
2 changed files with 6 additions and 1 deletions

View File

@ -192,7 +192,11 @@ class SuggestController extends ActionController
protected function suggestCheckcommandnames() protected function suggestCheckcommandnames()
{ {
$db = $this->db()->getDbAdapter(); $db = $this->db()->getDbAdapter();
$query = $db->select()->from('icinga_command', 'object_name')->order('object_name'); $query = $db->select()
->from('icinga_command', 'object_name')
->where('object_type != ?', 'template')
->order('object_name');
return $db->fetchCol($query); return $db->fetchCol($query);
} }

View File

@ -20,6 +20,7 @@ before switching to a new version.
* FEATURE: Users equipped with related permissions can toggle "Show SQL" in the GUI * FEATURE: Users equipped with related permissions can toggle "Show SQL" in the GUI
* FEATURE: A Service Set can now be assigned to multiple hosts at once #1281 * FEATURE: A Service Set can now be assigned to multiple hosts at once #1281
* FEATURE: Commands can now be filtered by usage (#1480) * FEATURE: Commands can now be filtered by usage (#1480)
* FIX: Don't suggest Command templates where Commands are required (#1414)
### CLI ### CLI
* FEATURE: Director Health Check Plugin (#1278) * FEATURE: Director Health Check Plugin (#1278)