Permalink
Browse files

Merge branch 'HHQ-3142'

  • Loading branch information...
1 parent c7882ac commit c25a6c0b173e308585c547ac8f239722f99e2ff5 Ryan Morgan committed May 22, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 hqu/hqapi1/app/AlertdefinitionController.groovy
@@ -193,7 +193,7 @@ public class AlertdefinitionController extends ApiController {
out << failureXml
} else {
out << getSuccessXML()
- for (definition in definitions) {
+ for (definition in definitions.sort {a, b -> a.id <=> b.id}) {
out << getAlertDefinitionXML(definition, false)
}
}
@@ -213,7 +213,8 @@ public class AlertdefinitionController extends ApiController {
renderXml() {
out << AlertDefinitionsResponse() {
out << getSuccessXML()
- for (definition in definitions) {
+ // Order by id's so recoveries come after problem alerts
+ for (definition in definitions.sort {a, b -> a.id <=> b.id}) {
out << getAlertDefinitionXML(definition, noIds)
}
}

0 comments on commit c25a6c0

Please sign in to comment.