diff --git a/application/views/scripts/authentication/login.phtml b/application/views/scripts/authentication/login.phtml index 50dd70ec1..d6a060cc6 100644 --- a/application/views/scripts/authentication/login.phtml +++ b/application/views/scripts/authentication/login.phtml @@ -19,12 +19,28 @@ = $this->form ?>
diff --git a/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php b/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php index cdbdcf69d..8baf49316 100644 --- a/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php @@ -36,11 +36,7 @@ class RemoveAcknowledgementCommandForm extends ObjectsCommandForm ), 'escape' => false, 'ignore' => true, - 'label' => $this->getView()->icon('cancel') . $this->translatePlural( - 'Remove problem acknowledgement', - 'Remove problem acknowledgements', - count($this->objects) - ), + 'label' => $this->getView()->icon('cancel'), 'title' => $this->translatePlural( 'Remove problem acknowledgement', 'Remove problem acknowledgements', diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index 52184209f..31d685d2b 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -26,7 +26,7 @@ data-icinga-multiselect-data="comment_id"> peekAhead($this->compact) as $comment): ?> -= Host::getStateText($host->host_state, true) ?> diff --git a/modules/monitoring/application/views/scripts/list/servicegroups.phtml b/modules/monitoring/application/views/scripts/list/servicegroups.phtml index 267b5fa76..4c9ecc3a0 100644 --- a/modules/monitoring/application/views/scripts/list/servicegroups.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegroups.phtml @@ -30,7 +30,7 @@ if (! $this->compact): ?>
= Service::getStateText($service->service_state, true) ?> 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 03060eecd..5a250d213 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -2,28 +2,29 @@ objecttype === 'service'): ?> = $this->icon('service', $this->translate('Service')) ?> = $this->qlink( $this->escape($comment->host_display_name) . ': ' . $this->escape($comment->service_display_name), - 'monitoring/comment/show', - array('comment_id' => $comment->id), + 'monitoring/service/show', + array( + 'host' => $comment->host_name, + 'service' => $comment->service_description + ), array( 'title' => sprintf( $this->translate('Show detailed information for this comment about service %s on host %s'), $comment->service_display_name, $comment->host_display_name - ), - 'class' => 'rowaction' + ) ) ) ?> = $this->icon('host', $this->translate('Host')) ?> = $this->qlink( $this->escape($comment->host_display_name), - 'monitoring/comment/show', - array('comment_id' => $comment->id), + 'monitoring/host/show', + array('host' => $comment->host_name), array( 'title' => sprintf( $this->translate('Show detailed information for this comment about host %s'), $comment->host_display_name - ), - 'class' => 'rowaction' + ) ) ) ?> diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml index 683375f13..4deea15e4 100644 --- a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml @@ -12,28 +12,30 @@ = $this->icon('service', $this->translate('Service')); ?> = $this->qlink( $this->escape($downtime->host_display_name) . ': ' . $this->escape($downtime->service_display_name), - 'monitoring/downtime/show', - array('downtime_id' => $downtime->id), + 'monitoring/service/show', + array( + 'host' => $downtime->host_name, + 'service' => $downtime->service_description + ), array( 'title' => sprintf( $this->translate('Show detailed information for this downtime scheduled for service %s on host %s'), $downtime->service_display_name, $downtime->host_display_name - ), - 'class' => 'rowaction' + ) ) ); ?> = $this->icon('host', $this->translate('host')); ?> = $this->qlink( $this->escape($downtime->host_display_name), - 'monitoring/downtime/show', + 'monitoring/host/show', + array('host' => $downtime->host_name), array('downtime_id' => $downtime->id), array( 'title' => sprintf( $this->translate('Show detailed information for this downtime scheduled for host %s'), $downtime->host_display_name - ), - 'class' => 'rowaction' + ) ) ); ?> diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index cb26694ce..9760acdf9 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -105,7 +105,7 @@ $section = $this->menuSection(N_('Problems'), array( 'icon' => 'block', 'priority' => 20 )); -$section->add(N_('Unhandled Hosts'), array( +$section->add(N_('Host Problems'), array( 'renderer' => array( 'MonitoringBadgeNavigationItemRenderer', 'columns' => array( @@ -114,10 +114,10 @@ $section->add(N_('Unhandled Hosts'), array( 'state' => 'critical', 'dataView' => 'statussummary' ), - 'url' => 'monitoring/list/hosts?host_problem=1&host_handled=0', - 'priority' => 30 + 'url' => 'monitoring/list/hosts?host_problem=1&sort=host_severity', + 'priority' => 50 )); -$section->add(N_('Unhandled Services'), array( +$section->add(N_('Service Problems'), array( 'renderer' => array( 'MonitoringBadgeNavigationItemRenderer', 'columns' => array( @@ -126,14 +126,6 @@ $section->add(N_('Unhandled Services'), array( 'state' => 'critical', 'dataView' => 'statussummary' ), - 'url' => 'monitoring/list/services?service_problem=1&service_handled=0&sort=service_severity', - 'priority' => 40 -)); -$section->add(N_('Host Problems'), array( - 'url' => 'monitoring/list/hosts?host_problem=1&sort=host_severity', - 'priority' => 50 -)); -$section->add(N_('Service Problems'), array( 'url' => 'monitoring/list/services?service_problem=1&sort=service_severity&dir=desc', 'priority' => 60 )); diff --git a/public/js/icinga/behavior/actiontable.js b/public/js/icinga/behavior/actiontable.js index 753603b6d..8ec3c63f6 100644 --- a/public/js/icinga/behavior/actiontable.js +++ b/public/js/icinga/behavior/actiontable.js @@ -84,7 +84,7 @@ * @returns {jQuery} */ rowActions: function() { - return this.$el.find('tr a.rowaction'); + return this.$el.find('tr[href]'); }, /** @@ -416,14 +416,20 @@ var container = evt.target; var self = evt.data.self; - // initialize all rows with the correct link + // initialize all rows with the correct row action $('table.action tr, table.action-table tr', container).each(function(idx, el) { + + // decide which row action to use: links declared with the class rowaction take + // the highest precedence before hrefs defined in the tr itself and regular links var $a = $('a[href].rowaction', el).first(); if ($a.length) { // TODO: Find out whether we leak memory on IE with this: $(el).attr('href', $a.attr('href')); return; } + if ($(el).attr('href') && $(el).attr('href').length) { + return; + } $a = $('a[href]', el).first(); if ($a.length) { $(el).attr('href', $a.attr('href'));