mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
Fix template code style, use Bootstrap 3, remove icons
- Icons have now the {{XY_ICON}} format - custom classes are removed - A few typos are fixed - Capitalization refs #4550 refs #4621 refs #4584
This commit is contained in:
parent
872fa2ac6c
commit
015a914aab
@ -1,99 +0,0 @@
|
||||
<?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}}}
|
||||
|
||||
namespace Icinga\Web\Form;
|
||||
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Session;
|
||||
use Icinga\Web\Notification;
|
||||
use \Icinga\Application\Config;
|
||||
|
||||
/**
|
||||
* Class SettingsForm
|
||||
* @package Icinga\Web\Form
|
||||
*/
|
||||
class SettingsForm extends Form
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function onSuccess()
|
||||
{
|
||||
$session = Session::getInstance();
|
||||
$values = $this->getValues();
|
||||
$session->language = $values['language'];
|
||||
$session->backend = $values['backend'];
|
||||
$session->show_benchmark = (bool)$values['show_benchmark'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function elements()
|
||||
{
|
||||
|
||||
$all_backends = Config::getInstance()->listAll('backends');
|
||||
$language = \Icinga\Web\Session::getInstance()->language;
|
||||
if (!$language) {
|
||||
$language = 'en_US';
|
||||
}
|
||||
return array(
|
||||
'backend' => array(
|
||||
'select',
|
||||
array(
|
||||
'label' => 'Backend',
|
||||
'required' => true,
|
||||
'value' => Session::getInstance()->backend,
|
||||
'multiOptions' => array_combine($all_backends, $all_backends)
|
||||
)
|
||||
),
|
||||
'language' => array(
|
||||
'select',
|
||||
array(
|
||||
'label' => 'Language',
|
||||
'required' => true,
|
||||
'value' => $language,
|
||||
'multiOptions' => array(
|
||||
'de_DE' => 'Deutsch',
|
||||
'en_US' => 'Englisch'
|
||||
)
|
||||
)
|
||||
),
|
||||
'show_benchmark' => array(
|
||||
'checkbox',
|
||||
array(
|
||||
'label' => 'Show Benchmarks'
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'submit',
|
||||
array(
|
||||
'label' => t('Apply')
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<?= $this->escape($this->auth()->getUser()->getUsername()); ?>
|
||||
<i>USER ICON</i>
|
||||
<i>{{USER_ICON}}</i>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
|
@ -18,7 +18,7 @@ $createDbBackend = Url::fromPath(
|
||||
if (!empty($errors)):
|
||||
?>
|
||||
<div class="alert alert-danger">
|
||||
<h4>There are errors in your configuration</h4>
|
||||
<h4>{{ERROR_ICON}} There are errors in your configuration:</h4>
|
||||
<br/>
|
||||
<ul>
|
||||
<?php foreach($errors as $error): ?>
|
||||
@ -29,7 +29,7 @@ $createDbBackend = Url::fromPath(
|
||||
<?php endif; ?>
|
||||
|
||||
<div>
|
||||
<a href="<?= $createLdapBackend ?>">Create a new LDAP authentication backend</a><br/>
|
||||
<a href="<?= $createDbBackend ?>">Create a new DB authentication backend</a>
|
||||
<a href="<?= $createLdapBackend ?>">{{CREATE_ICON}} Create A New LDAP Authentication Backend</a><br/>
|
||||
<a href="<?= $createDbBackend ?>">{{CREATE_ICON}} Create A New DB Authentication Backend</a>
|
||||
</div>
|
||||
<?= $this->form ?>
|
@ -1,4 +1,4 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
|
||||
<h4>Create new backend</h4>
|
||||
<h4>{{CREATE_ICON}} Create New Backend</h4>
|
||||
<?= $this->form ?>
|
@ -4,7 +4,7 @@
|
||||
|
||||
<?php if (!empty($errors)) : ?>
|
||||
<div class="alert alert-danger">
|
||||
<h4>Errors occured when trying to save the project</h4>
|
||||
<h4>Errors occured when trying to save the project.</h4>
|
||||
<p>
|
||||
The following errors occured when trying to save the configuration:
|
||||
</p>
|
||||
|
@ -22,10 +22,10 @@ $modules = $this->modules->paginate();
|
||||
<tr>
|
||||
<td>
|
||||
<? if ($module->enabled): ?>
|
||||
<i>ICON OK</i>
|
||||
<i>{{OK_ICON}}</i>
|
||||
<a href="<?= $disableUrl ?>"><?= $this->escape($module->name); ?></a>
|
||||
<? else: ?>
|
||||
<i>ICON REMOVE</i>
|
||||
<i>{{REMOVE_ICON}}</i>
|
||||
<a href="<?= $enableUrl ?>"><?= $this->escape($module->name); ?></a>
|
||||
<? endif ?>
|
||||
(<?=
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<br/>
|
||||
<div class="alert alert-error">
|
||||
<h4><i>WARNING ICON</i>Saving <?= $this->escape($this->file); ?>.ini failed</h4>
|
||||
<h4><i>WARNING ICON</i>Saving "<?= $this->escape($this->file); ?>.ini" Failed</h4>
|
||||
<br/>
|
||||
<p>
|
||||
Your <?= $this->escape($this->file); ?> configuration couldn't be stored (error: "<?= $this->exceptionMessage; ?>").<br/>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<h3>Add dashboard URL</h3>
|
||||
<h3>Add Dashboard URL</h3>
|
||||
|
||||
<?= $this->form->render($this); ?>
|
@ -1,6 +1,6 @@
|
||||
<br/>
|
||||
<div class="alert alert-error">
|
||||
<h4><i>ICON WARNING</i>Saving dashboard failed</h4>
|
||||
<h4><i>{{WARNING_ICON}}</i>Saving Dashboard Failed</h4>
|
||||
<br/>
|
||||
<p>
|
||||
Your dashboard couldn't be stored (error: "<?= $this->exceptionMessage; ?>"). This could have one or more
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
use Icinga\Web\Url;
|
||||
|
||||
if ($this->pageCount <= 1) return;
|
||||
|
||||
@ -24,9 +25,13 @@ $title_next = sprintf(
|
||||
<!-- Previous page link -->
|
||||
|
||||
<?php if (isset($this->previous)): ?>
|
||||
<li><a href="<?= $this->url()->setParam('page', $this->previous) ?>" title="<?= $title_prev ?>">« <?= $this->translate('Back') ?></a></li>
|
||||
<li>
|
||||
<a href="<?= Url::fromRequest()->overwriteParams(array('page' => $this->previous))->getAbsoluteUrl() ?>"
|
||||
title="<?= $title_prev ?>">« <?= $this->translate('Prev') ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="disabled"><span>« <?= $this->translate('Back') ?></span></li>
|
||||
<li class="disabled"><span>« <?= $this->translate('Prev') ?></span></li>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Numbered page links -->
|
||||
@ -45,7 +50,7 @@ foreach ($this->pagesInRange as $page):
|
||||
<li class="disabled"><span>...</span></li>
|
||||
<?php else: ?>
|
||||
<li <?= $class ?>>
|
||||
<a href="<?= $this->url()->setParam('page', $page) ?>" title="<?= $title ?>">
|
||||
<a href="<?= Url::fromRequest()->overwriteParams(array('page' => $page))->getAbsoluteUrl() ?>" title="<?= $title ?>">
|
||||
<?= $page ?>
|
||||
</a>
|
||||
</li>
|
||||
@ -55,7 +60,11 @@ endforeach;
|
||||
?>
|
||||
<!-- Next page link -->
|
||||
<? if (isset($this->next)): ?>
|
||||
<li><a href="<?= $this->url()->setParam('page', $this->next) ?>" title="<?= $title_next ?>"><?= t('Next') ?> »</a></li>
|
||||
<li>
|
||||
<a href="<?= Url::fromRequest()->overwriteParams(array('page' => $this->next))->getAbsoluteUrl() ?>"
|
||||
title="<?= $title_next ?>"><?= t('Next') ?> »
|
||||
</a>
|
||||
</li>
|
||||
<? else: ?>
|
||||
<li class="disabled"><span><?= t('Next') ?> »</span></li>
|
||||
<? endif ?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<?php if (isset($this->success)) : ?>
|
||||
<div class="alert alert-success">
|
||||
<h4>Preferences updated successfully</h4>
|
||||
<h4>Preferences Updated Successfully</h4>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Icinga\Web\View;
|
||||
|
||||
use Icinga\Web\Url;
|
||||
|
||||
function url($path = null, $params = null)
|
||||
{
|
||||
if ($path === null) {
|
||||
$url = Url::fromRequest();
|
||||
if ($params !== null) {
|
||||
$url->setParams($params);
|
||||
}
|
||||
} else {
|
||||
$url = Url::fromPath($path, $params);
|
||||
}
|
||||
return $url;
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
<h4><?= t('List of supported commands'); ?></h4>
|
||||
<h4><?= t('List Of Supported Commands'); ?></h4>
|
||||
<ul>
|
||||
<?php foreach($this->commands as $command): ?>
|
||||
<li>
|
||||
<a href="<?= $this->href('monitoring/command/'. $command); ?>">
|
||||
<?= $this->escape($command); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach($this->commands as $command): ?>
|
||||
<li>
|
||||
<a href="<?= $this->href('monitoring/command/'. $command); ?>">
|
||||
<?= $this->escape($command); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
@ -1,11 +1,11 @@
|
||||
|
||||
<?php if (isset($this->objects) && !empty($this->objects) && isset($this->objects[0]->host_name)): ?>
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<legend>Affected objects</legend>
|
||||
<legend>Affected Objects</legend>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Host name</th>
|
||||
<th>Service name</th>
|
||||
<th>{{HOST_ICON}} Host Name</th>
|
||||
<th>{{SERVICE_ICON}} Service Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<?php if ($this->name): ?>
|
||||
<h4>Edit Backend "<?= $this->escape($this->name) ?>"</h4>
|
||||
<h4><i>{{EDIT_ICON}} Edit Backend "<?= $this->escape($this->name) ?>"</h4>
|
||||
<?php else: ?>
|
||||
<h4>Create New Backend</h4>
|
||||
<h4>{{CREATE_ICON}} Create New Backend</h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->error): ?>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
|
||||
<?php if (isset($this->name)): ?>
|
||||
<h4>Edit Instance Configuration for "<?= $this->escape($this->name) ?>"</h4>
|
||||
<h4>{{EDIT_ICON}} Edit Instance Configuration for "<?= $this->escape($this->name) ?>"</h4>
|
||||
<?php else: ?>
|
||||
<h4>Configure New Icinga Instance</h4>
|
||||
<h4>{{CREATE_ICON}} Configure New Icinga Instance</h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->error): ?>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php use Icinga\Web\Url; ?>
|
||||
<?= $this->tabs->render($this); ?>
|
||||
|
||||
<h3>Backends</h3>
|
||||
<h3>Monitoring Backends</h3>
|
||||
|
||||
<div>
|
||||
<a href="<?= Url::fromPath('/monitoring/config/createbackend')->getAbsoluteUrl();?>">
|
||||
Create New Backend
|
||||
{{CREATE_ICON}} Create New Monitoring Backend
|
||||
</a>
|
||||
</div>
|
||||
<br/>
|
||||
@ -17,11 +17,11 @@
|
||||
<b><?= $this->escape($backendName); ?></b>
|
||||
<small>(Type: <?= $this->escape($config['type'] === 'ido' ? 'IDO' : ucfirst($config['type'])); ?>)</small>
|
||||
<?php if ($config['disabled']): ?>
|
||||
- <b>Disabled</b>
|
||||
- <b>{{DISABLED_ICON}} Disabled</b>
|
||||
<?php endif; ?>
|
||||
<div>
|
||||
<a href="<?= $removeUrl; ?>">Remove This Backend</a><br/>
|
||||
<a href="<?= $editUrl; ?>">Edit This Backend</a>
|
||||
<a href="<?= $removeUrl; ?>">{{REMOVE_ICON}} Remove This Backend</a><br/>
|
||||
<a href="<?= $editUrl; ?>">{{EDIT_ICON}} Edit This Backend</a>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
<div>
|
||||
<a href="<?= Url::fromPath('/monitoring/config/createinstance')->getAbsoluteUrl();?>">
|
||||
Create New Instance
|
||||
{{CREATE_ICON}} Create New Instance
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -46,8 +46,8 @@
|
||||
<small>(Type: <?= isset($config['host']) ? 'Remote' : 'Local'; ?>)</small>
|
||||
|
||||
<div>
|
||||
<a href="<?= $removeUrl; ?>">Remove This Instance</a><br/>
|
||||
<a href="<?= $editUrl; ?>">Edit This Instance</a>
|
||||
<a href="<?= $removeUrl; ?>">{{REMOVE_ICON}} Remove This Instance</a><br/>
|
||||
<a href="<?= $editUrl; ?>">{{EDIT_ICON}} Edit This Instance</a>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<h4>Remove Backend "<?= $this->escape($this->name) ?>"</h4>
|
||||
<h4>{{REMOVE_ICON}} Remove Backend "<?= $this->escape($this->name) ?>"</h4>
|
||||
|
||||
<p>
|
||||
Are you sure you want to remove the backend <?= $this->escape($this->name) ?>?
|
||||
Are you sure you want to remove the backend <?= $this->escape($this->name) ?>?
|
||||
</p>
|
||||
|
||||
<?= $this->form; ?>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<h4>Remove Instance "<?= $this->escape($this->name) ?>"</h4>
|
||||
<h4>{{REMOVE_ICON}} Remove Instance "<?= $this->escape($this->name) ?>"</h4>
|
||||
|
||||
<p>
|
||||
Are you sure you want to remove the instance <?= $this->escape($this->name) ?>?
|
||||
Are you sure you want to remove the instance <?= $this->escape($this->name) ?>?
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you have still any environments or views refering to this instance, you won't be able to send commands anymore
|
||||
after deletion.
|
||||
{{WARNING_ICON}} If you have still any environments or views refering to this instance, you won't be able to send commands anymore
|
||||
after deletion.
|
||||
</p>
|
||||
|
||||
<?= $this->form; ?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<br/>
|
||||
<div class="alert alert-error">
|
||||
<h4><i class="icon-warning-sign"> </i>Saving <?= $this->escape($this->file); ?>failed</h4>
|
||||
<h4><i>{{ERROR_ICON}}</i> Saving <?= $this->escape($this->file); ?>failed</h4>
|
||||
<br/>
|
||||
<p>
|
||||
Your <?= $this->escape($this->file); ?> configuration couldn't be stored (error: "<?= $this->exceptionMessage; ?>").<br/>
|
||||
|
@ -22,7 +22,7 @@ $downtimes = $downtimes->fetchAll();
|
||||
'action' => 'downtimes'
|
||||
));
|
||||
?>">
|
||||
<label>Sort by</label>
|
||||
<label>Sort By</label>
|
||||
<br/>
|
||||
<?=
|
||||
$this->formSelect(
|
||||
|
@ -29,27 +29,27 @@ $trimArea = $this->getHelper('Trim');
|
||||
<div>
|
||||
<?php if (!$host->host_handled && $host->host_state > 0): ?>
|
||||
<a href="#" title="<?= 'Unhandled host' ?>">
|
||||
<i>UNHANDLED ICON</i>
|
||||
<i>{{UNHANDLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($host->host_acknowledged && !$host->host_in_downtime): ?>
|
||||
<a href="#" title="<?= 'Acknowledged' ?>">
|
||||
<i>ACKNOWLEDGED ICON</i>
|
||||
<i>{{ACKNOWLEDGED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($host->host_is_flapping): ?>
|
||||
<a href="#" title="<?= 'Flapping' ?>">
|
||||
<i>FLAPPING ICON</i>
|
||||
<i>{{FLAPPING_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (!$host->host_notifications_enabled): ?>
|
||||
<a href="#" title="<?= 'Notifications disabled' ?>">
|
||||
<i>NOTIFICATIONS DISABLED ICON</i>
|
||||
<i>{{NOTIFICATIONS_DISABLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($host->host_in_downtime): ?>
|
||||
<a href="#" title="<?= 'In downtime' ?>">
|
||||
<i>IN DOWNTIME ICON</i>
|
||||
<i>{{IN_DOWNTIME_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -58,11 +58,11 @@ $trimArea = $this->getHelper('Trim');
|
||||
<div>
|
||||
<a href="<?= $this->href('monitoring/show/history', array('host' => $host->host_name)); ?>">
|
||||
<b> <?= ucfirst($viewHelper->monitoringState($host, 'host')); ?> </b>
|
||||
<div> since
|
||||
<div> Since
|
||||
<?= $this->timeSince($host->host_last_state_change); ?>
|
||||
<?php if ($host->host_state_type == 0): ?>
|
||||
<a href="#" title="<?= 'Soft state' ?>">
|
||||
<i>SOFTSTATE ICON</i>
|
||||
<i>{{SOFTSTATE_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -72,7 +72,7 @@ $trimArea = $this->getHelper('Trim');
|
||||
<td>
|
||||
<?php if ($host->host_last_comment !== null): ?>
|
||||
<a href="#" title="<?= 'Comments' ?>">
|
||||
<i>COMMENT ICON</i>
|
||||
<i>{{COMMENT_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a href="<?= $this->href('monitoring/show/host', array('host' => $host->host_name)); ?>">
|
||||
|
@ -6,7 +6,7 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
?>
|
||||
|
||||
<form method="get" class="form-inline" action="<?= $this->href('monitoring/list/hosts', $this->hosts->getAppliedFilter()->toParams());?>">
|
||||
<label>Sort by</label>
|
||||
<label>Sort By</label>
|
||||
<?= $this->formSelect(
|
||||
'sort',
|
||||
$this->sort,
|
||||
@ -19,7 +19,7 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
); ?>
|
||||
<noscript>
|
||||
<button class="btn btn-small btn-default">
|
||||
<i>REFRESH ICON</i>
|
||||
<i>{{REFRESH_ICON}}</i>
|
||||
</button>
|
||||
</noscript>
|
||||
</form>
|
||||
@ -51,31 +51,31 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
<div>
|
||||
<?php if (!$host->host_handled && $host->host_state > 0): ?>
|
||||
<a href="#" title="<?= 'Unhandled host' ?>">
|
||||
<i>UNHANDLED ICON</i>
|
||||
<i>{{UNHANDLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($host->host_acknowledged && !$host->host_in_downtime): ?>
|
||||
<a href="#" title="<?= 'Acknowledged' ?>">
|
||||
<i>ACKNOWLEDGED ICON</i>
|
||||
<i>{{ACKNOWLEDGED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($host->host_is_flapping): ?>
|
||||
<a href="#" title="<?= 'Flapping' ?>">
|
||||
<i>FLAPPING ICON</i>
|
||||
<i>{{FLAPPING_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$host->host_notifications_enabled): ?>
|
||||
<a href="#" title="<?= 'Notifications disabled' ?>">
|
||||
<i>NOTIFICATIONS DISABLED ICON</i>
|
||||
<i>{{NOTIFICATIONS_DISABLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($host->host_in_downtime): ?>
|
||||
<a href="#" title="<?= 'In downtime' ?>">
|
||||
<i>IN DOWNTIME ICON</i>
|
||||
<i>{{IN_DOWNTIME_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -84,11 +84,11 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
<td title="<?= $viewHelper->getStateTitle($host, 'host'); ?>">
|
||||
<div >
|
||||
<b><?= ucfirst($viewHelper->monitoringState($host, 'host')); ?></b>
|
||||
<div> since
|
||||
<div> Since
|
||||
<?= $this->timeSince($host->host_last_state_change); ?>
|
||||
<?php if ($host->host_state_type == 0): ?>
|
||||
<a href="#" title="<?= 'Soft state' ?>">
|
||||
<i>SOFTSTATE ICON</i>
|
||||
<i>{{SOFTSTATE_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -97,7 +97,7 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
<td>
|
||||
<?php if ($host->host_last_comment !== null): ?>
|
||||
<a href="#" title="<?= 'Comments' ?>">
|
||||
<i>COMMENT ICON</i>
|
||||
<i>{{COMMENT_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -10,7 +10,7 @@ $formatter = $this->getHelper('MonitoringProperties');
|
||||
$this->notifications->getAppliedFilter()->toParams()
|
||||
);
|
||||
?>">
|
||||
<label>Sort by</label> <?=
|
||||
<label>Sort By</label> <?=
|
||||
$this->formSelect(
|
||||
'sort',
|
||||
$this->sort,
|
||||
|
@ -34,31 +34,31 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
<div>
|
||||
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
||||
<a href="#" title="<?= 'Unhandled service' ?>">
|
||||
<i>UNHANDLED ICON</i>
|
||||
<i>{{UNHANDLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_acknowledged && !$service->service_in_downtime): ?>
|
||||
<a href="#" title="<?= 'Acknowledged' ?>">
|
||||
<i>ACKNOWLEDGED ICON</i>
|
||||
<i>{{ACKNOWLEDGED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_is_flapping): ?>
|
||||
<a href="#" title="<?= 'Flapping' ?>">
|
||||
<i>FLAPPING ICON</i>
|
||||
<i>{{FLAPPING_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$service->service_notifications_enabled): ?>
|
||||
<a href="#" title="<?= 'Notifications disabled' ?>">
|
||||
<i>NOTIFICATIONS DISABLED ICON</i>
|
||||
<i>{{NOTIFICATIONS_DISABLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_in_downtime): ?>
|
||||
<a href="#" title="<?= 'In downtime' ?>">
|
||||
<i>IN DOWNTIME ICON</i>
|
||||
<i>{{IN_DOWNTIME_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -67,11 +67,11 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
<td title="<?= $viewHelper->getStateTitle($service, 'service'); ?>">
|
||||
<div>
|
||||
<?= ucfirst($viewHelper->monitoringState($service, 'service')); ?></b>
|
||||
<div> since '
|
||||
<div> Since '
|
||||
<?= $this->timeSince($service->service_last_state_change); ?>
|
||||
<?php if ($service->service_state_type == 0): ?>
|
||||
<a href="#" title="<?= 'Soft state' ?>">
|
||||
<i>SOFTSTATE ICON</i>
|
||||
<i>{{SOFTSTATE_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -80,7 +80,7 @@ $viewHelper = $this->getHelper('MonitoringState');
|
||||
<td class="servicename">
|
||||
<?php if ($service->service_last_comment !== null): ?>
|
||||
<a href="#" title="<?= 'Comments' ?>">
|
||||
<i>COMMENT ICON</i>
|
||||
<i>{{COMMENT_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<b> <?= $service->service_display_name; ?></b>
|
||||
|
@ -13,7 +13,7 @@ $trimArea = $this->getHelper('Trim');
|
||||
<?php return; endif ?>
|
||||
|
||||
<form method="get" action="<?= $this->href('monitoring/list/services', $this->services->getAppliedFilter()->toParams()); ?>">
|
||||
<label>Sort by</label>
|
||||
<label>Sort By</label>
|
||||
<?= $this->formSelect(
|
||||
'sort',
|
||||
$this->sort,
|
||||
@ -61,31 +61,31 @@ $trimArea = $this->getHelper('Trim');
|
||||
<div>
|
||||
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
||||
<a href="#" title="<?= 'Unhandled service' ?>">
|
||||
<i>UNHANDLED ICON</i>
|
||||
<i>{{UNHANDLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_acknowledged && !$service->service_in_downtime): ?>
|
||||
<a href="#" title="<?= 'Acknowledged' ?>">
|
||||
<i>ACKNOWLEDGED ICON</i>
|
||||
<i>{{ACKNOWLEDGED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_is_flapping): ?>
|
||||
<a href="#" title="<?= 'Flapping' ?>">
|
||||
<i>FLAPPING ICON</i>
|
||||
<i>{{FLAPPING_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$service->service_notifications_enabled): ?>
|
||||
<a href="#" title="<?= 'Notifications disabled' ?>">
|
||||
<i>NOTIFICATIONS DISABLED ICON</i>
|
||||
<i>{{NOTIFICATIONS_DISABLED_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_in_downtime): ?>
|
||||
<a href="#" title="<?= 'In downtime' ?>">
|
||||
<i>IN DOWNTIME ICON</i>
|
||||
<i>{{IN_DOWNTIME_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -96,12 +96,12 @@ $trimArea = $this->getHelper('Trim');
|
||||
<td title="<?= $viewHelper->getStateTitle($service, 'service'); ?>">
|
||||
<div>
|
||||
<b><?= ucfirst($viewHelper->monitoringState($service, 'service')); ?></b>
|
||||
<div> since
|
||||
<div> Since
|
||||
<?= $this->timeSince($service->service_last_state_change); ?>
|
||||
|
||||
<?php if ($service->service_state_type == 0): ?>
|
||||
<a href="#" title="<?= 'Soft state' ?>">
|
||||
<i>SOFTSTATE ICON</i>
|
||||
<i>{{SOFTSTATE_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -112,7 +112,7 @@ $trimArea = $this->getHelper('Trim');
|
||||
<td>
|
||||
<?php if ($service->service_last_comment !== null): ?>
|
||||
<a href="#" title="<?= 'Comments' ?>">
|
||||
<i>COMMENT ICON</i>
|
||||
<i>{{COMMENT_ICON}}</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
<?= $this->expandable(
|
||||
$this->translate('Check statistics'),
|
||||
'<table style="width:100%">
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 25em">' . $this->translate('Last check') . '</td>
|
||||
<td>' . $this->format()->timeSince($object->last_check) . '</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>' . $this->translate('Next check') . '</td>
|
||||
<td class="icinga-uiwidget-countdown" countdown-end="' . $object->next_check . '">'
|
||||
. $this->format()->timeUntil($object->next_check)
|
||||
. '</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>' . $this->translate('Check execution time') . '</td>
|
||||
<td>' . $object->execution_time . '</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>' . $this->translate('Check latency') . '</td>
|
||||
<td>' . $object->latency . '</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
',
|
||||
array('collapsed' => false)
|
||||
);
|
@ -2,9 +2,6 @@
|
||||
$commandParts = preg_split('|!|', $object->check_command);
|
||||
$commandName = array_shift($commandParts);
|
||||
?>
|
||||
<?= $this->expandable(
|
||||
'<b>Command:</b> '. $commandName,
|
||||
$this->commandArguments($object->check_command),
|
||||
// TODO: no JS handler right now, should be collapsed
|
||||
array('collapsed' => ! (bool) strpos($object->check_command, '!'))
|
||||
) ?>
|
||||
|
||||
{{COMMAND_ICON}} <b>Command:</b> <?= $commandName; ?>
|
||||
<?= $this->commandArguments($object->check_command); ?>
|
@ -21,12 +21,13 @@ foreach ($this->comments as $comment) {
|
||||
);
|
||||
}
|
||||
?>
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Comments</span>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<span>{{COMMENT_ICON}} Comments</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<blockquote> <?= implode('<br />', $list) ?></blockquote>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
|
||||
echo '<strong>Contacts:</strong> ';
|
||||
echo '<strong>{{CONTACT_ICON}} Contacts:</strong> ';
|
||||
echo implode(', ', $contactList);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
)
|
||||
) . '">' . $contactgroup->contactgroup_alias . '</a>';
|
||||
}
|
||||
echo '<strong>Contactgroups:</strong> ';
|
||||
echo '<strong>{{CONTACTGROUP_ICON}} Contactgroups:</strong> ';
|
||||
echo implode(', ', $contactGroupList);
|
||||
}
|
||||
?>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php if (isset($this->customvars) && count($this->customvars)) { ?>
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span>Customvariables</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="panel-body">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
|
@ -27,12 +27,12 @@
|
||||
$list[] = '<td>'. implode('</td><td>', $row). '</td>';
|
||||
}
|
||||
?>
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Downtimes</span>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span>{{IN_DOWNTIME_ICON}} Downtimes</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="panel-body">
|
||||
<table>
|
||||
<tr>
|
||||
<?= implode('</tr><tr>', $list); ?>
|
||||
|
@ -9,17 +9,17 @@
|
||||
|
||||
$flags = $this->monitoringFlags($object);
|
||||
?>
|
||||
<table class="flag-container">
|
||||
<table class="table table-condensed">
|
||||
<?php foreach ($flags as $name => $value): ?>
|
||||
<tr>
|
||||
<th><?= $name; ?></th>
|
||||
<td>
|
||||
<?php if ($value === true): ?>
|
||||
<span class="flag flag-enabled">ENABLED</span>
|
||||
<?php else: ?>
|
||||
<span class="flag flag-disabled">DISABLED</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $name; ?></th>
|
||||
<td>
|
||||
<?php if ($value === true): ?>
|
||||
<span>{{ENABLED_ICON}} ENABLED</span>
|
||||
<?php else: ?>
|
||||
<span>{{DISABLED_ICON}} DISABLED</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
@ -1,28 +1,33 @@
|
||||
<? $showService = $object->service_description && $tabs->getActiveName() !== 'host' ?>
|
||||
<? if (! $compact): ?>
|
||||
<?php $showService = $object->service_description && $tabs->getActiveName() !== 'host' ?>
|
||||
<?php if (! $compact): ?>
|
||||
<?= $tabs->render($this) ?>
|
||||
<? endif ?>
|
||||
<table style="margin-bottom: 1em">
|
||||
<tr class="<?= $this->monitoringState($object, 'host') ?><?= $object->host_handled ? ' handled' : '' ?>">
|
||||
<td><b><?= $this->escape($object->host_name) ?><?
|
||||
if ($object->host_address && $object->host_address !== $object->host_name): ?>
|
||||
(<?= $this->escape($object->host_address) ?>)
|
||||
<? endif ?>
|
||||
</b></td>
|
||||
<td class="state"<?= $showService ? '' : ' rowspan="2"' ?>>
|
||||
<?= $this->util()->getHostStateName($object->host_state) ?><br />
|
||||
<?php endif ?>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>
|
||||
{{HOST_ICON}} <b><?= $this->escape($object->host_name) ?>
|
||||
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
|
||||
(<?= $this->escape($object->host_address) ?>)
|
||||
<?php endif ?>
|
||||
</b>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->util()->getHostStateName($object->host_state) ?>
|
||||
<br/>
|
||||
since <?= $this->timeSince($object->host_last_state_change) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($showService): ?>
|
||||
<tr class="<?= $this->monitoringState($object, 'service') ?><?= $object->service_handled ? ' handled' : '' ?>">
|
||||
<td><b>Service: <?= $this->escape($object->service_description) ?></b></td>
|
||||
<td class="state">
|
||||
<?= $this->util()->getServiceStateName($object->service_state); ?><br />
|
||||
<?php if ($showService): ?>
|
||||
<tr>
|
||||
<td>
|
||||
{{SERVICE_ICON}} <b>Service: <?= $this->escape($object->service_description) ?></b>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->util()->getServiceStateName($object->service_state); ?>
|
||||
<br/>
|
||||
since <?= $this->timeSince($object->service_last_state_change) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<? else: ?>
|
||||
<tr><td><b>Host state</b></td></tr>
|
||||
<? endif ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (empty($object->hostgroups)) return;
|
||||
|
||||
$list = array();
|
||||
foreach ($object->hostgroups as $name => $alias) {
|
||||
$list[] = '<a href="' . $this->href('monitoring/list/host', array('hostgroups' => $name)) . '">'
|
||||
. $alias
|
||||
. '</a>';
|
||||
}
|
||||
echo '<b>Hostgroups:</b> ' . implode(', ', $list) . "<br />\n";
|
||||
|
@ -1,4 +0,0 @@
|
||||
<?= $this->expandable(
|
||||
$this->pluginOutput($object->output),
|
||||
$this->pluginOutput($object->long_output)
|
||||
) ?>
|
@ -1,7 +0,0 @@
|
||||
<? if ($object->perfdata): ?>
|
||||
<?= $this->expandable(
|
||||
'<b>Performance data</b>',
|
||||
$this->perfdata($object->perfdata),
|
||||
array('collapsed' => false)
|
||||
) ?>
|
||||
<? endif ?>
|
@ -9,11 +9,11 @@ if (isset($this->service)) {
|
||||
|
||||
$properties = $this->monitoringProperties($object);
|
||||
?>
|
||||
<table>
|
||||
<?php foreach ($properties as $label => $value): ?>
|
||||
<tr>
|
||||
<th><?= $label ?></th>
|
||||
<td><?= $value ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<table class="table table-bordered">
|
||||
<?php foreach ($properties as $label => $value): ?>
|
||||
<tr>
|
||||
<th><?= $label ?></th>
|
||||
<td><?= $value ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
@ -8,5 +8,5 @@ foreach ($object->servicegroups as $name => $alias) {
|
||||
. $alias
|
||||
. '</a>';
|
||||
}
|
||||
echo '<b>Servicegroups:</b> ' . implode(', ', $list) . "<br />\n";
|
||||
echo '{{SERVICEGROUP_ICON}} <b>Servicegroups:</b> ' . implode(', ', $list) . "<br />\n";
|
||||
|
||||
|
@ -17,107 +17,103 @@ if (!$this->compact) {
|
||||
|
||||
}
|
||||
?>
|
||||
<div class="information-container">
|
||||
<?php if ($inlineCommands === true): ?>
|
||||
<div class="pull-right">
|
||||
<?=
|
||||
$this->monitoringCommands(
|
||||
($showService === true) ? $this->service : $this->host,
|
||||
'small'
|
||||
);
|
||||
?>
|
||||
<div>
|
||||
<?php if ($inlineCommands === true): ?>
|
||||
<div class="pull-right">
|
||||
<?=
|
||||
$this->monitoringCommands(
|
||||
($showService === true) ? $this->service : $this->host,
|
||||
'small'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
{{HOST_ICON}}
|
||||
<?php if ($this->host->host_icon_image): ?>
|
||||
<div>
|
||||
<img src="<?= $this->host->host_icon_image; ?>" alt="Host image"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<strong>
|
||||
<?= $this->escape($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 endif; ?>
|
||||
</strong>
|
||||
|
||||
<?php if (isset($this->host->host_alias) && $this->host->host_alias !== $this->host->host_name): ?>
|
||||
<br/>
|
||||
<sup>(<?= $this->host->host_alias; ?>)</sup>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td
|
||||
<?= $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'): ?>
|
||||
(Has been acknowledged)
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($this->host->host_action_url || $this->host->host_notes_url): ?>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<?php if ($this->host->host_action_url): ?>
|
||||
{{EXTERNAL_LINK_ICON}}
|
||||
<a href='<?= $this->host->host_notes_url ?>'>Host actions </a>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->host->host_notes_url): ?>
|
||||
{{EXTERNAL_LINK_ICON}}
|
||||
<a href='<?= $this->host->host_notes_url ?>'>Host notes </a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<table>
|
||||
<tr class="<?= $this->monitoringState($this->host, 'host') ?><?= $this->host->host_handled ? ' handled' : '' ?>">
|
||||
<td>
|
||||
<?php if ($showService === true): ?>
|
||||
<tr>
|
||||
<td>
|
||||
{{SERVICE_ICON}}
|
||||
<?php if ($this->service->service_icon_image): ?>
|
||||
<div>
|
||||
<img src="<?= $this->service->service_icon_image; ?>" alt="Host image"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<strong>
|
||||
Service: <?= $this->escape($this->service->service_description); ?>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->util()->getServiceStateName($this->service->service_state); ?>
|
||||
since <?= $this->timeSince($this->service->service_last_state_change); ?>
|
||||
<?php if ($this->service->service_acknowledged === '1'): ?>
|
||||
(Has been acknowledged)
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($this->host->host_icon_image): ?>
|
||||
<div class="monitoring_icon">
|
||||
<img src="<?= $this->host->host_icon_image; ?>" alt="Host image" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<strong>
|
||||
<?= $this->escape($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 endif; ?>
|
||||
</strong>
|
||||
|
||||
<?php if (isset($this->host->host_alias) && $this->host->host_alias !== $this->host->host_name): ?>
|
||||
<br />
|
||||
<sup>(<?= $this->host->host_alias; ?>)</sup>
|
||||
<?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'): ?>
|
||||
(Has been acknowledged)
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($this->host->host_action_url || $this->host->host_notes_url): ?>
|
||||
<tr>
|
||||
<td class="urls" rowspan="2">
|
||||
<?php if ($this->host->host_action_url): ?>
|
||||
<span class="url">
|
||||
<a href='<?= $this->host->host_notes_url ?>'>Host actions </a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->host->host_notes_url): ?>
|
||||
<span class="url">
|
||||
<a href='<?= $this->host->host_notes_url ?>'>Host notes </a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($this->service->service_action_url || $this->service->service_notes_url): ?>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<?php if ($this->service->service_action_url): ?>
|
||||
{{EXTERNAL_LINK_ICON}}
|
||||
<a href='<?= $this->service->service_notes_url ?>'>Service actions </a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if ($showService === true): ?>
|
||||
<tr class="<?= $this->monitoringState($this->service, 'service'); ?><?= $this->service->service_handled ? ' handled' : '' ?>">
|
||||
<td>
|
||||
<?php if ($this->service->service_icon_image): ?>
|
||||
<div class="monitoring_icon">
|
||||
<img src="<?= $this->service->service_icon_image; ?>" alt="Host image" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<strong>
|
||||
Service: <?= $this->escape($this->service->service_description); ?>
|
||||
</strong>
|
||||
</td>
|
||||
<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'): ?>
|
||||
(Has been acknowledged)
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php if ($this->service->service_action_url || $this->service->service_notes_url): ?>
|
||||
<tr>
|
||||
<td class="urls" rowspan="2">
|
||||
<?php if ($this->service->service_action_url): ?>
|
||||
<span class="url">
|
||||
<a href='<?= $this->service->service_notes_url ?>'>Service actions </a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->service->service_notes_url): ?>
|
||||
<span class="url">
|
||||
<a href='<?= $this->service->service_notes_url ?>'>Service notes </a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if ($this->service->service_notes_url): ?>
|
||||
{{EXTERNAL_LINK_ICON}}
|
||||
<a href='<?= $this->service->service_notes_url ?>'>Service notes </a>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="clearfix"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
@ -4,32 +4,30 @@ $history->limit(10);
|
||||
$hhistory = $this->history->paginate();
|
||||
|
||||
?>
|
||||
|
||||
<?php if (empty($hhistory)): ?>
|
||||
There are no matching history entries right now
|
||||
<?php else: ?>
|
||||
<?= $this->paginationControl($hhistory, null, null, array('preserve' => $preserve)); ?>
|
||||
<table class="paginatable">
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tbody>
|
||||
<?php foreach ($hhistory as $event): ?>
|
||||
<?php
|
||||
|
||||
if ($event->object_type == 'host') {
|
||||
$states = array('up', 'down', 'unreachable', 'unknown', 99 => 'pending', null => 'pending');
|
||||
} else {
|
||||
$states = array('ok', 'warning', 'critical', 'unknown', 99 => 'pending', null => 'pending');
|
||||
}
|
||||
|
||||
$row_class = array_key_exists($event->state, $states) ? $states[$event->state] : 'invalid';
|
||||
|
||||
?>
|
||||
<tr class="<?= $row_class ?>"><td class="state"><?= date('d.m. H:i', $event->timestamp ) ?></td>
|
||||
<tr>
|
||||
<td><?= date('d.m. H:i', $event->timestamp ) ?></td>
|
||||
|
||||
<? if (! $object): ?>
|
||||
<td><?= $this->escape($event->host_name) ?></td>
|
||||
<? endif ?>
|
||||
<? if (! $object): ?>
|
||||
<td><?= $this->escape($event->host_name) ?></td>
|
||||
<? endif ?>
|
||||
|
||||
<? if (! $object instanceof Monitoring\Object\Service): ?>
|
||||
<? if (! $object instanceof Monitoring\Object\Service): ?>
|
||||
<td>
|
||||
<? if ($object): ?>
|
||||
<a href="<?= $this->href('monitoring/show/service',array(
|
||||
@ -42,45 +40,43 @@ There are no matching history entries right now
|
||||
<? endif ?>
|
||||
</td>
|
||||
<? endif ?>
|
||||
<td style="padding: 0.2em;"><?php
|
||||
$imgparams = array(
|
||||
'width' => 16,
|
||||
'height' => 16,
|
||||
);
|
||||
switch ($event->type) {
|
||||
case 'notify':
|
||||
echo $this->img('img/classic/mail-notification.png', $imgparams);
|
||||
break;
|
||||
case 'comment':
|
||||
echo $this->img('img/classic/comment.gif', $imgparams);
|
||||
break;
|
||||
case 'ack':
|
||||
echo $this->img('img/classic/ack.gif', $imgparams);
|
||||
break;
|
||||
case 'dt_comment':
|
||||
echo $this->img('img/classic/downtime.gif', $imgparams);
|
||||
break;
|
||||
case 'flapping':
|
||||
echo $this->img('img/classic/flapping.gif', $imgparams);
|
||||
break;
|
||||
case 'hard_state':
|
||||
echo $this->img('img/classic/state-hard.png', $imgparams);
|
||||
break;
|
||||
case 'soft_state':
|
||||
echo $this->img('img/classic/state-soft.png', $imgparams);
|
||||
break;
|
||||
case 'dt_start':
|
||||
echo $this->img('img/classic/downtime-start.png', $imgparams);
|
||||
echo ' Downtime start';
|
||||
break;
|
||||
case 'dt_end':
|
||||
echo $this->img('img/classic/downtime-end.png', $imgparams);
|
||||
echo ' Downtime end';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<?php
|
||||
|
||||
switch ($event->type) {
|
||||
case 'notify':
|
||||
echo 'NOTIFICATION_ICON';
|
||||
break;
|
||||
case 'comment':
|
||||
echo 'COMMENT_ICON';
|
||||
break;
|
||||
case 'ack':
|
||||
echo 'ACKNOWLEDGEMENT_ICON';
|
||||
break;
|
||||
case 'dt_comment':
|
||||
echo 'IN_DOWNTIME_ICON';
|
||||
break;
|
||||
case 'flapping':
|
||||
echo 'FLAPPING_ICON';
|
||||
break;
|
||||
case 'hard_state':
|
||||
echo 'HARDSTATE_ICON';
|
||||
break;
|
||||
case 'soft_state':
|
||||
echo 'SOFTSTATE_ICON';
|
||||
break;
|
||||
case 'dt_start':
|
||||
echo 'DOWNTIME_START_ICON';
|
||||
echo ' Downtime start';
|
||||
break;
|
||||
case 'dt_end':
|
||||
echo 'DOWNTIME_END_ICON';
|
||||
echo ' Downtime end';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<? if ($event->attempt !== null): ?>
|
||||
[ <?= $event->attempt ?>/<?=$event->max_attempts ?> ]
|
||||
[ <?= $event->attempt ?>/<?=$event->max_attempts ?> ]
|
||||
<? endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -22,26 +22,24 @@ $this->partial(
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<?= $this->preview_image ?>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Plugin output</span>
|
||||
<br/>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span>Plugin Output</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="panel-body">
|
||||
<?= $this->pluginOutput($this->host->host_output); ?>
|
||||
<?= $this->pluginOutput($this->host->host_long_output); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Command</span>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{CHECK_ICON}} <span>Check Command</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Command:</strong>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$explodedCommand = explode('!', $this->host->host_check_command, 2);
|
||||
array_shift($explodedCommand);
|
||||
@ -50,16 +48,17 @@ $this->partial(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span>Groups and Contacts</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php if (count($hostgroupLinkList)): ?>
|
||||
<strong>Hostgroups:</strong>
|
||||
{{HOSTGROUP_ICON}} <strong>Hostgroups:</strong>
|
||||
<?= implode(' ', $hostgroupLinkList); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $this->render('show/components/contacts.phtml') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->render('show/components/comments.phtml'); ?>
|
||||
@ -69,39 +68,39 @@ $this->partial(
|
||||
<?= $this->render('show/components/customvars.phtml'); ?>
|
||||
|
||||
<?php if ($this->host->host_perfdata): ?>
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span>Perfdata</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="panel-body">
|
||||
<?= $this->perfdata($this->host->host_perfdata); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span>Flags</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="panel-body">
|
||||
<?= $this->render('show/components/flags.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span>Properties</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="panel-body">
|
||||
<?= $this->render('show/components/properties.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Commands</span>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{COMMAND_ICON}} <span>Commands</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="panel-body">
|
||||
<?= $this->monitoringCommands($this->host, 'full'); ?>
|
||||
</div>
|
||||
</div>
|
@ -1,117 +0,0 @@
|
||||
<!--<?php if (!isset($this->service) || $this->service == null): ?>
|
||||
<div class="alert alert-info fullpage_infobox">
|
||||
No service selected
|
||||
</div>
|
||||
<?php return; endif; ?>
|
||||
<br>
|
||||
<?= $this->expandable(
|
||||
'<b>'
|
||||
. $this->translate('Plugin output:')
|
||||
. '</b> '
|
||||
. $this->pluginOutput($this->service->service_output),
|
||||
$this->service->service_long_output
|
||||
? $this->pluginOutput($this->service->service_long_output)
|
||||
: ''
|
||||
) ?>
|
||||
<?php
|
||||
$explodedCmd = explode('!', $this->service->service_check_command);
|
||||
$row = '<dd><b>%s</b> : %s</dd>';
|
||||
$table = '';
|
||||
if (count($explodedCmd) > 1) {
|
||||
$table = '<dl>';
|
||||
for ($i = 1; $i < count($explodedCmd); $i++) {
|
||||
$table .= sprintf($row, '$ARG' . $i . '$', $explodedCmd[$i]);
|
||||
}
|
||||
$table .= '</dl>';
|
||||
}
|
||||
echo $this->expandable('<b>' . $this->translate('Check command:') . '</b> ' .$explodedCmd[0], $table); ?>
|
||||
|
||||
<?php
|
||||
|
||||
$perfData = $this->perfdata($this->service->service_perfdata);
|
||||
if (!$perfData && $this->service->service_perfdata)
|
||||
$perfData = $this->service->service_perfdata;
|
||||
|
||||
?>
|
||||
<?php if ($perfData): ?>
|
||||
<div class="expandable" >
|
||||
<div class="expand-title"><b><?= $this->translate('Performance data') ?></b> </div>
|
||||
<div class="expand-content">
|
||||
<?= $perfData ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
-->
|
||||
<?php //@TODO: Create check_statistic helper
|
||||
?>
|
||||
<?= $this->expandable(
|
||||
$this->translate('Check statistics'),
|
||||
'sdfas'
|
||||
) ?>
|
||||
|
||||
<div class="expandable" >
|
||||
<div class="expand-title">
|
||||
<b><?= $this->translate('Check statistics') ?></b>
|
||||
<div class="expand-controls">
|
||||
<a href="#" target="_self" title="<?= $this->translate('Check now') ?>">
|
||||
<i class='icon-repeat'></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expand-content">
|
||||
<table style="width:100%">
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 25em"><?= $this->translate('Last check') ?></td>
|
||||
<td><?= $this->format()->timeSince($this->service->service_last_check) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= $this->translate('Next check')?></td>
|
||||
<td>
|
||||
<span class="icinga-uiwidget-countdown" countdown-end="<?= $this->service->service_next_check ?>">
|
||||
<?= $this->format()->timeUntil($this->service->service_next_check) ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= $this->translate('Check execution time') ?></td>
|
||||
<td><?= $this->service->service_execution_time ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= $this->translate('Check latency') ?></td>
|
||||
<td><?=$this->service->service_latency ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (isset($this->service->service_comments) && is_array($this->service->service_comments)): ?>
|
||||
<div class="expandable" >
|
||||
<div class="expand-title">
|
||||
<b><?= $this->translate('Comments') ?></b>+
|
||||
</div>
|
||||
<div class="expand-content" style="padding: 0px">
|
||||
<table class="subTable icinga-widget" type="icinga/subTable" maxItems="10" style="width:100%">
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$comments = $this->service->service_comments;
|
||||
if (! is_array($comments)) {
|
||||
$comments = array($comments);
|
||||
}
|
||||
foreach ($comments as $comment ): ?>
|
||||
<tr>
|
||||
<td><?= $this->timeSince($comment->entry_time); ?></td>
|
||||
<td><?= htmlspecialchars($comment->author); ?></td>
|
||||
<td><?= htmlspecialchars($comment->data); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
@ -25,8 +25,8 @@ $this->partial(
|
||||
?>
|
||||
|
||||
<?= $this->preview_image ?>
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<div>
|
||||
<span>Plugin output</span>
|
||||
</div>
|
||||
<div>
|
||||
@ -35,27 +35,26 @@ $this->partial(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Command</span>
|
||||
<div>
|
||||
<div>
|
||||
{{CHECK_ICON}} <span>Check Command</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Command:</strong>
|
||||
<?php
|
||||
$explodedCommand = explode('!', $this->service->service_check_command, 2);
|
||||
$explodedCommand = explode('!', $this->service->service_check_command, 2);
|
||||
echo array_shift($explodedCommand);
|
||||
?>
|
||||
<?= $this->commandArguments($this->service->service_check_command); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Groups and Contacts</span>
|
||||
<div>
|
||||
<div>
|
||||
{{GROUP_ICON}} <span>Groups and Contacts</span>
|
||||
</div>
|
||||
<?php if (count($servicegroupLinkList)) { ?>
|
||||
<strong>Servicegroups:</strong>
|
||||
{{SERVICEGROUP_ICON}} <strong>Servicegroups:</strong>
|
||||
<?= implode(' ', $servicegroupLinkList); ?>
|
||||
<?php } ?>
|
||||
|
||||
@ -69,9 +68,9 @@ $this->partial(
|
||||
<?= $this->render('show/components/customvars.phtml'); ?>
|
||||
|
||||
<?php if ($this->service->service_perfdata): ?>
|
||||
<div class="information-container">
|
||||
<div>
|
||||
|
||||
<div class="head">
|
||||
<div>
|
||||
<span>Perfdata</span>
|
||||
</div>
|
||||
<div>
|
||||
@ -80,8 +79,8 @@ $this->partial(
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<div>
|
||||
<span>Flags</span>
|
||||
</div>
|
||||
<div>
|
||||
@ -89,8 +88,8 @@ $this->partial(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<div>
|
||||
<span>Properties</span>
|
||||
</div>
|
||||
<div>
|
||||
@ -98,9 +97,9 @@ $this->partial(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information-container">
|
||||
<div class="head">
|
||||
<span>Commands</span>
|
||||
<div>
|
||||
<div>
|
||||
{{COMMAND_ICON}} <span>Commands</span>
|
||||
</div>
|
||||
<div>
|
||||
<?= $this->monitoringCommands($this->service, 'full'); ?>
|
||||
|
@ -1,2 +0,0 @@
|
||||
<?= $tabs ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user