MonitoringBackend: a few more places, doesn't hurt

This commit is contained in:
Thomas Gelf 2014-11-12 00:20:37 +01:00
parent 4876854893
commit f24b0e2a4e
3 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@
namespace Icinga\Web\Menu;
use Icinga\Module\Monitoring\Backend;
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
use Icinga\Web\Menu;
use Icinga\Web\Url;
@ -17,7 +17,7 @@ class MonitoringMenuItemRenderer implements MenuItemRenderer {
protected static function summary($column = null)
{
if (self::$summary === null) {
self::$summary = Backend::createBackend()->select()->from(
self::$summary = MonitoringBackend::instance()->select()->from(
'statusSummary',
array(
'hosts_down_unhandled',

View File

@ -4,7 +4,7 @@
namespace Icinga\Module\Monitoring\Form\Command;
use Icinga\Module\Monitoring\Backend;
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
use Icinga\Module\Monitoring\Command\Transport\CommandTransport;
use Icinga\Web\Form;
use Icinga\Web\Request;
@ -24,11 +24,11 @@ abstract class CommandForm extends Form
/**
* Set the monitoring backend
*
* @param Backend $backend
* @param MonitoringBackend $backend
*
* @return $this
*/
public function setBackend(Backend $backend)
public function setBackend(MonitoringBackend $backend)
{
$this->backend = $backend;
return $this;

View File

@ -15,7 +15,7 @@ use Icinga\Data\Filterable;
use Icinga\Exception\QueryException;
use Icinga\Web\Request;
use Icinga\Web\Url;
use Icinga\Module\Monitoring\Backend;
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
/**
* A read-only view of an underlying query
@ -104,7 +104,7 @@ abstract class DataView implements Browsable, Countable, Filterable, Sortable
*/
public static function fromRequest($request, array $columns = null)
{
$view = new static(Backend::createBackend($request->getParam('backend')), $columns);
$view = new static(MonitoringBackend::instance($request->getParam('backend')), $columns);
$view->applyUrlFilter($request);
return $view;
@ -140,7 +140,7 @@ abstract class DataView implements Browsable, Countable, Filterable, Sortable
*/
public static function fromParams(array $params, array $columns = null)
{
$view = new static(Backend::createBackend($params['backend']), $columns);
$view = new static(MonitoringBackend::instance($params['backend']), $columns);
foreach ($params as $key => $value) {
if ($view->isValidFilterTarget($key)) {