Add support for new log type in frontend
This commit is contained in:
parent
37c492cbf3
commit
8c6628470e
@ -26,11 +26,12 @@ class LogEntry extends PureComponent {
|
||||
const line = this.props.line
|
||||
if (line.nameLink) {
|
||||
const modal = this.context
|
||||
return (
|
||||
return <>
|
||||
<Link to={line.nameLink} onClick={modal.close}>
|
||||
{line.name}
|
||||
</Link>
|
||||
)
|
||||
{line.nameSuffix}
|
||||
</>
|
||||
}
|
||||
return line.name
|
||||
}
|
||||
|
@ -94,10 +94,15 @@ class Dashboard extends Component {
|
||||
|
||||
const processEntry = (entry) => {
|
||||
entry.time = new Date(entry.time)
|
||||
entry.nameSuffix = ""
|
||||
if (entry.name.startsWith("maubot.")) {
|
||||
entry.name = entry.name.substr("maubot.".length)
|
||||
}
|
||||
if (entry.name.startsWith("client.")) {
|
||||
if (entry.name.endsWith(".crypto")) {
|
||||
entry.name = entry.name.slice(0, -".crypto".length)
|
||||
entry.nameSuffix = "/crypto"
|
||||
}
|
||||
entry.name = entry.name.substr("client.".length)
|
||||
entry.nameLink = `/client/${entry.name}`
|
||||
} else if (entry.name.startsWith("instance.")) {
|
||||
|
Loading…
Reference in New Issue
Block a user