diff --git a/www/class/centreon-clapi/centreonInstance.class.php b/www/class/centreon-clapi/centreonInstance.class.php index a8e783ab3b15e975f50365d2b2e2ff744d27eedd..518eea4acaebdb37536869dce83cd31014db8278 100644 --- a/www/class/centreon-clapi/centreonInstance.class.php +++ b/www/class/centreon-clapi/centreonInstance.class.php @@ -165,7 +165,7 @@ class CentreonInstance extends CentreonObject $elements = $this->object->getList($params, -1, 0, null, null, $filters); foreach ($elements as $tab) { if (isset($pollerState[$tab["id"]])) { - $tab["ns_status"] = $poller[$tab["id"]]; + $tab["ns_status"] = $pollerState[$tab["id"]]; } else { $tab["ns_status"] = '-'; } @@ -232,4 +232,22 @@ class CentreonInstance extends CentreonObject } } } + + /** + * Export data + * + * @param null $filter_id + * @param null $filter_name + */ + public function export($filter_id = null, $filter_name = null) + { + $filters = null; + if (!is_null($filter_id)) { + $filters = array( + $this->object->getPrimaryKey() => $filter_id + ); + } + + parent::export($filters); + } } diff --git a/www/class/centreon-clapi/centreonObject.class.php b/www/class/centreon-clapi/centreonObject.class.php index 366e68ac65c57c32c332dc9616be17e23d4600a8..47ccfad329f3834e75b8e5c7259fdb704dd9e972 100644 --- a/www/class/centreon-clapi/centreonObject.class.php +++ b/www/class/centreon-clapi/centreonObject.class.php @@ -407,7 +407,7 @@ abstract class CentreonObject /** * Export data * - * @param string $parameters + * @param string $filters * @return void */ public function export($filters = null)