Skip to content

Commit

Permalink
AbstractObject: Rename to MonitoredObject
Browse files Browse the repository at this point in the history
refs #6932
  • Loading branch information
mxhash committed Sep 4, 2014
1 parent 4fb47ef commit f8b3ffb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions modules/monitoring/application/controllers/ShowController.php
Expand Up @@ -3,13 +3,13 @@
// {{{ICINGA_LICENSE_HEADER}}}

use Icinga\Application\Benchmark;
use Icinga\Module\Monitoring\Object\MonitoredObject;
use Icinga\Web\Hook;
use Icinga\Web\Widget\Tabs;
use Icinga\Web\Widget\Tabextension\OutputFormat;
use Icinga\Web\Widget\Tabextension\DashboardAction;
use Icinga\Module\Monitoring\Backend;
use Icinga\Module\Monitoring\Controller;
use Icinga\Module\Monitoring\Object\AbstractObject;
use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;

Expand Down Expand Up @@ -41,7 +41,7 @@ public function init()
$this->view->object = new Service($this->params);
} else {
// TODO: Well... this could be done better
$this->view->object = AbstractObject::fromParams($this->params);
$this->view->object = MonitoredObject::fromParams($this->params);
}
if (Hook::has('ticket')) {
$this->view->tickets = Hook::first('ticket');
Expand Down
Expand Up @@ -4,6 +4,7 @@

namespace Icinga\Module\Monitoring\Form\Command;

use Icinga\Module\Monitoring\Object\MonitoredObject;
use Zend_Form_Element_Text;
use Zend_Validate_GreaterThan;
use Zend_Validate_Digits;
Expand All @@ -12,7 +13,6 @@
use Icinga\Util\DateTimeFactory;
use Icinga\Module\Monitoring\Backend;
use Icinga\Module\Monitoring\Command\ScheduleDowntimeCommand;
use Icinga\Module\Monitoring\Object\AbstractObject;
use Icinga\Module\Monitoring\Object\Service;
use Icinga\Web\Url;

Expand Down Expand Up @@ -67,7 +67,7 @@ private function getCurrentDowntimes()

$cfg = $this->getConfiguration();
$preferences = $this->getUserPreferences();
$object = AbstractObject::fromParams(Url::fromRequest()->getParams());
$object = MonitoredObject::fromParams(Url::fromRequest()->getParams());
$object->fetchDowntimes();
$downtimes = $object->downtimes;
/*
Expand Down
Expand Up @@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}

/*use Icinga\Module\Monitoring\Object\AbstractObject;*/
/* use Icinga\Module\Monitoring\Object\MonitoredObject; */

/**
* Rendering helper for object's properties which may be either enabled or disabled
Expand All @@ -26,11 +26,11 @@ class Zend_View_Helper_MonitoringFlags extends Zend_View_Helper_Abstract
/**
* Retrieve flags as array with either true or false as value
*
* @param AbstractObject $object
* @param MonitoredObject $object
*
* @return array
*/
public function monitoringFlags(/*AbstractObject*/$object)
public function monitoringFlags(/*MonitoredObject*/ $object)
{
$flags = array();
foreach (self::$flags as $column => $description) {
Expand Down
Expand Up @@ -3,7 +3,7 @@
// {{{ICINGA_LICENSE_HEADER}}}

use \Zend_View_Helper_Abstract;
use Icinga\Module\Monitoring\Object\AbstractObject;
use Icinga\Module\Monitoring\Object\MonitoredObject;

class Zend_View_Helper_ResolveMacros extends Zend_View_Helper_Abstract
{
Expand All @@ -22,7 +22,7 @@ class Zend_View_Helper_ResolveMacros extends Zend_View_Helper_Abstract
* Return the given string with macros being resolved
*
* @param string $input The string in which to look for macros
* @param AbstractObject|stdClass $object The host or service used to resolve macros
* @param MonitoredObject|stdClass $object The host or service used to resolve macros
*
* @return string The substituted or unchanged string
*/
Expand All @@ -45,7 +45,7 @@ public function resolveMacros($input, $object)
* Resolve a macro based on the given object
*
* @param string $macro The macro to resolve
* @param AbstractObject|stdClass $object The object used to resolve the macro
* @param MonitoredObject|stdClass $object The object used to resolve the macro
*
* @return string The new value or the macro if it cannot be resolved
*/
Expand Down
2 changes: 1 addition & 1 deletion modules/monitoring/library/Monitoring/Object/Host.php
Expand Up @@ -7,7 +7,7 @@
use Icinga\Module\Monitoring\DataView\HostStatus;
use Icinga\Data\Db\DbQuery;

class Host extends AbstractObject
class Host extends MonitoredObject
{
public $type = 'host';
public $prefix = 'host_';
Expand Down
Expand Up @@ -23,7 +23,7 @@
use Icinga\Application\Config;


abstract class AbstractObject
abstract class MonitoredObject
{
public $type;
public $prefix;
Expand Down
2 changes: 1 addition & 1 deletion modules/monitoring/library/Monitoring/Object/Service.php
Expand Up @@ -7,7 +7,7 @@
use Icinga\Module\Monitoring\DataView\ServiceStatus;
use Icinga\Data\Db\DbQuery;

class Service extends AbstractObject
class Service extends MonitoredObject
{
public $type = 'service';
public $prefix = 'service_';
Expand Down

0 comments on commit f8b3ffb

Please sign in to comment.