mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
MonitoringBackend: a few more places, doesn't hurt
This commit is contained in:
parent
4876854893
commit
f24b0e2a4e
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Web\Menu;
|
namespace Icinga\Web\Menu;
|
||||||
|
|
||||||
use Icinga\Module\Monitoring\Backend;
|
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
|
||||||
use Icinga\Web\Menu;
|
use Icinga\Web\Menu;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ class MonitoringMenuItemRenderer implements MenuItemRenderer {
|
|||||||
protected static function summary($column = null)
|
protected static function summary($column = null)
|
||||||
{
|
{
|
||||||
if (self::$summary === null) {
|
if (self::$summary === null) {
|
||||||
self::$summary = Backend::createBackend()->select()->from(
|
self::$summary = MonitoringBackend::instance()->select()->from(
|
||||||
'statusSummary',
|
'statusSummary',
|
||||||
array(
|
array(
|
||||||
'hosts_down_unhandled',
|
'hosts_down_unhandled',
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Monitoring\Form\Command;
|
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\Module\Monitoring\Command\Transport\CommandTransport;
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
@ -24,11 +24,11 @@ abstract class CommandForm extends Form
|
|||||||
/**
|
/**
|
||||||
* Set the monitoring backend
|
* Set the monitoring backend
|
||||||
*
|
*
|
||||||
* @param Backend $backend
|
* @param MonitoringBackend $backend
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBackend(Backend $backend)
|
public function setBackend(MonitoringBackend $backend)
|
||||||
{
|
{
|
||||||
$this->backend = $backend;
|
$this->backend = $backend;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -15,7 +15,7 @@ use Icinga\Data\Filterable;
|
|||||||
use Icinga\Exception\QueryException;
|
use Icinga\Exception\QueryException;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
use Icinga\Module\Monitoring\Backend;
|
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A read-only view of an underlying query
|
* 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)
|
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);
|
$view->applyUrlFilter($request);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
@ -140,7 +140,7 @@ abstract class DataView implements Browsable, Countable, Filterable, Sortable
|
|||||||
*/
|
*/
|
||||||
public static function fromParams(array $params, array $columns = null)
|
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) {
|
foreach ($params as $key => $value) {
|
||||||
if ($view->isValidFilterTarget($key)) {
|
if ($view->isValidFilterTarget($key)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user