Commit 98147636 authored by Laurent Calvet's avatar Laurent Calvet
Browse files

enh (export/conf): Add icon_id property to exported host and service files (#10994)

For the new resource status table, we add icon_id property to exported host and service files
parent ce148b6e
......@@ -119,6 +119,7 @@ abstract class AbstractHost extends AbstractObject
'notes_url',
'action_url',
'icon_image',
'icon_id',
'icon_image_alt',
'statusmap_image',
'timezone',
......@@ -181,6 +182,7 @@ abstract class AbstractHost extends AbstractObject
$media = Media::getInstance($this->dependencyInjector);
if (!isset($host['icon_image'])) {
$host['icon_image'] = $media->getMediaPathFromId($host['icon_image_id']);
$host['icon_id'] = $host['icon_image_id'];
}
if (!isset($host['statusmap_image'])) {
$host['statusmap_image'] = $media->getMediaPathFromId($host['statusmap_image_id']);
......
......@@ -112,6 +112,7 @@ abstract class AbstractService extends AbstractObject
'notes_url',
'action_url',
'icon_image',
'icon_id',
'icon_image_alt',
'acknowledgement_timeout'
);
......@@ -146,6 +147,7 @@ abstract class AbstractService extends AbstractObject
$media = Media::getInstance($this->dependencyInjector);
if (!isset($service['icon_image'])) {
$service['icon_image'] = $media->getMediaPathFromId($service['icon_image_id']);
$service['icon_id'] = $service['icon_image_id'];
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment