From ba8816f002918bbb65dc7a5311d1444c7fa21ed8 Mon Sep 17 00:00:00 2001 From: loiclau <loic.lau@gmail.com> Date: Tue, 29 Aug 2017 13:46:32 +0200 Subject: [PATCH] feat(clapi/webservice) export filter --- www/api/class/centreon_clapi.class.php | 3 +++ www/api/class/webService.class.php | 1 - www/class/centreon-clapi/centreonAPI.class.php | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/www/api/class/centreon_clapi.class.php b/www/api/class/centreon_clapi.class.php index 33cfcd719e..32412691ef 100644 --- a/www/api/class/centreon_clapi.class.php +++ b/www/api/class/centreon_clapi.class.php @@ -101,6 +101,9 @@ class CentreonClapi extends CentreonWebService if (isset($this->arguments['select'])) { $options['select'] = $this->arguments['select']; } + if (isset($this->arguments['filter'])) { + $options['filter-type'] = $this->arguments['filter']; + } }elseif (strtoupper($action) === 'IMPORT'){ } else { diff --git a/www/api/class/webService.class.php b/www/api/class/webService.class.php index f7746ff958..eb01a83a00 100644 --- a/www/api/class/webService.class.php +++ b/www/api/class/webService.class.php @@ -81,7 +81,6 @@ class CentreonWebService $httpParams = $_GET; unset($httpParams['action']); unset($httpParams['object']); - unset($httpParams['select']); $this->arguments = $httpParams; break; case 'POST': diff --git a/www/class/centreon-clapi/centreonAPI.class.php b/www/class/centreon-clapi/centreonAPI.class.php index 77c9dd58a9..dd32ada27a 100644 --- a/www/class/centreon-clapi/centreonAPI.class.php +++ b/www/class/centreon-clapi/centreonAPI.class.php @@ -83,7 +83,7 @@ class CentreonAPI private $objectTable; private $aExport = array(); - public function __construct($user, $password, $action, $centreon_path, $options) + private function __construct($user, $password, $action, $centreon_path, $options) { global $version; @@ -799,7 +799,6 @@ class CentreonAPI $this->initAllObjects(); - if (isset($this->options['select'])) { CentreonExported::getInstance()->set_filter(1); CentreonExported::getInstance()->set_options($this->options); -- GitLab