Apply style to detail

refs #4869
This commit is contained in:
Marius Hein 2013-10-15 12:48:33 +02:00
parent a69c7498ec
commit d6fd3350e0
12 changed files with 426 additions and 166 deletions

View File

@ -1,9 +1,12 @@
<div class="panel panel-default"> <div>
<div class="panel-heading"> <div class="panel-heading">
{{CHECK_COMMAND_ICON}} <div class="panel-hostname">
<span>Check Command</span> Check Command
</div>
</div> </div>
<hr class="separator" />
<div class="panel-body"> <div class="panel-body">
<table> <table>
<tr> <tr>

View File

@ -1,4 +1,3 @@
<?php if (!empty($object->contacts)): ?>
<?php <?php
$contacts = array(); $contacts = array();
foreach ($object->contacts as $contact) { foreach ($object->contacts as $contact) {
@ -14,17 +13,24 @@ foreach ($object->contacts as $contact) {
. '</a>'; . '</a>';
} }
?> ?>
<div class="panel panel-default"> <div>
<div class="panel-heading"> <div class="panel-heading">
{{CONTACT_ICON}} <span>Contacts</span> <div class="panel-hostname">
Contacts
</div>
</div> </div>
<hr class="separator" />
<div class="panel-body"> <div class="panel-body">
<?= implode(', ', $contacts); ?> <?php if (!count($contacts)): ?>
No Contacts
<?php else: ?>
<?= implode(', ', $contacts); ?>
<?php endif; ?>
</div> </div>
</div> </div>
<?php endif; ?>
<?php if (!empty($object->contactgroups)): ?>
<?php <?php
$contactgroups = array(); $contactgroups = array();
foreach ($object->contactgroups as $contactgroup) { foreach ($object->contactgroups as $contactgroup) {
@ -40,12 +46,20 @@ foreach ($object->contactgroups as $contactgroup) {
. '</a>'; . '</a>';
} }
?> ?>
<div class="panel panel-default"> <div>
<div class="panel-heading"> <div class="panel-heading">
{{CONTACTGROUP_ICON}} <span>Contactgroups</span> <div class="panel-hostname">
Contactgroups
</div>
</div> </div>
<hr class="separator" />
<div class="panel-body"> <div class="panel-body">
<?= implode(', ', $contactgroups); ?> <?php if (!count($contactgroups)): ?>
No Contactgroups
<?php else: ?>
<?= implode(', ', $contactgroups); ?>
<?php endif; ?>
</div> </div>
</div> </div>
<?php endif; ?>

View File

@ -8,6 +8,15 @@
<hr class="separator" /> <hr class="separator" />
<div class="panel-body"> <div class="panel-body">
<?php var_dump($this->object); ?> <?php if (empty($this->object->customvars)): ?>
No customvars
<?php else: ?>
<dl class="dl-horizontal">
<?php foreach ($this->object->customvars as $varname => $varvalue): ?>
<dt><?= $varname; ?></dt>
<dd><?= $varvalue; ?></dd>
<?php endforeach; ?>
</dl>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -56,7 +56,7 @@
<tr> <tr>
<td>No Downtimes</td> <td>No Downtimes</td>
</tr> </tr>
<?php endif; ?> <?php else: ?>
<?php foreach ($this->object->downtimes as $downtime): ?> <?php foreach ($this->object->downtimes as $downtime): ?>
<tr> <tr>
<td> <td>
@ -89,6 +89,7 @@
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -1,4 +1,3 @@
<?php if (!empty($object->hostgroups)): ?>
<?php <?php
$hostgroups = array(); $hostgroups = array();
foreach ($object->hostgroups as $name => $alias) { foreach ($object->hostgroups as $name => $alias) {
@ -7,12 +6,20 @@ foreach ($object->hostgroups as $name => $alias) {
. '</a>'; . '</a>';
} }
?> ?>
<div class="panel panel-default"> <div>
<div class="panel-heading"> <div class="panel-heading">
{{HOSTGROUP_ICON}} <span>Hostgroups</span> <div class="panel-hostname">
Hostgroups
</div>
</div> </div>
<hr class="separator" />
<div class="panel-body"> <div class="panel-body">
<?= implode(', ', $hostgroups); ?> <?php if (!count($hostgroups)): ?>
No Hostgroups
<?php else: ?>
<?= implode(', ', $hostgroups); ?>
<?php endif; ?>
</div> </div>
</div> </div>
<?php endif; ?>

View File

@ -10,12 +10,8 @@
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>Latency</dt> <dt>Latency</dt>
<dd><?= sprintf('%.2f', $this->object->check_execution_time); ?>s</dd> <dd><?= sprintf('%.2f', $this->object->check_execution_time); ?>s</dd>
</dl>
<dl class="dl-horizontal">
<dt>Duration</dt> <dt>Duration</dt>
<dd><?= sprintf('%.2f', $this->object->check_latency); ?>s</dd> <dd><?= sprintf('%.2f', $this->object->check_latency); ?>s</dd>
</dl>
<dl class="dl-horizontal">
<dt>Attempt</dt> <dt>Attempt</dt>
<dd> <dd>
<?= $this->object->current_check_attempt; ?>/<?= $this->object->max_check_attempts; ?> <?= $this->object->current_check_attempt; ?>/<?= $this->object->max_check_attempts; ?>

View File

@ -1,4 +1,3 @@
<?php if (!empty($object->servicegroups)): ?>
<?php <?php
$servicegroups = array(); $servicegroups = array();
foreach ($object->servicegroups as $name => $alias) { foreach ($object->servicegroups as $name => $alias) {
@ -7,12 +6,20 @@ foreach ($object->servicegroups as $name => $alias) {
. '</a>'; . '</a>';
} }
?> ?>
<div class="panel panel-default"> <div>
<div class="panel-heading"> <div class="panel-heading">
{{SERVICEGROUP_ICON}} <span>Servicegroups</span> <div class="panel-hostname">
Servicegroups
</div>
</div> </div>
<hr class="separator" />
<div class="panel-body"> <div class="panel-body">
<?= implode(', ', $servicegroups); ?> <?php if (!count($servicegroups)): ?>
No Servicegroups
<?php else: ?>
<?= implode(', ', $servicegroups); ?>
<?php endif; ?>
</div> </div>
</div> </div>
<?php endif; ?>

View File

@ -5,6 +5,6 @@
<?= $this->render('show/components/properties.phtml'); ?> <?= $this->render('show/components/properties.phtml'); ?>
<?= $this->render('show/components/flags.phtml'); ?> <?= $this->render('show/components/flags.phtml'); ?>
<?= $this->render('show/components/customvars.phtml'); ?> <?= $this->render('show/components/customvars.phtml'); ?>
<?= $this->render('show/components/servicegroups.phtml'); ?> <?= $this->render('show/components/hostgroups.phtml'); ?>
<?= $this->render('show/components/contacts.phtml'); ?> <?= $this->render('show/components/contacts.phtml'); ?>
<?= $this->render('show/components/command.phtml') ?> <?= $this->render('show/components/command.phtml') ?>

View File

@ -0,0 +1,65 @@
<?php
// {{{ICINGA_LICENSE_HEADER}}}
/**
* This file is part of Icinga 2 Web.
*
* Icinga 2 Web - Head for multiple monitoring backends.
* Copyright (C) 2013 Icinga Development Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @copyright 2013 Icinga Development Team <info@icinga.org>
* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
* @author Icinga Development Team <info@icinga.org>
*/
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Module\Monitoring\DataView;
/**
* Represent customvar view
*/
class Customvar extends DataView
{
/**
* Retrieve columns provided by this view
*
* @return array
*/
public function getColumns()
{
return array(
'varname',
'varvalue',
'object_type'
);
}
/**
* Retrieve default sorting rules for particular columns. These involve sort order and potential additional to sort
*
* @return array
*/
public function getSortRules()
{
return array(
'varname' => array(
'varname' => self::SORT_ASC,
'varvalue' => self::SORT_ASC,
)
);
}
}

View File

@ -1,10 +1,40 @@
<?php <?php
// {{{ICINGA_LICENSE_HEADER}}}
/**
* This file is part of Icinga 2 Web.
*
* Icinga 2 Web - Head for multiple monitoring backends.
* Copyright (C) 2013 Icinga Development Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @copyright 2013 Icinga Development Team <info@icinga.org>
* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
* @author Icinga Development Team <info@icinga.org>
*/
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Module\Monitoring\Object; namespace Icinga\Module\Monitoring\Object;
use Icinga\Data\AbstractQuery as Query; use Icinga\Data\AbstractQuery as Query;
use \Icinga\Module\Monitoring\Backend; use \Icinga\Module\Monitoring\Backend;
/**
* Generic icinga object with belongings
*/
abstract class AbstractObject abstract class AbstractObject
{ {
protected $backend; protected $backend;
@ -17,14 +47,7 @@ abstract class AbstractObject
protected $properties; protected $properties;
protected $foreign = array( protected $foreign = array();
// 'hostgroups' => null,
// 'contacts' => null,
// 'contactgroups' => null,
// 'servicegroups' => null,
// 'customvars' => null,
// 'comments' => null,
);
public function __construct(Backend $backend, $name1, $name2 = null) public function __construct(Backend $backend, $name1, $name2 = null)
{ {
@ -81,10 +104,13 @@ abstract class AbstractObject
protected function fetchHostgroups() protected function fetchHostgroups()
{ {
$this->foreign['hostgroups'] = $this->applyObjectFilter( $this->foreign['hostgroups'] = $this->applyObjectFilter(
$this->backend->select()->from('hostgroup', array( $this->backend->select()->from(
'hostgroup_name', 'hostgroup',
'hostgroup_alias' array(
)) 'hostgroup_name',
'hostgroup_alias'
)
)
)->fetchPairs(); )->fetchPairs();
return $this; return $this;
} }
@ -92,10 +118,13 @@ abstract class AbstractObject
protected function fetchServicegroups() protected function fetchServicegroups()
{ {
$this->foreign['servicegroups'] = $this->applyObjectFilter( $this->foreign['servicegroups'] = $this->applyObjectFilter(
$this->backend->select()->from('servicegroup', array( $this->backend->select()->from(
'servicegroup_name', 'servicegroup',
'servicegroup_alias' array(
)) 'servicegroup_name',
'servicegroup_alias'
)
)
)->fetchPairs(); )->fetchPairs();
return $this; return $this;
} }
@ -103,12 +132,15 @@ abstract class AbstractObject
protected function fetchContacts() protected function fetchContacts()
{ {
$this->foreign['contacts'] = $this->applyObjectFilter( $this->foreign['contacts'] = $this->applyObjectFilter(
$this->backend->select()->from('contact', array( $this->backend->select()->from(
'contact_name', 'contact',
'contact_alias', array(
'contact_email', 'contact_name',
'contact_pager', 'contact_alias',
)) 'contact_email',
'contact_pager',
)
)
)->fetchAll(); )->fetchAll();
return $this; return $this;
} }
@ -116,10 +148,13 @@ abstract class AbstractObject
protected function fetchContactgroups() protected function fetchContactgroups()
{ {
$this->foreign['contactgroups'] = $this->applyObjectFilter( $this->foreign['contactgroups'] = $this->applyObjectFilter(
$this->backend->select()->from('contactgroup', array( $this->backend->select()->from(
'contactgroup_name', 'contactgroup',
'contactgroup_alias', array(
)) 'contactgroup_name',
'contactgroup_alias',
)
)
)->fetchAll(); )->fetchAll();
return $this; return $this;
} }
@ -127,12 +162,15 @@ abstract class AbstractObject
protected function fetchComments() protected function fetchComments()
{ {
$this->foreign['comments'] = $this->applyObjectFilter( $this->foreign['comments'] = $this->applyObjectFilter(
$this->backend->select()->from('comment', array( $this->backend->select()->from(
'comment_timestamp', 'comment',
'comment_author', array(
'comment_data', 'comment_timestamp',
'comment_type', 'comment_author',
))->where('comment_objecttype_id', $this->type) 'comment_data',
'comment_type',
)
)->where('comment_objecttype_id', $this->type)
)->fetchAll(); )->fetchAll();
return $this; return $this;
} }
@ -140,12 +178,13 @@ abstract class AbstractObject
protected function fetchCustomvars() protected function fetchCustomvars()
{ {
$this->foreign['customvars'] = $this->applyObjectFilter( $this->foreign['customvars'] = $this->applyObjectFilter(
$this->backend->select()->from('customvar', array( $this->backend->select()->from(
'varname', 'customvar',
'varvalue' array(
)) 'varname',
->where('varname', '-*PW*,-*PASS*,-*COMMUNITY*') 'varvalue'
->where('object_type', 'host') )
)->where('varname', '-*PW*,-*PASS*,-*COMMUNITY*')
)->fetchPairs(); )->fetchPairs();
return $this; return $this;
} }
@ -153,17 +192,20 @@ abstract class AbstractObject
public function fetchEventHistory() public function fetchEventHistory()
{ {
$this->foreign['eventHistory'] = $this->applyObjectFilter( $this->foreign['eventHistory'] = $this->applyObjectFilter(
$this->backend->select()->from('eventHistory', array( $this->backend->select()->from(
'object_type', 'eventHistory',
'host_name', array(
'service_description', 'object_type',
'timestamp', 'host_name',
'state', 'service_description',
'attempt', 'timestamp',
'max_attempts', 'state',
'output', 'attempt',
'type' 'max_attempts',
)) 'output',
'type'
)
)
); );
return $this; return $this;
} }
@ -171,7 +213,9 @@ abstract class AbstractObject
public function fetchDowtimes() public function fetchDowtimes()
{ {
$this->foreign['downtimes'] = $this->applyObjectFilter( $this->foreign['downtimes'] = $this->applyObjectFilter(
$this->backend->select()->from('downtime', array( $this->backend->select()->from(
'downtime',
array(
'host_name', 'host_name',
'object_type', 'object_type',
'service_host_name', 'service_host_name',

View File

@ -1,9 +1,39 @@
<?php <?php
// {{{ICINGA_LICENSE_HEADER}}}
/**
* This file is part of Icinga 2 Web.
*
* Icinga 2 Web - Head for multiple monitoring backends.
* Copyright (C) 2013 Icinga Development Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @copyright 2013 Icinga Development Team <info@icinga.org>
* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
* @author Icinga Development Team <info@icinga.org>
*/
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Module\Monitoring\Object; namespace Icinga\Module\Monitoring\Object;
use Icinga\Data\AbstractQuery as Query; use Icinga\Data\AbstractQuery as Query;
/**
* Represent a host object
*/
class Host extends AbstractObject class Host extends AbstractObject
{ {
protected $foreign = array( protected $foreign = array(
@ -12,19 +42,35 @@ class Host extends AbstractObject
'contactgroups' => null, 'contactgroups' => null,
'customvars' => null, 'customvars' => null,
'comments' => null, 'comments' => null,
'downtimes' => null 'downtimes' => null,
'customvars' => null
); );
/**
* Statename
*/
public function stateName() public function stateName()
{ {
// TODO // TODO
} }
/**
* Filter object belongings
*
* @param Query $query
*
* @return Query
*/
protected function applyObjectFilter(Query $query) protected function applyObjectFilter(Query $query)
{ {
return $query->where('host_name', $this->name1); return $query->where('host_name', $this->name1);
} }
/**
* Load foreign object data
*
* @return self
*/
public function prefetch() public function prefetch()
{ {
return $this->fetchHostgroups() return $this->fetchHostgroups()
@ -32,48 +78,56 @@ class Host extends AbstractObject
->fetchContactgroups() ->fetchContactgroups()
->fetchCustomvars() ->fetchCustomvars()
->fetchComments() ->fetchComments()
->fetchDowtimes(); ->fetchDowtimes()
->fetchCustomvars();
} }
/**
* Load object data
* @return object
*/
protected function fetchObject() protected function fetchObject()
{ {
return $this->backend->select()->from('status', array( return $this->backend->select()->from(
'host_name', 'status',
'host_alias', array(
'host_address', 'host_name',
'host_state', 'host_alias',
'host_handled', 'host_address',
'host_in_downtime', 'host_state',
'in_downtime' => 'host_in_downtime', 'host_handled',
'host_acknowledged', 'host_in_downtime',
'host_last_state_change', 'in_downtime' => 'host_in_downtime',
'last_state_change' => 'host_last_state_change', 'host_acknowledged',
'last_notification' => 'host_last_notification', 'host_last_state_change',
'last_check' => 'host_last_check', 'last_state_change' => 'host_last_state_change',
'next_check' => 'host_next_check', 'last_notification' => 'host_last_notification',
'check_execution_time' => 'host_check_execution_time', 'last_check' => 'host_last_check',
'check_latency' => 'host_check_latency', 'next_check' => 'host_next_check',
'output' => 'host_output', 'check_execution_time' => 'host_check_execution_time',
'long_output' => 'host_long_output', 'check_latency' => 'host_check_latency',
'check_command' => 'host_check_command', 'output' => 'host_output',
'perfdata' => 'host_perfdata', 'long_output' => 'host_long_output',
'host_icon_image', 'check_command' => 'host_check_command',
'passive_checks_enabled' => 'host_passive_checks_enabled', 'perfdata' => 'host_perfdata',
'obsessing' => 'host_obsessing', 'host_icon_image',
'notifications_enabled' => 'host_notifications_enabled', 'passive_checks_enabled' => 'host_passive_checks_enabled',
'event_handler_enabled' => 'host_event_handler_enabled', 'obsessing' => 'host_obsessing',
'flap_detection_enabled' => 'host_flap_detection_enabled', 'notifications_enabled' => 'host_notifications_enabled',
'active_checks_enabled' => 'host_active_checks_enabled', 'event_handler_enabled' => 'host_event_handler_enabled',
'current_check_attempt' => 'host_current_check_attempt', 'flap_detection_enabled' => 'host_flap_detection_enabled',
'max_check_attempts' => 'host_max_check_attempts', 'active_checks_enabled' => 'host_active_checks_enabled',
'last_notification' => 'host_last_notification', 'current_check_attempt' => 'host_current_check_attempt',
'current_notification_number' => 'host_current_notification_number', 'max_check_attempts' => 'host_max_check_attempts',
'percent_state_change' => 'host_percent_state_change', 'last_notification' => 'host_last_notification',
'is_flapping' => 'host_is_flapping', 'current_notification_number' => 'host_current_notification_number',
'last_comment' => 'host_last_comment', 'percent_state_change' => 'host_percent_state_change',
'action_url' => 'host_action_url', 'is_flapping' => 'host_is_flapping',
'notes_url' => 'host_notes_url', 'last_comment' => 'host_last_comment',
'percent_state_change' => 'host_percent_state_change' 'action_url' => 'host_action_url',
))->where('host_name', $this->name1)->fetchRow(); 'notes_url' => 'host_notes_url',
'percent_state_change' => 'host_percent_state_change'
)
)->where('host_name', $this->name1)->fetchRow();
} }
} }

View File

@ -1,31 +1,82 @@
<?php <?php
// {{{ICINGA_LICENSE_HEADER}}}
/**
* This file is part of Icinga 2 Web.
*
* Icinga 2 Web - Head for multiple monitoring backends.
* Copyright (C) 2013 Icinga Development Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @copyright 2013 Icinga Development Team <info@icinga.org>
* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
* @author Icinga Development Team <info@icinga.org>
*/
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Module\Monitoring\Object; namespace Icinga\Module\Monitoring\Object;
use Icinga\Data\AbstractQuery as Query; use Icinga\Data\AbstractQuery as Query;
/**
* Represent a single service
*/
class Service extends AbstractObject class Service extends AbstractObject
{ {
/**
* Foreign references to objects
*
* @var array
*/
protected $foreign = array( protected $foreign = array(
'servicegroups' => null, 'servicegroups' => null,
'contacts' => null, 'contacts' => null,
'contactgroups' => null, 'contactgroups' => null,
'customvars' => null, 'customvars' => null,
'comments' => null, 'comments' => null,
'downtimes' => null 'downtimes' => null,
'customvars' => null
); );
/**
* Statename
*/
public function stateName() public function stateName()
{ {
// TODO // TODO
} }
/**
* Filter foreign object belongings
*
* @param Query $query
*
* @return Query
*/
protected function applyObjectFilter(Query $query) protected function applyObjectFilter(Query $query)
{ {
return $query->where('service_host_name', $this->name1) return $query->where('service_host_name', $this->name1)
->where('service_description', $this->name2); ->where('service_description', $this->name2);
} }
/**
* Collect foreign data
*
* @return self
*/
public function prefetch() public function prefetch()
{ {
return $this->fetchServicegroups() return $this->fetchServicegroups()
@ -33,54 +84,63 @@ class Service extends AbstractObject
->fetchContactgroups() ->fetchContactgroups()
->fetchCustomvars() ->fetchCustomvars()
->fetchComments() ->fetchComments()
->fetchDowtimes(); ->fetchDowtimes()
->fetchCustomvars();
} }
/**
* Load object data
*
* @return object
*/
protected function fetchObject() protected function fetchObject()
{ {
return $this->backend->select()->from('status', array( return $this->backend->select()->from(
'host_name', 'status',
'host_alias', array(
'host_address', 'host_name',
'host_state', 'host_alias',
'host_handled', 'host_address',
'host_in_downtime', 'host_state',
'host_acknowledged', 'host_handled',
'host_last_state_change', 'host_in_downtime',
'service_description', 'host_acknowledged',
'service_state', 'host_last_state_change',
'service_handled', 'service_description',
'service_acknowledged', 'service_state',
'service_in_downtime', 'service_handled',
'service_last_state_change', 'service_acknowledged',
'last_check' => 'service_last_check', 'service_in_downtime',
'next_check' => 'service_next_check', 'service_last_state_change',
'check_execution_time' => 'service_check_execution_time', 'last_check' => 'service_last_check',
'check_latency' => 'service_check_latency', 'next_check' => 'service_next_check',
'output' => 'service_output', 'check_execution_time' => 'service_check_execution_time',
'long_output' => 'service_long_output', 'check_latency' => 'service_check_latency',
'check_command' => 'service_check_command', 'output' => 'service_output',
'perfdata' => 'service_perfdata', 'long_output' => 'service_long_output',
'current_check_attempt' => 'service_current_check_attempt', 'check_command' => 'service_check_command',
'max_check_attempts' => 'service_max_check_attempts', 'perfdata' => 'service_perfdata',
'state_type' => 'service_state_type', 'current_check_attempt' => 'service_current_check_attempt',
'passive_checks_enabled' => 'service_passive_checks_enabled', 'max_check_attempts' => 'service_max_check_attempts',
'last_state_change' => 'service_last_state_change', 'state_type' => 'service_state_type',
'last_notification' => 'service_last_notification', 'passive_checks_enabled' => 'service_passive_checks_enabled',
'current_notification_number' => 'service_current_notification_number', 'last_state_change' => 'service_last_state_change',
'is_flapping' => 'service_is_flapping', 'last_notification' => 'service_last_notification',
'percent_state_change' => 'service_percent_state_change', 'current_notification_number' => 'service_current_notification_number',
'in_downtime' => 'service_in_downtime', 'is_flapping' => 'service_is_flapping',
'passive_checks_enabled' => 'service_passive_checks_enabled', 'percent_state_change' => 'service_percent_state_change',
'obsessing' => 'service_obsessing', 'in_downtime' => 'service_in_downtime',
'notifications_enabled' => 'service_notifications_enabled', 'passive_checks_enabled' => 'service_passive_checks_enabled',
'event_handler_enabled' => 'service_event_handler_enabled', 'obsessing' => 'service_obsessing',
'flap_detection_enabled' => 'service_flap_detection_enabled', 'notifications_enabled' => 'service_notifications_enabled',
'active_checks_enabled' => 'service_active_checks_enabled', 'event_handler_enabled' => 'service_event_handler_enabled',
'last_comment' => 'service_last_comment', 'flap_detection_enabled' => 'service_flap_detection_enabled',
'action_url' => 'service_action_url', 'active_checks_enabled' => 'service_active_checks_enabled',
'notes_url' => 'service_notes_url' 'last_comment' => 'service_last_comment',
)) 'action_url' => 'service_action_url',
'notes_url' => 'service_notes_url'
)
)
->where('host_name', $this->name1) ->where('host_name', $this->name1)
->where('service_description', $this->name2) ->where('service_description', $this->name2)
->fetchRow(); ->fetchRow();