mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
ObjectPreview: Avoid linking a flat command attribute inside a command
This commit is contained in:
parent
e64ace7ccf
commit
a6e32d763f
@ -99,17 +99,23 @@ class ObjectPreview
|
||||
$classes[] = 'logfile';
|
||||
}
|
||||
|
||||
$type = $object->getShortTableName();
|
||||
|
||||
$plain = Html::wantHtml($file->getContent())->render();
|
||||
$plain = preg_replace_callback(
|
||||
'/^(\s+import\s+\"\;)(.+)(\"\;)/m',
|
||||
[$this, 'linkImport'],
|
||||
$plain
|
||||
);
|
||||
$plain = preg_replace_callback(
|
||||
'/^(\s+(?:check_|event_)?command\s+=\s+\"\;)(.+)(\"\;)/m',
|
||||
[$this, 'linkCommand'],
|
||||
$plain
|
||||
);
|
||||
|
||||
if ($type !== 'command') {
|
||||
$plain = preg_replace_callback(
|
||||
'/^(\s+(?:check_|event_)?command\s+=\s+\"\;)(.+)(\"\;)/m',
|
||||
[$this, 'linkCommand'],
|
||||
$plain
|
||||
);
|
||||
}
|
||||
|
||||
$plain = preg_replace_callback(
|
||||
'/^(\s+host_name\s+=\s+\"\;)(.+)(\"\;)/m',
|
||||
[$this, 'linkHost'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user