Header h1
Header h2
Header h3
diff --git a/modules/doc/library/Doc/Renderer/DocTocRenderer.php b/modules/doc/library/Doc/Renderer/DocTocRenderer.php
index b0f78d3eb..20b8a5c64 100644
--- a/modules/doc/library/Doc/Renderer/DocTocRenderer.php
+++ b/modules/doc/library/Doc/Renderer/DocTocRenderer.php
@@ -86,7 +86,9 @@ class DocTocRenderer extends DocRenderer
);
$url = $view->url($path);
/** @var \Icinga\Web\Url $url */
- $url->setAnchor($this->encodeAnchor($section->getId()));
+ if ($this->getDepth() > 0) {
+ $url->setAnchor($this->encodeAnchor($section->getId()));
+ }
$urlAttributes = array(
'data-base-target' => '_next',
'title' => sprintf(
diff --git a/modules/doc/public/css/module.less b/modules/doc/public/css/module.less
index 1ab230c2e..65b8d61c0 100644
--- a/modules/doc/public/css/module.less
+++ b/modules/doc/public/css/module.less
@@ -25,6 +25,10 @@ table {
width: 100%;
}
+a[name]:focus {
+ outline: 0;
+}
+
th, td {
padding: 0.25rem;
text-align: left;
diff --git a/modules/doc/public/js/module.js b/modules/doc/public/js/module.js
new file mode 100644
index 000000000..c33e35ecf
--- /dev/null
+++ b/modules/doc/public/js/module.js
@@ -0,0 +1,29 @@
+
+(function(Icinga) {
+
+ var Doc = function(module) {
+ this.module = module;
+ this.initialize();
+ this.module.icinga.logger.debug('Doc module loaded');
+ };
+
+ Doc.prototype = {
+
+ initialize: function()
+ {
+ this.module.on('rendered', this.rendered);
+ this.module.icinga.logger.debug('Doc module initialized');
+ },
+
+ rendered: function(event) {
+ var $container = $(event.currentTarget);
+ if ($('> .content.styleguide', $container).length) {
+ $container.removeClass('module-doc');
+ }
+ }
+ };
+
+ Icinga.availableModules.doc = Doc;
+
+}(Icinga));
+
diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php
index bffbecc05..571e8ed88 100644
--- a/modules/monitoring/application/controllers/HostsController.php
+++ b/modules/monitoring/application/controllers/HostsController.php
@@ -37,13 +37,12 @@ class HostsController extends Controller
$this->getTabs()->add(
'show',
array(
+ 'label' => $this->translate('Hosts') . sprintf(' (%d)', count($this->hostList)),
'title' => sprintf(
$this->translate('Show summarized information for %u hosts'),
count($this->hostList)
),
- 'label' => $this->translate('Hosts') . sprintf(' (%d)', count($this->hostList)),
- 'url' => Url::fromRequest(),
- 'icon' => 'host'
+ 'url' => Url::fromRequest()
)
)->extend(new DashboardAction())->extend(new MenuAction())->activate('show');
$this->view->listAllLink = Url::fromRequest()->setPath('monitoring/list/hosts');
@@ -52,21 +51,18 @@ class HostsController extends Controller
protected function handleCommandForm(ObjectsCommandForm $form)
{
$this->hostList->setColumns(array(
- 'host_icon_image',
- 'host_icon_image_alt',
- 'host_name',
- 'host_address',
- 'host_address6',
- 'host_state',
- 'host_problem',
- 'host_handled',
'host_acknowledged',
+ 'host_active_checks_enabled',
+ 'host_display_name',
+ 'host_handled',
'host_in_downtime',
'host_is_flapping',
- 'host_output',
+ 'host_last_state_change',
+ 'host_name',
'host_notifications_enabled',
- 'host_active_checks_enabled',
- 'host_passive_checks_enabled'
+ 'host_passive_checks_enabled',
+ 'host_problem',
+ 'host_state'
));
$form
@@ -90,24 +86,18 @@ class HostsController extends Controller
->handleRequest();
$this->view->checkNowForm = $checkNowForm;
$this->hostList->setColumns(array(
- 'host_icon_image',
- 'host_icon_image_alt',
- 'host_name',
- 'host_address',
- 'host_address6',
- 'host_state',
- 'host_problem',
- 'host_handled',
'host_acknowledged',
+ 'host_active_checks_enabled',
+ 'host_display_name',
+ 'host_handled',
'host_in_downtime',
'host_is_flapping',
- 'host_output',
+ 'host_last_state_change',
+ 'host_name',
'host_notifications_enabled',
- 'host_active_checks_enabled',
- 'host_passive_checks_enabled'
- /*'host_event_handler_enabled',
- 'host_flap_detection_enabled',
- 'host_obsessing'*/
+ 'host_passive_checks_enabled',
+ 'host_problem',
+ 'host_state'
));
$acknowledgedObjects = $this->hostList->getAcknowledgedObjects();
diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php
index bb51a2108..798362fe4 100644
--- a/modules/monitoring/application/controllers/ServicesController.php
+++ b/modules/monitoring/application/controllers/ServicesController.php
@@ -39,13 +39,12 @@ class ServicesController extends Controller
$this->getTabs()->add(
'show',
array(
+ 'label' => $this->translate('Services') . sprintf(' (%d)', count($this->serviceList)),
'title' => sprintf(
$this->translate('Show summarized information for %u services'),
count($this->serviceList)
),
- 'label' => $this->translate('Services') . sprintf(' (%d)', count($this->serviceList)),
- 'url' => Url::fromRequest(),
- 'icon' => 'services'
+ 'url' => Url::fromRequest()
)
)->extend(new DashboardAction())->extend(new MenuAction())->activate('show');
}
@@ -53,28 +52,23 @@ class ServicesController extends Controller
protected function handleCommandForm(ObjectsCommandForm $form)
{
$this->serviceList->setColumns(array(
- 'host_icon_image',
- 'host_icon_image_alt',
- 'host_name',
- 'host_address',
- 'host_address6',
- 'host_output',
- 'host_state',
- 'host_problem',
+ 'host_display_name',
'host_handled',
- 'service_icon_image',
- 'service_icon_image_alt',
- 'service_description',
- 'service_state',
- 'service_problem',
- 'service_handled',
+ 'host_name',
+ 'host_problem',
+ 'host_state',
'service_acknowledged',
+ 'service_active_checks_enabled',
+ 'service_description',
+ 'service_display_name',
+ 'service_handled',
'service_in_downtime',
'service_is_flapping',
- 'service_output',
+ 'service_last_state_change',
'service_notifications_enabled',
- 'service_active_checks_enabled',
- 'service_passive_checks_enabled'
+ 'service_passive_checks_enabled',
+ 'service_problem',
+ 'service_state'
));
$form
@@ -99,32 +93,23 @@ class ServicesController extends Controller
->handleRequest();
$this->view->checkNowForm = $checkNowForm;
$this->serviceList->setColumns(array(
- 'host_icon_image',
- 'host_icon_image_alt',
- 'host_name',
- 'host_address',
- 'host_address6',
- 'host_output',
- 'host_state',
- 'host_problem',
+ 'host_display_name',
'host_handled',
- 'service_icon_image',
- 'service_icon_image_alt',
- 'service_output',
- 'service_description',
- 'service_state',
- 'service_problem',
- 'service_handled',
+ 'host_name',
+ 'host_problem',
+ 'host_state',
'service_acknowledged',
+ 'service_active_checks_enabled',
+ 'service_description',
+ 'service_display_name',
+ 'service_handled',
'service_in_downtime',
'service_is_flapping',
+ 'service_last_state_change',
'service_notifications_enabled',
- 'service_active_checks_enabled',
- 'service_passive_checks_enabled'
- /*
- 'service_event_handler_enabled',
- 'service_flap_detection_enabled',
- 'service_obsessing'*/
+ 'service_passive_checks_enabled',
+ 'service_problem',
+ 'service_state'
));
$acknowledgedObjects = $this->serviceList->getAcknowledgedObjects();
diff --git a/modules/monitoring/application/forms/Config/BackendConfigForm.php b/modules/monitoring/application/forms/Config/BackendConfigForm.php
index 03c293d7c..0ac9d3fb5 100644
--- a/modules/monitoring/application/forms/Config/BackendConfigForm.php
+++ b/modules/monitoring/application/forms/Config/BackendConfigForm.php
@@ -262,7 +262,7 @@ class BackendConfigForm extends ConfigForm
array(
'decorators' => array(
'FormElements',
- array('HtmlTag', array('tag' => 'div', 'class' => 'element'))
+ array('HtmlTag', array('tag' => 'div', 'class' => 'control-group'))
)
)
);
diff --git a/modules/monitoring/application/views/helpers/Link.php b/modules/monitoring/application/views/helpers/Link.php
index fcbba2662..e4aa8fa68 100644
--- a/modules/monitoring/application/views/helpers/Link.php
+++ b/modules/monitoring/application/views/helpers/Link.php
@@ -52,7 +52,7 @@ class Zend_View_Helper_Link extends Zend_View_Helper_Abstract
public function service($service, $serviceLinkText, $host, $hostLinkText, $class = null)
{
return sprintf(
- '%s: %s',
+ '%s: %s',
$this->host($host, $hostLinkText),
$this->view->qlink(
$serviceLinkText,
diff --git a/modules/monitoring/application/views/helpers/Perfdata.php b/modules/monitoring/application/views/helpers/Perfdata.php
index 090aff03e..0ed5ccb95 100644
--- a/modules/monitoring/application/views/helpers/Perfdata.php
+++ b/modules/monitoring/application/views/helpers/Perfdata.php
@@ -61,14 +61,14 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
$headers[$column] = $labels[$column];
}
}
- $table = array('
' . implode(' | ', $headers) . ' | ');
+ $table = array('
' . implode(' | ', $headers) . ' |
');
foreach ($pieChartData as $perfdata) {
if ($compact && $perfdata->isVisualizable()) {
$results[] = $perfdata->asInlinePie($color)->render();
} else {
$data = array();
if ($perfdata->isVisualizable()) {
- $data []= $perfdata->asInlinePie($color)->render() . ' ';
+ $data []= $perfdata->asInlinePie($color)->render();
} elseif (isset($columns[''])) {
$data []= '';
}
@@ -85,9 +85,10 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
);
}
}
- $table []= '' . implode(' | ', $data) . ' |
';
+ $table []= '' . implode(' | ', $data) . ' |
';
}
}
+ $table[] = '';
if ($limit > 0) {
$count = $compact ? count($results) : count($table);
if ($count > $limit) {
@@ -107,8 +108,7 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
return '';
}
return sprintf(
- '
',
- isset($columns['']) ? 'perfdata-piecharts' : '',
+ '
',
implode("\n", $table)
);
}
diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php
index dec3ca504..da33a5efd 100644
--- a/modules/monitoring/application/views/helpers/PluginOutput.php
+++ b/modules/monitoring/application/views/helpers/PluginOutput.php
@@ -40,6 +40,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
'
getPurifier()->purify($output)
);
+ $isHtml = true;
} else {
// Plaintext
$output = preg_replace(
@@ -47,11 +48,17 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
self::$txtReplacements,
$this->view->escape($output)
);
- }
- if (! $raw) {
- $output = '' . $output . '
';
+ $isHtml = false;
}
$output = $this->fixLinks($output);
+
+ if (! $raw) {
+ if ($isHtml) {
+ $output = '' . $output . '
';
+ } else {
+ $output = '' . $output . '
';
+ }
+ }
return $output;
}
diff --git a/modules/monitoring/application/views/scripts/config/index.phtml b/modules/monitoring/application/views/scripts/config/index.phtml
index 80882b59f..091aaf70f 100644
--- a/modules/monitoring/application/views/scripts/config/index.phtml
+++ b/modules/monitoring/application/views/scripts/config/index.phtml
@@ -10,12 +10,12 @@
'monitoring/config/createbackend',
null,
array(
- 'class' => 'button action-link',
+ 'class' => 'button-link',
'icon' => 'plus',
'title' => $this->translate('Create a new monitoring backend')
)
) ?>
-
+
= $this->translate('Monitoring Backend') ?> |
@@ -35,7 +35,7 @@
'title' => sprintf($this->translate('Edit monitoring backend %s'), $backendName)
)
) ?>
- (= sprintf(
+ (= sprintf(
$this->translate('Type: %s'),
$this->escape($config->type === 'ido' ? 'IDO' : ucfirst($config->type))
) ?>)
@@ -65,12 +65,12 @@
'monitoring/config/createtransport',
null,
array(
- 'class' => 'button action-link',
+ 'class' => 'button-link',
'icon' => 'plus',
'title' => $this->translate('Create a new command transport')
)
) ?>
-
+
= $this->translate('Transport') ?> |
@@ -90,7 +90,7 @@
'title' => sprintf($this->translate('Edit command transport %s'), $transportName)
)
); ?>
- (= sprintf(
+ (= sprintf(
$this->translate('Type: %s'),
$config->host !== null ? $this->translate('Remote') : $this->translate('Local')
) ?>)
diff --git a/modules/monitoring/application/views/scripts/host/history.phtml b/modules/monitoring/application/views/scripts/host/history.phtml
deleted file mode 100644
index 6b4093b98..000000000
--- a/modules/monitoring/application/views/scripts/host/history.phtml
+++ /dev/null
@@ -1,166 +0,0 @@
-qlink(
- $contact,
- 'monitoring/show/contact',
- array('contact_name' => $contact),
- array('title' => sprintf($view->translate('Show detailed information about %s'), $contact))
- );
- }
- return '[' . implode(', ', $links) . ']';
-}
-
-$self = $this;
-
-$url = $this->url();
-$limit = (int) $url->getParam('limit', 25);
-if (! $url->hasParam('page') || ($page = (int) $url->getParam('page')) < 1) {
- $page = 1;
-}
-
-$history->limit($limit * $page);
-
-if (! $this->compact): ?>
-
-
-
-
-
- peekAhead() as $event): ?>
- escape($event->output);
- $isService = isset($event->service_description);
- switch ($event->type) {
- case 'notify':
- $icon = 'notification';
- $title = $this->translate('Notification');
- $stateClass = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state);
-
- $msg = $msg ? preg_replace_callback(
- '/^\[([^\]]+)\]/',
- function($match) use ($self) { return contactsLink($match, $self); },
- $msg
- ) : $this->translate('This notification was not sent out to any contact.');
- break;
- case 'comment':
- $icon = 'comment';
- $title = $this->translate('Comment');
- break;
- case 'comment_deleted':
- $icon = 'remove';
- $title = $this->translate('Comment deleted');
- break;
- case 'ack':
- $icon = 'acknowledgement';
- $title = $this->translate('Acknowledge');
- break;
- case 'ack_deleted':
- $icon = 'remove';
- $title = $this->translate('Ack removed');
- break;
- case 'dt_comment':
- $icon = 'in_downtime';
- $title = $this->translate('In Downtime');
- break;
- case 'dt_comment_deleted':
- $icon = 'remove';
- $title = $this->translate('Downtime removed');
- break;
- case 'flapping':
- $icon = 'flapping';
- $title = $this->translate('Flapping');
- break;
- case 'flapping_deleted':
- $icon = 'remove';
- $title = $this->translate('Flapping stopped');
- break;
- case 'hard_state':
- $stateClass = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state);
- $icon = 'attention-alt';
- $title = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state);
- break;
- case 'soft_state':
- $icon = 'spinner';
- $stateClass = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state);
- $title = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state);
- break;
- case 'dt_start':
- $icon = 'downtime_start';
- $title = $this->translate('Downtime Start');
- break;
- case 'dt_end':
- $icon = 'downtime_end';
- $title = $this->translate('Downtime End');
- break;
- }
- ?>
-
-
- getIteratorPosition() % $limit === 0): ?>
-
-
- = $this->escape($title); ?>
- = date('d.m. H:i', $event->timestamp); ?>
- |
-
-
- = sprintf(
- $this->translate('%s on %s', 'Service running on host'),
- $this->qlink(
- $event->service_display_name,
- 'monitoring/service/show',
- 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
- ))
- ),
- $event->host_display_name
- ) ?>
-
- = $this->escape($event->host_name); ?>
-
-
- = $this->icon($icon, $title); ?> = $this->createTicketLinks($msg) ?>
-
- |
-
-
-
-
-hasResult()): ?>
- = $this->translate('No history events found matching the filter'); ?>
-hasMore()): ?>
- = $this->qlink(
- $this->translate('Load More'),
- $url->setAnchor('page-' . ($page + 1)),
- array(
- 'page' => $page + 1,
- ),
- array(
- 'id' => 'load-more',
- 'class' => 'pull-right action-link'
- )
- ); ?>
-
-
diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml
index e496ced29..45849a524 100644
--- a/modules/monitoring/application/views/scripts/list/comments.phtml
+++ b/modules/monitoring/application/views/scripts/list/comments.phtml
@@ -12,7 +12,7 @@
"
data-icinga-multiselect-data="comment_id">
diff --git a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml
index ab1695765..688fafc0f 100644
--- a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml
+++ b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml
@@ -8,16 +8,16 @@ if (! $stats instanceof stdClass) {
}
?>
-= $this->qlink(
- sprintf($this->translatePlural('%u Host', '%u Hosts', $stats->hosts_total), $stats->hosts_total),
- // @TODO(el): Fix that
- Url::fromPath('monitoring/list/hosts')->setParams(isset($baseFilter) ? $baseFilter->getUrlParams() : array()),
- null,
- array('title' => sprintf(
- $this->translatePlural('List %u host', 'List all %u hosts', $stats->hosts_total),
- $stats->hosts_total
- ))
-) ?>:
+
= $this->qlink(
+ sprintf($this->translatePlural('%u Host', '%u Hosts', $stats->hosts_total), $stats->hosts_total),
+ // @TODO(el): Fix that
+ Url::fromPath('monitoring/list/hosts')->setParams(isset($baseFilter) ? $baseFilter->getUrlParams() : array()),
+ null,
+ array('title' => sprintf(
+ $this->translatePlural('List %u host', 'List all %u hosts', $stats->hosts_total),
+ $stats->hosts_total
+ ))
+ ) ?>:
translate('Press and hold the Ctrl key while clicking on rows to select multiple rows or press and hold the Shift key to select a range of rows.', 'multiselection');
+$helpMessage = $this->translate(
+ 'Press and hold the Ctrl key while clicking on rows to select multiple rows or press and hold the Shift key to'
+ .' select a range of rows',
+ 'Multi-selection help'
+);
?>
-
-
0 = $this->translate('row(s) selected', 'multiselection') ?>
+
+ = sprintf(
+ /// TRANSLATORS: Please leave %s as it is because the selection counter is wrapped in a span tag for updating
+ /// the counter via JavaScript
+ $this->translate('%s row(s) selected', 'Multi-selection count'),
+ '0'
+ ) ?>
diff --git a/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml b/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml
index b8b61aebe..a56c33c33 100644
--- a/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml
+++ b/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml
@@ -8,19 +8,19 @@ if (! $stats instanceof stdClass) {
}
?>
-= $this->qlink(
- sprintf($this->translatePlural(
- '%u Service', '%u Services', $stats->services_total),
- $stats->services_total
- ),
- // @TODO(el): Fix that
- Url::fromPath('monitoring/list/services')->setParams(isset($baseFilter) ? $baseFilter->getUrlParams() : array()),
- null,
- array('title' => sprintf(
- $this->translatePlural('List %u service', 'List all %u services', $stats->services_total),
- $stats->services_total
- ))
-) ?>:
+
= $this->qlink(
+ sprintf($this->translatePlural(
+ '%u Service', '%u Services', $stats->services_total),
+ $stats->services_total
+ ),
+ // @TODO(el): Fix that
+ Url::fromPath('monitoring/list/services')->setParams(isset($baseFilter) ? $baseFilter->getUrlParams() : array()),
+ null,
+ array('title' => sprintf(
+ $this->translatePlural('List %u service', 'List all %u services', $stats->services_total),
+ $stats->services_total
+ ))
+ ) ?>:
-
+
|
diff --git a/modules/monitoring/application/views/scripts/list/contacts.phtml b/modules/monitoring/application/views/scripts/list/contacts.phtml
index 6ece9e8df..5517f4fc3 100644
--- a/modules/monitoring/application/views/scripts/list/contacts.phtml
+++ b/modules/monitoring/application/views/scripts/list/contacts.phtml
@@ -11,7 +11,7 @@
hasResult()): ?>
-
+
= $this->translate('Name') ?> |
diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml
index f6023f421..56be44ffd 100644
--- a/modules/monitoring/application/views/scripts/list/downtimes.phtml
+++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml
@@ -16,7 +16,7 @@ if (! $this->compact): ?>
"
data-icinga-multiselect-data="downtime_id">
@@ -30,7 +30,6 @@ if (! $this->compact): ?>
$this->stateName = Host::getStateText($downtime->host_state);
}
$this->downtime = $downtime;
- $this->displayComment = true;
?>
= $this->render('partials/downtime/downtime-header.phtml'); ?>
diff --git a/modules/monitoring/application/views/scripts/list/eventhistory.phtml b/modules/monitoring/application/views/scripts/list/eventhistory.phtml
index cddad22fd..4923f2079 100644
--- a/modules/monitoring/application/views/scripts/list/eventhistory.phtml
+++ b/modules/monitoring/application/views/scripts/list/eventhistory.phtml
@@ -1,140 +1,17 @@
url();
-$limit = (int) $url->getParam('limit', 25);
-if (! $url->hasParam('page') || ($page = (int) $url->getParam('page')) < 1) {
- $page = 1;
-}
-
-$history->limit($limit * $page);
if (! $this->compact): ?>
- = $this->tabs; ?>
-
-
- = $this->limiter ?>
+ = $this->tabs ?>
+
+ = $this->limiter ?>
+ = $this->sortBox ?>
-
-
- = $this->sortBox ?>
-
-
- = $this->filterEditor; ?>
+ = $this->filterEditor ?>
-
-
-
- peekAhead() as $event): ?>
- output;
- $title = $event->type;
- $stateName = 'invalid';
- $isService = isset($event->service_description);
- switch ($event->type) {
- case 'notify':
- $icon = 'bell';
- $title = $this->translate('Notification');
- $msg = $msg ?: $this->translate('This notification was not sent out to any contact.');
- break;
- case 'comment':
- $icon = 'comment';
- $title = $this->translate('Comment');
- break;
- case 'ack':
- $icon = 'ok';
- $title = $this->translate('Acknowledgement');
- break;
- case 'dt_comment':
- $icon = 'plug';
- $title = $this->translate('In Downtime');
- break;
- case 'flapping':
- $icon = 'flapping';
- $title = $this->translate('Flapping');
- break;
- case 'flapping_deleted':
- $icon = 'ok';
- $title = $this->translate('Flapping Stopped');
- break;
- case 'hard_state':
- $icon = $isService ? 'service' : 'host';
- $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state);
- $title = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true);
- break;
- case 'soft_state':
- $icon = 'lightbulb';
- $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state);
- $title = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true);
- break;
- case 'dt_start':
- $icon = 'starttime';
- $title = $this->translate('Downtime Start');
- break;
- case 'dt_end':
- $icon = 'endtime';
- $title = $this->translate('Downtime End');
- break;
- }
- ?>
-
-
- getIteratorPosition() % $limit === 0): ?>
-
-
- = $this->escape($title); ?>
- = $this->timeAgo($event->timestamp, $this->compact); ?>
- |
-
- = $this->icon($icon, $title); ?>
-
- = $this->link()->service(
- $event->service_description, $event->service_display_name, $event->host_name, $event->host_display_name, 'rowaction'
- ) ?>
-
- = $this->link()->host($event->host_name, $event->host_display_name) ?>
-
-
- = empty($msg) ? '' : $this->escape($msg) ?>
-
- |
-
-
-
-
-hasResult()): ?>
- = $this->translate('No history events found matching the filter'); ?>
-hasMore()): ?>
- compact): ?>
- = $this->qlink(
- $this->translate('Show More'),
- $url->without(array('view', 'limit')),
- null,
- array(
- 'data-base-target' => '_next',
- 'class' => 'pull-right action-link'
- )
- ); ?>
-
- = $this->qlink(
- $this->translate('Load More'),
- $url->setAnchor('page-' . ($page + 1)),
- array(
- 'page' => $page + 1,
- ),
- array(
- 'id' => 'load-more',
- 'class' => 'pull-right action-link'
- )
- ); ?>
-
-
-
+= $this->partial(
+ 'partials/event-history.phtml',
+ array('compact' => $this->compact, 'history' => $history, 'isOverview' => true, 'tableCssClass' => 'table-row-selectable')
+) ?>
+
diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml
index 4d6d235bc..1eb5e754d 100644
--- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml
+++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml
@@ -18,7 +18,7 @@ if (! $this->compact): ?>
= $this->translate('No host groups found matching the filter.') ?>
-
+
|
diff --git a/modules/monitoring/application/views/scripts/list/hosts.phtml b/modules/monitoring/application/views/scripts/list/hosts.phtml
index 9c955ef66..53b543625 100644
--- a/modules/monitoring/application/views/scripts/list/hosts.phtml
+++ b/modules/monitoring/application/views/scripts/list/hosts.phtml
@@ -22,7 +22,7 @@ if (! $this->compact): ?>
"
data-icinga-multiselect-data="host">
@@ -32,61 +32,63 @@ if (! $this->compact): ?>
$hostLink = $this->href('monitoring/host/show', array('host' => $host->host_name)); ?>
-
- = Host::getStateText($host->host_state, true) ?>
+ = Host::getStateText($host->host_state, true) ?>
host_state !== 99): ?>
-
- = $this->timeSince($host->host_last_state_change, $this->compact) ?>
- host_state > 0 && (int) $host->host_state_type === 0): ?>
-
- Soft = $host->host_attempt ?>
+
-
-
|
-
- = $this->iconImage()->host($host) ?>
- = implode(' ', $this->hostFlags($host)) ?>
- = $this->qlink(
- $host->host_display_name,
- $hostLink,
- null,
- array(
- 'title' => sprintf(
- $this->translate('Show detailed information for host %s'),
- $host->host_display_name
- ),
- 'class' => 'rowaction'
- )
- ) ?>
- host_name])): ?>
- (= $this->qlink(
- sprintf(
- $this->translatePlural(
- '%u unhandled service', '%u unhandled services', $summary[$host->host_name]
- ),
- $summary[$host->host_name]
- ),
- 'monitoring/list/services',
- array(
- 'host' => $host->host_name,
- 'service_problem' => 1,
- 'service_handled' => 0
- ),
- array(
- 'title' => sprintf(
+ |
+
+
+ = $this->pluginOutput($this->ellipsis($host->host_output, 10000), true) ?>
+
|
addColumns as $col): ?>
= $this->escape($host->$col) ?> |
diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml
index 85255cded..a70eb6932 100644
--- a/modules/monitoring/application/views/scripts/list/notifications.phtml
+++ b/modules/monitoring/application/views/scripts/list/notifications.phtml
@@ -2,8 +2,6 @@
use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
-$notifications->peekAhead($this->compact);
-
if (! $this->compact): ?>
= $tabs ?>
@@ -16,22 +14,32 @@ if (! $this->compact): ?>
-
+hasResult()): ?>
+ = $this->translate('No notifications found matching the filter.') ?>
+
+
+
- peekAhead($this->compact) as $notification):
if (isset($notification->service_description)) {
$isService = true;
+ $stateLabel = Service::getStateText($notification->notification_state, true);
$stateName = Service::getStateText($notification->notification_state);
} else {
$isService = false;
+ $stateLabel = Host::getStateText($notification->notification_state, true);
$stateName = Host::getStateText($notification->notification_state);
}
?>
- = $this->timeAgo($notification->notification_start_time, $this->compact) ?>
+ = $stateLabel ?>
+
+ = $this->timeAgo($notification->notification_start_time, $this->compact) ?>
+
|
+
+
= $this->pluginOutput($this->ellipsis($notification->notification_output, 10000), true) ?>
|
@@ -70,17 +78,17 @@ if (! $this->compact): ?>
-hasResult()): ?>
- = $this->translate('No notifications found matching the filter'); ?>
-hasMore()): ?>
- = $this->qlink(
- $this->translate('Show More'),
- $this->url(isset($notificationsUrl) ? $notificationsUrl : null)->without(array('view', 'limit')),
- null,
- array(
- 'data-base-target' => '_next',
- 'class' => 'pull-right action-link'
- )
- ); ?>
+hasMore()): ?>
+
+ = $this->qlink(
+ $this->translate('Show More'),
+ $this->url(isset($notificationsUrl) ? $notificationsUrl : null)->without(array('view', 'limit')),
+ null,
+ array(
+ 'class' => 'action-link',
+ 'data-base-target' => '_next'
+ )
+ ); ?>
+
diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml
index b51bb3baf..3fdefcbe8 100644
--- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml
+++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml
@@ -3,32 +3,20 @@ use Icinga\Module\Monitoring\Object\Service;
use Icinga\Web\Url;
if (! $this->compact): ?>
-
- = $this->tabs; ?>
-
-
- = $this->limiter ?>
-
-
- = $this->paginator ?>
-
-
- = $this->sortBox ?>
-
-
- = $this->filterEditor; ?>
+
+ = $this->tabs ?>
+ = $this->sortBox ?>
+ = $this->filterEditor ?>
-translate('No services found matching the filter') . '
';
- return;
-}
+
+
= $this->translate('No services found matching the filter.') ?>
+
+
-
-
+
= $this->partial(
@@ -38,7 +26,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
'xAxisPaginator' => $horizontalPaginator,
'yAxisPaginator' => $verticalPaginator
)
- ); ?> |
+ ) ?>
$serviceDisplayName): ?>
= $this->qlink(
$this->ellipsis($serviceDisplayName, 18),
@@ -55,7 +43,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
-
+
$hostDisplayName): ?>
">
= $this->escape($service->service_output) ?>
- = $this->qlink(
- '',
- 'monitoring/service/show',
- array(
- 'host' => $hostName,
- 'service' => $serviceDescription
- ),
- array(
- 'aria-describedby' => $ariaDescribedById,
- 'class' => 'bg-color-' . 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_display_name,
- $service->host_display_name
+ = $this->qlink(
+ '',
+ 'monitoring/service/show',
+ array(
+ 'host' => $hostName,
+ 'service' => $serviceDescription
+ ),
+ array(
+ 'aria-describedby' => $ariaDescribedById,
+ 'aria-label' => sprintf(
+ $this->translate('Show detailed information for service %s on host %s'),
+ $service->service_display_name,
+ $service->host_display_name
+ ),
+ 'class' => 'bg-color-' . Service::getStateText($service->service_state) . ($service->service_handled ? ' handled' : ''),
+ 'title' => $this->escape($service->service_output)
)
- )
- ); ?>
+ ) ?>
compact && $this->horizontalPaginator->getPages()->pageCount > 1): ?>
@@ -110,16 +98,16 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
. $this->verticalPaginator->getItemCountPerPage()
),
array(
- 'data-base-target' => '_self',
- 'class' => 'action-link'
+ 'class' => 'action-link',
+ 'data-base-target' => '_self'
)
) ?>
= ++$i === (int) (count($pivotHeader['rows']) / 2) ? $expandLink : '' ?>
-
+
|
- compact && $this->verticalPaginator->getPages()->pageCount > 1): ;?>
+ compact && $this->verticalPaginator->getPages()->pageCount > 1): ?>
qlink(
@@ -130,13 +118,13 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
($this->verticalPaginator->getItemCountPerPage() + 20)
),
array(
- 'data-base-target' => '_self',
- 'class' => 'action-link'
+ 'class' => 'action-link',
+ 'data-base-target' => '_self'
)
) ?>
|
-
+
-
+
diff --git a/modules/monitoring/application/views/scripts/list/servicegroups.phtml b/modules/monitoring/application/views/scripts/list/servicegroups.phtml
index 5e9500bea..ca7dfc325 100644
--- a/modules/monitoring/application/views/scripts/list/servicegroups.phtml
+++ b/modules/monitoring/application/views/scripts/list/servicegroups.phtml
@@ -16,7 +16,7 @@ if (! $this->compact): ?>
= $this->translate('No service groups found matching the filter.') ?>
-
+
|
= $this->translate('Service Group') ?> |
diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml
index fc9421795..b0e75c267 100644
--- a/modules/monitoring/application/views/scripts/list/services.phtml
+++ b/modules/monitoring/application/views/scripts/list/services.phtml
@@ -23,7 +23,7 @@ if (! $this->compact): ?>
@@ -45,51 +45,55 @@ if (! $this->compact): ?>
$serviceStateName = Service::getStateText($service->service_state); ?>
-
- = Service::getStateText($service->service_state, true) ?>
- service_state !== 99): ?>
-
+ = Service::getStateText($service->service_state, true) ?>
+ service_state !== 99): ?>
+
+
|
-
- = $this->iconImage()->service($service) ?>
- = implode(' ', $this->serviceFlags($service)) ?>
- showHost): ?>= $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
+ |
+
+
+
+ = $this->perfdata($service->service_perfdata, true, 5) ?>
+
+
+ = $this->pluginOutput($this->ellipsis($service->service_output, 10000), true) ?>
+
+
|
addColumns as $col): ?>
= $this->escape($service->$col) ?> |
diff --git a/modules/monitoring/application/views/scripts/object/detail-history.phtml b/modules/monitoring/application/views/scripts/object/detail-history.phtml
new file mode 100644
index 000000000..692d3e4ee
--- /dev/null
+++ b/modules/monitoring/application/views/scripts/object/detail-history.phtml
@@ -0,0 +1,13 @@
+compact): ?>
+
+ = $this->tabs ?>
+type === 'service') {
+ echo $this->render('partials/object/service-header.phtml');
+} else {
+ echo $this->render('partials/object/host-header.phtml');
+} ?>
+
+
+= $this->render('partials/event-history.phtml') ?>
diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml
index cfd4421f3..f35680cab 100644
--- a/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml
+++ b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml
@@ -21,4 +21,4 @@ switch ($comment->type) {
$tooltip = $this->translate('Comment was caused by an acknowledgement');
break;
}
-echo $this->icon($icon, $tooltip, array('class' => 'big-icon'));
+echo $this->icon($icon, $tooltip, array('class' => 'large-icon'));
diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml
index 695c71901..2d4f32792 100644
--- a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml
+++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml
@@ -1,4 +1,4 @@
-