monitoring: Ensure that views and queries are all named using the same scheme

That's "SomesuperQuery" and not "SomeSuperQuery", according to most
of the existing queries.
This commit is contained in:
Johannes Meyer 2015-06-12 14:42:49 +02:00
parent 76b17462f9
commit 4996f569fe
19 changed files with 16 additions and 16 deletions

View File

@ -156,7 +156,7 @@ class ListCommand extends Command
'service_perfdata',
'service_last_state_change'
);
$query = $this->getQuery('serviceStatus', $columns)
$query = $this->getQuery('servicestatus', $columns)
->order('host_name');
echo $this->renderStatusQuery($query);
}

View File

@ -251,7 +251,7 @@ class Monitoring_AlertsummaryController extends Controller
$interval = $this->getInterval();
$query = $this->backend->select()->from(
'eventHistory',
'eventhistory',
array(
'timestamp'
)

View File

@ -180,7 +180,7 @@ class Monitoring_ListController extends Controller
'current_check_attempt' => 'service_current_check_attempt',
'max_check_attempts' => 'service_max_check_attempts'
), $this->addColumns());
$query = $this->backend->select()->from('serviceStatus', $columns);
$query = $this->backend->select()->from('servicestatus', $columns);
$this->filterQuery($query);
$this->applyRestriction('monitoring/filter/objects', $query);
$this->view->services = $query;
@ -567,7 +567,7 @@ class Monitoring_ListController extends Controller
$this->translate('List event records')
);
$query = $this->backend->select()->from('eventHistory', array(
$query = $this->backend->select()->from('eventhistory', array(
'host_name',
'host_display_name',
'service_description',
@ -594,7 +594,7 @@ class Monitoring_ListController extends Controller
{
$this->addTitleTab('servicegrid', $this->translate('Service Grid'), $this->translate('Show the Service Grid'));
$this->setAutorefreshInterval(15);
$query = $this->backend->select()->from('serviceStatus', array(
$query = $this->backend->select()->from('servicestatus', array(
'host_name',
'service_description',
'service_state',

View File

@ -211,7 +211,7 @@ class Monitoring_ShowController extends Controller
)
);
}
if ($this->backend->hasQuery('eventHistory')) {
if ($this->backend->hasQuery('eventhistory')) {
$tabs->add(
'history',
array(

View File

@ -21,7 +21,7 @@ class Monitoring_TacticalController extends MonitoringController
)
)->extend(new DashboardAction())->activate('tactical_overview');
$stats = $this->backend->select()->from(
'statusSummary',
'statussummary',
array(
'hosts_up',
'hosts_pending',

View File

@ -30,7 +30,7 @@ class Monitoring_TimelineController extends Controller
$detailUrl = Url::fromPath('monitoring/list/eventhistory');
$timeline = new TimeLine(
$this->backend->select()->from('eventHistory',
$this->backend->select()->from('eventhistory',
array(
'name' => 'type',
'time' => 'timestamp'

View File

@ -137,7 +137,7 @@ class Host extends MonitoredObject
if ($this->backend->getType() === 'livestatus') {
$columns[] = 'host_contacts';
}
return $this->backend->select()->from('hostStatus', $columns)
return $this->backend->select()->from('hoststatus', $columns)
->where('host_name', $this->host);
}
@ -149,7 +149,7 @@ class Host extends MonitoredObject
public function fetchServices()
{
$services = array();
foreach ($this->backend->select()->from('serviceStatus', array('service_description'))
foreach ($this->backend->select()->from('servicestatus', array('service_description'))
->where('host_name', $this->host)
->getQuery()
->fetchAll() as $service) {

View File

@ -12,7 +12,7 @@ use Icinga\Util\String;
*/
class HostList extends ObjectList
{
protected $dataViewName = 'hostStatus';
protected $dataViewName = 'hoststatus';
protected $columns = array('host_name');

View File

@ -449,7 +449,7 @@ abstract class MonitoredObject implements Filterable
*/
public function fetchEventhistory()
{
$eventHistory = $this->backend->select()->from('eventHistory', array(
$eventHistory = $this->backend->select()->from('eventhistory', array(
'object_type',
'host_name',
'host_display_name',

View File

@ -105,7 +105,7 @@ class Service extends MonitoredObject
*/
protected function getDataView()
{
return $this->backend->select()->from('serviceStatus', array(
return $this->backend->select()->from('servicestatus', array(
'host_icon_image',
'host_icon_image_alt',
'host_acknowledged',

View File

@ -16,7 +16,7 @@ class ServiceList extends ObjectList
protected $serviceStateSummary;
protected $dataViewName = 'serviceStatus';
protected $dataViewName = 'servicestatus';
protected $columns = array('host_name', 'service_description');

View File

@ -181,7 +181,7 @@ abstract class MonitoredObjectController extends Controller
)
);
}
if ($this->backend->hasQuery('eventHistory')) {
if ($this->backend->hasQuery('eventhistory')) {
$tabs->add(
'history',
array(

View File

@ -38,7 +38,7 @@ class MonitoringMenuItemRenderer extends MenuItemRenderer
{
if (self::$summary === null) {
$summary = MonitoringBackend::instance()->select()->from(
'statusSummary',
'statussummary',
array(
'hosts_down_unhandled',
'services_critical_unhandled'