mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add a helper function to do highlighting in a uniform way
This commit is contained in:
@@ -78,12 +78,12 @@ func (widget *Widget) contentFrom(triggeredMonitors []datadog.Monitor) string {
|
||||
"[red]Triggered Monitors[white]",
|
||||
)
|
||||
for idx, triggeredMonitor := range triggeredMonitors {
|
||||
str = str + fmt.Sprintf(`["%d"][%s][red] %s[%s][""]`,
|
||||
idx,
|
||||
row := fmt.Sprintf(`[%s][red] %s[%s]`,
|
||||
widget.RowColor(idx),
|
||||
*triggeredMonitor.Name,
|
||||
widget.RowColor(idx),
|
||||
) + "\n"
|
||||
)
|
||||
str += wtf.HighlightableHelper(widget.View, row, idx, len(*triggeredMonitor.Name))
|
||||
}
|
||||
} else {
|
||||
str += fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user