mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge pull request #589 from lesteenman/WTF-575-url-decode-jenkins-job-names
WTF-575: URL-Decode Jenkins branch names
This commit is contained in:
commit
fcda904e1b
@ -5,6 +5,7 @@ import (
|
|||||||
"github.com/rivo/tview"
|
"github.com/rivo/tview"
|
||||||
"github.com/wtfutil/wtf/utils"
|
"github.com/wtfutil/wtf/utils"
|
||||||
"github.com/wtfutil/wtf/view"
|
"github.com/wtfutil/wtf/view"
|
||||||
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Widget struct {
|
type Widget struct {
|
||||||
@ -75,12 +76,13 @@ func (widget *Widget) content() (string, string, bool) {
|
|||||||
var str string
|
var str string
|
||||||
jobs := widget.view.Jobs
|
jobs := widget.view.Jobs
|
||||||
for idx, job := range jobs {
|
for idx, job := range jobs {
|
||||||
|
jobName, _ := url.QueryUnescape(job.Name)
|
||||||
|
|
||||||
row := fmt.Sprintf(
|
row := fmt.Sprintf(
|
||||||
`[%s] [%s]%-6s[white]`,
|
`[%s] [%s]%-6s[white]`,
|
||||||
widget.RowColor(idx),
|
widget.RowColor(idx),
|
||||||
widget.jobColor(&job),
|
widget.jobColor(&job),
|
||||||
job.Name,
|
jobName,
|
||||||
)
|
)
|
||||||
|
|
||||||
str += utils.HighlightableHelper(widget.View, row, idx, len(job.Name))
|
str += utils.HighlightableHelper(widget.View, row, idx, len(job.Name))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user