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:
parent
25bcd15793
commit
2c6e546e1a
@ -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]
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user