From b49cefa45d4afd6281111612e7f31131a9c18364 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 21 Dec 2015 12:25:24 +0100 Subject: [PATCH] monitoring: Highlight state in plugin output in the detail area refs #10670 --- .../views/helpers/PluginOutput.php | 12 ++++----- modules/monitoring/public/css/module.less | 26 ++++++++++++++++++- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php index 56b7e366d..706dd015c 100644 --- a/modules/monitoring/application/views/helpers/PluginOutput.php +++ b/modules/monitoring/application/views/helpers/PluginOutput.php @@ -20,10 +20,10 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract "\n", "\t", "\n", - '$1OK$2', - '$1WARNING$2', - '$1CRITICAL$2', - '$1UNKNOWN$2', + '$1OK$2', + '$1WARNING$2', + '$1CRITICAL$2', + '$1UNKNOWN$2', '@@@@@@', ); @@ -54,9 +54,9 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract if (! $raw) { if ($isHtml) { - $output = '
' . $output . '
'; + $output = '
' . $output . '
'; } else { - $output = '
' . $output . '
'; + $output = '
' . $output . '
'; } } return $output; diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 3eb269d82..b7017d667 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -415,9 +415,33 @@ form.instance-features span.description, form.object-features span.description { } } -div.pluginoutput { +.plugin-output { border-left: 5px solid @gray-lighter; padding: 0.66em 0.33em; + + .state-critical { + background-color: @color-critical; + color: @body-bg-color; + padding: 0.2em; + } + + .state-ok { + background-color: @color-ok; + color: @body-bg-color; + padding: 0.2em; + } + + .state-unknown { + background-color: @color-unknown; + color: @body-bg-color; + padding: 0.2em; + } + + .state-warning { + background-color: @color-warning; + color: @body-bg-color; + padding: 0.2em; + } } .go-ahead > a {