Skip to content

Commit

Permalink
Merge branch 'bugfix/state-colors-in-plugin-output-10670'
Browse files Browse the repository at this point in the history
fixes #10670
  • Loading branch information
lippserd committed Dec 21, 2015
2 parents 772ea10 + b49cefa commit 9f8ee4f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
12 changes: 6 additions & 6 deletions modules/monitoring/application/views/helpers/PluginOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
"\n",
"\t",
"\n",
'<span class="state ok">$1OK$2</span>',
'<span class="state warning">$1WARNING$2</span>',
'<span class="state critical">$1CRITICAL$2</span>',
'<span class="state error">$1UNKNOWN$2</span>',
'<span class="state-ok">$1OK$2</span>',
'<span class="state-warning">$1WARNING$2</span>',
'<span class="state-critical">$1CRITICAL$2</span>',
'<span class="state-unknown">$1UNKNOWN$2</span>',
'@@@@@@',
);

Expand Down Expand Up @@ -54,9 +54,9 @@ public function pluginOutput($output, $raw = false)

if (! $raw) {
if ($isHtml) {
$output = '<div class="pluginoutput">' . $output . '</div>';
$output = '<div class="plugin-output">' . $output . '</div>';
} else {
$output = '<div class="pluginoutput preformatted">' . $output . '</div>';
$output = '<div class="plugin-output preformatted">' . $output . '</div>';
}
}
return $output;
Expand Down
26 changes: 25 additions & 1 deletion modules/monitoring/public/css/module.less
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9f8ee4f

Please sign in to comment.