| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package buildbot | 5 package buildbot |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "compress/gzip" | 9 "compress/gzip" |
| 10 "encoding/json" | 10 "encoding/json" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 continue | 133 continue |
| 134 } | 134 } |
| 135 ml := resp.BuilderGroup{Name: entry.Name} | 135 ml := resp.BuilderGroup{Name: entry.Name} |
| 136 // Sort the builder listing. | 136 // Sort the builder listing. |
| 137 sb := make([]string, 0, len(master.Builders)) | 137 sb := make([]string, 0, len(master.Builders)) |
| 138 for bn := range master.Builders { | 138 for bn := range master.Builders { |
| 139 sb = append(sb, bn) | 139 sb = append(sb, bn) |
| 140 } | 140 } |
| 141 sort.Strings(sb) | 141 sort.Strings(sb) |
| 142 for _, bn := range sb { | 142 for _, bn := range sb { |
| 143 » » » ml.Builders = append(ml.Builders, resp.Link{ | 143 » » » // Go templates escapes this for us, and also |
| 144 » » » » Label: bn, | 144 » » » // slashes are not allowed in builder names. |
| 145 » » » » // Go templates escapes this for us, and also | 145 » » » ml.Builders = append(ml.Builders, *resp.NewLink( |
| 146 » » » » // slashes are not allowed in builder names. | 146 » » » » bn, fmt.Sprintf("/buildbot/%s/%s", entry.Name, b
n))) |
| 147 » » » » URL: fmt.Sprintf("/buildbot/%s/%s", entry.Name,
bn), | |
| 148 » » » }) | |
| 149 } | 147 } |
| 150 result.BuilderGroups = append(result.BuilderGroups, ml) | 148 result.BuilderGroups = append(result.BuilderGroups, ml) |
| 151 } | 149 } |
| 152 return result, nil | 150 return result, nil |
| 153 } | 151 } |
| OLD | NEW |