Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(clapi): fix overlapping in clapi export (#8191)
Browse files Browse the repository at this point in the history
* fix(clapi): fix overlapping in clapi export
* enh(test): add host parentship clapi test export
  • Loading branch information
lpinsivy committed Dec 13, 2019
1 parent c9da303 commit e8233ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/clapi_export/clapi-configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5023,6 +5023,7 @@ HOST;setparam;Centreon-Server;timezone;0
HOST;setparam;Centreon-Server;host_locked;0
HOST;setparam;Centreon-Server;host_register;1
HOST;setparam;Centreon-Server;host_activate;1
HOST;addparent;Centreon-Server;test_host
HOST;addtemplate;Centreon-Server;generic-host
HOST;addtemplate;test_host;my_htpl-test
STPL;ADD;generic-service;generic-service;
Expand Down
6 changes: 5 additions & 1 deletion www/class/centreon-clapi/centreonHost.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,11 @@ public function export($filterName = null)
echo $this->action . $this->delim
. "addparent" . $this->delim
. $element[$this->object->getUniqueLabelField()] . $this->delim
. isset($elements[$parentId]) && isset($elements[$parentId][$this->object->getUniqueLabelField()]) ? $elements[$parentId][$this->object->getUniqueLabelField()] : '' . "\n";
. ((isset($elements[$parentId]) && isset($elements[$parentId][$this->object->getUniqueLabelField()]))
? $elements[$parentId][$this->object->getUniqueLabelField()]
: ''
)
. "\n";
}
}

Expand Down

0 comments on commit e8233ae

Please sign in to comment.