mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
parent
4b229c122c
commit
9a0279b111
@ -11,6 +11,12 @@ v1.10.0 (unreleased)
|
|||||||
* You can find issues and feature requests related to this release on our
|
* You can find issues and feature requests related to this release on our
|
||||||
[roadmap](https://github.com/Icinga/icingaweb2-module-director/milestone/27?closed=1)
|
[roadmap](https://github.com/Icinga/icingaweb2-module-director/milestone/27?closed=1)
|
||||||
|
|
||||||
|
### User Interface
|
||||||
|
* FIX: links from Service Previews (Icinga DSL) to templates (#2554)
|
||||||
|
|
||||||
|
### REST API
|
||||||
|
* FIX: addressing service templates by name has been fixed (#2487)
|
||||||
|
|
||||||
### CLI
|
### CLI
|
||||||
* FIX: config deploy doesn't try to wait in case of no deployment (#2522)
|
* FIX: config deploy doesn't try to wait in case of no deployment (#2522)
|
||||||
* FEATURE: improved wording for deployment error messages (#2523)
|
* FEATURE: improved wording for deployment error messages (#2523)
|
||||||
|
@ -8,7 +8,6 @@ use Icinga\Module\Director\Objects\IcingaHost;
|
|||||||
use Icinga\Module\Director\Objects\IcingaServiceSet;
|
use Icinga\Module\Director\Objects\IcingaServiceSet;
|
||||||
use Ramsey\Uuid\Uuid;
|
use Ramsey\Uuid\Uuid;
|
||||||
use Ramsey\Uuid\UuidInterface;
|
use Ramsey\Uuid\UuidInterface;
|
||||||
use RuntimeException;
|
|
||||||
use function is_int;
|
use function is_int;
|
||||||
use function is_resource;
|
use function is_resource;
|
||||||
use function is_string;
|
use function is_string;
|
||||||
@ -22,17 +21,21 @@ class UuidLookup
|
|||||||
* @param int|string $key
|
* @param int|string $key
|
||||||
* @param IcingaHost|null $host
|
* @param IcingaHost|null $host
|
||||||
* @param IcingaServiceSet $set
|
* @param IcingaServiceSet $set
|
||||||
|
* @return ?UuidInterface
|
||||||
*/
|
*/
|
||||||
public static function findServiceUuid(
|
public static function findServiceUuid(
|
||||||
Db $connection,
|
Db $connection,
|
||||||
Branch $branch,
|
Branch $branch,
|
||||||
$objectType,
|
$objectType = null,
|
||||||
$key = null,
|
$key = null,
|
||||||
IcingaHost $host = null,
|
IcingaHost $host = null,
|
||||||
IcingaServiceSet $set = null
|
IcingaServiceSet $set = null
|
||||||
) {
|
) {
|
||||||
$db = $connection->getDbAdapter();
|
$db = $connection->getDbAdapter();
|
||||||
$query = $db->select()->from('icinga_service', 'uuid')->where('object_type = ?', $objectType);
|
$query = $db->select()->from('icinga_service', 'uuid');
|
||||||
|
if ($objectType) {
|
||||||
|
$query->where('object_type = ?', $objectType);
|
||||||
|
}
|
||||||
$query = self::addKeyToQuery($connection, $query, $key);
|
$query = self::addKeyToQuery($connection, $query, $key);
|
||||||
if ($host) {
|
if ($host) {
|
||||||
$query->where('host_id = ?', $host->get('id'));
|
$query->where('host_id = ?', $host->get('id'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user