Skip to content

Commit

Permalink
Adjust config.ids
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Oct 28, 2021
1 parent c486d32 commit b8003a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions web/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ func dasLinks(path, inst, val string, links []interface{}) string {
for _, row := range links {
rec := row.(mongo.DASRecord)
name := rec["name"].(string)
if strings.Contains(name, "%s") {
name = fmt.Sprintf(name, val)
}
if v, ok := rec["query"]; ok {
q := v.(string)
if q != "" {
Expand Down Expand Up @@ -482,6 +485,15 @@ func PresentData(path string, dasquery dasql.DASQuery, data []mongo.DASRecord, p
if daskey == "lumi.number" {
value = joinLumis(strings.Split(value, ","))
}
if daskey == "config.ids" {
var vals []string
for _, vvv := range strings.Split(value, ",") {
v := strings.Trim(vvv, " ")
v = fmt.Sprintf("<a href=\"https://cmsweb.cern.ch/couchdb/reqmgr_config_cache/%s/configFile\">%s</a>", v, v)
vals = append(vals, v)
}
value = strings.Join(vals, ", ")
}
if pval == "" {
pval = value
}
Expand Down

0 comments on commit b8003a7

Please sign in to comment.