fix: try unescape client name in slow log

doc: update screenshots
This commit is contained in:
tiny-craft 2023-11-03 10:50:51 +08:00
parent dc39b5ea3e
commit 75abd66c46
5 changed files with 6 additions and 1 deletions

View File

@ -1659,9 +1659,14 @@ func (c *connectionService) GetSlowLogs(connName string, db int, num int64) (res
}
list := sliceutil.Map(logs, func(i int) slowLogItem {
var name string
var e error
if name, e = url.QueryUnescape(logs[i].ClientName); e != nil {
name = logs[i].ClientName
}
return slowLogItem{
Timestamp: logs[i].Time.UnixMilli(),
Client: logs[i].ClientName,
Client: name,
Addr: logs[i].ClientAddr,
Cmd: sliceutil.JoinString(logs[i].Args, " "),
Cost: logs[i].Duration.Milliseconds(),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 KiB

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

After

Width:  |  Height:  |  Size: 377 KiB