mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 00:34:05 +02:00
Exporter: unserialize JSON-encoded Basket objects
New baskets provide a Dictionary
This commit is contained in:
parent
cc211fbdfb
commit
7c8edfd467
@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\Data;
|
namespace Icinga\Module\Director\Data;
|
||||||
|
|
||||||
|
use gipfl\Json\JsonString;
|
||||||
use gipfl\ZfDb\Adapter\Adapter;
|
use gipfl\ZfDb\Adapter\Adapter;
|
||||||
use Icinga\Module\Director\Data\Db\DbDataFormatter;
|
use Icinga\Module\Director\Data\Db\DbDataFormatter;
|
||||||
use Icinga\Module\Director\Data\Db\DbObject;
|
use Icinga\Module\Director\Data\Db\DbObject;
|
||||||
use Icinga\Module\Director\Data\Db\DbObjectWithSettings;
|
use Icinga\Module\Director\Data\Db\DbObjectWithSettings;
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
|
use Icinga\Module\Director\DirectorObject\Automation\Basket;
|
||||||
use Icinga\Module\Director\Objects\DirectorDatafield;
|
use Icinga\Module\Director\Objects\DirectorDatafield;
|
||||||
use Icinga\Module\Director\Objects\DirectorDatalist;
|
use Icinga\Module\Director\Objects\DirectorDatalist;
|
||||||
use Icinga\Module\Director\Objects\DirectorDatalistEntry;
|
use Icinga\Module\Director\Objects\DirectorDatalistEntry;
|
||||||
@ -260,6 +262,11 @@ class Exporter
|
|||||||
$props['settings'] = (object) $object->getSettings(); // Already sorted
|
$props['settings'] = (object) $object->getSettings(); // Already sorted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($object instanceof Basket) {
|
||||||
|
if (isset($props['objects']) && is_string($props['objects'])) {
|
||||||
|
$props['objects'] = JsonString::decode($props['objects']);
|
||||||
|
}
|
||||||
|
}
|
||||||
unset($props['uuid']); // Not yet
|
unset($props['uuid']); // Not yet
|
||||||
if (! $this->showDefaults) {
|
if (! $this->showDefaults) {
|
||||||
foreach ($props as $key => $value) {
|
foreach ($props as $key => $value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user