BranchActivity: show related host for services

fixes #2736
This commit is contained in:
Thomas Gelf 2023-04-20 11:46:36 +02:00
parent 35e90f7b60
commit 9f76d7e605
2 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,7 @@ This version hasn't been released yet
* FEATURE: Data Fields are now sorted in a case-insensitive way (#2358)
* FEATURE: Deployment Log now breaks lines (#2677)
* FEATURE: Sort Template trees by name (#2691)
* FEATURE: Branch and Sync diff/preview now shows related host for services (#2736)
* FIX: do not fail for (some) Service Dependencies (#2669, #1142)
### Icinga Configuration

View File

@ -294,7 +294,13 @@ class BranchActivity
*/
public function getObjectName()
{
return $this->getProperty('object_name', 'unknown object name');
if ($this->objectTable === BranchSupport::TABLE_ICINGA_SERVICE && $host = $this->getProperty('host')) {
$suffix = " ($host)";
} else {
$suffix = '';
}
return $this->getProperty('object_name', 'unknown object name') . $suffix;
}
/**