commit
decab543b0
|
@ -39,28 +39,34 @@ class ConfigController extends ActionController
|
|||
$allowedActions = array();
|
||||
if ($auth->hasPermission('system/config/application')) {
|
||||
$tabs->add('application', array(
|
||||
'title' => $this->translate('Application'),
|
||||
'title' => $this->translate('Adjust the general configuration of Icinga Web 2'),
|
||||
'label' => $this->translate('Application'),
|
||||
'url' => 'config/application'
|
||||
));
|
||||
$allowedActions[] = 'application';
|
||||
}
|
||||
if ($auth->hasPermission('system/config/authentication')) {
|
||||
$tabs->add('authentication', array(
|
||||
'title' => $this->translate('Authentication'),
|
||||
'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
|
||||
'label' => $this->translate('Authentication'),
|
||||
'url' => 'config/authentication'
|
||||
));
|
||||
$allowedActions[] = 'authentication';
|
||||
}
|
||||
if ($auth->hasPermission('system/config/resources')) {
|
||||
$tabs->add('resource', array(
|
||||
'title' => $this->translate('Resources'),
|
||||
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
|
||||
'label' => $this->translate('Resources'),
|
||||
'url' => 'config/resource'
|
||||
));
|
||||
$allowedActions[] = 'resource';
|
||||
}
|
||||
if ($auth->hasPermission('system/config/roles')) {
|
||||
$tabs->add('roles', array(
|
||||
'title' => $this->translate('Roles'),
|
||||
'title' => $this->translate(
|
||||
'Configure roles to permit or restrict users and groups accessing Icinga Web 2'
|
||||
),
|
||||
'label' => $this->translate('Roles'),
|
||||
'url' => 'roles'
|
||||
));
|
||||
$allowedActions[] = 'roles';
|
||||
|
|
|
@ -23,7 +23,7 @@ class ListController extends Controller
|
|||
protected function addTitleTab($action)
|
||||
{
|
||||
$this->getTabs()->add($action, array(
|
||||
'title' => ucfirst($action),
|
||||
'label' => ucfirst($action),
|
||||
'url' => Url::fromPath(
|
||||
'list/'
|
||||
. str_replace(' ', '', $action)
|
||||
|
|
|
@ -25,8 +25,9 @@ class PreferenceController extends BasePreferenceController
|
|||
return array(
|
||||
'preferences' => new Tab(
|
||||
array(
|
||||
'title' => t('Preferences'),
|
||||
'url' => Url::fromPath('/preference')
|
||||
'title' => t('Adjust the preferences of Icinga Web 2 according to your needs'),
|
||||
'label' => t('Preferences'),
|
||||
'url' => Url::fromPath('/preference')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -25,24 +25,30 @@ class RolesController extends ActionController
|
|||
$auth = $this->Auth();
|
||||
if ($auth->hasPermission('system/config/application')) {
|
||||
$tabs->add('application', array(
|
||||
'title' => $this->translate('Application'),
|
||||
'title' => $this->translate('Adjust the general configuration of Icinga Web 2'),
|
||||
'label' => $this->translate('Application'),
|
||||
'url' => 'config'
|
||||
));
|
||||
}
|
||||
if ($auth->hasPermission('system/config/authentication')) {
|
||||
$tabs->add('authentication', array(
|
||||
'title' => $this->translate('Authentication'),
|
||||
'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
|
||||
'label' => $this->translate('Authentication'),
|
||||
'url' => 'config/authentication'
|
||||
));
|
||||
}
|
||||
if ($auth->hasPermission('system/config/resources')) {
|
||||
$tabs->add('resource', array(
|
||||
'title' => $this->translate('Resources'),
|
||||
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
|
||||
'label' => $this->translate('Resources'),
|
||||
'url' => 'config/resource'
|
||||
));
|
||||
}
|
||||
$tabs->add('roles', array(
|
||||
'title' => $this->translate('Roles'),
|
||||
'title' => $this->translate(
|
||||
'Configure roles to permit or restrict users and groups accessing Icinga Web 2'
|
||||
),
|
||||
'label' => $this->translate('Roles'),
|
||||
'url' => 'roles'
|
||||
));
|
||||
$this->getTabs()->setTitle($this->translate('Role Configuration'));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</div>
|
||||
<div class="content">
|
||||
<h1 tabindex="-1" id="application-configuration">
|
||||
<?= $this->translate('Generic Configuration'); ?>
|
||||
<?= $this->translate('General Configuration'); ?>
|
||||
</h1>
|
||||
<?php if (isset($this->messageBox)): ?>
|
||||
<?= $this->messageBox->render() ?>
|
||||
|
|
|
@ -22,14 +22,20 @@
|
|||
<tr>
|
||||
<th><?= $this->translate('State') ?></th>
|
||||
<td><?= $state ?><?php if ($state === 'enabled'): ?>
|
||||
<?= $this->qlink($this->translate('disable'), 'config/moduledisable', array(
|
||||
'name' => $module->getName()
|
||||
)) ?>
|
||||
<?= $this->qlink(
|
||||
$this->translate('disable'),
|
||||
'config/moduledisable',
|
||||
array('name' => $module->getName()),
|
||||
array('title' => sprintf($this->translate('Disable the %s module'), $module->getName()))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($state === 'disabled'): ?>
|
||||
<?= $this->qlink($this->translate('enable'), 'config/moduleenable', array(
|
||||
'name' => $module->getName()
|
||||
)) ?>
|
||||
<?= $this->qlink(
|
||||
$this->translate('enable'),
|
||||
'config/moduleenable',
|
||||
array('name' => $module->getName()),
|
||||
array('title' => sprintf($this->translate('Enable the %s module'), $module->getName()))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<tr>
|
||||
|
|
|
@ -11,22 +11,18 @@
|
|||
<tr>
|
||||
<td>
|
||||
<?php if ($module->enabled && $module->loaded) {
|
||||
$icon = $this->icon('thumbs-up');
|
||||
$title = sprintf($this->translate('Module %s is enabled'), $module->name);
|
||||
echo $this->icon('thumbs-up', sprintf($this->translate('Module %s is enabled'), $module->name));
|
||||
} elseif (! $module->enabled) {
|
||||
$icon = $this->icon('thumbs-down');
|
||||
$title = sprintf($this->translate('Module %s is disabled'), $module->name);
|
||||
echo $this->icon('thumbs-down', sprintf($this->translate('Module %s is disabled'), $module->name));
|
||||
} else { // ! $module->loaded
|
||||
$icon = $this->icon('thumbs-down');
|
||||
$title = sprintf($this->translate('Module %s has failed to load'), $module->name);
|
||||
echo $this->icon('thumbs-down', sprintf($this->translate('Module %s has failed to load'), $module->name));
|
||||
}
|
||||
|
||||
echo $this->qlink(
|
||||
$icon . $this->escape($module->name),
|
||||
$module->name,
|
||||
'config/module/',
|
||||
array('name' => $module->name),
|
||||
array('title' => $title),
|
||||
false
|
||||
array('title' => sprintf($this->translate('Show the overview of the %s module'), $module->name))
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -26,21 +26,25 @@
|
|||
<tr>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('edit') . ' ' . $this->escape($name),
|
||||
$name,
|
||||
'config/editresource',
|
||||
array('resource' => $name),
|
||||
array('title' => sprintf($this->translate('Edit resource %s'), $name)),
|
||||
false
|
||||
array(
|
||||
'icon' => 'edit',
|
||||
'title' => sprintf($this->translate('Edit resource %s'), $name)
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
<td>
|
||||
<center>
|
||||
<?= $this->qlink(
|
||||
$this->icon('cancel'),
|
||||
'',
|
||||
'config/removeresource',
|
||||
array('resource' => $name),
|
||||
array('title' => sprintf($this->translate('Remove resource %s'), $name)),
|
||||
false
|
||||
array(
|
||||
'icon' => 'cancel',
|
||||
'title' => sprintf($this->translate('Remove resource %s'), $name)
|
||||
)
|
||||
); ?>
|
||||
</center>
|
||||
</td>
|
||||
|
|
|
@ -24,11 +24,13 @@
|
|||
</th>
|
||||
<th>
|
||||
<?= $this->qlink(
|
||||
$this->icon('cancel'),
|
||||
'',
|
||||
'dashboard/remove-pane',
|
||||
array('pane' => $pane->getName()),
|
||||
array('title' => sprintf($this->translate('Remove pane %s'), $pane->getName())),
|
||||
false
|
||||
array(
|
||||
'icon' => 'cancel',
|
||||
'title' => sprintf($this->translate('Remove pane %s'), $pane->getName())
|
||||
)
|
||||
); ?>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -44,20 +46,30 @@
|
|||
<?php if ($dashlet->getDisabled() === true) continue; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?= $this->href('dashboard/update-dashlet', array('pane' => $pane->getName(), 'dashlet' => $dashlet->getTitle())); ?>">
|
||||
<?= $dashlet->getTitle(); ?>
|
||||
</a>
|
||||
<?= $this->qlink(
|
||||
$dashlet->getTitle(),
|
||||
'dashboard/update-dashlet',
|
||||
array('pane' => $pane->getName(), 'dashlet' => $dashlet->getTitle()),
|
||||
array('title' => sprintf($this->translate('Edit dashlet %s'), $dashlet->getTitle()))
|
||||
); ?>
|
||||
</td>
|
||||
<td style="table-layout: fixed; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
<a href="<?= $this->href($dashlet->getUrl()); ?>"><?= $dashlet->getUrl(); ?></a>
|
||||
<?= $this->qlink(
|
||||
$dashlet->getUrl(),
|
||||
$dashlet->getUrl(),
|
||||
null,
|
||||
array('title' => sprintf($this->translate('Show dashlet %s'), $dashlet->getTitle()))
|
||||
); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('cancel'),
|
||||
'',
|
||||
'dashboard/remove-dashlet',
|
||||
array('pane' => $pane->getName(), 'dashlet' => $dashlet->getTitle()),
|
||||
array('title' => sprintf($this->translate('Remove dashlet %s from pane %s'), $dashlet->getTitle(), $pane->getName())),
|
||||
false
|
||||
array(
|
||||
'icon' => 'cancel',
|
||||
'title' => sprintf($this->translate('Remove dashlet %s from pane %s'), $dashlet->getTitle(), $pane->getName())
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -11,20 +11,24 @@
|
|||
<tr>
|
||||
<td class="action">
|
||||
<?= $this->qlink(
|
||||
$this->icon('edit') . ' ' . $this->escape($backendNames[$i]),
|
||||
$backendNames[$i],
|
||||
'config/editAuthenticationBackend',
|
||||
array('auth_backend' => $backendNames[$i]),
|
||||
array('title' => sprintf($this->translate('Edit authentication backend %s'), $backendNames[$i])),
|
||||
false
|
||||
array(
|
||||
'icon' => 'edit',
|
||||
'title' => sprintf($this->translate('Edit authentication backend %s'), $backendNames[$i])
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('cancel'),
|
||||
'',
|
||||
'config/removeAuthenticationBackend',
|
||||
array('auth_backend' => $backendNames[$i]),
|
||||
array('title' => sprintf($this->translate('Remove authentication backend %s'), $backendNames[$i])),
|
||||
false
|
||||
array(
|
||||
'icon' => 'cancel',
|
||||
'title' => sprintf($this->translate('Remove authentication backend %s'), $backendNames[$i])
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -6,7 +6,7 @@ if ($xAxisPaginator->count() <= 1 && $yAxisPaginator->count() <= 1) {
|
|||
return; // Display this pagination only if there are multiple pages
|
||||
}
|
||||
|
||||
$fromTo = t('%s: %d to %d of %d (on the %s-axis)');
|
||||
$showText = $this->translate('%s: Show %s %u to %u out of %u', 'pagination.joystick');
|
||||
$xAxisPages = $xAxisPaginator->getPages('all');
|
||||
$yAxisPages = $yAxisPaginator->getPages('all');
|
||||
|
||||
|
@ -28,16 +28,25 @@ $nextXAxisPage = $currentXAxisPage < $totalXAxisPages ? $currentXAxisPage + 1 :
|
|||
<td> </td>
|
||||
<td>
|
||||
<?php if ($prevYAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $currentXAxisPage . ',' . $prevYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Hosts'),
|
||||
($prevYAxisPage - 1) * $yAxisPages->itemCountPerPage + 1,
|
||||
$prevYAxisPage * $yAxisPages->itemCountPerPage,
|
||||
$yAxisPages->totalItemCount,
|
||||
'y'
|
||||
); ?>"><?= $this->icon('up-open'); ?></a>
|
||||
<?= $this->qlink(
|
||||
'',
|
||||
Url::fromRequest(),
|
||||
array(
|
||||
'page' => $currentXAxisPage . ',' . $prevYAxisPage
|
||||
),
|
||||
array(
|
||||
'icon' => 'up-open',
|
||||
'data-base-target' => '_self',
|
||||
'title' => sprintf(
|
||||
$showText,
|
||||
$this->translate('Y-Axis', 'pagination.joystick'),
|
||||
$this->translate('hosts', 'pagination.joystick'),
|
||||
($prevYAxisPage - 1) * $yAxisPages->itemCountPerPage + 1,
|
||||
$prevYAxisPage * $yAxisPages->itemCountPerPage,
|
||||
$yAxisPages->totalItemCount
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('up-open'); ?>
|
||||
<?php endif ?>
|
||||
|
@ -47,16 +56,25 @@ $nextXAxisPage = $currentXAxisPage < $totalXAxisPages ? $currentXAxisPage + 1 :
|
|||
<tr>
|
||||
<td>
|
||||
<?php if ($prevXAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $prevXAxisPage . ',' . $currentYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Services'),
|
||||
($prevXAxisPage - 1) * $xAxisPages->itemCountPerPage + 1,
|
||||
$prevXAxisPage * $xAxisPages->itemCountPerPage,
|
||||
$xAxisPages->totalItemCount,
|
||||
'x'
|
||||
); ?>"><?= $this->icon('left-open'); ?></a>
|
||||
<?= $this->qlink(
|
||||
'',
|
||||
Url::fromRequest(),
|
||||
array(
|
||||
'page' => $prevXAxisPage . ',' . $currentYAxisPage
|
||||
),
|
||||
array(
|
||||
'icon' => 'left-open',
|
||||
'data-base-target' => '_self',
|
||||
'title' => sprintf(
|
||||
$showText,
|
||||
$this->translate('X-Axis', 'pagination.joystick'),
|
||||
$this->translate('services', 'pagination.joystick'),
|
||||
($prevXAxisPage - 1) * $xAxisPages->itemCountPerPage + 1,
|
||||
$prevXAxisPage * $xAxisPages->itemCountPerPage,
|
||||
$xAxisPages->totalItemCount
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('left-open'); ?>
|
||||
<?php endif ?>
|
||||
|
@ -64,16 +82,26 @@ $nextXAxisPage = $currentXAxisPage < $totalXAxisPages ? $currentXAxisPage + 1 :
|
|||
<td> </td>
|
||||
<td>
|
||||
<?php if ($nextXAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $nextXAxisPage . ',' . $currentYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Services'),
|
||||
$currentXAxisPage * $xAxisPages->itemCountPerPage + 1,
|
||||
$nextXAxisPage === $xAxisPages->last ? $xAxisPages->totalItemCount : $nextXAxisPage * $xAxisPages->itemCountPerPage,
|
||||
$xAxisPages->totalItemCount,
|
||||
'x'
|
||||
); ?>"><?= $this->icon('right-open'); ?></a>
|
||||
<?= $this->qlink(
|
||||
'',
|
||||
Url::fromRequest(),
|
||||
array(
|
||||
'page' => $nextXAxisPage . ',' . $currentYAxisPage
|
||||
),
|
||||
array(
|
||||
'icon' => 'right-open',
|
||||
'data-base-target' => '_self',
|
||||
'title' => sprintf(
|
||||
$showText,
|
||||
$this->translate('X-Axis', 'pagination.joystick'),
|
||||
$this->translate('services', 'pagination.joystick'),
|
||||
$currentXAxisPage * $xAxisPages->itemCountPerPage + 1,
|
||||
$nextXAxisPage === $xAxisPages->last ? $xAxisPages->totalItemCount : $nextXAxisPage * $xAxisPages->itemCountPerPage,
|
||||
$xAxisPages->totalItemCount
|
||||
)
|
||||
),
|
||||
false
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('right-open'); ?>
|
||||
<?php endif ?>
|
||||
|
@ -83,16 +111,25 @@ $nextXAxisPage = $currentXAxisPage < $totalXAxisPages ? $currentXAxisPage + 1 :
|
|||
<td> </td>
|
||||
<td>
|
||||
<?php if ($nextYAxisPage): ?>
|
||||
<a target="_self" href="<?= Url::fromRequest()->overwriteParams(array(
|
||||
'page' => $currentXAxisPage . ',' . $nextYAxisPage
|
||||
))->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||
$fromTo,
|
||||
t('Hosts'),
|
||||
$currentYAxisPage * $yAxisPages->itemCountPerPage + 1,
|
||||
$nextYAxisPage === $yAxisPages->last ? $yAxisPages->totalItemCount : $nextYAxisPage * $yAxisPages->itemCountPerPage,
|
||||
$yAxisPages->totalItemCount,
|
||||
'y'
|
||||
); ?>"><?= $this->icon('down-open'); ?></a>
|
||||
<?= $this->qlink(
|
||||
'',
|
||||
Url::fromRequest(),
|
||||
array(
|
||||
'page' => $currentXAxisPage . ',' . $nextYAxisPage
|
||||
),
|
||||
array(
|
||||
'icon' => 'down-open',
|
||||
'data-base-target' => '_self',
|
||||
'title' => sprintf(
|
||||
$showText,
|
||||
$this->translate('Y-Axis', 'pagination.joystick'),
|
||||
$this->translate('hosts', 'pagination.joystick'),
|
||||
$currentYAxisPage * $yAxisPages->itemCountPerPage + 1,
|
||||
$nextYAxisPage === $yAxisPages->last ? $yAxisPages->totalItemCount : $nextYAxisPage * $yAxisPages->itemCountPerPage,
|
||||
$yAxisPages->totalItemCount
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('down-open'); ?>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -13,7 +13,7 @@ if ($this->pageCount <= 1) return;
|
|||
<ul class="pagination" aria-labelledby="paginationlabel" role="navigation"
|
||||
<?php
|
||||
|
||||
$fromto = t('Show rows %d to %d of %d');
|
||||
$fromto = t('Show rows %u to %u out of %u');
|
||||
$total = $this->totalItemCount;
|
||||
$limit = $this->itemCountPerPage;
|
||||
$title_prev = sprintf(
|
||||
|
@ -29,9 +29,9 @@ $title_next = sprintf(
|
|||
($this->current + 1) * $limit,
|
||||
$total
|
||||
);
|
||||
$li = ' ><li%s><span class="audible">'
|
||||
$li = ' ><li%1$s><span class="audible">'
|
||||
. t('Page')
|
||||
. ' </span><a href="%s" title="%s">%s</a></li
|
||||
. ' </span><a href="%2$s" aria-label="%3$s" title="%3$s">%4$s</a></li
|
||||
';
|
||||
|
||||
?>
|
||||
|
|
|
@ -23,10 +23,12 @@
|
|||
<?php foreach ($roles as $name => $role): /** @var object $role */ ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $this->escape($name) ?>
|
||||
<div class="hidden">
|
||||
<a href="<?= $this->url('roles/update', array('role' => $name)) ?>"></a>
|
||||
</div>
|
||||
<?= $this->qlink(
|
||||
$name,
|
||||
'roles/update',
|
||||
array('role' => $name),
|
||||
array('title' => sprintf($this->translate('Edit role %s'), $name))
|
||||
); ?>
|
||||
</td>
|
||||
<!-- <td>--><?//= $this->escape($role->permissions, 0, 50) ?><!--</td>-->
|
||||
<!-- <td>-->
|
||||
|
@ -54,11 +56,13 @@
|
|||
<td><?= $this->escape($role->groups) ?></td>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('cancel'),
|
||||
'',
|
||||
'roles/remove',
|
||||
array('role' => $name),
|
||||
array('title' => sprintf($this->translate('Remove role %s'), $name)),
|
||||
false
|
||||
array(
|
||||
'icon' => 'cancel',
|
||||
'title' => sprintf($this->translate('Remove role %s'), $name)
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -70,7 +74,7 @@
|
|||
<?= $this->translate('Create New Role'); ?>
|
||||
</h2>
|
||||
<a data-base-target="_next" href="<?= $this->href('roles/new') ?>">
|
||||
<?= $this->translate('New Role') ?>
|
||||
<?= $this->translate('Create a New Role') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Accessibility: Link Labels</title>
|
||||
<meta name="description" content="Accessible links">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<a href="/monitoring/host/show?host=localhost"
|
||||
title="Show detailed information about the host localhost"
|
||||
aria-label="Show detailed information about the host localhost">localhost</a>
|
||||
</body>
|
||||
</html>
|
|
@ -641,7 +641,7 @@ class Module
|
|||
$tabs->add('info', array(
|
||||
'url' => 'config/module',
|
||||
'urlParams' => array('name' => $this->getName()),
|
||||
'title' => 'Module: ' . $this->getName()
|
||||
'label' => 'Module: ' . $this->getName()
|
||||
));
|
||||
foreach ($this->configTabs as $name => $config) {
|
||||
$tabs->add($name, $config);
|
||||
|
|
|
@ -27,16 +27,24 @@ $this->addHelperFunction('url', function ($path = null, $params = null) {
|
|||
return $url;
|
||||
});
|
||||
|
||||
$this->addHelperFunction('qlink', function ($title, $url, $params = null, $properties = array(), $escape = true) use ($view) {
|
||||
if (array_key_exists('title', $properties) && !array_key_exists('aria-label', $properties)) {
|
||||
$properties['aria-label'] = $properties['title'];
|
||||
$this->addHelperFunction('qlink', function ($title, $url, $params = null, $properties = null, $escape = true) use ($view) {
|
||||
$icon = '';
|
||||
if ($properties) {
|
||||
if (array_key_exists('title', $properties) && !array_key_exists('aria-label', $properties)) {
|
||||
$properties['aria-label'] = $properties['title'];
|
||||
}
|
||||
|
||||
if (array_key_exists('icon', $properties)) {
|
||||
$icon = $view->icon($properties['icon']);
|
||||
unset($properties['icon']);
|
||||
}
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<a href="%s"%s>%s</a>',
|
||||
$view->url($url, $params),
|
||||
$view->propertiesToString($properties),
|
||||
$escape ? $view->escape($title) : $title
|
||||
$icon . ($escape ? $view->escape($title) : $title)
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -122,17 +122,18 @@ class HistoryColorGrid extends AbstractWidget {
|
|||
{
|
||||
if (array_key_exists($day, $this->data) && $this->data[$day]['value'] > 0) {
|
||||
$entry = $this->data[$day];
|
||||
return'<a ' .
|
||||
'style="background-color:' . $this->calculateColor($entry['value']) . '; '
|
||||
. ' opacity: ' . $this->opacity . ';"' .
|
||||
return '<a ' .
|
||||
'style="background-color: ' . $this->calculateColor($entry['value']) . ';'
|
||||
. ' opacity: ' . $this->opacity . ';" ' .
|
||||
'aria-label="' . $entry['caption'] . '" ' .
|
||||
'title="' . $entry['caption'] . '" ' .
|
||||
'href="' . $entry['url'] . '"' .
|
||||
'> </a>';
|
||||
} else {
|
||||
return '<a ' .
|
||||
'style="background-color:' . $this->calculateColor(0) . '; ' . ' opacity: ' . $this->opacity . ';" ' .
|
||||
'title="No entries for ' . $day . '" ' .
|
||||
'></a>';
|
||||
} else {
|
||||
return '<span ' .
|
||||
'style="background-color: ' . $this->calculateColor(0) . '; opacity: ' . $this->opacity . ';" ' .
|
||||
'title="No entries for ' . $day . '" ' .
|
||||
'></span>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,11 @@ class Dashboard extends AbstractWidget
|
|||
$this->tabs->add(
|
||||
$key,
|
||||
array(
|
||||
'title' => $pane->getTitle(),
|
||||
'title' => sprintf(
|
||||
t('Show %s', 'dashboard.pane.tooltip'),
|
||||
$pane->getTitle()
|
||||
),
|
||||
'label' => $pane->getTitle(),
|
||||
'url' => clone($url),
|
||||
'urlParams' => array($this->tabParam => $key)
|
||||
)
|
||||
|
|
|
@ -51,7 +51,7 @@ class Dashlet extends UserWidget
|
|||
private $template =<<<'EOD'
|
||||
|
||||
<div class="container" data-icinga-url="{URL}">
|
||||
<h1><a href="{FULL_URL}" data-base-target="col1">{TITLE}</a></h1>
|
||||
<h1><a href="{FULL_URL}" aria-label="{TOOLTIP}" title="{TOOLTIP}" data-base-target="col1">{TITLE}</a></h1>
|
||||
<noscript>
|
||||
<iframe
|
||||
src="{IFRAME_URL}"
|
||||
|
@ -187,8 +187,8 @@ EOD;
|
|||
'{URL}',
|
||||
'{IFRAME_URL}',
|
||||
'{FULL_URL}',
|
||||
'{TOOLTIP}',
|
||||
'{TITLE}',
|
||||
'{REMOVE}',
|
||||
'{TITLE_PREFIX}'
|
||||
);
|
||||
|
||||
|
@ -196,32 +196,14 @@ EOD;
|
|||
$url,
|
||||
$iframeUrl,
|
||||
$url->getUrlWithout(array('view', 'limit')),
|
||||
sprintf($view->translate('Show %s', 'dashboard.dashlet.tooltip'), $view->escape($this->getTitle())),
|
||||
$view->escape($this->getTitle()),
|
||||
$this->getRemoveLink(),
|
||||
t('Dashlet') . ': '
|
||||
|
||||
$view->translate('Dashlet') . ': '
|
||||
);
|
||||
|
||||
return str_replace($searchTokens, $replaceTokens, $this->template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the form for removing a dashboard elemetn
|
||||
*
|
||||
* @return string The html representation of the form
|
||||
*/
|
||||
protected function getRemoveLink()
|
||||
{
|
||||
return sprintf(
|
||||
'<a data-base-target="main" href="%s">%s</a>',
|
||||
Url::fromPath('dashboard/remove-dashlet', array(
|
||||
'dashlet' => $this->getTitle(),
|
||||
'pane' => $this->pane->getTitle()
|
||||
)),
|
||||
t('Remove')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a @see Dashlet instance from the given Zend config, using the provided title
|
||||
*
|
||||
|
|
|
@ -310,8 +310,8 @@ class FilterEditor extends AbstractWidget
|
|||
$this->preservedUrl()->with('removeFilter', $filter->getId()),
|
||||
null,
|
||||
array(
|
||||
'title' => t('Click to remove this part of your filter'),
|
||||
'class' => 'icon-cancel'
|
||||
'icon' => 'icon-cancel',
|
||||
'title' => t('Remove this part of your filter')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -323,8 +323,8 @@ class FilterEditor extends AbstractWidget
|
|||
$this->preservedUrl()->with('addFilter', $filter->getId()),
|
||||
null,
|
||||
array(
|
||||
'title' => t('Click to add another filter'),
|
||||
'class' => 'icon-plus'
|
||||
'icon' => 'icon-plus',
|
||||
'title' => t('Add another filter')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -336,8 +336,8 @@ class FilterEditor extends AbstractWidget
|
|||
$this->preservedUrl()->with('stripFilter', $filter->getId()),
|
||||
null,
|
||||
array(
|
||||
'title' => t('Strip this filter'),
|
||||
'class' => 'icon-minus'
|
||||
'icon' => 'icon-minus',
|
||||
'title' => t('Strip this filter')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -349,8 +349,8 @@ class FilterEditor extends AbstractWidget
|
|||
$this->preservedUrl()->without('addFilter'),
|
||||
null,
|
||||
array(
|
||||
'title' => t('Cancel this operation'),
|
||||
'class' => 'icon-cancel'
|
||||
'icon' => 'icon-cancel',
|
||||
'title' => t('Cancel this operation')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -666,6 +666,8 @@ class FilterEditor extends AbstractWidget
|
|||
return $html
|
||||
. '<a href="'
|
||||
. $this->preservedUrl()->with('modifyFilter', true)
|
||||
. '" aria-label="'
|
||||
. $title
|
||||
. '" title="'
|
||||
. $title
|
||||
. '">'
|
||||
|
|
|
@ -80,7 +80,7 @@ class Limiter extends AbstractWidget
|
|||
$this->url->setParam('limit', $limit),
|
||||
null,
|
||||
array(
|
||||
'title' => sprintf(t('Show %s rows on one page'), $caption)
|
||||
'title' => sprintf($view->translate('Limit each page to a maximum of %u rows'), $caption)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ class Tab extends AbstractWidget
|
|||
*/
|
||||
private $title = '';
|
||||
|
||||
private $label = '';
|
||||
|
||||
/**
|
||||
* The Url this tab points to
|
||||
*
|
||||
|
@ -116,6 +118,11 @@ class Tab extends AbstractWidget
|
|||
return $this->name;
|
||||
}
|
||||
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->label = $label;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $title
|
||||
*/
|
||||
|
@ -210,9 +217,22 @@ class Tab extends AbstractWidget
|
|||
if ($this->active) {
|
||||
$classes[] = 'active';
|
||||
}
|
||||
$caption = $view->escape($this->title);
|
||||
|
||||
$caption = $view->escape($this->label);
|
||||
$tagParams = $this->tagParams;
|
||||
|
||||
if ($this->title) {
|
||||
if ($tagParams !== null) {
|
||||
$tagParams['title'] = $this->title;
|
||||
$tagParams['aria-label'] = $this->title;
|
||||
} else {
|
||||
$tagParams = array(
|
||||
'title' => $this->title,
|
||||
'aria-label' => $this->title
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->icon !== null) {
|
||||
if (strpos($this->icon, '.') === false) {
|
||||
$caption = $view->icon($this->icon) . $caption;
|
||||
|
@ -220,13 +240,16 @@ class Tab extends AbstractWidget
|
|||
$caption = $view->img($this->icon, null, array('class' => 'icon')) . $caption;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->url !== null) {
|
||||
$this->url->overwriteParams($this->urlParams);
|
||||
|
||||
if ($tagParams !== null) {
|
||||
$params = $view->propertiesToString($tagParams);
|
||||
} else {
|
||||
$params = '';
|
||||
}
|
||||
|
||||
$tab = sprintf(
|
||||
'<a href="%s"%s>%s</a>',
|
||||
$this->url,
|
||||
|
@ -236,6 +259,7 @@ class Tab extends AbstractWidget
|
|||
} else {
|
||||
$tab = $caption;
|
||||
}
|
||||
|
||||
$class = empty($classes) ? '' : sprintf(' class="%s"', implode(' ', $classes));
|
||||
return '<li ' . $class . '>' . $tab . "</li>\n";
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class DashboardAction implements Tabextension
|
|||
'dashboard',
|
||||
array(
|
||||
'icon' => 'dashboard',
|
||||
'title' => 'Add To Dashboard',
|
||||
'label' => 'Add To Dashboard',
|
||||
'url' => Url::fromPath('dashboard/new-dashlet'),
|
||||
'urlParams' => array(
|
||||
'url' => rawurlencode(Url::fromRequest()->getRelativeUrl())
|
||||
|
|
|
@ -22,7 +22,7 @@ class DashboardSettings implements Tabextension
|
|||
'dashboard_add',
|
||||
array(
|
||||
'icon' => 'img/icons/dashboard.png',
|
||||
'title' => t('Add To Dashboard'),
|
||||
'label' => t('Add To Dashboard'),
|
||||
'url' => Url::fromPath('dashboard/new-dashlet')
|
||||
)
|
||||
);
|
||||
|
@ -30,9 +30,9 @@ class DashboardSettings implements Tabextension
|
|||
$tabs->addAsDropdown(
|
||||
'dashboard_settings',
|
||||
array(
|
||||
'icon' => 'img/icons/dashboard.png',
|
||||
'title' => t('Settings'),
|
||||
'url' => Url::fromPath('dashboard/settings')
|
||||
'icon' => 'img/icons/dashboard.png',
|
||||
'label' => t('Settings'),
|
||||
'url' => Url::fromPath('dashboard/settings')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class OutputFormat implements Tabextension
|
|||
if (Platform::extensionLoaded('gd')) {
|
||||
$supportedTypes[self::TYPE_PDF] = array(
|
||||
'name' => 'pdf',
|
||||
'title' => 'PDF',
|
||||
'label' => 'PDF',
|
||||
'icon' => 'file-pdf',
|
||||
'urlParams' => array('format' => 'pdf'),
|
||||
);
|
||||
|
@ -93,7 +93,7 @@ class OutputFormat implements Tabextension
|
|||
|
||||
$supportedTypes[self::TYPE_CSV] = array(
|
||||
'name' => 'csv',
|
||||
'title' => 'CSV',
|
||||
'label' => 'CSV',
|
||||
'icon' => 'file-excel',
|
||||
'urlParams' => array('format' => 'csv')
|
||||
);
|
||||
|
@ -101,7 +101,7 @@ class OutputFormat implements Tabextension
|
|||
if (Platform::extensionLoaded('json')) {
|
||||
$supportedTypes[self::TYPE_JSON] = array(
|
||||
'name' => 'json',
|
||||
'title' => 'JSON',
|
||||
'label' => 'JSON',
|
||||
'icon' => 'img/icons/json.png',
|
||||
'urlParams' => array('format' => 'json')
|
||||
);
|
||||
|
|
|
@ -49,10 +49,10 @@ class Doc_ModuleController extends DocController
|
|||
{
|
||||
$moduleManager = Icinga::app()->getModuleManager();
|
||||
$modules = array();
|
||||
foreach (Icinga::app()->getModuleManager()->listEnabledModules() as $module) {
|
||||
foreach ($moduleManager->listEnabledModules() as $module) {
|
||||
$path = $this->getPath($module, $moduleManager->getModuleDir($module, '/doc'), true);
|
||||
if ($path !== null) {
|
||||
$modules[] = $module;
|
||||
$modules[] = $moduleManager->getModule($module);
|
||||
}
|
||||
}
|
||||
$this->view->modules = $modules;
|
||||
|
|
|
@ -1,9 +1,19 @@
|
|||
<div class="controls"></div>
|
||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
||||
<h1><?= $this->translate('Available documentations') ?></h1>
|
||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
|
||||
<h1><?= $this->translate('Available documentations'); ?></h1>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li><a href="<?= $this->href('doc/icingaweb/toc') ?>">Icinga Web 2</a></li>
|
||||
<li><a href="<?= $this->href('doc/module/') ?>"><?= $this->translate('Module documentations') ?></a></li>
|
||||
<li><?= $this->qlink(
|
||||
'Icinga Web 2',
|
||||
'doc/icingaweb/toc',
|
||||
null,
|
||||
array('title' => $this->translate('Show the documentation\'s table of contents for Icinga Web 2'))
|
||||
); ?></li>
|
||||
<li><?= $this->qlink(
|
||||
$this->translate('Module documentations'),
|
||||
'doc/module/',
|
||||
null,
|
||||
array('title' => $this->translate('List all modifications for which documentation is available'))
|
||||
); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -1,15 +1,19 @@
|
|||
<div class="controls">
|
||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
||||
<h1><?= $this->translate('Module documentations') ?></h1>
|
||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
|
||||
<h1><?= $this->translate('Module documentations'); ?></h1>
|
||||
</div>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<?php foreach ($modules as $module): ?>
|
||||
<li>
|
||||
<a href="<?= $this->getHelper('Url')->url(array('moduleName' => $module), 'doc/module/toc', false, false) ?>">
|
||||
<?= $module ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php foreach ($modules as $module): ?>
|
||||
<li><?= $this->qlink(
|
||||
$module->getTitle(),
|
||||
'doc/module/toc',
|
||||
array('moduleName' => $module->getName()),
|
||||
array('title' => sprintf(
|
||||
$this->translate('Show the documentation\'s table of contents for the %s'),
|
||||
$module->getTitle()
|
||||
))
|
||||
); ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -107,11 +107,30 @@ class DocSearchRenderer extends DocRenderer
|
|||
);
|
||||
/** @type \Icinga\Web\Url $url */
|
||||
$url->setAnchor($this->encodeAnchor($section->getId()));
|
||||
$this->content[] = sprintf(
|
||||
'<li><a data-base-target="_next" %shref="%s">%s</a>',
|
||||
$section->getNoFollow() ? 'rel="nofollow" ' : '',
|
||||
$urlAttributes = array(
|
||||
'data-base-target' => '_next',
|
||||
'title' => sprintf(
|
||||
$this->getView()->translate(
|
||||
'Show all matches of "%s" in %sthe chapter "%s"',
|
||||
'search.render.section.link'
|
||||
),
|
||||
$this->getInnerIterator()->getSearch()->getInput(),
|
||||
$section->getId() !== $section->getChapter()->getId() ? sprintf(
|
||||
$this->getView()->translate('the section "%s" of ', 'search.render.section.link'),
|
||||
$section->getTitle()
|
||||
) : '',
|
||||
$section->getChapter()->getTitle()
|
||||
)
|
||||
);
|
||||
if ($section->getNoFollow()) {
|
||||
$urlAttributes['rel'] = 'nofollow';
|
||||
}
|
||||
$this->content[] = '<li>' . $this->getView()->qlink(
|
||||
$title,
|
||||
$url->getAbsoluteUrl(),
|
||||
$title
|
||||
null,
|
||||
$urlAttributes,
|
||||
false
|
||||
);
|
||||
if (! empty($contentMatches)) {
|
||||
$this->content = array_merge($this->content, $contentMatches);
|
||||
|
|
|
@ -87,11 +87,25 @@ class DocTocRenderer extends DocRenderer
|
|||
$url = $view->url($path);
|
||||
/** @type \Icinga\Web\Url $url */
|
||||
$url->setAnchor($this->encodeAnchor($section->getId()));
|
||||
$this->content[] = sprintf(
|
||||
'<li><a data-base-target="_next" %shref="%s">%s</a>',
|
||||
$section->getNoFollow() ? 'rel="nofollow" ' : '',
|
||||
$urlAttributes = array(
|
||||
'data-base-target' => '_next',
|
||||
'title' => sprintf(
|
||||
$this->getView()->translate('Show the %schapter "%s"', 'toc.render.section.link'),
|
||||
$section->getId() !== $section->getChapter()->getId() ? sprintf(
|
||||
$this->getView()->translate('section "%s" of the ', 'toc.render.section.link'),
|
||||
$section->getTitle()
|
||||
) : '',
|
||||
$section->getChapter()->getTitle()
|
||||
)
|
||||
);
|
||||
if ($section->getNoFollow()) {
|
||||
$urlAttributes['rel'] = 'nofollow';
|
||||
}
|
||||
$this->content[] = '<li>' . $this->getView()->qlink(
|
||||
$section->getTitle(),
|
||||
$url->getAbsoluteUrl(),
|
||||
$view->escape($section->getTitle())
|
||||
null,
|
||||
$urlAttributes
|
||||
);
|
||||
if (! $section->hasChildren()) {
|
||||
$this->content[] = '</li>';
|
||||
|
|
|
@ -10,11 +10,6 @@ use Icinga\Web\Url;
|
|||
|
||||
class Monitoring_AlertsummaryController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -30,42 +25,28 @@ class Monitoring_AlertsummaryController extends Controller
|
|||
*/
|
||||
public function init()
|
||||
{
|
||||
$tabs = $this->getTabs();
|
||||
if (in_array($this->_request->getActionName(), array('alertsummary'))) {
|
||||
$tabs->extend(new OutputFormat())->extend(new DashboardAction());
|
||||
}
|
||||
|
||||
$this->url = Url::fromRequest();
|
||||
|
||||
$this->notificationData = $this->createNotificationData();
|
||||
$this->problemData = $this->createProblemData();
|
||||
|
||||
$tabs->setTitle($this->translate('Alertsummary Navigation'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $action
|
||||
* @param bool $title
|
||||
*/
|
||||
protected function addTitleTab($action, $title = false)
|
||||
{
|
||||
$title = $title ?: ucfirst($action);
|
||||
$this->getTabs()->add(
|
||||
$action,
|
||||
array(
|
||||
'title' => $title,
|
||||
'url' => $this->url
|
||||
)
|
||||
)->activate($action);
|
||||
$this->view->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creat full report
|
||||
* Create full report
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$this->addTitleTab('alertsummary', $this->translate('Alert Summary'));
|
||||
$this->getTabs()->add(
|
||||
'alertsummary',
|
||||
array(
|
||||
'title' => $this->translate(
|
||||
'Show recent alerts and visualize notifications and problems'
|
||||
. ' based on their amount and chronological distribution'
|
||||
),
|
||||
'label' => $this->translate('Alert Summary'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('alertsummary')->setTitle($this->translate('Alertsummary Navigation'));
|
||||
$this->view->title = $this->translate('Alert Summary');
|
||||
|
||||
$this->view->intervalBox = $this->createIntervalBox();
|
||||
$this->view->recentAlerts = $this->createRecentAlerts();
|
||||
$this->view->interval = $this->getInterval();
|
||||
|
|
|
@ -72,8 +72,12 @@ class Monitoring_HostsController extends Controller
|
|||
$this->getTabs()->add(
|
||||
'show',
|
||||
array(
|
||||
'title' => mt('monitoring', 'Hosts'),
|
||||
'url' => Url::fromRequest()
|
||||
'title' => sprintf(
|
||||
$this->translate('Show summarized information for %u hosts'),
|
||||
count($this->hostList)
|
||||
),
|
||||
'label' => $this->translate('Hosts'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('show');
|
||||
$this->setAutorefreshInterval(15);
|
||||
|
|
|
@ -6,7 +6,6 @@ use Icinga\Module\Monitoring\Backend;
|
|||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimeCommandForm;
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Web\Hook;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
use Icinga\Web\Widget\Tabextension\OutputFormat;
|
||||
use Icinga\Web\Widget\Tabs;
|
||||
|
@ -17,11 +16,7 @@ use Icinga\Module\Monitoring\Forms\StatehistoryForm;
|
|||
|
||||
class Monitoring_ListController extends Controller
|
||||
{
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* Retrieve backend and hooks for this controller
|
||||
*
|
||||
* @see ActionController::init
|
||||
*/
|
||||
public function init()
|
||||
|
@ -32,7 +27,6 @@ class Monitoring_ListController extends Controller
|
|||
$this->view->compact = true;
|
||||
$this->view->inline = true;
|
||||
}
|
||||
$this->url = Url::fromRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +50,7 @@ class Monitoring_ListController extends Controller
|
|||
protected function hasBetterUrl()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$url = clone($this->url);
|
||||
$url = Url::fromRequest();
|
||||
|
||||
if ($this->getRequest()->isPost()) {
|
||||
if ($request->getPost('sort')) {
|
||||
|
@ -100,7 +94,7 @@ class Monitoring_ListController extends Controller
|
|||
$stateChangeColumn = 'host_last_state_change';
|
||||
}
|
||||
|
||||
$this->addTitleTab('hosts', $this->translate('Hosts'));
|
||||
$this->addTitleTab('hosts', $this->translate('Hosts'), $this->translate('List hosts'));
|
||||
$this->setAutorefreshInterval(10);
|
||||
$query = $this->backend->select()->from('hostStatus', array_merge(array(
|
||||
'host_icon_image',
|
||||
|
@ -174,7 +168,7 @@ class Monitoring_ListController extends Controller
|
|||
$stateChangeColumn = 'service_last_state_change';
|
||||
}
|
||||
|
||||
$this->addTitleTab('services', $this->translate('Services'));
|
||||
$this->addTitleTab('services', $this->translate('Services'), $this->translate('List services'));
|
||||
$this->view->showHost = true;
|
||||
if ($host = $this->_getParam('host')) {
|
||||
if (strpos($host, '*') === false) {
|
||||
|
@ -272,7 +266,7 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('downtimes', $this->translate('Downtimes'));
|
||||
$this->addTitleTab('downtimes', $this->translate('Downtimes'), $this->translate('List downtimes'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
$query = $this->backend->select()->from('downtime', array(
|
||||
'id' => 'downtime_internal_id',
|
||||
|
@ -326,7 +320,11 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('notifications', $this->translate('Notifications'));
|
||||
$this->addTitleTab(
|
||||
'notifications',
|
||||
$this->translate('Notifications'),
|
||||
$this->translate('List notifications')
|
||||
);
|
||||
$this->setAutorefreshInterval(15);
|
||||
$query = $this->backend->select()->from('notification', array(
|
||||
'host',
|
||||
|
@ -350,7 +348,7 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('contacts', $this->translate('Contacts'));
|
||||
$this->addTitleTab('contacts', $this->translate('Contacts'), $this->translate('List contacts'));
|
||||
$query = $this->backend->select()->from('contact', array(
|
||||
'contact_name',
|
||||
'contact_id',
|
||||
|
@ -389,7 +387,7 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('eventgrid', $this->translate('Event Grid'));
|
||||
$this->addTitleTab('eventgrid', $this->translate('Event Grid'), $this->translate('Show the Event Grid'));
|
||||
|
||||
$form = new StatehistoryForm();
|
||||
$form->setEnctype(Zend_Form::ENCTYPE_URLENCODED);
|
||||
|
@ -430,7 +428,11 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('contactgroups', $this->translate('Contact Groups'));
|
||||
$this->addTitleTab(
|
||||
'contactgroups',
|
||||
$this->translate('Contact Groups'),
|
||||
$this->translate('List contact groups')
|
||||
);
|
||||
$query = $this->backend->select()->from('contactgroup', array(
|
||||
'contactgroup_name',
|
||||
'contactgroup_alias',
|
||||
|
@ -462,7 +464,7 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('comments', $this->translate('Comments'));
|
||||
$this->addTitleTab('comments', $this->translate('Comments'), $this->translate('List comments'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
$query = $this->backend->select()->from('comment', array(
|
||||
'id' => 'comment_internal_id',
|
||||
|
@ -501,7 +503,11 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('servicegroups', $this->translate('Service Groups'));
|
||||
$this->addTitleTab(
|
||||
'servicegroups',
|
||||
$this->translate('Service Groups'),
|
||||
$this->translate('List service groups')
|
||||
);
|
||||
$this->setAutorefreshInterval(12);
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'servicegroup',
|
||||
|
@ -551,7 +557,7 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('hostgroups', $this->translate('Host Groups'));
|
||||
$this->addTitleTab('hostgroups', $this->translate('Host Groups'), $this->translate('List host groups'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'hostgroup',
|
||||
|
@ -601,7 +607,11 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('eventhistory', $this->translate('Event Overview'));
|
||||
$this->addTitleTab(
|
||||
'eventhistory',
|
||||
$this->translate('Event Overview'),
|
||||
$this->translate('List event records')
|
||||
);
|
||||
|
||||
$query = $this->backend->select()->from('eventHistory', array(
|
||||
'host_name',
|
||||
|
@ -632,7 +642,7 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
$this->addTitleTab('servicegrid', $this->translate('Service Grid'));
|
||||
$this->addTitleTab('servicegrid', $this->translate('Service Grid'), $this->translate('Show the Service Grid'));
|
||||
$this->setAutorefreshInterval(15);
|
||||
$query = $this->backend->select()->from('serviceStatus', array(
|
||||
'host_name',
|
||||
|
@ -698,13 +708,12 @@ class Monitoring_ListController extends Controller
|
|||
$this->view->sortControl->applyRequest($this->getRequest());
|
||||
}
|
||||
|
||||
protected function addTitleTab($action, $title = false)
|
||||
protected function addTitleTab($action, $title, $tip)
|
||||
{
|
||||
$title = $title ?: ucfirst($action);
|
||||
$this->getTabs()->add($action, array(
|
||||
'title' => $title,
|
||||
// 'url' => Url::fromPath('monitoring/list/' . $action)
|
||||
'url' => $this->url
|
||||
'title' => $tip,
|
||||
'label' => $title,
|
||||
'url' => Url::fromRequest()
|
||||
))->activate($action);
|
||||
$this->view->title = $title;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,11 @@ class Monitoring_ProcessController extends Controller
|
|||
->add(
|
||||
'info',
|
||||
array(
|
||||
'title' => $this->translate('Monitoring Health'),
|
||||
'title' => $this->translate(
|
||||
'Show information about the current monitoring instance\'s process'
|
||||
. ' and it\'s performance as well as available features'
|
||||
),
|
||||
'label' => $this->translate('Monitoring Health'),
|
||||
'url' =>'monitoring/process/info'
|
||||
)
|
||||
)->setTitle($this->translate('Process Information'));
|
||||
|
|
|
@ -93,8 +93,12 @@ class Monitoring_ServicesController extends Controller
|
|||
$this->getTabs()->add(
|
||||
'show',
|
||||
array(
|
||||
'title' => mt('monitoring', 'Services'),
|
||||
'url' => Url::fromRequest()
|
||||
'title' => sprintf(
|
||||
$this->translate('Show summarized information for %u services'),
|
||||
count($this->serviceList)
|
||||
),
|
||||
'label' => $this->translate('Services'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('show');
|
||||
$this->setAutorefreshInterval(15);
|
||||
|
|
|
@ -189,10 +189,12 @@ class Monitoring_ShowController extends Controller
|
|||
return;
|
||||
}
|
||||
if ($object->getType() === $object::TYPE_HOST) {
|
||||
$isService = false;
|
||||
$params = array(
|
||||
'host' => $object->getName()
|
||||
);
|
||||
} else {
|
||||
$isService = true;
|
||||
$params = array(
|
||||
'host' => $object->getHost()->getName(),
|
||||
'service' => $object->getName()
|
||||
|
@ -202,17 +204,26 @@ class Monitoring_ShowController extends Controller
|
|||
$tabs->add(
|
||||
'host',
|
||||
array(
|
||||
'title' => $this->translate('Host'),
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for host %s'),
|
||||
$isService ? $object->getHost()->getName() : $object->getName()
|
||||
),
|
||||
'label' => $this->translate('Host'),
|
||||
'icon' => 'host',
|
||||
'url' => 'monitoring/show/host',
|
||||
'urlParams' => $params,
|
||||
)
|
||||
);
|
||||
if (isset($params['service'])) {
|
||||
if ($isService) {
|
||||
$tabs->add(
|
||||
'service',
|
||||
array(
|
||||
'title' => $this->translate('Service'),
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for service %s on host %s'),
|
||||
$object->getName(),
|
||||
$object->getHost()->getName()
|
||||
),
|
||||
'label' => $this->translate('Service'),
|
||||
'icon' => 'service',
|
||||
'url' => 'monitoring/show/service',
|
||||
'urlParams' => $params,
|
||||
|
@ -222,7 +233,11 @@ class Monitoring_ShowController extends Controller
|
|||
$tabs->add(
|
||||
'services',
|
||||
array(
|
||||
'title' => $this->translate('Services'),
|
||||
'title' => sprintf(
|
||||
$this->translate('List all services on host %s'),
|
||||
$isService ? $object->getHost()->getName() : $object->getName()
|
||||
),
|
||||
'label' => $this->translate('Services'),
|
||||
'icon' => 'services',
|
||||
'url' => 'monitoring/show/services',
|
||||
'urlParams' => $params,
|
||||
|
@ -232,7 +247,15 @@ class Monitoring_ShowController extends Controller
|
|||
$tabs->add(
|
||||
'history',
|
||||
array(
|
||||
'title' => $this->translate('History'),
|
||||
'title' => $isService
|
||||
? sprintf(
|
||||
$this->translate('Show all event records of service %s on host %s'),
|
||||
$object->getName(),
|
||||
$object->getHost()->getName()
|
||||
)
|
||||
: sprintf($this->translate('Show all event records of host %s'), $object->getName())
|
||||
,
|
||||
'label' => $this->translate('History'),
|
||||
'icon' => 'rewind',
|
||||
'url' => 'monitoring/show/history',
|
||||
'urlParams' => $params,
|
||||
|
|
|
@ -11,7 +11,11 @@ class Monitoring_TacticalController extends MonitoringController
|
|||
$this->getTabs()->add(
|
||||
'tactical_overview',
|
||||
array(
|
||||
'title' => $this->translate('Tactical Overview'),
|
||||
'title' => $this->translate(
|
||||
'Show an overview of all hosts and services, their current'
|
||||
. ' states and monitoring feature utilisation'
|
||||
),
|
||||
'label' => $this->translate('Tactical Overview'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('tactical_overview');
|
||||
|
|
|
@ -13,20 +13,17 @@ use Icinga\Module\Monitoring\Web\Widget\SelectBox;
|
|||
|
||||
class Monitoring_TimelineController extends Controller
|
||||
{
|
||||
protected function addTitleTab($action, $title = false)
|
||||
{
|
||||
$title = $title ? : ucfirst($action);
|
||||
$this->getTabs()->add($action, array(
|
||||
'title' => $title,
|
||||
'url' => Url::fromRequest()
|
||||
))->activate($action)
|
||||
->setTitle($this->translate('Timeline Navigation'));
|
||||
$this->view->title = $title;
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->addTitleTab('index', t('Timeline'));
|
||||
$this->getTabs()->add(
|
||||
'timeline',
|
||||
array(
|
||||
'title' => $this->translate('Show the number of historical event records grouped by time and type'),
|
||||
'label' => $this->translate('Timeline'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('timeline')->setTitle($this->translate('Timeline Navigation'));
|
||||
$this->view->title = $this->translate('Timeline');
|
||||
|
||||
// TODO: filter for hard_states (precedence adjustments necessary!)
|
||||
$this->setupIntervalBox();
|
||||
|
@ -144,7 +141,7 @@ class Monitoring_TimelineController extends Controller
|
|||
case '1d':
|
||||
return $this->getDateFormat();
|
||||
case '1w':
|
||||
return '\W\e\ek #W\<b\r\>\of Y';
|
||||
return '\W\e\ek W\<b\r\>\of Y';
|
||||
case '1m':
|
||||
return 'F Y';
|
||||
case '1y':
|
||||
|
|
|
@ -60,7 +60,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
|
|||
if ((bool) $this->status->notifications_enabled) {
|
||||
if ($this->hasPermission('monitoring/command/feature/instance')) {
|
||||
$notificationDescription = sprintf(
|
||||
'<a title="%s" href="%s" data-base-target="_next">%s</a>',
|
||||
'<a aria-label="%1$s" title="%1$s" href="%2$s" data-base-target="_next">%3$s</a>',
|
||||
$this->translate('Disable notifications for a specific time on a program-wide basis'),
|
||||
$this->getView()->href('monitoring/process/disable-notifications'),
|
||||
$this->translate('Disable temporarily')
|
||||
|
|
|
@ -39,7 +39,8 @@ class CheckNowCommandForm extends ObjectsCommandForm
|
|||
. $this->translate('Check now'),
|
||||
'decorators' => array('ViewHelper'),
|
||||
'escape' => false,
|
||||
'class' => 'link-like'
|
||||
'class' => 'link-like',
|
||||
'title' => $this->translate('Schedule the next active check to run immediately')
|
||||
)
|
||||
)
|
||||
));
|
||||
|
|
|
@ -54,7 +54,7 @@ class DeleteCommentCommandForm extends ObjectsCommandForm
|
|||
array(
|
||||
'ignore' => true,
|
||||
'label' => 'X',
|
||||
'title' => $this->translate('Delete comment'),
|
||||
'title' => $this->translate('Delete this comment'),
|
||||
'decorators' => array('ViewHelper')
|
||||
)
|
||||
);
|
||||
|
|
|
@ -54,7 +54,7 @@ class DeleteDowntimeCommandForm extends ObjectsCommandForm
|
|||
array(
|
||||
'ignore' => true,
|
||||
'label' => 'X',
|
||||
'title' => $this->translate('Delete downtime'),
|
||||
'title' => $this->translate('Delete this downtime'),
|
||||
'decorators' => array('ViewHelper')
|
||||
)
|
||||
);
|
||||
|
|
|
@ -230,7 +230,9 @@ class BackendConfigForm extends ConfigForm
|
|||
)
|
||||
);
|
||||
|
||||
$resourceElement = $this->createElement(
|
||||
$decorators = static::$defaultElementDecorators;
|
||||
array_pop($decorators); // Removes the HtmlTag decorator
|
||||
$this->addElement(
|
||||
'select',
|
||||
'resource',
|
||||
array(
|
||||
|
@ -238,32 +240,35 @@ class BackendConfigForm extends ConfigForm
|
|||
'label' => $this->translate('Resource'),
|
||||
'description' => $this->translate('The resource to use'),
|
||||
'multiOptions' => $this->resources[$resourceType],
|
||||
'value' => current($this->resources[$resourceType]),
|
||||
'decorators' => $decorators,
|
||||
'autosubmit' => true
|
||||
)
|
||||
);
|
||||
|
||||
if (empty($formData)) {
|
||||
$options = $resourceElement->options;
|
||||
$resourceName = array_shift($options);
|
||||
} else {
|
||||
$resourceName = (isset($formData['resource'])) ? $formData['resource'] : $this->getValue('resource');
|
||||
}
|
||||
|
||||
$this->addElement($resourceElement);
|
||||
|
||||
if ($resourceElement) {
|
||||
$this->addElement(
|
||||
'note',
|
||||
'resource_note',
|
||||
array(
|
||||
'value' => sprintf(
|
||||
'<a href="%s" data-base-target="_main">%s</a>',
|
||||
$this->getView()->url('config/editresource', array('resource' => $resourceName)),
|
||||
$this->translate('Show resource configuration')
|
||||
),
|
||||
'escape' => false
|
||||
$resourceName = isset($formData['resource']) ? $formData['resource'] : $this->getValue('resource');
|
||||
$this->addElement(
|
||||
'note',
|
||||
'resource_note',
|
||||
array(
|
||||
'escape' => false,
|
||||
'decorators' => $decorators,
|
||||
'value' => sprintf(
|
||||
'<a href="%1$s" data-base-target="_next" title="%2$s" aria-label="%2$s">%3$s</a>',
|
||||
$this->getView()->url('config/editresource', array('resource' => $resourceName)),
|
||||
sprintf($this->translate('Show the configuration of the %s resource'), $resourceName),
|
||||
$this->translate('Show resource configuration')
|
||||
)
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
$this->addDisplayGroup(
|
||||
array('resource', 'resource_note'),
|
||||
'resource-group',
|
||||
array(
|
||||
'decorators' => array(
|
||||
'FormElements',
|
||||
array('HtmlTag', array('tag' => 'div', 'class' => 'element'))
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,9 @@ class Zend_View_Helper_Link extends Zend_View_Helper_Abstract
|
|||
{
|
||||
return $this->view->qlink(
|
||||
$linkText,
|
||||
$this->view->href('monitoring/host/show', array('host' => $host))
|
||||
'monitoring/host/show',
|
||||
array('host' => $host),
|
||||
array('title' => sprintf($this->view->translate('Show detailed information for host %s'), $host))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -52,7 +54,13 @@ class Zend_View_Helper_Link extends Zend_View_Helper_Abstract
|
|||
$this->view->translate('%s on %s', 'Service running on host'),
|
||||
$this->view->qlink(
|
||||
$serviceLinkText,
|
||||
$this->view->href('monitoring/service/show', array('host' => $host, 'service' => $service))
|
||||
'monitoring/service/show',
|
||||
array('host' => $host, 'service' => $service),
|
||||
array('title' => sprintf(
|
||||
$this->view->translate('Show detailed information for service %s on host %s'),
|
||||
$service,
|
||||
$host
|
||||
))
|
||||
),
|
||||
$this->host($host, $hostLinkText)
|
||||
);
|
||||
|
|
|
@ -19,11 +19,13 @@
|
|||
<tr>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('edit') . ' ' . $this->escape($backendName),
|
||||
$backendName,
|
||||
'/monitoring/config/editbackend',
|
||||
array('backend' => $backendName),
|
||||
array('title' => sprintf($this->translate('Edit monitoring backend %s'), $backendName)),
|
||||
false
|
||||
array(
|
||||
'icon' => 'edit',
|
||||
'title' => sprintf($this->translate('Edit monitoring backend %s'), $backendName)
|
||||
)
|
||||
); ?>
|
||||
<small>(<?= sprintf(
|
||||
$this->translate('Type: %s'),
|
||||
|
@ -32,11 +34,13 @@
|
|||
</td>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('cancel'),
|
||||
'',
|
||||
'/monitoring/config/removebackend',
|
||||
array('backend' => $backendName),
|
||||
array('title' => sprintf($this->translate('Remove monitoring backend %s'), $backendName)),
|
||||
false
|
||||
array(
|
||||
'icon' => 'cancel',
|
||||
'title' => sprintf($this->translate('Remove monitoring backend %s'), $backendName)
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -59,11 +63,13 @@
|
|||
<tr>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('edit') . ' ' . $this->escape($instanceName),
|
||||
$instanceName,
|
||||
'/monitoring/config/editinstance',
|
||||
array('instance' => $instanceName),
|
||||
array('title' => sprintf($this->translate('Edit monitoring instance %s'), $instanceName)),
|
||||
false
|
||||
array(
|
||||
'icon' => 'edit',
|
||||
'title' => sprintf($this->translate('Edit monitoring instance %s'), $instanceName)
|
||||
)
|
||||
); ?>
|
||||
<small>(<?= sprintf(
|
||||
$this->translate('Type: %s'),
|
||||
|
@ -72,11 +78,13 @@
|
|||
</td>
|
||||
<td>
|
||||
<?= $this->qlink(
|
||||
$this->icon('cancel'),
|
||||
'',
|
||||
'/monitoring/config/removeinstance',
|
||||
array('instance' => $instanceName),
|
||||
array('title' => sprintf($this->translate('Remove monitoring instance %s'), $instanceName)),
|
||||
false
|
||||
array(
|
||||
'icon' => 'cancel',
|
||||
'title' => sprintf($this->translate('Remove monitoring instance %s'), $instanceName)
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,174 +1,116 @@
|
|||
<div class="controls">
|
||||
<?= $this->render('partials/host/objects-header.phtml') ?>
|
||||
<?= $this->render('partials/host/objects-header.phtml'); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if (($hostCount = count($objects)) === 0): ?>
|
||||
<?= $this->translate('No hosts matching the filter') ?>
|
||||
<?= $this->translate('No hosts matching the filter'); ?>
|
||||
<?php else: ?>
|
||||
<h3>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Host',
|
||||
'%u Hosts',
|
||||
$hostCount
|
||||
),
|
||||
$hostCount
|
||||
) ?>
|
||||
</h3>
|
||||
|
||||
<h3><?= sprintf($this->translatePlural('%u Host', '%u Hosts', $hostCount), $hostCount); ?></h3>
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('List all %u hosts'), $hostCount),
|
||||
$listAllLink
|
||||
); ?></div>
|
||||
<div>
|
||||
<a href="<?= $listAllLink ?>" title="<?= sprintf(
|
||||
$this->translate('List all %u hosts'),
|
||||
$hostCount
|
||||
); ?>">
|
||||
<?= $this->translate('List all') ?>
|
||||
</a>
|
||||
<?= $checkNowForm; ?>
|
||||
</div>
|
||||
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('Reschedule the next check for all %u hosts'), $hostCount),
|
||||
$rescheduleAllLink,
|
||||
null,
|
||||
array('icon' => 'reschedule')
|
||||
); ?></div>
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('Schedule a downtime for all %u hosts'), $hostCount),
|
||||
$downtimeAllLink,
|
||||
null,
|
||||
array('icon' => 'plug')
|
||||
); ?></div>
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('Submit a passive check result for all %u hosts'), $hostCount),
|
||||
$processCheckResultAllLink,
|
||||
null,
|
||||
array('icon' => 'reply')
|
||||
); ?></div>
|
||||
<?php if (($unhandledCount = count($unhandledObjects)) > 0): ?>
|
||||
<div>
|
||||
<?= $checkNowForm ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="<?= $rescheduleAllLink ?>">
|
||||
<?= $this->icon('reschedule'); ?>
|
||||
<?= $this->translate('Reschedule host checks') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="<?= $downtimeAllLink ?>">
|
||||
<?= $this->icon('plug'); ?>
|
||||
<?= $this->translate('Schedule host downtimes') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="<?= $processCheckResultAllLink; ?>">
|
||||
<?= $this->icon('reply'); ?>
|
||||
<?= $this->translate('Submit passive check results'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if (! empty($unhandledObjects)): ?>
|
||||
<h3>
|
||||
<?php $unhandledCount = count($unhandledObjects) ?>
|
||||
<?= sprintf(
|
||||
<h3><?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Unhandled Host Problem',
|
||||
'%u Unhandled Host Problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>
|
||||
</h3>
|
||||
<div>
|
||||
<a href="<?= $downtimeUnhandledLink ?>" title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'Schedule downtime for %u unhandled host problem',
|
||||
'Schedule downtimes for %u unhandled host problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>">
|
||||
<?= $this->icon('plug'); ?>
|
||||
<?= sprintf(
|
||||
); ?></h3>
|
||||
<div><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'Schedule downtime for unhandled host problem',
|
||||
'Schedule downtimes for unhandled host problems',
|
||||
'Schedule a downtime for %u unhandled host problem',
|
||||
'Schedule a downtime for %u unhandled host problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="<?= $acknowledgeUnhandledLink ?>" title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'Acknowledge %u unhandled host problem',
|
||||
'Acknowledge %u unhandled host problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>">
|
||||
<?= $this->icon('ok'); ?>
|
||||
<?= sprintf(
|
||||
$downtimeUnhandledLink,
|
||||
null,
|
||||
array('icon' => 'plug')
|
||||
); ?></div>
|
||||
<div><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'Acknowledge unhandled host problem',
|
||||
'Acknowledge unhandled host problems',
|
||||
'Acknowledge %u unhandled host problem',
|
||||
'Acknowledge %u unhandled host problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>
|
||||
</a>
|
||||
),
|
||||
$acknowledgeUnhandledLink,
|
||||
null,
|
||||
array('icon' => 'ok')
|
||||
); ?></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($acknowledgedObjects)): ?>
|
||||
<h2>
|
||||
<?php $acknowledgedCount = count($acknowledgedObjects) ?>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Acknowledged Host Problem',
|
||||
'%u Acknowledged Host Problems',
|
||||
$acknowledgedCount
|
||||
),
|
||||
<?php endif ?>
|
||||
<?php if (($acknowledgedCount = count($acknowledgedObjects)) > 0): ?>
|
||||
<div>
|
||||
<h2><?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Acknowledged Host Problem',
|
||||
'%u Acknowledged Host Problems',
|
||||
$acknowledgedCount
|
||||
) ?>
|
||||
</h2>
|
||||
<div>
|
||||
<?= $removeAckForm ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($objectsInDowntime)): ?>
|
||||
<h2>
|
||||
<?php $inDowntimeCount = count($objectsInDowntime) ?>
|
||||
<a href="<?= $inDowntimeLink ?>"
|
||||
title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host which is in downtime',
|
||||
'List %u hosts which are in downtime',
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeCount
|
||||
) ?>">
|
||||
<?= $this->icon('plug'); ?>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host currently in downtime',
|
||||
'List %u hosts currently downtime',
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeCount
|
||||
) ?>
|
||||
</a>
|
||||
</h2>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $commentCount = count($objects->getComments()) ?>
|
||||
<?php if ($commentCount): ?>
|
||||
<h2>
|
||||
<a href="<?= $commentsLink ?>"
|
||||
title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host comment',
|
||||
'List %u host comments',
|
||||
$commentCount
|
||||
),
|
||||
$commentCount
|
||||
) ?>">
|
||||
<?= $this->icon('comment'); ?>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host comment',
|
||||
'List %u host comments',
|
||||
$commentCount
|
||||
),
|
||||
$commentCount
|
||||
) ?>
|
||||
</a>
|
||||
</h2>
|
||||
<?php endif ?>
|
||||
),
|
||||
$acknowledgedCount
|
||||
); ?></h2>
|
||||
<?= $removeAckForm ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host currently in downtime',
|
||||
'List %u hosts currently in downtime',
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeLink,
|
||||
null,
|
||||
array('icon' => 'plug')
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<?php if (($commentCount = count($objects->getComments())) > 0): ?>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host comment',
|
||||
'List %u host comments',
|
||||
$commentCount
|
||||
),
|
||||
$commentCount
|
||||
),
|
||||
$commentsLink,
|
||||
null,
|
||||
array('icon' => 'comment')
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
|
@ -4,79 +4,133 @@ use Icinga\Web\Url;
|
|||
|
||||
$selfUrl = 'monitoring/list/hosts';
|
||||
$currentUrl = Url::fromRequest()->getRelativeUrl();
|
||||
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?= $this->qlink(sprintf($this->translate('%s hosts:'), $this->stats->hosts_total), $selfUrl); ?>
|
||||
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>>
|
||||
<?= sprintf($this->translate('%s hosts:'), $this->stats->hosts_total); ?>
|
||||
<span class="badges">
|
||||
<?php if($this->stats->hosts_up): ?>
|
||||
<span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 0))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<?php if ($this->stats->hosts_up): ?>
|
||||
<span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 0))->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_up,
|
||||
$selfUrl,
|
||||
array('host_state' => 0),
|
||||
array('title' => $this->translate('Hosts with state UP'))
|
||||
) ?>
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state UP',
|
||||
'List %u hosts which are currently in state UP',
|
||||
$this->stats->hosts_up
|
||||
),
|
||||
$this->stats->hosts_up
|
||||
))
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->stats->hosts_down_unhandled): ?>
|
||||
<span class="state critical<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 1, 'host_unhandled' => 1))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<?php if ($this->stats->hosts_down_unhandled): ?>
|
||||
<span class="state critical<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 1, 'host_unhandled' => 1))->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_down_unhandled,
|
||||
$selfUrl,
|
||||
array('host_state' => 1, 'host_unhandled' => 1),
|
||||
array('title' => $this->translate('Unhandled hosts with state DOWN'))
|
||||
) ?>
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_unhandled' => 1
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state DOWN',
|
||||
'List %u hosts which are currently in state DOWN',
|
||||
$this->stats->hosts_down_unhandled
|
||||
),
|
||||
$this->stats->hosts_down_unhandled
|
||||
))
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->stats->hosts_down_handled > 0): ?>
|
||||
<span class="state handled critical<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 1, 'host_unhandled' =>0))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_down_handled,
|
||||
$selfUrl,
|
||||
array('host_state' => 1, 'host_unhandled' => 0),
|
||||
array('title' => $this->translate('Handled hosts with state DOWN'))
|
||||
) ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->stats->hosts_down_handled): ?>
|
||||
<span class="state handled critical<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 1, 'host_unhandled' =>0))->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_down_handled,
|
||||
$selfUrl,
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_unhandled' => 0
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state DOWN (Acknowledged)',
|
||||
'List %u hosts which are currently in state DOWN (Acknowledged)',
|
||||
$this->stats->hosts_down_handled
|
||||
),
|
||||
$this->stats->hosts_down_handled
|
||||
))
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->stats->hosts_down): ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->stats->hosts_unreachable_unhandled): ?>
|
||||
<span class="state unknown<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 2, 'host_unhandled' => 1))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<span class="state unknown<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 2, 'host_unhandled' => 1))->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_unreachable_unhandled,
|
||||
$selfUrl,
|
||||
array('host_state' => 2, 'host_unhandled' => 1),
|
||||
array('title' => $this->translate('Unhandled hosts with state UNREACHABLE'))
|
||||
) ?>
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_unhandled' => 1
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state UNREACHABLE',
|
||||
'List %u hosts which are currently in state UNREACHABLE',
|
||||
$this->stats->hosts_unreachable_unhandled
|
||||
),
|
||||
$this->stats->hosts_unreachable_unhandled
|
||||
))
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->stats->hosts_unreachable_handled > 0): ?>
|
||||
<span class="state handled unknown<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 2, 'host_unhandled' => 0))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_unreachable_handled,
|
||||
$selfUrl,
|
||||
array('host_state' => 2, 'host_unhandled' => 0),
|
||||
array('title' => $this->translate('Handled hosts with state UNREACHABLE'))
|
||||
) ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if($this->stats->hosts_unreachable_handled > 0): ?>
|
||||
<span class="state handled unknown<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 2, 'host_unhandled' => 0))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_unreachable_handled,
|
||||
$selfUrl,
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_unhandled' => 0
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state UNREACHABLE (Acknowledged)',
|
||||
'List %u hosts which are currently in state UNREACHABLE (Acknowledged)',
|
||||
$this->stats->hosts_unreachable_handled
|
||||
),
|
||||
$this->stats->hosts_unreachable_handled
|
||||
))
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->stats->hosts_unreachable): ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->stats->hosts_pending): ?>
|
||||
<span class="state pending<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 99))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<span class="state pending<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 99))->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->hosts_pending,
|
||||
$selfUrl,
|
||||
array('host_state' => 99),
|
||||
array('title' => $this->translate('Hosts with state PENDING'))
|
||||
) ?>
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state PENDING',
|
||||
'List %u hosts which are currently in state PENDING',
|
||||
$this->stats->hosts_pending
|
||||
),
|
||||
$this->stats->hosts_pending
|
||||
))
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
|
@ -1,19 +1,29 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
$selfUrl = 'monitoring/list/services';
|
||||
$currentUrl = Url::fromRequest()->getRelativeUrl();
|
||||
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?= $this->qlink(sprintf($this->translate('%s services:'), $this->stats->services_total), $selfUrl) ?>
|
||||
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>>
|
||||
<?= sprintf($this->translate('%s services:'), $this->stats->services_total); ?>
|
||||
<span class="badges">
|
||||
<?php if ($this->stats->services_ok): ?>
|
||||
<span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('service_state' => 0))->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$this->stats->services_ok,
|
||||
$selfUrl,
|
||||
array('service_state' => 0),
|
||||
array('title' => sprintf($this->translate('Services with state %s'), $this->translate('OK')))
|
||||
) ?></span>
|
||||
<span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('service_state' => 0))->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->services_ok,
|
||||
$selfUrl,
|
||||
array('service_state' => 0),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state OK',
|
||||
'List %u services which are currently in state OK',
|
||||
$this->stats->services_ok
|
||||
),
|
||||
$this->stats->services_ok
|
||||
))
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $state) {
|
||||
|
@ -42,7 +52,15 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
$this->stats->$unhandled,
|
||||
$selfUrl,
|
||||
$paramsUnhandled,
|
||||
array('title' => sprintf($this->translate('Unhandled services with state %s'), $this->translate(strtoupper($state))))
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state %s',
|
||||
'List %u services which are currently in state %s',
|
||||
$this->stats->$unhandled
|
||||
),
|
||||
$this->stats->$unhandled,
|
||||
Service::getStateText($stateId, true)
|
||||
))
|
||||
);
|
||||
}
|
||||
if ($this->stats->$handled) {
|
||||
|
@ -59,7 +77,15 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
$this->stats->$handled,
|
||||
$selfUrl,
|
||||
$paramsHandled,
|
||||
array('title' => sprintf($this->translate('Handled services with state %s'), $this->translate(strtoupper($state))))
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state %s (Acknowledged)',
|
||||
'List %u services which are currently in state %s (Acknowledged)',
|
||||
$this->stats->$handled
|
||||
),
|
||||
$this->stats->$handled,
|
||||
Service::getStateText($stateId, true)
|
||||
))
|
||||
);
|
||||
if ($this->stats->$unhandled) {
|
||||
echo "</span>\n";
|
||||
|
@ -70,12 +96,21 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
}
|
||||
?>
|
||||
<?php if ($this->stats->services_pending): ?>
|
||||
<span class="state pending<?= $currentUrl === Url::fromPath($selfUrl, array('service_state' => 99))->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$this->stats->services_pending,
|
||||
$selfUrl,
|
||||
array('service_state' => 99),
|
||||
array('title' => sprintf($this->translate('Services with state %s'), $this->translate('PENDING')))
|
||||
) ?></span>
|
||||
<span class="state pending<?= $currentUrl === Url::fromPath($selfUrl, array('service_state' => 99))->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$this->stats->services_pending,
|
||||
$selfUrl,
|
||||
array('service_state' => 99),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state PENDING',
|
||||
'List %u services which are currently in state PENDING',
|
||||
$this->stats->services_pending
|
||||
),
|
||||
$this->stats->services_pending
|
||||
))
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -24,18 +24,21 @@ foreach ($groupData as $groupName => $groupInfo): ?>
|
|||
<?php foreach ($groupInfo['contacts'] as $c): ?>
|
||||
<div class="box entry">
|
||||
<?= $this->img('/static/gravatar', array('email' => $c->contact_email)); ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$c->contact_alias,
|
||||
'monitoring/show/contact',
|
||||
array('contact' => $c->contact_name)
|
||||
); ?>">
|
||||
<?= $this->escape($c->contact_alias) ?>
|
||||
</a>
|
||||
array('contact' => $c->contact_name),
|
||||
array('title' => sprintf(
|
||||
$this->translate('Show detailed information about %s'),
|
||||
$c->contact_alias
|
||||
))
|
||||
); ?>
|
||||
<p>
|
||||
<?php if ($c->contact_email): ?>
|
||||
<?= $c->contact_email; ?>
|
||||
<?php endif;
|
||||
if ($c->contact_pager): ?>
|
||||
<br />
|
||||
<br>
|
||||
<?= $c->contact_pager; ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
|
|
|
@ -11,24 +11,29 @@
|
|||
<h1 tabindex="-1"><?= $this->translate('Contacts') ?></h1>
|
||||
<?php
|
||||
if (count($contacts) === 0) {
|
||||
echo mt('monitoring', 'No contacts matching the filter');
|
||||
echo $this->translate('No contacts matching the filter');
|
||||
return;
|
||||
}
|
||||
foreach ($contacts as $contact): ?>
|
||||
<div class="contact">
|
||||
<?= $this->img('/static/gravatar', array('email' => $contact->contact_email)); ?>
|
||||
<a href="<?= $this->href(
|
||||
<strong><?= $this->qlink(
|
||||
$contact->contact_name,
|
||||
'monitoring/show/contact',
|
||||
array('contact' => $contact->contact_name)
|
||||
) ?>"><strong><?= $contact->contact_name ?></strong></a> (<?= $contact->contact_alias ?>)
|
||||
<div><?= sprintf(
|
||||
'%1$s: <a href="mailto:%2$s">%2$s</a>',
|
||||
mt('monitoring', 'Email'),
|
||||
$this->escape($contact->contact_email)
|
||||
) ?></div>
|
||||
array('contact' => $contact->contact_name),
|
||||
array('title' => sprintf(
|
||||
$this->translate('Show detailed information about %s'),
|
||||
$contact->contact_alias
|
||||
))
|
||||
); ?></strong> (<?= $contact->contact_alias; ?>)
|
||||
<div>
|
||||
<?= $this->translate('Email'); ?>: <a href="mailto:<?= $contact->contact_email; ?>" title="<?= sprintf($this->translate('Send a mail to %s'), $contact->contact_alias); ?>" aria-label="<?= sprintf($this->translate('Send a mail to %s'), $contact->contact_alias); ?>">
|
||||
<?= $this->escape($contact->contact_email); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php if ($contact->contact_pager): ?>
|
||||
<div>
|
||||
<?= mt('monitoring', 'Pager') ?>:
|
||||
<?= $this->translate('Pager') ?>:
|
||||
<?= $this->escape($contact->contact_pager) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -36,13 +41,13 @@
|
|||
<div class="notification-periods">
|
||||
<?php if ($contact->contact_notify_service_timeperiod): ?>
|
||||
<div>
|
||||
<?= mt('monitoring', 'Service notification period') ?>:
|
||||
<?= $this->translate('Service notification period') ?>:
|
||||
<?= $this->escape($contact->contact_notify_service_timeperiod) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($contact->contact_notify_host_timeperiod): ?>
|
||||
<div>
|
||||
<?= mt('monitoring', 'Host notification period') ?>:
|
||||
<?= $this->translate('Host notification period') ?>:
|
||||
<?= $this->escape($contact->contact_notify_host_timeperiod) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -21,39 +21,39 @@ use Icinga\Web\Widget\Chart\HistoryColorGrid;
|
|||
|
||||
$settings = array(
|
||||
'cnt_up' => array(
|
||||
'tooltip' => mt('monitoring', '%d ok on %s'),
|
||||
'tooltip' => $this->translate('%d hosts ok on %s'),
|
||||
'color' => '#49DF96',
|
||||
'opacity' => '0.55'
|
||||
),
|
||||
'cnt_unreachable_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d unreachable on %s'),
|
||||
'tooltip' => $this->translate('%d hosts unreachable on %s'),
|
||||
'color' => '#77AAFF',
|
||||
'opacity' => '0.55'
|
||||
),
|
||||
'cnt_critical_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d critical on %s'),
|
||||
'tooltip' => $this->translate('%d services critical on %s'),
|
||||
'color' => '#ff5566',
|
||||
'opacity' => '0.9'
|
||||
),
|
||||
|
||||
'cnt_warning_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d warning on %s'),
|
||||
'tooltip' => $this->translate('%d services warning on %s'),
|
||||
'color' => '#ffaa44',
|
||||
'opacity' => '1.0'
|
||||
),
|
||||
|
||||
'cnt_down_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d down on %s'),
|
||||
'tooltip' => $this->translate('%d hosts down on %s'),
|
||||
'color' => '#ff5566',
|
||||
'opacity' => '0.9'
|
||||
),
|
||||
'cnt_unknown_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d unknown on %s'),
|
||||
'tooltip' => $this->translate('%d services unknown on %s'),
|
||||
'color' => '#cc77ff',
|
||||
'opacity' => '0.7'
|
||||
),
|
||||
'cnt_ok' => array(
|
||||
'tooltip' => mt('monitoring', '%d ok on %s'),
|
||||
'tooltip' => $this->translate('%d services ok on %s'),
|
||||
'color' => '#49DF96',
|
||||
'opacity' => '0.55'
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ if ($to - $from > 315360000) {
|
|||
$data = array();
|
||||
|
||||
if (count($summary) === 0) {
|
||||
echo mt('monitoring', 'No state changes in the selected time period.');
|
||||
echo $this->translate('No state changes in the selected time period.');
|
||||
}
|
||||
foreach ($summary as $entry) {
|
||||
$day = $entry->day;
|
||||
|
|
|
@ -78,39 +78,53 @@
|
|||
</td>
|
||||
<?php endif ?>
|
||||
<td class="groupname">
|
||||
<a href="<?= $this->href('monitoring/list/hosts', array('hostgroup' => $h->hostgroup)); ?>">
|
||||
<?= $this->escape($h->hostgroup_alias) ?>
|
||||
</a>
|
||||
<?= $this->qlink(
|
||||
$h->hostgroup_alias,
|
||||
'monitoring/list/hosts',
|
||||
array('hostgroup' => $h->hostgroup),
|
||||
array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $h->hostgroup_alias))
|
||||
); ?>
|
||||
</td>
|
||||
<td class="total">
|
||||
<?= $this->qlink($h->services_total, 'monitoring/list/services', array('hostgroup' => $h->hostgroup)) ?>
|
||||
<?= $this->qlink(
|
||||
$h->services_total,
|
||||
'monitoring/list/services',
|
||||
array('hostgroup' => $h->hostgroup),
|
||||
array('title' => sprintf(
|
||||
$this->translate('List all services of all hosts in host group "%s"'),
|
||||
$h->hostgroup_alias
|
||||
))
|
||||
); ?>
|
||||
</td>
|
||||
<td class="state">
|
||||
<?php if ($h->services_ok): ?>
|
||||
<span class="state ok">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_ok,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 0,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?= printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status ok in host group %s',
|
||||
'List %u services with status ok in host group %s',
|
||||
$h->services_ok
|
||||
),
|
||||
$h->services_ok,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_ok; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state OK on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state OK on hosts in the host group "%s"',
|
||||
$h->services_ok
|
||||
),
|
||||
$h->services_ok,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($h->services_critical_unhandled): ?>
|
||||
<span class="state critical">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_critical_unhandled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
|
@ -119,40 +133,43 @@
|
|||
'host_problem' => 0,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status critical unhandled in host group %s',
|
||||
'List %u services with status critical unhandled in host group %s',
|
||||
$h->services_critical_unhandled
|
||||
),
|
||||
$h->services_critical_unhandled,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_critical_unhandled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state CRITICAL on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state CRITICAL on hosts in the host group "%s"',
|
||||
$h->services_critical_unhandled
|
||||
),
|
||||
$h->services_critical_unhandled,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($h->services_critical_handled): ?>
|
||||
<span class="state critical handled">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_critical_handled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 1,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status critical handled in host group %s',
|
||||
'List %u services with status critical handled in host group %s',
|
||||
$h->services_critical_handled
|
||||
),
|
||||
$h->services_critical_handled,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_critical_handled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state CRITICAL (Acknowledged) on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state CRITICAL (Acknowledged) on hosts in the host group "%s"',
|
||||
$h->services_critical_handled
|
||||
),
|
||||
$h->services_critical_handled,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($h->services_critical_unhandled): ?>
|
||||
|
@ -160,7 +177,8 @@
|
|||
<?php endif ?>
|
||||
<?php if ($h->services_unknown_unhandled): ?>
|
||||
<span class="state unknown">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_unknown_unhandled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
|
@ -169,40 +187,43 @@
|
|||
'host_problem' => 0,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status unknown unhandled in host group %s',
|
||||
'List %u services with status unknown unhandled in host group %s',
|
||||
$h->services_unknown_unhandled
|
||||
),
|
||||
$h->services_unknown_unhandled,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_unknown_unhandled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state UNKNOWN on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state UNKNOWN on hosts in the host group "%s"',
|
||||
$h->services_unknown_unhandled
|
||||
),
|
||||
$h->services_unknown_unhandled,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($h->services_unknown_handled): ?>
|
||||
<span class="state unknown handled">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_unknown_handled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 1,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status unknown handled in host group %s',
|
||||
'List %u services with status unknown handled in host group %s',
|
||||
$h->services_unknown_handled
|
||||
),
|
||||
$h->services_unknown_handled,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_unknown_handled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state UNKNOWN (Acknowledged) on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state UNKNOWN (Acknowledged) on hosts in the host group "%s"',
|
||||
$h->services_unknown_handled
|
||||
),
|
||||
$h->services_unknown_handled,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($h->services_unknown_unhandled): ?>
|
||||
|
@ -210,7 +231,8 @@
|
|||
<?php endif ?>
|
||||
<?php if ($h->services_warning_unhandled): ?>
|
||||
<span class="state warning">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_warning_unhandled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
|
@ -219,40 +241,43 @@
|
|||
'host_problem' => 0,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status warning unhandled in host group %s',
|
||||
'List %u services with status warning unhandled in host group %s',
|
||||
$h->services_warning_unhandled
|
||||
),
|
||||
$h->services_warning_unhandled,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_warning_unhandled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state WARNING on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state WARNING on hosts in the host group "%s"',
|
||||
$h->services_warning_unhandled
|
||||
),
|
||||
$h->services_warning_unhandled,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($h->services_warning_handled): ?>
|
||||
<span class="state warning handled">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_warning_handled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status warning handled in host group %s',
|
||||
'List %u services with status warning handled in host group %s',
|
||||
$h->services_warning_handled
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
$h->services_warning_handled,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_warning_handled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state WARNING (Acknowledged) on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state WARNING (Acknowledged) on hosts in the host group "%s"',
|
||||
$h->services_warning_handled
|
||||
),
|
||||
$h->services_warning_handled,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($h->services_warning_unhandled): ?>
|
||||
|
@ -260,24 +285,26 @@
|
|||
<?php endif ?>
|
||||
<?php if ($h->services_pending): ?>
|
||||
<span class="state pending">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$h->services_pending,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 99,
|
||||
'hostgroup' => $h->hostgroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %u service with status pending in host group %s',
|
||||
'List %u services with status pending in host group %s',
|
||||
$h->services_pending
|
||||
),
|
||||
$h->services_pending,
|
||||
$h->hostgroup
|
||||
); ?>">
|
||||
<?= $h->services_pending; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state PENDING on hosts in the host group "%s"',
|
||||
'List %u services which are currently in state PENDING on hosts in the host group "%s"',
|
||||
$h->services_pending
|
||||
),
|
||||
$h->services_pending,
|
||||
$h->hostgroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
|
|
|
@ -95,11 +95,18 @@ if ($hosts->count() === 0) {
|
|||
<?= $this->icon($this->resolveMacros($host->host_icon_image, $host)) ?>
|
||||
<?php endif ?>
|
||||
<?= implode(' ', $icons) ?>
|
||||
<a href="<?= $hostLink ?>"><?= $this->escape($host->host_display_name) ?></a>
|
||||
<?= $this->qlink(
|
||||
$host->host_display_name,
|
||||
$hostLink,
|
||||
null,
|
||||
array(
|
||||
'title' => sprintf($this->translate('Show detailed information for host %s'), $host->host_display_name)
|
||||
)
|
||||
); ?>
|
||||
<?php if (isset($host->host_unhandled_services) && $host->host_unhandled_services > 0): ?>
|
||||
<span> (<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%d unhandled service', '%d unhandled services', $host->host_unhandled_services),
|
||||
$this->translatePlural('%u unhandled service', '%u unhandled services', $host->host_unhandled_services),
|
||||
$host->host_unhandled_services
|
||||
),
|
||||
'monitoring/show/services',
|
||||
|
@ -112,8 +119,8 @@ if ($hosts->count() === 0) {
|
|||
'style' => 'font-weight: normal',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service problem on host %s',
|
||||
'List %s service problems on host %s',
|
||||
'List %s unhandled service problem on host %s',
|
||||
'List %s unhandled service problems on host %s',
|
||||
$host->host_unhandled_services
|
||||
),
|
||||
$host->host_unhandled_services,
|
||||
|
|
|
@ -36,18 +36,23 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
|||
); ?></th>
|
||||
<th colspan="<?= count($serviceStates); ?>">
|
||||
<div>
|
||||
<?php foreach (array_keys($serviceStates) as $service_description): ?>
|
||||
<?php
|
||||
$serviceDescriptions = array_keys($serviceStates);
|
||||
$serviceFilter = '(service_description=' . implode('|service_description=', $serviceDescriptions) . ')';
|
||||
|
||||
foreach ($serviceDescriptions as $service_description): ?>
|
||||
<span>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
<?= $this->qlink(
|
||||
'<abbr>' . (strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description) . '</abbr>',
|
||||
'monitoring/list/services?' . $hostFilter,
|
||||
array(
|
||||
'service_description' => $service_description
|
||||
)
|
||||
) . '&' . $hostFilter; ?>">
|
||||
<abbr title="<?= $service_description; ?>">
|
||||
<?= strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description; ?>
|
||||
</abbr>
|
||||
</a>
|
||||
),
|
||||
array(
|
||||
'title' => sprintf($this->translate('List all services with the name "%s" on all reported hosts'), $service_description)
|
||||
),
|
||||
false
|
||||
); ?>
|
||||
</span>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
@ -59,18 +64,40 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
|||
<?php endif ?>
|
||||
<tr>
|
||||
<th>
|
||||
<a href="<?= $this->href('monitoring/show/services', array('host' => $host_name)); ?>"><?= $host_name; ?></a>
|
||||
<?= $this->qlink(
|
||||
$host_name,
|
||||
'monitoring/show/services?' . $serviceFilter,
|
||||
array('host' => $host_name),
|
||||
array('title' => sprintf($this->translate('List all reported services on host %s'), $host_name))
|
||||
); ?>
|
||||
</th>
|
||||
<?php foreach (array_values($serviceStates) as $service): ?>
|
||||
<?php if ($service !== null): ?>
|
||||
<td>
|
||||
<a href="<?= $this->href('monitoring/show/service', array(
|
||||
'host' => $service->host_name,
|
||||
'service' => $service->service_description
|
||||
)); ?>" title="<?= $this->escape($service->service_output); ?>" class="state_<?= Service::getStateText($service->service_state); ?> <?= $service->service_handled ? 'handled' : ''; ?>"></a>
|
||||
<span class="sr-only" id="<?= $service->host_name . '_' . $service->service_description . '_desc'; ?>">
|
||||
<?= $this->escape($service->service_output); ?>
|
||||
</span>
|
||||
<?= $this->qlink(
|
||||
'',
|
||||
'monitoring/show/service',
|
||||
array(
|
||||
'host' => $service->host_name,
|
||||
'service' => $service->service_description
|
||||
),
|
||||
array(
|
||||
'aria-describedby' => $service->host_name . '_' . $service->service_description . '_desc',
|
||||
'class' => 'state_' . Service::getStateText($service->service_state). ($service->service_handled ? ' handled' : ''),
|
||||
'title' => $this->escape($service->service_output),
|
||||
'aria-label' => sprintf(
|
||||
$this->translate('Show detailed information for service %s on host %s'),
|
||||
$service->service_description,
|
||||
$service->host_name
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td>·</td>
|
||||
<td><span aria-hidden="true">·</span></td>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
|
|
|
@ -78,9 +78,12 @@
|
|||
</td>
|
||||
<?php endif ?>
|
||||
<td class="groupname">
|
||||
<a href="<?= $this->href('monitoring/list/services', array('servicegroup' => $s->servicegroup)); ?>">
|
||||
<?= $this->translate($s->servicegroup_alias) ?>
|
||||
</a>
|
||||
<?= $this->qlink(
|
||||
$s->servicegroup_alias,
|
||||
'monitoring/list/services',
|
||||
array('servicegroup' => $s->servicegroup),
|
||||
array('title' => sprintf($this->translate('List all services in the group "%s"'), $s->servicegroup_alias))
|
||||
); ?>
|
||||
</td>
|
||||
<td class="total">
|
||||
<?= $s->services_total; ?>
|
||||
|
@ -88,29 +91,32 @@
|
|||
<td class="state">
|
||||
<?php if ($s->services_ok): ?>
|
||||
<span class="state ok">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_ok,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 0,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status ok in service group %s',
|
||||
'List %s Services with status ok in service group %s',
|
||||
$s->services_ok
|
||||
),
|
||||
$s->services_ok,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_ok; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currently in state OK in service group "%s"',
|
||||
'List %s services which are currently in state OK in service group "%s"',
|
||||
$s->services_ok
|
||||
),
|
||||
$s->services_ok,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($s->services_critical_unhandled): ?>
|
||||
<span class="state critical">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_critical_unhandled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
|
@ -119,40 +125,43 @@
|
|||
'host_problem' => 0,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status critical unhandled in service group %s',
|
||||
'List %s Services with status critical unhandled in service group %s',
|
||||
$s->services_critical_unhandled
|
||||
),
|
||||
$s->services_critical_unhandled,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_critical_unhandled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currently in state CRITICAL in service group "%s"',
|
||||
'List %s services which are currently in state CRITICAL in service group "%s"',
|
||||
$s->services_critical_unhandled
|
||||
),
|
||||
$s->services_critical_unhandled,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($s->services_critical_handled): ?>
|
||||
<span class="state critical handled">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_critical_handled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 1,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status critical handled in service group %s',
|
||||
'List %s services with status critical handled in service group %s',
|
||||
$s->services_critical_handled
|
||||
),
|
||||
$s->services_critical_handled,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_critical_handled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currently in state CRITICAL (Acknowledged) in service group "%s"',
|
||||
'List %s services which are currently in state CRITICAL (Acknowledged) in service group "%s"',
|
||||
$s->services_critical_handled
|
||||
),
|
||||
$s->services_critical_handled,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($s->services_critical_unhandled): ?>
|
||||
|
@ -160,7 +169,8 @@
|
|||
<?php endif ?>
|
||||
<?php if ($s->services_unknown_unhandled): ?>
|
||||
<span class="state unknown">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_unknown_unhandled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
|
@ -169,40 +179,43 @@
|
|||
'host_problem' => 0,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status unknown unhandled in service group %s',
|
||||
'List %s services with status unknown unhandled in service group %s',
|
||||
$s->services_unknown_unhandled
|
||||
),
|
||||
$s->services_unknown_unhandled,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_unknown_unhandled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currently in state UNKNOWN in service group "%s"',
|
||||
'List %s services which are currently in state UNKNOWN in service group "%s"',
|
||||
$s->services_unknown_unhandled
|
||||
),
|
||||
$s->services_unknown_unhandled,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($s->services_unknown_handled): ?>
|
||||
<span class="state unknown handled">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_unknown_handled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 1,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status unknown handled in service group %s',
|
||||
'List %s services with status unknown handled in service group %s',
|
||||
$s->services_unknown_handled
|
||||
),
|
||||
$s->services_unknown_handled,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_unknown_handled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currently in state UNKNOWN (Acknowledged) in service group "%s"',
|
||||
'List %s services which are currently in state UNKNOWN (Acknowledged) in service group "%s"',
|
||||
$s->services_unknown_handled
|
||||
),
|
||||
$s->services_unknown_handled,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($s->services_unknown_unhandled): ?>
|
||||
|
@ -210,7 +223,8 @@
|
|||
<?php endif ?>
|
||||
<?php if ($s->services_warning_unhandled): ?>
|
||||
<span class="state warning">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_warning_unhandled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
|
@ -219,40 +233,43 @@
|
|||
'host_problem' => 0,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status warning unhandled in service group %s',
|
||||
'List %s services with status warning unhandled in service group %s',
|
||||
$s->services_warning_unhandled
|
||||
),
|
||||
$s->services_warning_unhandled,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_warning_unhandled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currently in state WARNING in service group "%s"',
|
||||
'List %s services which are currently in state WARNING in service group "%s"',
|
||||
$s->services_warning_unhandled
|
||||
),
|
||||
$s->services_warning_unhandled,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($s->services_warning_handled): ?>
|
||||
<span class="state warning handled">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_warning_handled,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status warning handled in service group %s',
|
||||
'List %s services with status warning handled in service group %s',
|
||||
$s->services_warning_handled
|
||||
),
|
||||
$s->services_warning_handled,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_warning_handled; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currently in state WARNING (Acknowledged) in service group "%s"',
|
||||
'List %s services which are currently in state WARNING (Acknowledged) in service group "%s"',
|
||||
$s->services_warning_handled
|
||||
),
|
||||
$s->services_warning_handled,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($s->services_warning_unhandled): ?>
|
||||
|
@ -260,24 +277,26 @@
|
|||
<?php endif ?>
|
||||
<?php if ($s->services_pending): ?>
|
||||
<span class="state pending">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$s->services_pending,
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 99,
|
||||
'servicegroup' => $s->servicegroup,
|
||||
'sort' => 'service_severity'
|
||||
)
|
||||
); ?>" title="<?php printf(
|
||||
$this->translatePlural(
|
||||
'List %s service with status pending in service group %s',
|
||||
'List %s services with status pending in service group %s',
|
||||
$s->services_pending
|
||||
),
|
||||
$s->services_pending,
|
||||
$s->servicegroup
|
||||
); ?>">
|
||||
<?= $s->services_pending; ?>
|
||||
</a>
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %s service that is currenlty in state PENDING in service group "%s"',
|
||||
'List %s services which are currently in state PENDING in service group "%s"',
|
||||
$s->services_pending
|
||||
),
|
||||
$s->services_pending,
|
||||
$s->servicegroup_alias
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
|
|
|
@ -101,13 +101,23 @@ foreach ($services as $service):
|
|||
<?php endif ?>
|
||||
|
||||
<?php if ($service->service_icon_image && ! preg_match('/[\'"]/', $service->service_icon_image)): ?>
|
||||
<?= $this->icon($this->resolveMacros($service->service_icon_image, $service)) ?>
|
||||
<?= $this->icon($this->resolveMacros($service->service_icon_image, $service)) ?>
|
||||
<?php endif ?>
|
||||
<a href="<?= $serviceLink ?>"><?= $this->escape($service->service_display_name) ?></a><?php if ($this->showHost): ?> on <a href="<?= $hostLink ?>"><?= $this->escape($service->host_display_name) ?>
|
||||
<?php if ($service->host_state != 0): ?>
|
||||
(<?= Host::getStateText($service->host_state, true); ?>)
|
||||
<?php endif ?>
|
||||
</a><?php endif ?><br />
|
||||
<?= $this->qlink(
|
||||
$service->service_display_name,
|
||||
$serviceLink,
|
||||
null,
|
||||
array('title' => sprintf(
|
||||
$this->translate('Show detailed information for service %s on host %s'),
|
||||
$service->service_display_name,
|
||||
$service->host_display_name
|
||||
))
|
||||
); ?><?php if ($this->showHost): ?> on <?= $this->qlink(
|
||||
$service->host_display_name . ($service->host_state != 0 ? ' (' . Host::getStateText($service->host_state, true) . ')' : ''),
|
||||
$hostLink,
|
||||
null,
|
||||
array('title' => sprintf($this->translate('Show detailed information for host %s'), $service->host_display_name))
|
||||
); ?><?php endif ?><br>
|
||||
<p class="pluginoutput"><?= $this->escape($this->ellipsis($service->service_output, 10000)); ?></p>
|
||||
</td>
|
||||
<?php foreach($this->extraColumns as $col): ?>
|
||||
|
|
|
@ -1,23 +1,54 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
$selfUrl = Url::fromPath('monitoring/show/services', array('host' => $this->object->host_name));
|
||||
$selfUrl = Url::fromPath('monitoring/show/services', array('host' => $object->host_name));
|
||||
$currentUrl = Url::fromRequest()->without('limit')->getRelativeUrl();
|
||||
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?php if ($object->stats->services_total > 0): ?>
|
||||
<?= $this->qlink(sprintf($this->translatePlural('%d configured service:', '%d configured services:', $object->stats->services_total), $object->stats->services_total), $selfUrl) ?>
|
||||
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>>
|
||||
<?php if ($object->stats->services_total): ?>
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u configured service:',
|
||||
'%u configured services:',
|
||||
$object->stats->services_total
|
||||
),
|
||||
$object->stats->services_total
|
||||
),
|
||||
$selfUrl,
|
||||
null,
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List all %u service on host %s',
|
||||
'List all %u services on host %s',
|
||||
$object->stats->services_total
|
||||
),
|
||||
$object->stats->services_total,
|
||||
$object->host_name
|
||||
))
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= $this->translate('No services configured on this host'); ?>
|
||||
<?php endif; ?>
|
||||
<span class="badges">
|
||||
<?php if ($object->stats->services_ok > 0): ?>
|
||||
<span class="state ok<?= $currentUrl === $selfUrl->with('service_state', 0)->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$object->stats->services_ok,
|
||||
$selfUrl,
|
||||
array('service_state' => 0),
|
||||
array('title' => sprintf($this->translate('Services with state %s'), $this->translate('OK')))
|
||||
) ?></span>
|
||||
<?php if ($object->stats->services_ok): ?>
|
||||
<span class="state ok<?= $currentUrl === $selfUrl->with('service_state', 0)->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$object->stats->services_ok,
|
||||
$selfUrl,
|
||||
array('service_state' => 0),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state OK on host %s',
|
||||
'List %u services which are currently in state OK on host %s',
|
||||
$object->stats->services_ok
|
||||
),
|
||||
$object->stats->services_ok,
|
||||
$object->host_name
|
||||
))
|
||||
); ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $state) {
|
||||
|
@ -46,7 +77,16 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
$object->stats->$unhandled,
|
||||
$selfUrl,
|
||||
$paramsUnhandled,
|
||||
array('title' => sprintf($this->translate('Unhandled services with state %s'), $this->translate(strtoupper($state))))
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state %s on host %s',
|
||||
'List %u services which are currently in state %s on host %s',
|
||||
$object->stats->$unhandled
|
||||
),
|
||||
$object->stats->$unhandled,
|
||||
Service::getStateText($stateId, true),
|
||||
$object->host_name
|
||||
))
|
||||
);
|
||||
}
|
||||
if ($object->stats->$handled) {
|
||||
|
@ -63,7 +103,16 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
$object->stats->$handled,
|
||||
$selfUrl,
|
||||
$paramsHandled,
|
||||
array('title' => sprintf($this->translate('Handled services with state %s'), $this->translate(strtoupper($state))))
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state %s (Acknowledged) on host %s',
|
||||
'List %u services which are currently in state %s (Acknowledged) on host %s',
|
||||
$object->stats->$handled
|
||||
),
|
||||
$object->stats->$handled,
|
||||
Service::getStateText($stateId, true),
|
||||
$object->host_name
|
||||
))
|
||||
);
|
||||
if ($object->stats->$unhandled) {
|
||||
echo "</span>\n";
|
||||
|
@ -74,12 +123,22 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
}
|
||||
?>
|
||||
<?php if ($object->stats->services_pending): ?>
|
||||
<span class="state pending<?= $currentUrl === $selfUrl->with('service_state', 99)->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$object->stats->services_pending,
|
||||
$selfUrl,
|
||||
array('service_state' => 99),
|
||||
array('title' => sprintf($this->translate('Services with state %s'), $this->translate('PENDING')))
|
||||
) ?></span>
|
||||
<span class="state pending<?= $currentUrl === $selfUrl->with('service_state', 99)->getRelativeUrl() ? ' active' : ''; ?>">
|
||||
<?= $this->qlink(
|
||||
$object->stats->services_pending,
|
||||
$selfUrl,
|
||||
array('service_state' => 99),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state PENDING on host %s',
|
||||
'List %u services which are currently in state PENDING on host %s',
|
||||
$object->stats->services_pending
|
||||
),
|
||||
$object->stats->services_pending,
|
||||
$object->host_name
|
||||
))
|
||||
) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
|
@ -1,159 +1,116 @@
|
|||
<div class="controls">
|
||||
<?= $this->render('partials/service/objects-header.phtml') ?>
|
||||
<?= $this->render('partials/service/objects-header.phtml'); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if (($serviceCount = count($objects)) === 0): ?>
|
||||
<?= $this->translate('No services matching the filter') ?>
|
||||
<?= $this->translate('No services matching the filter'); ?>
|
||||
<?php else: ?>
|
||||
|
||||
<h3><?= sprintf($this->translatePlural('%u Service', '%u Services', $serviceCount), $serviceCount); ?></h3>
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('List all %u services'), $serviceCount),
|
||||
$listAllLink
|
||||
); ?></div>
|
||||
<div>
|
||||
<a href="<?= $listAllLink ?>" title="<?= sprintf($this->translate('List all %u services'), $serviceCount) ?>">
|
||||
<?= $this->translate('List all') ?>
|
||||
</a>
|
||||
<?= $checkNowForm; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('Reschedule the next check for all %u services'), $serviceCount),
|
||||
$rescheduleAllLink,
|
||||
null,
|
||||
array('icon' => 'reschedule')
|
||||
); ?></div>
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('Schedule a downtime for all %u services'), $serviceCount),
|
||||
$downtimeAllLink,
|
||||
null,
|
||||
array('icon' => 'plug')
|
||||
); ?></div>
|
||||
<div><?= $this->qlink(
|
||||
sprintf($this->translate('Submit a passive check result for all %u services'), $serviceCount),
|
||||
$processCheckResultAllLink,
|
||||
null,
|
||||
array('icon' => 'reply')
|
||||
); ?></div>
|
||||
<?php if (($unhandledCount = count($unhandledObjects)) > 0): ?>
|
||||
<div>
|
||||
<?= $checkNowForm ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="<?= $rescheduleAllLink ?>">
|
||||
<?= $this->icon('reschedule'); ?>
|
||||
<?= $this->translate('Reschedule service checks') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="<?= $downtimeAllLink ?>">
|
||||
<?= $this->icon('plug'); ?>
|
||||
<?= $this->translate('Schedule service downtimes') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="<?= $processCheckResultAllLink; ?>">
|
||||
<?= $this->icon('reply'); ?>
|
||||
<?= $this->translate('Submit passive check results'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if (! empty($unhandledObjects)): ?>
|
||||
<h3>
|
||||
<?php $unhandledCount = count($unhandledObjects) ?>
|
||||
<?= sprintf(
|
||||
<h3><?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Unhandled Service Problem',
|
||||
'%u Unhandled Service Problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>
|
||||
</h3>
|
||||
<div>
|
||||
<a href="<?= $downtimeUnhandledLink ?>" title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'Schedule downtime for %u unhandled service problem',
|
||||
'Schedule downtimes for %u unhandled service problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>">
|
||||
<?= $this->icon('plug'); ?>
|
||||
<?= sprintf(
|
||||
); ?></h3>
|
||||
<div><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'Schedule downtime for unhandled service problem',
|
||||
'Schedule downtimes for unhandled service problems',
|
||||
'Schedule a downtime for %u unhandled service problem',
|
||||
'Schedule a downtime for %u unhandled service problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="<?= $acknowledgeUnhandledLink ?>" title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'Acknowledge %u unhandled service problem',
|
||||
'Acknowledge %u unhandled service problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>">
|
||||
<?= $this->icon('ok'); ?>
|
||||
<?= sprintf(
|
||||
$downtimeUnhandledLink,
|
||||
null,
|
||||
array('icon' => 'plug')
|
||||
); ?></div>
|
||||
<div><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'Acknowledge unhandled service problem',
|
||||
'Acknowledge unhandled service problems',
|
||||
'Acknowledge %u unhandled service problem',
|
||||
'Acknowledge %u unhandled service problems',
|
||||
$unhandledCount
|
||||
),
|
||||
$unhandledCount
|
||||
) ?>
|
||||
</a>
|
||||
),
|
||||
$acknowledgeUnhandledLink,
|
||||
null,
|
||||
array('icon' => 'ok')
|
||||
); ?></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($acknowledgedObjects)): ?>
|
||||
<h2>
|
||||
<?php $acknowledgedCount = count($acknowledgedObjects) ?>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Acknowledged Service Problem',
|
||||
'%u Acknowledged Service Problems',
|
||||
$acknowledgedCount
|
||||
),
|
||||
<?php endif ?>
|
||||
<?php if (($acknowledgedCount = count($acknowledgedObjects)) > 0): ?>
|
||||
<div>
|
||||
<h2><?= sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Acknowledged Service Problem',
|
||||
'%u Acknowledged Service Problems',
|
||||
$acknowledgedCount
|
||||
) ?>
|
||||
</h2>
|
||||
<div>
|
||||
<?= $removeAckForm ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($objectsInDowntime)): ?>
|
||||
<h2>
|
||||
<?php $inDowntimeCount = count($objectsInDowntime) ?>
|
||||
<a href="<?= $inDowntimeLink ?>" title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service currently in downtime',
|
||||
'List %u services currently in downtime',
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeCount) ?>">
|
||||
<?= $this->icon('plug'); ?>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service currently in downtime',
|
||||
'List %u services currently in downtime',
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeCount
|
||||
) ?>
|
||||
</a>
|
||||
</h2>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $commentCount = count($objects->getComments()) ?>
|
||||
<?php if ($commentCount): ?>
|
||||
<h2>
|
||||
<a href="<?= $commentsLink ?>" title="<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service comment',
|
||||
'List %u service comments',
|
||||
$commentCount
|
||||
),
|
||||
),
|
||||
$acknowledgedCount
|
||||
); ?></h2>
|
||||
<?= $removeAckForm ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service currently in downtime',
|
||||
'List %u services currently in downtime',
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeCount
|
||||
),
|
||||
$inDowntimeLink,
|
||||
null,
|
||||
array('icon' => 'plug')
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<?php if (($commentCount = count($objects->getComments())) > 0): ?>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service comment',
|
||||
'List %u service comments',
|
||||
$commentCount
|
||||
) ?>">
|
||||
<?= $this->icon('comment'); ?>
|
||||
<?= sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service comment',
|
||||
'List %u service comments',
|
||||
$commentCount
|
||||
),
|
||||
$commentCount
|
||||
) ?>
|
||||
</a>
|
||||
</h2>
|
||||
<?php endif ?>
|
||||
),
|
||||
$commentCount
|
||||
),
|
||||
$commentsLink,
|
||||
null,
|
||||
array('icon' => 'comment')
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
|
@ -35,9 +35,17 @@ if ($object->acknowledged): ?>
|
|||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $ackLink ?>" data-base-target="_self">
|
||||
<?= $this->icon('ok') ?> <?= $this->translate('Acknowledge') ?>
|
||||
</a>
|
||||
<?= $this->qlink(
|
||||
$this->translate('Acknowledge'),
|
||||
$ackLink,
|
||||
null,
|
||||
array(
|
||||
'icon' => 'ok',
|
||||
'title' => $this->translate(
|
||||
'Acknowledge this problem, suppress all future notifications for it and tag it as being handled'
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php } else {
|
||||
echo '-';
|
||||
} // endif ?>
|
||||
|
|
|
@ -28,23 +28,33 @@ if ($object->getType() === $object::TYPE_HOST) {
|
|||
<td>
|
||||
<?php if ($this->hasPermission('monitoring/command/schedule-check')) {
|
||||
if ($isService) {
|
||||
$reschedule = $this->href(
|
||||
echo $this->qlink(
|
||||
$this->translate('Reschedule'),
|
||||
'monitoring/service/reschedule-check',
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reschedule',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule the next active check at a different time than the current one'
|
||||
)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$reschedule = $this->href(
|
||||
echo $this->qlink(
|
||||
$this->translate('Reschedule'),
|
||||
'monitoring/host/reschedule-check',
|
||||
array('host' => $object->getName())
|
||||
array('host' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reschedule',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule the next active check at a different time than the current one'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $reschedule ?>" data-base-target="_self">
|
||||
<?= $this->icon('reschedule') ?>
|
||||
<?= $this->translate('Reschedule') ?>
|
||||
</a>
|
||||
<?php } // endif ?>
|
||||
<?= $this->timeUntil($object->next_check) ?>
|
||||
} ?> <?= $this->timeUntil($object->next_check) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -6,26 +6,35 @@ $command = array_shift($parts);
|
|||
?>
|
||||
|
||||
<tr class="newsection">
|
||||
<th><?= $this->translate('Command') ?></th>
|
||||
<th><?= $this->translate('Command'); ?></th>
|
||||
<td>
|
||||
<?= $this->escape($command) ?>
|
||||
<?php if ($this->hasPermission('monitoring/command/schedule-check') && $object->passive_checks_enabled): ?>
|
||||
<?php if ($object->getType() === $object::TYPE_HOST) {
|
||||
$processCheckResult = $this->href(
|
||||
<?= $this->escape($command); ?>
|
||||
<?php if ($this->hasPermission('monitoring/command/schedule-check') && $object->passive_checks_enabled) {
|
||||
$title = sprintf($this->translate('Submit a one time or so called passive result for the %s check'), $command);
|
||||
if ($object->getType() === $object::TYPE_HOST) {
|
||||
echo $this->qlink(
|
||||
$this->translate('Process check result'),
|
||||
'monitoring/host/process-check-result',
|
||||
array('host' => $object->getName())
|
||||
array('host' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reply',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $title
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$processCheckResult = $this->href(
|
||||
echo $this->qlink(
|
||||
$this->translate('Process check result'),
|
||||
'monitoring/service/process-check-result',
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reply',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $title
|
||||
)
|
||||
);
|
||||
} ?>
|
||||
<a href="<?= $processCheckResult ?>" data-base-target="_self">
|
||||
<?= $this->icon('reply') ?>
|
||||
<?= $this->translate('Process check result') ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
}
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -1,27 +1,34 @@
|
|||
<tr>
|
||||
<th><?= $this->translate('Comments') ?></th>
|
||||
<th><?= $this->translate('Comments'); ?></th>
|
||||
<td>
|
||||
<?php if ($this->hasPermission('monitoring/command/comment/add')) {
|
||||
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||
if ($object->getType() === $object::TYPE_HOST) {
|
||||
$addCommentLink = $this->href(
|
||||
echo $this->qlink(
|
||||
$this->translate('Add comment'),
|
||||
'monitoring/host/add-comment',
|
||||
array('host' => $object->getName())
|
||||
array('host' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'comment',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate('Add a new comment to this host')
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$addCommentLink = $this->href(
|
||||
echo $this->qlink(
|
||||
$this->translate('Add comment'),
|
||||
'monitoring/service/add-comment',
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'comment',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate('Add a new comment to this service')
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $addCommentLink ?>" data-base-target="_self">
|
||||
<?= $this->icon('comment') ?>
|
||||
<?= $this->translate('Add comment') ?>
|
||||
</a>
|
||||
<?php } else {
|
||||
} else {
|
||||
echo '-';
|
||||
} // endif ?>
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -4,9 +4,12 @@ if (! empty($object->contacts)) {
|
|||
|
||||
$list = array();
|
||||
foreach ($object->contacts as $contact) {
|
||||
$list[] = $this->qlink($contact->contact_alias, 'monitoring/show/contact', array(
|
||||
'contact' => $contact->contact_name
|
||||
));
|
||||
$list[] = $this->qlink(
|
||||
$contact->contact_alias,
|
||||
'monitoring/show/contact',
|
||||
array('contact' => $contact->contact_name),
|
||||
array('title' => sprintf($this->translate('Show detailed information about %s'), $contact->contact_alias))
|
||||
);
|
||||
}
|
||||
|
||||
printf(
|
||||
|
@ -24,7 +27,8 @@ if (! empty($object->contactgroups)) {
|
|||
$list[] = $this->qlink(
|
||||
$contactgroup->contactgroup_alias,
|
||||
'monitoring/list/contactgroups',
|
||||
array('contactgroup' => $contactgroup->contactgroup_name)
|
||||
array('contactgroup' => $contactgroup->contactgroup_name),
|
||||
array('title' => sprintf($this->translate('List contacts in contact-group "%s"'), $contactgroup->contactgroup_alias))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,38 @@
|
|||
<tr>
|
||||
<th><?= $this->translate('Downtimes') ?></th>
|
||||
<th><?= $this->translate('Downtimes'); ?></th>
|
||||
<td>
|
||||
<?php if ($this->hasPermission('monitoring/command/downtime/schedule')) {
|
||||
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||
if ($object->getType() === $object::TYPE_HOST) {
|
||||
$scheduleDowntimeLink = $this->href(
|
||||
echo $this->qlink(
|
||||
$this->translate('Schedule downtime'),
|
||||
'monitoring/host/schedule-downtime',
|
||||
array('host' => $object->getName())
|
||||
array('host' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'plug',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule a downtime to suppress all problem notifications within a specific period of time'
|
||||
)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$scheduleDowntimeLink = $this->href(
|
||||
echo $this->qlink(
|
||||
$this->translate('Schedule downtime'),
|
||||
'monitoring/service/schedule-downtime',
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'plug',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule a downtime to suppress all problem notifications within a specific period of time'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<a href="<?= $scheduleDowntimeLink ?>" data-base-target="_self">
|
||||
<?= $this->icon('plug') ?>
|
||||
<?= $this->translate('Schedule downtime') ?>
|
||||
</a>
|
||||
<?php } else {
|
||||
} else {
|
||||
echo '-';
|
||||
} // endif ?>
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -4,9 +4,12 @@ if (empty($object->hostgroups)) return;
|
|||
|
||||
$list = array();
|
||||
foreach ($object->hostgroups as $name => $alias) {
|
||||
$list[] = $this->qlink($alias, 'monitoring/list/hosts', array(
|
||||
'hostgroup' => $name
|
||||
));
|
||||
$list[] = $this->qlink(
|
||||
$alias,
|
||||
'monitoring/list/hosts',
|
||||
array('hostgroup' => $name),
|
||||
array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $alias))
|
||||
);
|
||||
}
|
||||
printf(
|
||||
"<tr><th>%s</th><td>%s %s</td></tr>\n",
|
||||
|
|
|
@ -4,9 +4,12 @@ if (empty($object->servicegroups)) return;
|
|||
|
||||
$list = array();
|
||||
foreach ($object->servicegroups as $name => $alias) {
|
||||
$list[] = $this->qlink($alias, 'monitoring/list/services', array(
|
||||
'servicegroup' => $name
|
||||
));
|
||||
$list[] = $this->qlink(
|
||||
$alias,
|
||||
'monitoring/list/services',
|
||||
array('servicegroup' => $name),
|
||||
array('title' => sprintf($this->translate('List all services in the group "%s"'), $alias))
|
||||
);
|
||||
}
|
||||
|
||||
printf(
|
||||
|
|
|
@ -19,23 +19,27 @@
|
|||
</tr>
|
||||
<?php if ($contact->contact_email): ?>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Email') ?></th>
|
||||
<td><?= sprintf('<a href="mailto:%1$s">%1$s</a>', $this->escape($contact->contact_email)) ?></td>
|
||||
<th><?= $this->translate('Email') ?></th>
|
||||
<td>
|
||||
<a href="mailto:<?= $contact->contact_email; ?>" title="<?= sprintf($this->translate('Send a mail to %s'), $contact->contact_alias); ?>" aria-label="<?= sprintf($this->translate('Send a mail to %s'), $contact->contact_alias); ?>">
|
||||
<?= $this->escape($contact->contact_email); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?php if ($contact->contact_pager): ?>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Pager') ?></th>
|
||||
<th><?= $this->translate('Pager') ?></th>
|
||||
<td><?= $this->escape($contact->contact_pager) ?></td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Hosts') ?></th>
|
||||
<th><?= $this->translate('Hosts') ?></th>
|
||||
<td><?= $this->escape($contactHelper->contactFlags($contact, 'host')) ?><br />
|
||||
<?= $this->escape($contact->contact_notify_host_timeperiod) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Services') ?></th>
|
||||
<th><?= $this->translate('Services') ?></th>
|
||||
<td><?= $this->escape($contactHelper->contactFlags($contact, 'service')) ?><br />
|
||||
<?= $this->escape($contact->contact_notify_service_timeperiod) ?></td>
|
||||
</tr>
|
||||
|
|
|
@ -29,7 +29,12 @@ $hostContext = $object->getType() === 'host';
|
|||
function contactsLink($match, $view) {
|
||||
$links = array();
|
||||
foreach (preg_split('/,\s/', $match[1]) as $contact) {
|
||||
$links[] = $view->qlink($contact, 'monitoring/show/contact', array('contact' => $contact));
|
||||
$links[] = $view->qlink(
|
||||
$contact,
|
||||
'monitoring/show/contact',
|
||||
array('contact' => $contact),
|
||||
array('title' => sprintf($view->translate('Show detailed information about %s'), $contact))
|
||||
);
|
||||
}
|
||||
return '[' . implode(', ', $links) . ']';
|
||||
}
|
||||
|
@ -136,12 +141,17 @@ $output = $this->tickets ? preg_replace_callback(
|
|||
<?= sprintf(
|
||||
$this->translate('%s on %s', 'Service running on host'),
|
||||
$hostContext ? $this->qlink(
|
||||
$this->escape($event->service_display_name),
|
||||
$event->service_display_name,
|
||||
'monitoring/show/service',
|
||||
array(
|
||||
'host' => $event->host_name,
|
||||
'service' => $event->service_description
|
||||
)
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translate('Show detailed information for service %s on host %s'),
|
||||
$event->service_display_name,
|
||||
$event->host_display_name
|
||||
))
|
||||
) : $this->escape($event->service_display_name),
|
||||
$event->host_display_name
|
||||
) ?>
|
||||
|
@ -150,7 +160,7 @@ $output = $this->tickets ? preg_replace_callback(
|
|||
<?php endif ?>
|
||||
<br>
|
||||
<div>
|
||||
<?= $this->icon($icon, $title); ?> <?= empty($msg) ? '' : $this->escape($msg) ?>
|
||||
<?= $this->icon($icon, $title); ?> <?= empty($msg) ? '' : $msg; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -12,66 +12,114 @@
|
|||
<tr>
|
||||
<td>
|
||||
<?php if ($this->statusSummary->hosts_active): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Active', '%d Active', $this->statusSummary->hosts_active), $this->statusSummary->hosts_active); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="box entry"><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Active', '%u Active', $this->statusSummary->hosts_active),
|
||||
$this->statusSummary->hosts_active
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 1),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u actively checked host',
|
||||
'List %u actively checked hosts',
|
||||
$this->statusSummary->hosts_active
|
||||
),
|
||||
$this->statusSummary->hosts_active
|
||||
))
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_passive): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->hosts_passive), $this->statusSummary->hosts_passive); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="box entry"><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->hosts_passive),
|
||||
$this->statusSummary->hosts_passive
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 1),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u passively checked host',
|
||||
'List %u passively checked hosts',
|
||||
$this->statusSummary->hosts_passive
|
||||
),
|
||||
$this->statusSummary->hosts_passive
|
||||
))
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_not_checked): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 0)
|
||||
); ?>" style="color: red;">
|
||||
<?= sprintf($this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->hosts_not_checked), $this->statusSummary->hosts_not_checked); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="box entry"><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->hosts_not_checked),
|
||||
$this->statusSummary->hosts_not_checked
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 0),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is not being checked at all',
|
||||
'List %u hosts which are not being checked at all',
|
||||
$this->statusSummary->hosts_not_checked
|
||||
),
|
||||
$this->statusSummary->hosts_not_checked
|
||||
))
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($this->statusSummary->services_active): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Active', '%d Active', $this->statusSummary->services_active), $this->statusSummary->services_active); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="box entry"><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%d Active', '%d Active', $this->statusSummary->services_active),
|
||||
$this->statusSummary->services_active
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 1),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u actively checked service',
|
||||
'List %u actively checked services',
|
||||
$this->statusSummary->services_active
|
||||
),
|
||||
$this->statusSummary->services_active
|
||||
))
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->services_passive): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->services_passive), $this->statusSummary->services_passive); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="box entry"><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->services_passive),
|
||||
$this->statusSummary->services_passive
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 1),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u passively checked service',
|
||||
'List %u passively checked services',
|
||||
$this->statusSummary->services_passive
|
||||
),
|
||||
$this->statusSummary->services_passive
|
||||
))
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->services_not_checked): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 0)
|
||||
); ?>" style="color: red;">
|
||||
<?= sprintf($this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->services_not_checked), $this->statusSummary->services_not_checked); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="box entry"><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->services_not_checked),
|
||||
$this->statusSummary->services_not_checked
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 0),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is not being checked at all',
|
||||
'List %u services which are not being checked at all',
|
||||
$this->statusSummary->services_not_checked
|
||||
),
|
||||
$this->statusSummary->services_not_checked
|
||||
))
|
||||
); ?></div>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -11,58 +11,112 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="box entry">
|
||||
<?php if ($this->statusSummary->hosts_without_flap_detection): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Host Disabled', '%u Hosts Disabled', $this->statusSummary->hosts_without_flap_detection),
|
||||
$this->statusSummary->hosts_without_flap_detection
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_flap_detection_enabled' => 0)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Host Disabled', '%d Hosts Disabled', $this->statusSummary->hosts_without_flap_detection), $this->statusSummary->hosts_without_flap_detection); ?>
|
||||
</a>
|
||||
array('host_flap_detection_enabled' => 0),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host for which flap detection has been disabled',
|
||||
'List %u hosts for which flap detection has been disabled',
|
||||
$this->statusSummary->hosts_without_flap_detection
|
||||
),
|
||||
$this->statusSummary->hosts_without_flap_detection
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$this->translate('All Hosts Enabled'),
|
||||
'monitoring/list/hosts',
|
||||
array('host_flap_detection_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->translate('All Hosts Enabled'); ?>
|
||||
</a>
|
||||
array('host_flap_detection_enabled' => 1),
|
||||
array('title' => $this->translate(
|
||||
'List all hosts, for which flap detection is enabled entirely'
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_flapping): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Host Flapping', '%u Hosts Flapping', $this->statusSummary->hosts_flapping),
|
||||
$this->statusSummary->hosts_flapping
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_is_flapping' => 1)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Host Flapping', '%d Hosts Flapping', $this->statusSummary->hosts_flapping), $this->statusSummary->hosts_flapping); ?>
|
||||
</a>
|
||||
array('host_is_flapping' => 1),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently flapping',
|
||||
'List %u hosts which are currently flapping',
|
||||
$this->statusSummary->hosts_flapping
|
||||
),
|
||||
$this->statusSummary->hosts_flapping
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="box entry">
|
||||
<?php if ($this->statusSummary->services_without_flap_detection): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Service Disabled', '%u Services Disabled', $this->statusSummary->services_without_flap_detection),
|
||||
$this->statusSummary->services_without_flap_detection
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('service_flap_detection_enabled' => 0)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Service Disabled', '%d Services Disabled', $this->statusSummary->services_without_flap_detection), $this->statusSummary->services_without_flap_detection); ?>
|
||||
</a>
|
||||
array('service_flap_detection_enabled' => 0),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service for which flap detection has been disabled',
|
||||
'List %u services for which flap detection has been disabled',
|
||||
$this->statusSummary->services_without_flap_detection
|
||||
),
|
||||
$this->statusSummary->services_without_flap_detection
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$this->translate('All Services Enabled'),
|
||||
'monitoring/list/services',
|
||||
array('service_flap_detection_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->translate('All Services Enabled'); ?>
|
||||
</a>
|
||||
array('service_flap_detection_enabled' => 1),
|
||||
array('title' => $this->translate(
|
||||
'List all services, for which flap detection is enabled entirely'
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->services_flapping): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Service Flapping', '%u Services Flapping', $this->statusSummary->services_flapping),
|
||||
$this->statusSummary->services_flapping
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('service_is_flapping' => 1)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Service Flapping', '%d Services Flapping', $this->statusSummary->services_flapping), $this->statusSummary->services_flapping); ?>
|
||||
</a>
|
||||
array('service_is_flapping' => 1),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently flapping',
|
||||
'List %u services which are currently flapping',
|
||||
$this->statusSummary->services_flapping
|
||||
),
|
||||
$this->statusSummary->services_flapping
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -78,42 +132,70 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="box entry">
|
||||
<?php if ($this->statusSummary->hosts_not_triggering_notifications): ?>
|
||||
<div class="box entry ">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Host Disabled', '%u Hosts Disabled', $this->statusSummary->hosts_not_triggering_notifications),
|
||||
$this->statusSummary->hosts_not_triggering_notifications
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_notifications_enabled' => 0)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Host Disabled', '%d Hosts Disabled', $this->statusSummary->hosts_not_triggering_notifications), $this->statusSummary->hosts_not_triggering_notifications); ?>
|
||||
</a>
|
||||
array('host_notifications_enabled' => 0),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host for which notifications are suppressed',
|
||||
'List %u hosts for which notifications are suppressed',
|
||||
$this->statusSummary->hosts_not_triggering_notifications
|
||||
),
|
||||
$this->statusSummary->hosts_not_triggering_notifications
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<div class="box entry ">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$this->translate('All Hosts Enabled'),
|
||||
'monitoring/list/hosts',
|
||||
array('host_notifications_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->translate('All Hosts Enabled'); ?>
|
||||
</a>
|
||||
array('host_notifications_enabled' => 1),
|
||||
array('title' => $this->translate(
|
||||
'List all hosts, for which notifications are enabled entirely'
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="box entry">
|
||||
<?php if ($this->statusSummary->services_not_triggering_notifications): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Service Disabled', '%u Services Disabled', $this->statusSummary->services_not_triggering_notifications),
|
||||
$this->statusSummary->services_not_triggering_notifications
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('service_notifications_enabled' => 0)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Service Disabled', '%d Services Disabled', $this->statusSummary->services_not_triggering_notifications), $this->statusSummary->services_not_triggering_notifications); ?>
|
||||
</a>
|
||||
array('service_notifications_enabled' => 0),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service for which notifications are suppressed',
|
||||
'List %u services for which notifications are suppressed',
|
||||
$this->statusSummary->services_not_triggering_notifications
|
||||
),
|
||||
$this->statusSummary->services_not_triggering_notifications
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$this->translate('All Services Enabled'),
|
||||
'monitoring/list/services',
|
||||
array('service_notifications_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->translate('All Services Enabled'); ?>
|
||||
</a>
|
||||
array('service_notifications_enabled' => 1),
|
||||
array('title' => $this->translate(
|
||||
'List all services, for which notifications are enabled entirely'
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -129,42 +211,70 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="box entry">
|
||||
<?php if ($this->statusSummary->hosts_not_processing_event_handlers): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Host Disabled', '%u Hosts Disabled', $this->statusSummary->hosts_not_processing_event_handlers),
|
||||
$this->statusSummary->hosts_not_processing_event_handlers
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_event_handler_enabled' => 0)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Host Disabled', '%d Hosts Disabled', $this->statusSummary->hosts_not_processing_event_handlers), $this->statusSummary->hosts_not_processing_event_handlers); ?>
|
||||
</a>
|
||||
array('host_event_handler_enabled' => 0),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is not processing any event handlers',
|
||||
'List %u hosts which are not processing any event handlers',
|
||||
$this->statusSummary->hosts_not_processing_event_handlers
|
||||
),
|
||||
$this->statusSummary->hosts_not_processing_event_handlers
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$this->translate('All Hosts Enabled'),
|
||||
'monitoring/list/hosts',
|
||||
array('host_event_handler_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->translate('All Hosts Enabled'); ?>
|
||||
</a>
|
||||
array('host_event_handler_enabled' => 1),
|
||||
array('title' => $this->translate(
|
||||
'List all hosts, which are processing event handlers entirely'
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="box entry">
|
||||
<?php if ($this->statusSummary->services_not_processing_event_handlers): ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Service Disabled', '%u Services Disabled', $this->statusSummary->services_not_processing_event_handlers),
|
||||
$this->statusSummary->services_not_processing_event_handlers
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('service_event_handler_enabled' => 0)
|
||||
); ?>" class="feature-highlight">
|
||||
<?= sprintf($this->translatePlural('%d Service Disabled', '%d Services Disabled', $this->statusSummary->services_not_processing_event_handlers), $this->statusSummary->services_not_processing_event_handlers); ?>
|
||||
</a>
|
||||
array('service_event_handler_enabled' => 0),
|
||||
array(
|
||||
'class' => 'feature-highlight',
|
||||
'title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is not processing any event handlers',
|
||||
'List %u services which are not processing any event handlers',
|
||||
$this->statusSummary->services_not_processing_event_handlers
|
||||
),
|
||||
$this->statusSummary->services_not_processing_event_handlers
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<div class="box entry">
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$this->translate('All Services Enabled'),
|
||||
'monitoring/list/services',
|
||||
array('service_event_handler_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->translate('All Services Enabled'); ?>
|
||||
</a>
|
||||
array('service_event_handler_enabled' => 1),
|
||||
array('title' => $this->translate(
|
||||
'List all services, which are processing event handlers entirely'
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -10,18 +10,40 @@ $service_problems = (
|
|||
?>
|
||||
<div class="box ok_hosts state_<?= $this->statusSummary->hosts_up ? 'up' : 'pending'; ?>">
|
||||
<?php if ($this->statusSummary->hosts_up): ?>
|
||||
<h2>
|
||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 0)); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Host UP', '%d Hosts UP', $this->statusSummary->hosts_up), $this->statusSummary->hosts_up); ?>
|
||||
</a>
|
||||
</h2>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Host UP', '%u Hosts UP', $this->statusSummary->hosts_up),
|
||||
$this->statusSummary->hosts_up
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 0),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state UP',
|
||||
'List %u hosts which are currently in state UP',
|
||||
$this->statusSummary->hosts_up
|
||||
),
|
||||
$this->statusSummary->hosts_up
|
||||
))
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_pending): ?>
|
||||
<h2>
|
||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 99)); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Host PENDING', '%d Hosts PENDING', $this->statusSummary->hosts_pending), $this->statusSummary->hosts_pending); ?>
|
||||
</a>
|
||||
</h2>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Host PENDING', '%u Hosts PENDING', $this->statusSummary->hosts_pending),
|
||||
$this->statusSummary->hosts_pending
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 99),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state PENDING',
|
||||
'List %u hosts which are currently in state PENDING',
|
||||
$this->statusSummary->hosts_pending
|
||||
),
|
||||
$this->statusSummary->hosts_pending
|
||||
))
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<?php if ($service_problems || $this->statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?>
|
||||
<div class="box contents">
|
||||
|
|
|
@ -1,280 +1,396 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
?>
|
||||
<?php if ($services_critical_handled || $services_critical_unhandled): ?>
|
||||
<div class="box entry state_critical <?= $services_critical_unhandled ? '' : 'handled'; ?>">
|
||||
<div class="box entry state_<?= Service::getStateText(2); ?> <?= $services_critical_unhandled ? '' : 'handled'; ?>">
|
||||
<?php if ($services_critical_unhandled): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$services_critical_unhandled . ' ' . Service::getStateText(2, true),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 2, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
|
||||
); ?>">
|
||||
<?= sprintf($this->translatePlural('%d CRITICAL', '%d CRITICAL', $services_critical_unhandled, 'icinga.state'), $services_critical_unhandled); ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 2,
|
||||
'service_acknowledged' => 0,
|
||||
'service_in_downtime' => 0
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state CRITICAL',
|
||||
'List %u services which are currently in state CRITICAL',
|
||||
$services_critical_unhandled
|
||||
),
|
||||
$services_critical_unhandled
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_handled): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$services_critical_handled . ' ' . (
|
||||
$services_critical_unhandled ? $this->translate('Acknowledged') : Service::getStateText(2, true)
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 2, 'service_handled' => 1)
|
||||
); ?>">
|
||||
<?= $services_critical_handled . ' ' . ($services_critical_unhandled ? $this->translate('Acknowledged') : $this->translate('CRITICAL', 'icinga.state')); ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 2,
|
||||
'service_handled' => 1
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state CRITICAL (Acknowledged)',
|
||||
'List %u services which are currently in state CRITICAL (Acknowledged)',
|
||||
$services_critical_handled
|
||||
),
|
||||
$services_critical_handled
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_passive): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is passively checked',
|
||||
'%u are passively checked',
|
||||
$services_critical_passive
|
||||
),
|
||||
$services_critical_passive
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_critical_passive > 1) {
|
||||
printf(
|
||||
$this->translate('%d are passively checked'),
|
||||
$services_critical_passive
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is passively checked'),
|
||||
$services_critical_passive
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state CRITICAL and passively checked',
|
||||
'List %u services which are currently in state CRITICAL and passively checked',
|
||||
$services_critical_passive
|
||||
),
|
||||
$services_critical_passive
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_not_checked): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is not checked at all',
|
||||
'%u are not checked at all',
|
||||
$services_critical_not_checked
|
||||
),
|
||||
$services_critical_not_checked
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_critical_not_checked > 1) {
|
||||
printf(
|
||||
$this->translate('%d are not checked at all'),
|
||||
$services_critical_not_checked
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is not checked at all'),
|
||||
$services_critical_not_checked
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state CRITICAL and not checked at all',
|
||||
'List %u services which are currently in state CRITICAL and not checked at all',
|
||||
$services_critical_not_checked
|
||||
),
|
||||
$services_critical_not_checked
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_handled || $services_warning_unhandled): ?>
|
||||
<div class="box entry state_warning <?= $services_warning_unhandled ? '' : 'handled'; ?>">
|
||||
<div class="box entry state_<?= Service::getStateText(1); ?> <?= $services_warning_unhandled ? '' : 'handled'; ?>">
|
||||
<?php if ($services_warning_unhandled): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$services_warning_unhandled . ' ' . Service::getStateText(1, true),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 1, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
|
||||
); ?>">
|
||||
<?= $services_warning_unhandled; ?> <?= $this->translate('WARNING', 'icinga.state') ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 1,
|
||||
'service_acknowledged' => 0,
|
||||
'service_in_downtime' => 0
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state WARNING',
|
||||
'List %u services which are currently in state WARNING',
|
||||
$services_warning_unhandled
|
||||
),
|
||||
$services_warning_unhandled
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_handled): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$services_warning_handled . ' ' . (
|
||||
$services_warning_unhandled ? $this->translate('Acknowledged') : Service::getStateText(1, true)
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 1, 'service_handled' => 1)
|
||||
); ?>">
|
||||
<?= $services_warning_handled . ' ' . ($services_warning_unhandled ? $this->translate('Acknowledged') : $this->translate('WARNING', 'icinga.state')); ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state WARNING (Acknowledged)',
|
||||
'List %u services which are currently in state WARNING (Acknowledged)',
|
||||
$services_warning_handled
|
||||
),
|
||||
$services_warning_handled
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_passive): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is passively checked',
|
||||
'%u are passively checked',
|
||||
$services_warning_passive
|
||||
),
|
||||
$services_warning_passive
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_warning_passive > 1) {
|
||||
printf(
|
||||
$this->translate('%d are passively checked'),
|
||||
$services_warning_passive
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is passively checked'),
|
||||
$services_warning_passive
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state WARNING and passively checked',
|
||||
'List %u services which are currently in state WARNING and passively checked',
|
||||
$services_warning_passive
|
||||
),
|
||||
$services_warning_passive
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_not_checked): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is not checked at all',
|
||||
'%u are not checked at all',
|
||||
$services_warning_not_checked
|
||||
),
|
||||
$services_warning_not_checked
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_warning_not_checked > 1) {
|
||||
printf(
|
||||
$this->translate('%d are not checked at all'),
|
||||
$services_warning_not_checked
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is not checked at all'),
|
||||
$services_warning_not_checked
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state WARNING and not checked at all',
|
||||
'List %u services which are currently in state WARNING and not checked at all',
|
||||
$services_warning_not_checked
|
||||
),
|
||||
$services_warning_not_checked
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_handled || $services_unknown_unhandled): ?>
|
||||
<div class="box entry state_unknown <?= $services_unknown_unhandled ? '' : 'handled'; ?>">
|
||||
<div class="box entry state_<?= Service::getStateText(3); ?> <?= $services_unknown_unhandled ? '' : 'handled'; ?>">
|
||||
<?php if ($services_unknown_unhandled): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$services_unknown_unhandled . ' ' . Service::getStateText(3, true),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 3, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
|
||||
); ?>">
|
||||
<?= sprintf($this->translatePlural('%d UNKNOWN', '%d UNKNOWN', $services_unknown_unhandled, 'icinga.state'), $services_unknown_unhandled) ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 3,
|
||||
'service_acknowledged' => 0,
|
||||
'service_in_downtime' => 0
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state UNKNOWN',
|
||||
'List %u services which are currently in state UNKNOWN',
|
||||
$services_unknown_unhandled
|
||||
),
|
||||
$services_unknown_unhandled
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_handled): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
$services_unknown_handled . ' ' . (
|
||||
$services_unknown_unhandled ? $this->translate('Acknowledged') : Service::getStateText(3, true)
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 3, 'service_handled' => 1)
|
||||
); ?>">
|
||||
<?= $services_unknown_handled . ' ' . ($services_unknown_unhandled ? $this->translate('Acknowledged') : $this->translate('UNKNOWN', 'icinga.state')); ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 3,
|
||||
'service_handled' => 1
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state UNKNOWN (Acknowledged)',
|
||||
'List %u services which are currently in state UNKNOWN (Acknowledged)',
|
||||
$services_unknown_handled
|
||||
),
|
||||
$services_unknown_handled
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_passive): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is passively checked',
|
||||
'%u are passively checked',
|
||||
$services_unknown_passive
|
||||
),
|
||||
$services_unknown_passive
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_unknown_passive > 1) {
|
||||
printf(
|
||||
$this->translate('%d are passively checked'),
|
||||
$services_unknown_passive
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is passively checked'),
|
||||
$services_unknown_passive
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state UNKNOWN and passively checked',
|
||||
'List %u services which are currently in state UNKNOWN and passively checked',
|
||||
$services_unknown_passive
|
||||
),
|
||||
$services_unknown_passive
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_not_checked): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is not checked at all',
|
||||
'%u are not checked at all',
|
||||
$services_unknown_not_checked
|
||||
),
|
||||
$services_unknown_not_checked
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_unknown_not_checked > 1) {
|
||||
printf(
|
||||
$this->translate('%d are not checked at all'),
|
||||
$services_unknown_not_checked
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is not checked at all'),
|
||||
$services_unknown_not_checked
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state UNKNOWN and not checked at all',
|
||||
'List %u services which are currently in state UNKNOWN and not checked at all',
|
||||
$services_unknown_not_checked
|
||||
),
|
||||
$services_unknown_not_checked
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($services_ok): ?>
|
||||
<div class="box entry state_ok">
|
||||
<a href="<?= $this->href(
|
||||
<div class="box entry state_<?= Service::getStateText(0); ?>">
|
||||
<?= $this->qlink(
|
||||
$services_ok . ' ' . Service::getStateText(0, true),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 0)
|
||||
); ?>">
|
||||
<?= $services_ok; ?> <?= $this->translate('OK', 'icinga.state') ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 0
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state OK',
|
||||
'List %u services which are currently in state OK',
|
||||
$services_ok
|
||||
),
|
||||
$services_ok
|
||||
))
|
||||
); ?>
|
||||
<?php if ($services_ok_not_checked): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is not checked at all',
|
||||
'%u are not checked at all',
|
||||
$services_ok_not_checked
|
||||
),
|
||||
$services_ok_not_checked
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 0,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_ok_not_checked > 1) {
|
||||
printf(
|
||||
$this->translate('%d are not checked at all'),
|
||||
$services_ok_not_checked
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is not checked at all'),
|
||||
$services_ok_not_checked
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state OK and not checked at all',
|
||||
'List %u services which are currently in state OK and not checked at all',
|
||||
$services_ok_not_checked
|
||||
),
|
||||
$services_ok_not_checked
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($services_pending): ?>
|
||||
<div class="box entry state_pending">
|
||||
<a href="<?= $this->href(
|
||||
<div class="box entry state_<?= Service::getStateText(99); ?>">
|
||||
<?= $this->qlink(
|
||||
$services_pending . ' ' . Service::getStateText(99, true),
|
||||
'monitoring/list/services',
|
||||
array('host_problem' => $host_problem, 'service_state' => 99)
|
||||
); ?>">
|
||||
<?= sprintf($this->translatePlural('%d PENDING', '%d PENDING', $services_pending, 'icinga.state'), $services_pending); ?>
|
||||
</a>
|
||||
array(
|
||||
'host_problem' => $host_problem,
|
||||
'service_state' => 99
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state PENDING',
|
||||
'List %u services which are currently in state PENDING',
|
||||
$services_pending
|
||||
),
|
||||
$services_pending
|
||||
))
|
||||
); ?>
|
||||
<?php if ($services_pending_not_checked): ?>
|
||||
<a href="<?= $this->href(
|
||||
<?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u is not checked at all',
|
||||
'%u are not checked at all',
|
||||
$services_pending_not_checked
|
||||
),
|
||||
$services_pending_not_checked
|
||||
),
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 99,
|
||||
'host_problem' => $host_problem,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?php
|
||||
if ($services_pending_not_checked > 1) {
|
||||
printf(
|
||||
$this->translate('%d are not checked at all'),
|
||||
$services_pending_not_checked
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
$this->translate('%d is not checked at all'),
|
||||
$services_pending_not_checked
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u service that is currently in state PENDING and not checked at all',
|
||||
'List %u services which are currently in state PENDING and not checked at all',
|
||||
$services_pending_not_checked
|
||||
),
|
||||
$services_pending_not_checked
|
||||
))
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
|
@ -5,18 +5,44 @@
|
|||
}
|
||||
?>">
|
||||
<?php if ($this->statusSummary->hosts_down): ?>
|
||||
<h2>
|
||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 1)); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Host DOWN', '%d Hosts DOWN', $this->statusSummary->hosts_down), $this->statusSummary->hosts_down); ?>
|
||||
</a>
|
||||
</h2>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural('%u Host DOWN', '%u Hosts DOWN', $this->statusSummary->hosts_down),
|
||||
$this->statusSummary->hosts_down
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 1),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state DOWN',
|
||||
'List %u hosts which are currently in state DOWN',
|
||||
$this->statusSummary->hosts_down
|
||||
),
|
||||
$this->statusSummary->hosts_down
|
||||
))
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_unreachable): ?>
|
||||
<h2>
|
||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 2)); ?>">
|
||||
<?= sprintf($this->translatePlural('%d Host UNREACHABLE', '%d Hosts UNREACHABLE', $this->statusSummary->hosts_unreachable), $this->statusSummary->hosts_unreachable); ?>
|
||||
</a>
|
||||
</h2>
|
||||
<h2><?= $this->qlink(
|
||||
sprintf(
|
||||
$this->translatePlural(
|
||||
'%u Host UNREACHABLE',
|
||||
'%u Hosts UNREACHABLE',
|
||||
$this->statusSummary->hosts_unreachable
|
||||
),
|
||||
$this->statusSummary->hosts_unreachable
|
||||
),
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 2),
|
||||
array('title' => sprintf(
|
||||
$this->translatePlural(
|
||||
'List %u host that is currently in state UNREACHABLE',
|
||||
'List %u hosts which are currently in state UNREACHABLE',
|
||||
$this->statusSummary->hosts_unreachable
|
||||
),
|
||||
$this->statusSummary->hosts_unreachable
|
||||
))
|
||||
); ?></h2>
|
||||
<?php endif ?>
|
||||
<div class="box contents">
|
||||
<strong><?= $this->translate('Services'); ?></strong>
|
||||
|
|
|
@ -31,19 +31,54 @@ $firstRow = !$beingExtended;
|
|||
<?php if ($switchedContext): ?>
|
||||
<hr>
|
||||
<?php endif ?>
|
||||
<?php foreach ($timeline as $timeInfo): ?>
|
||||
<?php foreach ($timeline as $timeInfo):
|
||||
switch ($intervalBox->getInterval()) {
|
||||
case '1d':
|
||||
$titleTime = sprintf(
|
||||
$this->translate('on %s', 'timeline.link.title.time'),
|
||||
$timeInfo[0]->end->format('d/m/Y')
|
||||
);
|
||||
break;
|
||||
case '1w':
|
||||
$titleTime = sprintf(
|
||||
$this->translate('in week %s of %s', 'timeline.link.title.week.and.year'),
|
||||
$timeInfo[0]->end->format('W'),
|
||||
$timeInfo[0]->end->format('Y')
|
||||
);
|
||||
break;
|
||||
case '1m':
|
||||
$titleTime = sprintf(
|
||||
$this->translate('in %s', 'timeline.link.title.month.and.year'),
|
||||
$timeInfo[0]->end->format('F Y')
|
||||
);
|
||||
break;
|
||||
case '1y':
|
||||
$titleTime = sprintf(
|
||||
$this->translate('in %s', 'timeline.link.title.year'),
|
||||
$timeInfo[0]->end->format('Y')
|
||||
);
|
||||
break;
|
||||
default:
|
||||
$titleTime = sprintf(
|
||||
$this->translate('between %s and %s', 'timeline.link.title.datetime.twice'),
|
||||
$timeInfo[0]->end->format('d/m/Y g:i A'),
|
||||
$timeInfo[0]->start->format('d/m/Y g:i A')
|
||||
);
|
||||
} ?>
|
||||
<div class="timeframe">
|
||||
<span>
|
||||
<a href="<?= $this->href(
|
||||
'/monitoring/list/eventhistory',
|
||||
array(
|
||||
'timestamp<' => $timeInfo[0]->start->getTimestamp(),
|
||||
'timestamp>' => $timeInfo[0]->end->getTimestamp()
|
||||
)
|
||||
); ?>">
|
||||
<?= $timeInfo[0]->end->format($intervalFormat); ?>
|
||||
</a>
|
||||
</span>
|
||||
<span><?= $this->qlink(
|
||||
$timeInfo[0]->end->format($intervalFormat),
|
||||
'/monitoring/list/eventhistory',
|
||||
array(
|
||||
'timestamp<' => $timeInfo[0]->start->getTimestamp(),
|
||||
'timestamp>' => $timeInfo[0]->end->getTimestamp()
|
||||
),
|
||||
array('title' => sprintf(
|
||||
$this->translate('List all event records registered %s', 'timeline.link.title'),
|
||||
$titleTime
|
||||
)),
|
||||
false
|
||||
); ?></span>
|
||||
<?php foreach ($groupInfo as $groupName => $labelAndColor): ?>
|
||||
<?php if (array_key_exists($groupName, $timeInfo[1])): ?>
|
||||
<?php
|
||||
|
@ -67,18 +102,30 @@ $extrapolatedCircleWidth = $timeline->getExtrapolatedCircleWidth($timeInfo[1][$g
|
|||
$circleWidth
|
||||
); ?>">
|
||||
<?php endif ?>
|
||||
<a class="inner-circle" style="<?= sprintf(
|
||||
'width: %3$s; height: %3$s; background-color: %2$s; margin-top: -%1$Fem; margin-left: -%1$Fem;',
|
||||
(float) substr($circleWidth, 0, -2) / 2,
|
||||
$timeInfo[1][$groupName]->getColor(),
|
||||
(string) $circleWidth
|
||||
); ?>" href="<?= $timeInfo[1][$groupName]->getDetailUrl()->overwriteParams(
|
||||
<?= $this->qlink(
|
||||
'',
|
||||
$timeInfo[1][$groupName]->getDetailUrl(),
|
||||
array(
|
||||
'timestamp<' => $timeInfo[0]->start->getTimestamp(),
|
||||
'timestamp>' => $timeInfo[0]->end->getTimestamp(),
|
||||
'type' => $groupName
|
||||
'type' => $groupName,
|
||||
'timestamp<' => $timeInfo[0]->start->getTimestamp(),
|
||||
'timestamp>' => $timeInfo[0]->end->getTimestamp()
|
||||
),
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translate('List %u %s registered %s', 'timeline.link.title'),
|
||||
$timeInfo[1][$groupName]->getValue(),
|
||||
strtolower($labelAndColor['label']),
|
||||
$titleTime
|
||||
),
|
||||
'class' => 'inner-circle',
|
||||
'style' => sprintf(
|
||||
'width: %3$s; height: %3$s; background-color: %2$s; margin-top: -%1$Fem; margin-left: -%1$Fem;',
|
||||
(float) substr($circleWidth, 0, -2) / 2,
|
||||
$timeInfo[1][$groupName]->getColor(),
|
||||
(string) $circleWidth
|
||||
)
|
||||
)
|
||||
); ?>" title="<?= $timeInfo[1][$groupName]->getValue(); ?> <?= $labelAndColor['label']; ?>"></a>
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
@ -86,7 +133,7 @@ $extrapolatedCircleWidth = $timeline->getExtrapolatedCircleWidth($timeInfo[1][$g
|
|||
</div>
|
||||
<?php $firstRow = false; ?>
|
||||
<?php endforeach ?>
|
||||
<a id="end" href="<?= Url::fromRequest()->remove(
|
||||
<a aria-hidden="true" id="end" href="<?= Url::fromRequest()->remove(
|
||||
array(
|
||||
'raw_timestamp<',
|
||||
'raw_timestamp>'
|
||||
|
|
|
@ -67,11 +67,13 @@ $this->provideRestriction(
|
|||
);
|
||||
|
||||
$this->provideConfigTab('backends', array(
|
||||
'title' => 'Backends',
|
||||
'title' => $this->translate('Configure how to retrieve monitoring information'),
|
||||
'label' => $this->translate('Backends'),
|
||||
'url' => 'config'
|
||||
));
|
||||
$this->provideConfigTab('security', array(
|
||||
'title' => 'Security',
|
||||
'title' => $this->translate('Configure how to protect your monitoring environment against prying eyes'),
|
||||
'label' => $this->translate('Security'),
|
||||
'url' => 'config/security'
|
||||
));
|
||||
$this->provideSetupWizard('Icinga\Module\Monitoring\MonitoringWizard');
|
||||
|
|
|
@ -164,10 +164,12 @@ abstract class MonitoredObjectController extends Controller
|
|||
$tabs = $this->getTabs();
|
||||
$object = $this->object;
|
||||
if ($object->getType() === $object::TYPE_HOST) {
|
||||
$isService = false;
|
||||
$params = array(
|
||||
'host' => $object->getName()
|
||||
);
|
||||
} else {
|
||||
$isService = true;
|
||||
$params = array(
|
||||
'host' => $object->getHost()->getName(),
|
||||
'service' => $object->getName()
|
||||
|
@ -176,17 +178,26 @@ abstract class MonitoredObjectController extends Controller
|
|||
$tabs->add(
|
||||
'host',
|
||||
array(
|
||||
'title' => $this->translate('Host'),
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for host %s'),
|
||||
$isService ? $object->getHost()->getName() : $object->getName()
|
||||
),
|
||||
'label' => $this->translate('Host'),
|
||||
'icon' => 'host',
|
||||
'url' => 'monitoring/host/show',
|
||||
'urlParams' => $params
|
||||
)
|
||||
);
|
||||
if (isset($params['service'])) {
|
||||
if ($isService) {
|
||||
$tabs->add(
|
||||
'service',
|
||||
array(
|
||||
'title' => $this->translate('Service'),
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for service %s on host %s'),
|
||||
$object->getName(),
|
||||
$object->getHost()->getName()
|
||||
),
|
||||
'label' => $this->translate('Service'),
|
||||
'icon' => 'service',
|
||||
'url' => 'monitoring/service/show',
|
||||
'urlParams' => $params
|
||||
|
@ -196,7 +207,11 @@ abstract class MonitoredObjectController extends Controller
|
|||
$tabs->add(
|
||||
'services',
|
||||
array(
|
||||
'title' => $this->translate('Services'),
|
||||
'title' => sprintf(
|
||||
$this->translate('List all services on host %s'),
|
||||
$isService ? $object->getHost()->getName() : $object->getName()
|
||||
),
|
||||
'label' => $this->translate('Services'),
|
||||
'icon' => 'services',
|
||||
'url' => 'monitoring/show/services',
|
||||
'urlParams' => $params
|
||||
|
@ -206,7 +221,15 @@ abstract class MonitoredObjectController extends Controller
|
|||
$tabs->add(
|
||||
'history',
|
||||
array(
|
||||
'title' => $this->translate('History'),
|
||||
'title' => $isService
|
||||
? sprintf(
|
||||
$this->translate('Show all event records of service %s on host %s'),
|
||||
$object->getName(),
|
||||
$object->getHost()->getName()
|
||||
)
|
||||
: sprintf($this->translate('Show all event records of host %s'), $object->getName())
|
||||
,
|
||||
'label' => $this->translate('History'),
|
||||
'icon' => 'rewind',
|
||||
'url' => 'monitoring/show/history',
|
||||
'urlParams' => $params
|
||||
|
|
|
@ -32,7 +32,17 @@ $requirements = $form->getRequirements();
|
|||
<td></td>
|
||||
<td class="btn-update">
|
||||
<div class="buttons">
|
||||
<a title="<?= $this->translate('You may also need to restart the web-server for the changes to take effect!'); ?>" href="<?= $this->href(); ?>" class="button-like"><?= $this->translate('Refresh'); ?></a>
|
||||
<?php $title = $this->translate('You may also need to restart the web-server for the changes to take effect!'); ?>
|
||||
<?= $this->qlink(
|
||||
$this->translate('Refresh'),
|
||||
null,
|
||||
null,
|
||||
array(
|
||||
'class' => 'button-like',
|
||||
'title' => $title,
|
||||
'aria-label' => sprintf($this->translate('Refresh the page; %s'), $title)
|
||||
)
|
||||
); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -18,9 +18,25 @@
|
|||
</div>
|
||||
<div class="buttons">
|
||||
<?php if ($success): ?>
|
||||
<a href="<?= $this->href('authentication/login'); ?>" class="button-like login"><?= $this->translate('Login to Icinga Web 2'); ?></a>
|
||||
<?= $this->qlink(
|
||||
$this->translate('Login to Icinga Web 2'),
|
||||
'authentication/login',
|
||||
null,
|
||||
array(
|
||||
'class' => 'button-like login',
|
||||
'title' => $this->translate('Show the login page of Icinga Web 2')
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href(); ?>" class="button-like"><?= $this->translate('Back'); ?></a>
|
||||
<?= $this->qlink(
|
||||
$this->translate('Back'),
|
||||
null,
|
||||
null,
|
||||
array(
|
||||
'class' => 'button-like',
|
||||
'title' => $this->translate('Show previous wizard-page')
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
|
@ -29,7 +29,7 @@ table.historycolorgrid td.weekday {
|
|||
opacity: 1.0;
|
||||
}
|
||||
|
||||
table.historycolorgrid a {
|
||||
table.historycolorgrid a, table.historycolorgrid span {
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
|
||||
cutContainer: function ($col) {
|
||||
var props = {
|
||||
'elements': $('#' + $col.attr('id') + ' > div').detach(),
|
||||
'elements': $('#' + $col.attr('id') + ' > *').detach(),
|
||||
'data': {
|
||||
'data-icinga-url': $col.data('icingaUrl'),
|
||||
'data-icinga-refresh': $col.data('icingaRefresh'),
|
||||
|
|
Loading…
Reference in New Issue