Objects: delegate rendering zone for groups, users
This commit is contained in:
parent
6708df8a61
commit
f7bd50838d
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Icinga\Module\Director\Objects;
|
||||
|
||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||
|
||||
abstract class IcingaObjectGroup extends IcingaObject
|
||||
{
|
||||
protected $supportsImports = true;
|
||||
|
@ -13,4 +15,9 @@ abstract class IcingaObjectGroup extends IcingaObject
|
|||
'disabled' => 'n',
|
||||
'display_name' => null,
|
||||
);
|
||||
|
||||
public function getRenderingZone(IcingaConfig $config = null)
|
||||
{
|
||||
return $this->connection->getDefaultGlobalZoneName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Icinga\Module\Director\Objects;
|
||||
|
||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||
|
||||
class IcingaUser extends IcingaObject
|
||||
{
|
||||
protected $table = 'icinga_user';
|
||||
|
@ -40,4 +42,9 @@ class IcingaUser extends IcingaObject
|
|||
'period' => 'IcingaTimePeriod',
|
||||
'zone' => 'IcingaZone',
|
||||
);
|
||||
|
||||
public function getRenderingZone(IcingaConfig $config = null)
|
||||
{
|
||||
return $this->connection->getMasterZoneName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
|
||||
namespace Icinga\Module\Director\Objects;
|
||||
|
||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||
|
||||
class IcingaUserGroup extends IcingaObjectGroup
|
||||
{
|
||||
protected $table = 'icinga_usergroup';
|
||||
|
||||
public function getRenderingZone(IcingaConfig $config = null)
|
||||
{
|
||||
return $this->connection->getMasterZoneName();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue