parent
4ededd5179
commit
1492245788
|
@ -26,7 +26,7 @@
|
|||
use Icinga\Monitoring\Command\Meta;
|
||||
|
||||
/**
|
||||
* Class MonitoringCommands
|
||||
* Display a bunch of commands
|
||||
*
|
||||
* Helper which produces a list of command buttons
|
||||
* depending on object states
|
||||
|
@ -34,6 +34,8 @@ use Icinga\Monitoring\Command\Meta;
|
|||
class Zend_View_Helper_MonitoringCommands extends Zend_View_Helper_Abstract
|
||||
{
|
||||
/**
|
||||
* Helper function called externally
|
||||
*
|
||||
* @param stdClass $object host or service object or something other
|
||||
* @param string $type small or full
|
||||
* @return string html output
|
||||
|
|
|
@ -1,10 +1,29 @@
|
|||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
/**
|
||||
* Icinga 2 Web - Head for multiple monitoring frontends
|
||||
* 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>
|
||||
* @author Icinga Development Team <info@icinga.org>
|
||||
*/
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
/**
|
||||
* Class Zend_View_Helper_MonitoringFlags
|
||||
*
|
||||
* Rendering helper for flags depending on objects
|
||||
*/
|
||||
class Zend_View_Helper_MonitoringFlags extends Zend_View_Helper_Abstract
|
||||
|
|
|
@ -1,9 +1,30 @@
|
|||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
/**
|
||||
* Icinga 2 Web - Head for multiple monitoring frontends
|
||||
* 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>
|
||||
* @author Icinga Development Team <info@icinga.org>
|
||||
*/
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
/**
|
||||
* Class Zend_View_Helper_MonitoringProperties
|
||||
* Helper to display monitoring properties
|
||||
*/
|
||||
class Zend_View_Helper_MonitoringProperties extends Zend_View_Helper_Abstract
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<?php if (! empty($this->comments)) { ?>
|
||||
<?php if (! empty($this->comments)): ?>
|
||||
<?
|
||||
$list = array();
|
||||
foreach ($this->comments as $comment) {
|
||||
|
@ -28,4 +28,4 @@ foreach ($this->comments as $comment) {
|
|||
|
||||
<blockquote> <?= implode('<br />', $list) ?></blockquote>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
|
@ -1,4 +1,4 @@
|
|||
<?php if (!empty($this->downtimes)) { ?>
|
||||
<?php if (!empty($this->downtimes)): ?>
|
||||
<?php
|
||||
$list = array();
|
||||
foreach ($this->downtimes as $downtime) {
|
||||
|
@ -40,4 +40,4 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
|
@ -10,16 +10,16 @@
|
|||
$flags = $this->monitoringFlags($object);
|
||||
?>
|
||||
<table class="flag-container">
|
||||
<?php foreach ($flags as $name => $value) { ?>
|
||||
<?php foreach ($flags as $name => $value): ?>
|
||||
<tr>
|
||||
<th><?= $name; ?></th>
|
||||
<td>
|
||||
<?php if ($value === true) { ?>
|
||||
<?php if ($value === true): ?>
|
||||
<span class="flag flag-enabled">ENABLED</span>
|
||||
<?php } else { ?>
|
||||
<?php else: ?>
|
||||
<span class="flag flag-disabled">DISABLED</span>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
|
@ -10,10 +10,10 @@ if (isset($this->service)) {
|
|||
$properties = $this->monitoringProperties($object);
|
||||
?>
|
||||
<table>
|
||||
<?php foreach ($properties as $label => $value) { ?>
|
||||
<?php foreach ($properties as $label => $value): ?>
|
||||
<tr>
|
||||
<th><?= $label ?></th>
|
||||
<td><?= $value ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
|
@ -17,7 +17,7 @@ if (!$this->compact) {
|
|||
}
|
||||
?>
|
||||
<div class="information-container">
|
||||
<?php if ($inlineCommands === true) { ?>
|
||||
<?php if ($inlineCommands === true): ?>
|
||||
<div class="pull-right">
|
||||
<?=
|
||||
$this->monitoringCommands(
|
||||
|
@ -26,7 +26,7 @@ if (!$this->compact) {
|
|||
);
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<table>
|
||||
<tr class="<?= $this->monitoringState($this->host, 'host') ?><?= $this->host->host_handled ? ' handled' : '' ?>">
|
||||
|
@ -39,22 +39,22 @@ if (!$this->compact) {
|
|||
<?php endif; ?>
|
||||
<strong>
|
||||
<?= $this->escape($this->host->host_name); ?>
|
||||
<?php if ($this->host->host_address && $this->host->host_address !== $this->host->host_name) { ?>
|
||||
<?php if ($this->host->host_address && $this->host->host_address !== $this->host->host_name): ?>
|
||||
(<?= $this->escape($this->host->host_address); ?>)
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
</strong>
|
||||
|
||||
<?php if (isset($this->host->host_alias) && $this->host->host_alias !== $this->host->host_name) { ?>
|
||||
<?php if (isset($this->host->host_alias) && $this->host->host_alias !== $this->host->host_name): ?>
|
||||
<br />
|
||||
<sup>(<?= $this->host->host_alias; ?>)</sup>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="state"<?= $showService ? '' : ' rowspan="2"'; ?>
|
||||
<?= $this->util()->getHostStateName($this->host->host_state); ?>
|
||||
since <?= $this->timeSince($this->host->host_last_state_change); ?>
|
||||
<?php if ($this->host->host_acknowledged === '1') { ?>
|
||||
<?php if ($this->host->host_acknowledged === '1'): ?>
|
||||
(Has been acknowledged)
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -91,9 +91,9 @@ if (!$this->compact) {
|
|||
<td class="state">
|
||||
<?= $this->util()->getServiceStateName($this->service->service_state); ?>
|
||||
since <?= $this->timeSince($this->service->service_last_state_change); ?>
|
||||
<?php if ($this->service->service_acknowledged === '1') { ?>
|
||||
<?php if ($this->service->service_acknowledged === '1'): ?>
|
||||
(Has been acknowledged)
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
<div class="head">
|
||||
<span>Groups and Contacts</span>
|
||||
</div>
|
||||
<?php if (count($hostgroupLinkList)) { ?>
|
||||
<?php if (count($hostgroupLinkList)): ?>
|
||||
<strong>Hostgroups:</strong>
|
||||
<?= implode(' ', $hostgroupLinkList); ?>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $this->render('show/components/contacts.phtml') ?>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
namespace Icinga\Monitoring\Backend\Ido\Query;
|
||||
|
||||
/**
|
||||
* Class DowntimeQuery
|
||||
* Handling downtime queries
|
||||
*/
|
||||
class DowntimeQuery extends AbstractQuery
|
||||
{
|
||||
|
|
|
@ -29,8 +29,6 @@ use Icinga\Authentication\User;
|
|||
use Icinga\Exception\ProgrammingError;
|
||||
|
||||
/**
|
||||
* Class Meta
|
||||
*
|
||||
* Deals with objects and available commands which can be used on the object
|
||||
*/
|
||||
class Meta
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
namespace Icinga\Monitoring\View;
|
||||
|
||||
/**
|
||||
* Class DowntimeView
|
||||
* View for downtimes
|
||||
*/
|
||||
class DowntimeView extends MonitoringView
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue