diff --git a/modules/monitoring/application/controllers/TacticalController.php b/modules/monitoring/application/controllers/TacticalController.php index 104112cf4..990a1e0af 100644 --- a/modules/monitoring/application/controllers/TacticalController.php +++ b/modules/monitoring/application/controllers/TacticalController.php @@ -22,17 +22,11 @@ class Monitoring_TacticalController extends MonitoringController $this->_request, array( 'hosts_up', - 'hosts_up_not_checked', 'hosts_pending', - 'hosts_pending_not_checked', - 'hosts_down_handled', + 'hosts_down', 'hosts_down_unhandled', - 'hosts_down_passive', - 'hosts_down_not_checked', - 'hosts_unreachable_handled', + 'hosts_unreachable', 'hosts_unreachable_unhandled', - 'hosts_unreachable_passive', - 'hosts_unreachable_not_checked', 'services_ok_on_ok_hosts', 'services_ok_not_checked_on_ok_hosts', diff --git a/modules/monitoring/application/views/scripts/list/contactgroups.phtml b/modules/monitoring/application/views/scripts/list/contactgroups.phtml index 331e790bb..6c2346064 100644 --- a/modules/monitoring/application/views/scripts/list/contactgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/contactgroups.phtml @@ -9,7 +9,7 @@

-

+

diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml index 9e0d9d6da..c38655669 100644 --- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml @@ -7,9 +7,11 @@
- -

hostgroup; ?>

-
+

+ + hostgroup; ?> + +

diff --git a/modules/monitoring/application/views/scripts/list/servicegroups.phtml b/modules/monitoring/application/views/scripts/list/servicegroups.phtml index 8aa9967c8..eb5c80f3a 100644 --- a/modules/monitoring/application/views/scripts/list/servicegroups.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegroups.phtml @@ -7,12 +7,14 @@
diff --git a/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml b/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml index d71d4283d..4bb3708e1 100644 --- a/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml +++ b/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml @@ -1,113 +1,57 @@ -
-

translate('OK Hosts'); ?>

-
-
- - - - - - - - - - - - -
translate('Hosts'); ?>translate('Services'); ?>
+statusSummary->services_warning_handled_on_ok_hosts || + $this->statusSummary->services_warning_unhandled_on_ok_hosts || + $this->statusSummary->services_critical_handled_on_ok_hosts || + $this->statusSummary->services_critical_unhandled_on_ok_hosts || + $this->statusSummary->services_unknown_handled_on_ok_hosts || + $this->statusSummary->services_unknown_unhandled_on_ok_hosts +); +?> +
statusSummary->hosts_up): ?> -
- - statusSummary->hosts_up; ?> UP - -statusSummary->hosts_up_not_checked): ?> - - statusSummary->hosts_up_not_checked > 1) { - printf( - $this->translate('%d are not checked at all'), - $this->statusSummary->hosts_up_not_checked - ); - } else { - printf( - $this->translate('%d is not checked at all'), - $this->statusSummary->hosts_up_not_checked - ); - } - ?> - - -
+

+ + translate('%d Hosts UP'), $this->statusSummary->hosts_up); ?> + +

statusSummary->hosts_pending): ?> -
- - statusSummary->hosts_pending; ?> PENDING - -statusSummary->hosts_pending_not_checked): ?> - - statusSummary->hosts_pending_not_checked > 1) { - printf( - $this->translate('%d are not checked at all'), - $this->statusSummary->hosts_pending_not_checked - ); - } else { - printf( - $this->translate('%d is not checked at all'), - $this->statusSummary->hosts_pending_not_checked - ); - } - ?> - +

+ + translate('%d Hosts PENDING'), $this->statusSummary->hosts_pending); ?> + +

