From 0c0944174af9474393e2982a3872f5390f04907d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 1 Oct 2015 14:49:34 +0200 Subject: [PATCH 1/7] Remove ack: remove text label, hover-info suffices --- .../Command/Object/RemoveAcknowledgementCommandForm.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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', From 2a25063678b72dc7c7c8ef35713ed14ccbc2f66f Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 1 Oct 2015 14:08:29 +0200 Subject: [PATCH 2/7] Remove action table tr hrefs that do not have any effect refs #5543 --- .../monitoring/application/views/scripts/list/hostgroups.phtml | 2 +- modules/monitoring/application/views/scripts/list/hosts.phtml | 2 +- .../application/views/scripts/list/servicegroups.phtml | 2 +- .../monitoring/application/views/scripts/list/services.phtml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml index 7f3928e67..ee808e22e 100644 --- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml @@ -36,7 +36,7 @@ if (! $this->compact): ?> peekAhead($this->compact) as $hostgroup): ?> - + hosts_total ?> diff --git a/modules/monitoring/application/views/scripts/list/hosts.phtml b/modules/monitoring/application/views/scripts/list/hosts.phtml index ee2e3c180..f2ea185f2 100644 --- a/modules/monitoring/application/views/scripts/list/hosts.phtml +++ b/modules/monitoring/application/views/scripts/list/hosts.phtml @@ -40,7 +40,7 @@ if (! $this->compact): ?> peekAhead($this->compact) as $host): $hostStateName = Host::getStateText($host->host_state); $hostLink = $this->href('monitoring/host/show', array('host' => $host->host_name)); ?> - +

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): ?> peekAhead($this->compact) as $serviceGroup): ?> - + services_total ?> diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml index 20a9f73a9..e5e1e01da 100644 --- a/modules/monitoring/application/views/scripts/list/services.phtml +++ b/modules/monitoring/application/views/scripts/list/services.phtml @@ -53,7 +53,7 @@ if (! $this->compact): ?> ) ); $serviceStateName = Service::getStateText($service->service_state); ?> - +

service_state, true) ?> From cb81916a2ca530bd716aa1408fb5bfeede4a8400 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 1 Oct 2015 14:23:27 +0200 Subject: [PATCH 3/7] Support defining row actions that do not show up in any of the links --- public/js/icinga/behavior/actiontable.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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')); From 03ab6e4e929206df48a27403c6b2cba9a17c2258 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 1 Oct 2015 14:24:21 +0200 Subject: [PATCH 4/7] Fix links in comment view Let the host and service link in the comment list always point to the host and service object while the row action itself opens the comment. --- .../views/scripts/list/comments.phtml | 2 +- .../partials/comment/comment-detail.phtml | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) 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): ?> - + partial('partials/comment/comment-description.phtml', array('comment' => $comment)); ?> 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'): ?> icon('service', $this->translate('Service')) ?> 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' + ) ) ) ?> icon('host', $this->translate('Host')) ?> 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' + ) ) ) ?> From f54fcefefbcb27feaf673f38933e16817767f90d Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 1 Oct 2015 14:49:48 +0200 Subject: [PATCH 5/7] Fix links in downtime list --- .../views/scripts/list/downtimes.phtml | 2 +- .../partials/downtime/downtime-header.phtml | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index 106a61eb6..2b4c10c6d 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -40,7 +40,7 @@ if (! $this->compact): ?> $this->downtime = $downtime; $this->displayComment = true; ?> - + render('partials/downtime/downtime-header.phtml'); ?> 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 @@ icon('service', $this->translate('Service')); ?> 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' + ) ) ); ?> icon('host', $this->translate('host')); ?> 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' + ) ) ); ?> From 79d89e5277505e6988f5418f49ac010daebb3574 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 1 Oct 2015 14:55:07 +0200 Subject: [PATCH 6/7] monitoring: Remove redundant menu entries for unhandled states refs #5543 --- modules/monitoring/configuration.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) 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 )); From f3531ca6df0fc16ab0a4f1c892b0bf5935391b8d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 1 Oct 2015 14:57:26 +0200 Subject: [PATCH 7/7] Use the new social network icons on the login page refs #5543 --- .../views/scripts/authentication/login.phtml | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) 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 @@ form ?>