diff --git a/mcserver-manager/build.gradle b/mcserver-manager/build.gradle index 3471b72..0fdb140 100644 --- a/mcserver-manager/build.gradle +++ b/mcserver-manager/build.gradle @@ -1,5 +1,5 @@ group = 'asys' -version = '0.10.4-SNAPSHOT' +version = '0.10.5-SNAPSHOT' apply plugin: 'osgi' diff --git a/mcserver-manager/src/main/resources/components.js b/mcserver-manager/src/main/resources/components.js index f07bea5..ae8a9b1 100644 --- a/mcserver-manager/src/main/resources/components.js +++ b/mcserver-manager/src/main/resources/components.js @@ -199,7 +199,10 @@ var WebConsole = React.createClass({ ce('div', {id: 'webconsole'}, ce(ScrollingContent, {className: 'output'}, 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}) diff --git a/mcserver-manager/src/main/resources/moduleStyle.css b/mcserver-manager/src/main/resources/moduleStyle.css index 2a9fd62..621d064 100644 --- a/mcserver-manager/src/main/resources/moduleStyle.css +++ b/mcserver-manager/src/main/resources/moduleStyle.css @@ -26,6 +26,14 @@ 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 { width: 9px; background: #f00;