IcingaServiceSet: improve work with imports
This commit is contained in:
parent
1724a78da5
commit
7f34e4bdf3
|
@ -19,6 +19,16 @@ class ServicesetController extends ObjectController
|
|||
parent::init();
|
||||
}
|
||||
|
||||
public function loadForm($name)
|
||||
{
|
||||
$form = parent::loadForm($name);
|
||||
if ($name === 'icingaServiceSet' && $this->host) {
|
||||
$form->setHost($this->host);
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
protected function loadObject()
|
||||
{
|
||||
if ($this->object === null) {
|
||||
|
|
|
@ -50,7 +50,7 @@ class IcingaServiceSetTable extends IcingaObjectTable
|
|||
array('h' => 'icinga_host'),
|
||||
'h.id = sset.host_id',
|
||||
array()
|
||||
)->order('sset.object_name');
|
||||
)->where('sset.object_type = ?', 'template')->order('sset.object_name');
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,11 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen
|
|||
$this->relatedObjectClass = $relatedObjectClass;
|
||||
}
|
||||
|
||||
public function getObjects()
|
||||
{
|
||||
return $this->relations;
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->relations);
|
||||
|
|
Loading…
Reference in New Issue