Monitoring: Fix nonexistent Icinga\Backend usage in CommandController

This commit is contained in:
Eric Lippmann 2013-08-20 16:19:34 +02:00
parent 1bd35ff734
commit d574a26db3

View File

@ -29,13 +29,12 @@
use Icinga\Application\Benchmark; use Icinga\Application\Benchmark;
use Icinga\Application\Icinga; use Icinga\Application\Icinga;
use Icinga\Backend; use \Monitoring\Backend;
use \Icinga\Application\Config; use \Icinga\Application\Config;
use Icinga\Application\Logger; use Icinga\Application\Logger;
use Icinga\Authentication\Manager; use Icinga\Authentication\Manager;
use Icinga\Web\Form; use Icinga\Web\Form;
use Icinga\Web\Controller\ModuleActionController; use Icinga\Web\Controller\ModuleActionController;
use Icinga\Protocol\Commandpipe\Comment;
use Icinga\Protocol\Commandpipe\CommandPipe; use Icinga\Protocol\Commandpipe\CommandPipe;
use Icinga\Exception\ConfigurationError; use Icinga\Exception\ConfigurationError;
use Icinga\Exception\MissingParameterException; use Icinga\Exception\MissingParameterException;
@ -172,7 +171,7 @@ class Monitoring_CommandController extends ModuleActionController
$fields[] = "service_state"; $fields[] = "service_state";
} }
; ;
$query = Backend::getInstance()->select()->from("status", $fields); $query = Backend::getInstance($this->_getParam('backend'))->select()->from("status", $fields);
return $query->applyFilters($filter)->fetchAll(); return $query->applyFilters($filter)->fetchAll();
} catch (\Exception $e) { } catch (\Exception $e) {
Logger::error( Logger::error(