mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
BasketController: show "diff" also for new objects
This commit is contained in:
parent
f0878a9bcd
commit
a58efd2d25
@ -283,9 +283,15 @@ class BasketController extends ActionController
|
|||||||
}
|
}
|
||||||
$objectFromBasket = $objects->$type->$key;
|
$objectFromBasket = $objects->$type->$key;
|
||||||
$current = BasketSnapshot::instanceByIdentifier($type, $key, $connection);
|
$current = BasketSnapshot::instanceByIdentifier($type, $key, $connection);
|
||||||
|
if ($current === null) {
|
||||||
|
$current = '';
|
||||||
|
} else {
|
||||||
|
$current = Json::encode($current->export(), JSON_PRETTY_PRINT);
|
||||||
|
}
|
||||||
|
|
||||||
$this->content()->add(
|
$this->content()->add(
|
||||||
ConfigDiff::create(
|
ConfigDiff::create(
|
||||||
Json::encode($current->export(), JSON_PRETTY_PRINT),
|
$current,
|
||||||
Json::encode($objectFromBasket, JSON_PRETTY_PRINT)
|
Json::encode($objectFromBasket, JSON_PRETTY_PRINT)
|
||||||
)->setHtmlRenderer('Inline')
|
)->setHtmlRenderer('Inline')
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user