Hide config in new instances and add exceptions to log
This commit is contained in:
parent
034eead840
commit
73e86ebb17
@ -149,12 +149,13 @@ class Instance extends BaseMainView {
|
|||||||
value={this.selectedPluginEntry}
|
value={this.selectedPluginEntry}
|
||||||
onChange={({ id }) => this.setState({ type: id })}/>
|
onChange={({ id }) => this.setState({ type: id })}/>
|
||||||
</PrefTable>
|
</PrefTable>
|
||||||
|
{!this.isNew &&
|
||||||
<AceEditor mode="yaml" theme="github" onChange={config => this.setState({ config })}
|
<AceEditor mode="yaml" theme="github" onChange={config => this.setState({ config })}
|
||||||
name="config" value={this.state.config}
|
name="config" value={this.state.config}
|
||||||
editorProps={{
|
editorProps={{
|
||||||
fontSize: "10pt",
|
fontSize: "10pt",
|
||||||
$blockScrolling: true,
|
$blockScrolling: true,
|
||||||
}}/>
|
}}/>}
|
||||||
<div className="buttons">
|
<div className="buttons">
|
||||||
{!this.isNew && (
|
{!this.isNew && (
|
||||||
<button className="delete" onClick={this.delete} disabled={this.loading}>
|
<button className="delete" onClick={this.delete} disabled={this.loading}>
|
||||||
|
@ -16,14 +16,17 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
const Log = ({ lines, showName = true }) => <div className="log">
|
const Log = ({ lines, showName = true }) => <div className="log">
|
||||||
{lines.map(data =>
|
{lines.map(data => <>
|
||||||
<div className="row" key={data.id}>
|
<div className="row" key={data.id}>
|
||||||
<span className="time">{data.time.toLocaleTimeString()}</span>
|
<span className="time">{data.time.toLocaleTimeString()}</span>
|
||||||
<span className="level">{data.levelname}</span>
|
<span className="level">{data.levelname}</span>
|
||||||
{showName && <span className="logger">{data.name}</span>}
|
{showName && <span className="logger">{data.name}</span>}
|
||||||
<span className="text">{data.msg}</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>
|
</div>
|
||||||
|
|
||||||
export default Log
|
export default Log
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
overflow: auto
|
overflow: auto
|
||||||
|
|
||||||
> div.row
|
> div.row
|
||||||
white-space: nowrap
|
white-space: pre
|
||||||
|
|
||||||
> span.level:before
|
> span.level:before
|
||||||
content: " ["
|
content: " ["
|
||||||
|
Loading…
Reference in New Issue
Block a user