-
+statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?> +
+ translate('Services'); ?> + partial( + 'tactical/components/parts/servicestatesummarybyhoststate.phtml', + array( + 'host_problem' => 0, + 'services_ok' => $this->statusSummary->services_ok_on_ok_hosts, + 'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_ok_hosts, + 'services_pending' => $this->statusSummary->services_pending_on_ok_hosts, + 'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_ok_hosts, + 'services_warning_handled' => $this->statusSummary->services_warning_handled_on_ok_hosts, + 'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_ok_hosts, + 'services_warning_passive' => $this->statusSummary->services_warning_passive_on_ok_hosts, + 'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_ok_hosts, + 'services_critical_handled' => $this->statusSummary->services_critical_handled_on_ok_hosts, + 'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_ok_hosts, + 'services_critical_passive' => $this->statusSummary->services_critical_passive_on_ok_hosts, + 'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_ok_hosts, + 'services_unknown_handled' => $this->statusSummary->services_unknown_handled_on_ok_hosts, + 'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_ok_hosts, + 'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_ok_hosts, + 'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_ok_hosts + ) + ); ?> + +
+

0

+ translate('Service Problems'); ?> -
-statusSummary->hosts_up || $this->statusSummary->hosts_pending): ?> - partial( - 'tactical/components/parts/servicestatesummarybyhoststate.phtml', - array( - 'host_problem' => 0, - 'services_ok' => $this->statusSummary->services_ok_on_ok_hosts, - 'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_ok_hosts, - 'services_pending' => $this->statusSummary->services_pending_on_ok_hosts, - 'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_ok_hosts, - 'services_warning_handled' => $this->statusSummary->services_warning_handled_on_ok_hosts, - 'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_ok_hosts, - 'services_warning_passive' => $this->statusSummary->services_warning_passive_on_ok_hosts, - 'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_ok_hosts, - 'services_critical_handled' => $this->statusSummary->services_critical_handled_on_ok_hosts, - 'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_ok_hosts, - 'services_critical_passive' => $this->statusSummary->services_critical_passive_on_ok_hosts, - 'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_ok_hosts, - 'services_unknown_handled' => $this->statusSummary->services_unknown_handled_on_ok_hosts, - 'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_ok_hosts, - 'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_ok_hosts, - 'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_ok_hosts - ) - ); ?> - -
diff --git a/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml b/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml index 35610e636..c5ecbe2fb 100644 --- a/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml +++ b/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml @@ -1,179 +1,46 @@ -
-

translate('Problem Hosts'); ?>

+
+statusSummary->hosts_down): ?> +

+ + translate('%d Hosts DOWN'), $this->statusSummary->hosts_down); ?> + +

+ +statusSummary->hosts_unreachable): ?> +

+ + translate('%d Hosts UNREACHABLE'), $this->statusSummary->hosts_unreachable); ?> + +

