mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-26 11:19:16 +02:00
ServiceController: load Set and Host before...
...the service, which get's loaded in the parent class fixes #2452 fixes #2449
This commit is contained in:
parent
212596a41e
commit
1cbb033911
@ -39,9 +39,10 @@ class ServiceController extends ObjectController
|
||||
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
// Hint: having Host and Set loaded first is important for UUID lookups with legacy URLs
|
||||
$this->loadOptionalHost();
|
||||
$this->loadOptionalSet();
|
||||
parent::init();
|
||||
$this->addOptionalHostTabs();
|
||||
$this->addOptionalSetTabs();
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ class UuidLookup
|
||||
$query = $db->select()->from('icinga_service', 'uuid')->where('object_type = ?', $objectType);
|
||||
$query = self::addKeyToQuery($connection, $query, $key);
|
||||
if ($host) {
|
||||
$query->add('host_id = ?', $host->get('id'));
|
||||
$query->where('host_id = ?', $host->get('id'));
|
||||
}
|
||||
if ($set) {
|
||||
$query->add('service_set_id = ?', $set->get('id'));
|
||||
$query->where('service_set_id = ?', $set->get('id'));
|
||||
}
|
||||
$uuid = self::fetchOptionalUuid($connection, $query);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user