diff --git a/README.md b/README.md index f3b9ed6..bb3fa58 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,14 @@ directory of the project - GetConnections.ConnectionInfo.LocalPort=9091 or Name=java ##### filter connections (you should check the Connes and uncheck the Process) -ConnectionInfo.LocalPort = 2181 or ConnectionInfo.LocalPort = 9091 +- ConnectionInfo.LocalPort = 2181 or ConnectionInfo.LocalPort = 9091 ##### filter both (you should check the both) > Note: filter processes and connections at the same time it's only meaningful that you filter processes based on connection and you want see connections only satisfies the filter for process. so we just use `or` to concat two (or more) filter, but we known that one is for process and another is for connection. -GetConnections.ConnectionInfo.LocalPort = 2181 or ConnectionInfo.LocalPort = 2181 +- GetConnections.ConnectionInfo.LocalPort = 2181 or ConnectionInfo.LocalPort = 2181 > filter function implement based on [uni-filter](https://github.com/Ivlyth/uni-filter), see more document [here](https://github.com/Ivlyth/uni-filter/blob/main/README.md) diff --git a/go.mod b/go.mod index 93a2b3b..04934a6 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( ) require ( - github.com/Ivlyth/uni-filter v0.1.0 + github.com/Ivlyth/uni-filter v0.1.1 github.com/gdamore/tcell/v2 v2.5.2 github.com/gin-gonic/gin v1.8.1 github.com/gogo/protobuf v1.1.1 @@ -71,5 +71,3 @@ require ( golang.org/x/text v0.3.7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) - -replace github.com/Ivlyth/uni-filter => /Users/myth/workspace/tophant/uni-filter diff --git a/go.sum b/go.sum index 2dd9e66..d33a75e 100644 --- a/go.sum +++ b/go.sum @@ -33,6 +33,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Ivlyth/uni-filter v0.1.1 h1:AS/UCpPol7IYwCgGjBeYyt/DbrYtv4pp92kDK0r/OQY= +github.com/Ivlyth/uni-filter v0.1.1/go.mod h1:vykvxXRpp9keOwW/DRUxiK0AYj6eFVRhg0G/IsxgjYI= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= diff --git a/top/graph_panel.go b/top/graph_panel.go index 11cfa71..6c4f123 100644 --- a/top/graph_panel.go +++ b/top/graph_panel.go @@ -38,9 +38,9 @@ func refreshGraphPanel() { _, _, width, height := graphView.GetInnerRect() height -= 2 width -= 2 - if height <= 8 { + if height <= 4 { height = 0 - _, _ = graphView.Write([]byte("not enough height to draw the graph (at least 8)")) + _, _ = graphView.Write([]byte("not enough height to draw the graph (at least 4)")) } else { var in, out []float64 for _, h := range histories {