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;
|
namespace Icinga\Module\Director\Objects;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||||
|
|
||||||
abstract class IcingaObjectGroup extends IcingaObject
|
abstract class IcingaObjectGroup extends IcingaObject
|
||||||
{
|
{
|
||||||
protected $supportsImports = true;
|
protected $supportsImports = true;
|
||||||
|
@ -13,4 +15,9 @@ abstract class IcingaObjectGroup extends IcingaObject
|
||||||
'disabled' => 'n',
|
'disabled' => 'n',
|
||||||
'display_name' => null,
|
'display_name' => null,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public function getRenderingZone(IcingaConfig $config = null)
|
||||||
|
{
|
||||||
|
return $this->connection->getDefaultGlobalZoneName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace Icinga\Module\Director\Objects;
|
namespace Icinga\Module\Director\Objects;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||||
|
|
||||||
class IcingaUser extends IcingaObject
|
class IcingaUser extends IcingaObject
|
||||||
{
|
{
|
||||||
protected $table = 'icinga_user';
|
protected $table = 'icinga_user';
|
||||||
|
@ -40,4 +42,9 @@ class IcingaUser extends IcingaObject
|
||||||
'period' => 'IcingaTimePeriod',
|
'period' => 'IcingaTimePeriod',
|
||||||
'zone' => 'IcingaZone',
|
'zone' => 'IcingaZone',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public function getRenderingZone(IcingaConfig $config = null)
|
||||||
|
{
|
||||||
|
return $this->connection->getMasterZoneName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,14 @@
|
||||||
|
|
||||||
namespace Icinga\Module\Director\Objects;
|
namespace Icinga\Module\Director\Objects;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||||
|
|
||||||
class IcingaUserGroup extends IcingaObjectGroup
|
class IcingaUserGroup extends IcingaObjectGroup
|
||||||
{
|
{
|
||||||
protected $table = 'icinga_usergroup';
|
protected $table = 'icinga_usergroup';
|
||||||
|
|
||||||
|
public function getRenderingZone(IcingaConfig $config = null)
|
||||||
|
{
|
||||||
|
return $this->connection->getMasterZoneName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue