Hide config in new instances and add exceptions to log

This commit is contained in:
Tulir Asokan 2018-11-27 00:53:19 +02:00
parent 034eead840
commit 73e86ebb17
3 changed files with 9 additions and 5 deletions

View File

@ -149,12 +149,13 @@ class Instance extends BaseMainView {
value={this.selectedPluginEntry}
onChange={({ id }) => this.setState({ type: id })}/>
</PrefTable>
{!this.isNew &&
<AceEditor mode="yaml" theme="github" onChange={config => this.setState({ config })}
name="config" value={this.state.config}
editorProps={{
fontSize: "10pt",
$blockScrolling: true,
}}/>
}}/>}
<div className="buttons">
{!this.isNew && (
<button className="delete" onClick={this.delete} disabled={this.loading}>

View File

@ -16,14 +16,17 @@
import React from "react"
const Log = ({ lines, showName = true }) => <div className="log">
{lines.map(data =>
{lines.map(data => <>
<div className="row" key={data.id}>
<span className="time">{data.time.toLocaleTimeString()}</span>
<span className="level">{data.levelname}</span>
{showName && <span className="logger">{data.name}</span>}
<span className="text">{data.msg}</span>
</div>,
)}
</div>
{data.exc_info && <div className="row exception" key={data.id + "-exc"}>
{data.exc_info.replace(/\\n/g, "\n")}
</div>}
</>)}
</div>
export default Log

View File

@ -97,7 +97,7 @@
overflow: auto
> div.row
white-space: nowrap
white-space: pre
> span.level:before
content: " ["