sort metrics and dimensions
This commit is contained in:
@@ -132,6 +132,7 @@ func handleGetMetrics(req *cwRequest, c *middleware.Context) {
|
|||||||
c.JsonApiErr(404, "Unable to find namespace "+reqParam.Parameters.Namespace, nil)
|
c.JsonApiErr(404, "Unable to find namespace "+reqParam.Parameters.Namespace, nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
sort.Sort(sort.StringSlice(namespaceMetrics))
|
||||||
|
|
||||||
result := []interface{}{}
|
result := []interface{}{}
|
||||||
for _, name := range namespaceMetrics {
|
for _, name := range namespaceMetrics {
|
||||||
@@ -155,6 +156,7 @@ func handleGetDimensions(req *cwRequest, c *middleware.Context) {
|
|||||||
c.JsonApiErr(404, "Unable to find dimension "+reqParam.Parameters.Namespace, nil)
|
c.JsonApiErr(404, "Unable to find dimension "+reqParam.Parameters.Namespace, nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
sort.Sort(sort.StringSlice(dimensionValues))
|
||||||
|
|
||||||
result := []interface{}{}
|
result := []interface{}{}
|
||||||
for _, name := range dimensionValues {
|
for _, name := range dimensionValues {
|
||||||
|
|||||||
Reference in New Issue
Block a user