Remove extra spaces between logs

This commit is contained in:
Anthony Laibe 2018-10-17 09:07:06 +01:00 committed by Pascal Precht
parent eb8de02ed0
commit a118fc1017
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 10 additions and 2 deletions

View File

@ -66,6 +66,14 @@ class Console extends Component {
}
}
logClassName(item) {
return classnames('m-0', {
'text-info': item.logLevel === 'debug',
'text-danger': item.logLevel === 'error',
'text-warning': item.logLevel === 'warning'
});
}
renderTabs() {
const {processLogs, processes} = this.props;
@ -82,14 +90,14 @@ class Console extends Component {
if (this.isJsonObject(item)) {
return(
<div>
<p key={i} className={item.logLevel} dangerouslySetInnerHTML={{__html: (convert.toHtml(item.command || ""))}}></p>
<p key={i} className={this.logClassName(item)} dangerouslySetInnerHTML={{__html: (convert.toHtml(item.command || ""))}}></p>
<ReactJson src={JSON.parse(item.result)} theme="monokai" sortKeys={true} collapsed={1} />
</div>
)
}
return (
<p key={i} className={item.logLevel} dangerouslySetInnerHTML={{__html: (convert.toHtml(item.command || "") + convert.toHtml(item.msg))}}></p>
<p key={i} className={this.logClassName(item)} dangerouslySetInnerHTML={{__html: (convert.toHtml(item.command || "") + convert.toHtml(item.msg))}}></p>
)
})
}