mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add multi-line scrolling support, timestamps to error view
This commit is contained in:
5
grid.go
5
grid.go
@@ -12,7 +12,8 @@ func ShowConnError(err error) (exit bool) {
|
||||
defer ui.DefaultEvtStream.ResetHandlers()
|
||||
|
||||
setErr := func(err error) {
|
||||
errView.Text = err.Error()
|
||||
errView.Append(err.Error())
|
||||
errView.Append("attempting to reconnect...")
|
||||
ui.Render(errView)
|
||||
}
|
||||
|
||||
@@ -21,7 +22,7 @@ func ShowConnError(err error) (exit bool) {
|
||||
ui.StopLoop()
|
||||
})
|
||||
|
||||
ui.Handle("/timer/1s", func(ui.Event) {
|
||||
ui.Handle("/timer/2s", func(ui.Event) {
|
||||
_, err := cursor.RefreshContainers()
|
||||
if err == nil {
|
||||
ui.StopLoop()
|
||||
|
||||
Reference in New Issue
Block a user