mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Move the utils.go file into the /utils directory
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package datadog
|
||||
|
||||
import (
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
datadog "github.com/zorkian/go-datadog-api"
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@ func (widget *Widget) Monitors() ([]datadog.Monitor, error) {
|
||||
widget.settings.applicationKey,
|
||||
)
|
||||
|
||||
tags := wtf.ToStrs(widget.settings.tags)
|
||||
tags := utils.ToStrs(widget.settings.tags)
|
||||
|
||||
monitors, err := client.GetMonitorsByTags(tags)
|
||||
if err != nil {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
datadog "github.com/zorkian/go-datadog-api"
|
||||
)
|
||||
|
||||
@@ -84,7 +84,7 @@ func (widget *Widget) contentFrom(triggeredMonitors []datadog.Monitor) string {
|
||||
*triggeredMonitor.Name,
|
||||
widget.RowColor(idx),
|
||||
)
|
||||
str += wtf.HighlightableHelper(widget.View, row, idx, len(*triggeredMonitor.Name))
|
||||
str += utils.HighlightableHelper(widget.View, row, idx, len(*triggeredMonitor.Name))
|
||||
}
|
||||
} else {
|
||||
str += fmt.Sprintf(
|
||||
@@ -101,6 +101,6 @@ func (widget *Widget) openItem() {
|
||||
sel := widget.GetSelected()
|
||||
if sel >= 0 && widget.monitors != nil && sel < len(widget.monitors) {
|
||||
item := &widget.monitors[sel]
|
||||
wtf.OpenFile(fmt.Sprintf("https://app.datadoghq.com/monitors/%d?q=*", *item.Id))
|
||||
utils.OpenFile(fmt.Sprintf("https://app.datadoghq.com/monitors/%d?q=*", *item.Id))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user