Merge branch 'master' into style-changes-bulletfactory

This commit is contained in:
Torkel Ödegaard
2016-02-12 10:14:06 +01:00
12 changed files with 85 additions and 46 deletions
+5
View File
@@ -126,6 +126,11 @@ func handleGetNamespaces(req *cwRequest, c *middleware.Context) {
for key := range metricsMap {
keys = append(keys, key)
}
if customMetricsNamespaces, ok := req.DataSource.JsonData["customMetricsNamespaces"].(string); ok {
for _, key := range strings.Split(customMetricsNamespaces, ",") {
keys = append(keys, key)
}
}
sort.Sort(sort.StringSlice(keys))
result := []interface{}{}
+1 -1
View File
@@ -84,7 +84,7 @@ func CreateOrg(c *middleware.Context, cmd m.CreateOrgCommand) Response {
cmd.UserId = c.UserId
if err := bus.Dispatch(&cmd); err != nil {
if err == m.ErrOrgNameTaken {
return ApiError(400, "Organization name taken", err)
return ApiError(409, "Organization name taken", err)
}
return ApiError(500, "Failed to create organization", err)
}