1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

fix(cds/favorites): next key

Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
This commit is contained in:
Yvonnick Esnault 2020-02-11 15:11:10 +01:00
parent 25bcd15793
commit 2c6e546e1a
2 changed files with 2 additions and 4 deletions

View File

@ -43,7 +43,6 @@ func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *
widget.SetDisplayFunction(widget.display)
widget.Unselect()
widget.KeyboardWidget.SetView(widget.View)
widget.client = cdsclient.New(cdsclient.Config{
@ -136,7 +135,6 @@ func (widget *Widget) currentCDSWorkflow() *sdk.Workflow {
if widget.Idx < 0 || widget.Idx >= len(widget.workflows) {
widget.Idx = 0
return nil
}
p := widget.workflows[widget.Idx]

View File

@ -27,12 +27,12 @@ func (widget *Widget) content() (string, string, bool) {
func (widget *Widget) displayStatus() string {
status, err := widget.client.MonStatus()
widget.SetItemCount(len(status.Lines))
if err != nil || len(status.Lines) == 0 {
return fmt.Sprintf(" [red]Error: %v[white]\n", err.Error())
}
widget.SetItemCount(len(status.Lines))
var (
global []string
globalWarn []string