mirror of
https://github.com/taigrr/wtf
synced 2026-03-22 20:32:18 -07:00
Handle offline scenarios for OpsGenie
This commit is contained in:
committed by
Chris Cummer
parent
204e3b4032
commit
aa658db210
@@ -34,13 +34,20 @@ func (widget *Widget) Refresh() {
|
||||
return
|
||||
}
|
||||
|
||||
data := Fetch()
|
||||
data, err := Fetch()
|
||||
|
||||
widget.View.SetTitle(" ⏰ On Call ")
|
||||
widget.RefreshedAt = time.Now()
|
||||
|
||||
widget.View.Clear()
|
||||
fmt.Fprintf(widget.View, "%s", widget.contentFrom(data))
|
||||
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
fmt.Fprintf(widget.View, "%s", err)
|
||||
} else {
|
||||
widget.View.SetWrap(false)
|
||||
fmt.Fprintf(widget.View, "%s", widget.contentFrom(data))
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
Reference in New Issue
Block a user