Skip to content

Commit

Permalink
fix config ids links
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Dec 11, 2021
1 parent eb7da72 commit 5e3acc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/reqmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func reqmgrConfigs(dasquery dasql.DASQuery) []mongo.DASRecord {
var configIds []string
for _, k := range req.ConfigIDs {
if v, ok := req.ConfigIDMap[k]; ok {
configIds = append(configIds, fmt.Sprintf("%s (%s)", k, v))
configIds = append(configIds, fmt.Sprintf("%s::%s", k, v))
} else {
configIds = append(configIds, k)
}
Expand Down
9 changes: 8 additions & 1 deletion web/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,14 @@ func PresentData(path string, dasquery dasql.DASQuery, data []mongo.DASRecord, p
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)
name := v
cid := v
if strings.Contains(v, "::") {
arr := strings.Split(v, "::")
cid = arr[0]
name = arr[1]
}
v = fmt.Sprintf("<a href=\"https://cmsweb.cern.ch/couchdb/reqmgr_config_cache/%s/configFile\">%s</a>", cid, name)
vals = append(vals, v)
}
value = strings.Join(vals, ", ")
Expand Down

0 comments on commit 5e3acc4

Please sign in to comment.