+
- - - - - - - - - - - - - -
translate('Hosts'); ?>translate('Services'); ?>
-statusSummary->hosts_down_handled || $this->statusSummary->hosts_down_unhandled): ?> -
-statusSummary->hosts_down_unhandled): ?> - - statusSummary->hosts_down_unhandled; ?> DOWN - - -statusSummary->hosts_down_handled): ?> - - statusSummary->hosts_down_handled . ' ' . $this->statusSummary->hosts_down_unhandled ? $this->translate('Acknowledged') : 'DOWN'; ?> - - -statusSummary->hosts_down_passive): ?> - - statusSummary->hosts_down_passive > 1) { - printf( - $this->translate('%d are passively checked'), - $this->statusSummary->hosts_down_passive - ); - } else { - printf( - $this->translate('%d is passively checked'), - $this->statusSummary->hosts_down_passive - ); - } - ?> - - -statusSummary->hosts_down_not_checked): ?> - - statusSummary->hosts_down_not_checked > 1) { - printf( - $this->translate('%d are not checked at all'), - $this->statusSummary->hosts_down_not_checked - ); - } else { - printf( - $this->translate('%d is not checked at all'), - $this->statusSummary->hosts_down_not_checked - ); - } - ?> - - -
- -statusSummary->hosts_unreachable_handled || $this->statusSummary->hosts_unreachable_unhandled): ?> -
-statusSummary->hosts_unreachable_unhandled): ?> - - statusSummary->hosts_unreachable_unhandled; ?> UNREACHABLE - - -statusSummary->hosts_unreachable_handled): ?> - - statusSummary->hosts_unreachable . ' ' . $this->statusSummary->hosts_unreachable_unhandled ? $this->translate('Acknowledged') : 'UNREACHABLE'; ?> - - -statusSummary->hosts_unreachable_passive): ?> - - statusSummary->hosts_unreachable_passive > 1) { - printf( - $this->translate('%d are passively checked'), - $this->statusSummary->hosts_unreachable_passive - ); - } else { - printf( - $this->translate('%d is passively checked'), - $this->statusSummary->hosts_unreachable_passive - ); - } - ?> - - -statusSummary->hosts_unreachable_not_checked): ?> - - statusSummary->hosts_unreachable_not_checked > 1) { - printf( - $this->translate('%d are not checked at all'), - $this->statusSummary->hosts_unreachable_not_checked - ); - } else { - printf( - $this->translate('%d is not checked at all'), - $this->statusSummary->hosts_unreachable_not_checked - ); - } - ?> - - -
- -
- partial( - 'tactical/components/parts/servicestatesummarybyhoststate.phtml', - array( - 'host_problem' => 1, - 'services_ok' => $this->statusSummary->services_ok_on_problem_hosts, - 'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_problem_hosts, - 'services_pending' => $this->statusSummary->services_pending_on_problem_hosts, - 'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_problem_hosts, - 'services_warning_handled' => $this->statusSummary->services_warning_handled_on_problem_hosts, - 'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_problem_hosts, - 'services_warning_passive' => $this->statusSummary->services_warning_passive_on_problem_hosts, - 'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_problem_hosts, - 'services_critical_handled' => $this->statusSummary->services_critical_handled_on_problem_hosts, - 'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_problem_hosts, - 'services_critical_passive' => $this->statusSummary->services_critical_passive_on_problem_hosts, - 'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_problem_hosts, - 'services_unknown_handled' => $this->statusSummary->services_unknown_handled_on_problem_hosts, - 'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_problem_hosts, - 'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_problem_hosts, - 'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_problem_hosts - ) - ); ?> -
+ translate('Services'); ?> + partial( + 'tactical/components/parts/servicestatesummarybyhoststate.phtml', + array( + 'host_problem' => 1, + 'services_ok' => $this->statusSummary->services_ok_on_problem_hosts, + 'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_problem_hosts, + 'services_pending' => $this->statusSummary->services_pending_on_problem_hosts, + 'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_problem_hosts, + 'services_warning_handled' => $this->statusSummary->services_warning_handled_on_problem_hosts, + 'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_problem_hosts, + 'services_warning_passive' => $this->statusSummary->services_warning_passive_on_problem_hosts, + 'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_problem_hosts, + 'services_critical_handled' => $this->statusSummary->services_critical_handled_on_problem_hosts, + 'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_problem_hosts, + 'services_critical_passive' => $this->statusSummary->services_critical_passive_on_problem_hosts, + 'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_problem_hosts, + 'services_unknown_handled' => $this->statusSummary->services_unknown_handled_on_problem_hosts, + 'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_problem_hosts, + 'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_problem_hosts, + 'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_problem_hosts + ) + ); ?>
diff --git a/modules/monitoring/application/views/scripts/tactical/index.phtml b/modules/monitoring/application/views/scripts/tactical/index.phtml index 7e3b9a3e9..4711a4411 100644 --- a/modules/monitoring/application/views/scripts/tactical/index.phtml +++ b/modules/monitoring/application/views/scripts/tactical/index.phtml @@ -5,9 +5,12 @@
+statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?> render('tactical/components/problem_hosts.phtml'); ?> + +statusSummary->hosts_up || $this->statusSummary->hosts_pending): ?> render('tactical/components/ok_hosts.phtml'); ?> -
+ render('tactical/components/hostservicechecks.phtml'); ?> render('tactical/components/monitoringfeatures.phtml'); ?>
diff --git a/public/css/icinga/monitoring-colors.less b/public/css/icinga/monitoring-colors.less index 043cecc73..6c15489eb 100644 --- a/public/css/icinga/monitoring-colors.less +++ b/public/css/icinga/monitoring-colors.less @@ -237,23 +237,36 @@ a.critical { /* Box caption */ .boxview div.box h2 { - margin-top: 0.2em; - margin-bottom: 0.6em; - - color: white; - font-weight: bold; -} - -.boxview div.box h3 { margin-top: 0; margin-bottom: 0.6em; font-size: 0.8em; - + color: #eee; } +.boxview div.box h2:first-child { + margin-top: 0.2em; + font-size: inherit; + + color: white; +} + +.boxview div.box h2 > a { + color: inherit; +} + +.boxview div.box h2 > a:hover { + color: #fafafa; +} + +.boxview div.box h2:first-child > a:hover { + color: #dfdfdf; +} + /* Box body of contents */ .boxview div.box.contents { + padding: 0.2em; + background: #fbfbfb; border-radius: 0.4em; -moz-border-radius: 0.4em; @@ -377,8 +390,64 @@ div.box.entry.handled a:hover { /* Tactical overview element styles */ -div.tactical div.box { - min-height: 15em; +.tactical > .boxview > div.box { + min-height: 17em; +} + +.tactical div.box.contents { + min-height: 14.5em; +} + +div.box.contents.zero { + min-width: 11.1em; + + background-color: transparent; +} + +div.box.contents.zero span { + font-weight: bold; + + color: white; +} + +div.box.contents.zero h3 { + margin: 0; + font-size: 12em; + line-height: 1em; + + color: white; +} + +div.box.ok_hosts.state_up { + background-color: @colorOk; +} + +div.box.ok_hosts.state_pending { + background-color: @colorPending; +} + +div.box.problem_hosts.state_down { + background-color: @colorCritical; +} + +div.box.problem_hosts.state_down.handled { + background-color: @colorCriticalHandled; +} + +div.box.problem_hosts.state_unreachable { + background-color: @colorUnreachable; +} + +div.box.problem_hosts.state_unreachable.handled { + background-color: @colorUnreachableHandled; +} + +div.box.ok_hosts div.box.entry, div.box.problem_hosts div.box.entry { + min-width: 11.1em; +} + +div.box.monitoringfeatures div.box.contents { + padding: 0 0 0.4em; } div.box.monitoringfeatures div.box-separator { diff --git a/public/js/icinga/history.js b/public/js/icinga/history.js index f86550c3a..f6acf482c 100644 --- a/public/js/icinga/history.js +++ b/public/js/icinga/history.js @@ -49,6 +49,7 @@ ) { this.enabled = true; this.icinga.logger.debug('History API enabled'); + this.applyLocationBar(); $(window).on('popstate', { self: this }, this.onHistoryChange); } @@ -98,9 +99,7 @@ var self = event.data.self, icinga = self.icinga, - onload, - main, - parts; + onload; icinga.logger.debug('Got a history change'); @@ -117,6 +116,15 @@ icinga.logger.debug('History state', event.originalEvent.state); } + self.applyLocationBar(); + + }, + + applyLocationBar: function () { + var icinga = this.icinga, + main, + parts; + // TODO: Still hardcoding col1/col2, shall be dynamic soon main = document.location.pathname + document.location.search; if ($('#col1').data('icingaUrl') !== main) { @@ -145,7 +153,6 @@ // TODO: Replace with dynamic columns icinga.ui.layout1col(); } - }, /**