MCSM:Webconsole: окрашивание строк в соответствии со статусом
Ошибки в красный фон, предупреждения - желтый
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
group = 'asys'
|
group = 'asys'
|
||||||
version = '0.10.4-SNAPSHOT'
|
version = '0.10.5-SNAPSHOT'
|
||||||
|
|
||||||
apply plugin: 'osgi'
|
apply plugin: 'osgi'
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,10 @@ var WebConsole = React.createClass({
|
|||||||
ce('div', {id: 'webconsole'},
|
ce('div', {id: 'webconsole'},
|
||||||
ce(ScrollingContent, {className: 'output'},
|
ce(ScrollingContent, {className: 'output'},
|
||||||
this.state.lines.map(function(line){
|
this.state.lines.map(function(line){
|
||||||
return ce('p', {dangerouslySetInnerHTML: {__html: ansi_up.ansi_to_html(line)}});
|
var clazz = "";
|
||||||
|
if (line.indexOf('ERROR') !== -1) { clazz = "error"; }
|
||||||
|
else if (line.indexOf('WARN') !== -1) { clazz = "warn"; }
|
||||||
|
return ce('p', {className: clazz, dangerouslySetInnerHTML: {__html: ansi_up.ansi_to_html(line)}});
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
ce('input', {ref: 'input', 'onKeyPress': this.handleKeyInput})
|
ce('input', {ref: 'input', 'onKeyPress': this.handleKeyInput})
|
||||||
|
|||||||
@@ -26,6 +26,14 @@
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#webconsole .output .wrapper .content p.error {
|
||||||
|
background-color: rgba(255,0,0,0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
#webconsole .output .wrapper .content p.warn {
|
||||||
|
background-color: rgba(255,200,0,0.3);
|
||||||
|
}
|
||||||
|
|
||||||
#webconsole .output .scroll {
|
#webconsole .output .scroll {
|
||||||
width: 9px;
|
width: 9px;
|
||||||
background: #f00;
|
background: #f00;
|
||||||
|
|||||||
Reference in New Issue
Block a user