Skip to content

Commit

Permalink
fix: try unescape client name in slow log
Browse files Browse the repository at this point in the history
doc: update screenshots
  • Loading branch information
tiny-craft committed Nov 3, 2023
1 parent dc39b5e commit 75abd66
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/services/connection_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Binary file modified screenshots/dark_en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/dark_zh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/light_en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/light_zh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 75abd66

Please sign in to comment.