show/activitylog: prepare diff object
This commit is contained in:
parent
7bc59c010e
commit
02d0ea0cb7
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||||
use Icinga\Module\Director\Objects\IcingaObject;
|
use Icinga\Module\Director\Objects\IcingaObject;
|
||||||
|
use Icinga\Module\Director\ConfigDiff;
|
||||||
use Icinga\Module\Director\Util;
|
use Icinga\Module\Director\Util;
|
||||||
use Icinga\Module\Director\Web\Controller\ActionController;
|
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||||
|
|
||||||
|
@ -30,6 +31,14 @@ class Director_ShowController extends ActionController
|
||||||
$new = $this->createObject($entry->object_type, $entry->new_properties);
|
$new = $this->createObject($entry->object_type, $entry->new_properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($old && $new) {
|
||||||
|
$d = ConfigDiff::create($old, $new);
|
||||||
|
$this->view->diff = strtr(
|
||||||
|
$d->renderHtml(),
|
||||||
|
array('\\n' => "\\n\n")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->view->entry = $entry;
|
$this->view->entry = $entry;
|
||||||
$this->view->newObject = $new;
|
$this->view->newObject = $new;
|
||||||
$this->view->oldObject = $old;
|
$this->view->oldObject = $old;
|
||||||
|
|
Loading…
Reference in New Issue