Skip to content

Commit

Permalink
Sort queries and graph descriptions alphabetically when shown in Drop…
Browse files Browse the repository at this point in the history
…down
  • Loading branch information
ylvion committed Apr 9, 2022
1 parent 033a64e commit b995925
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ public RedirectView deleteAnalysis(@RequestParam("flow") UUID analysisId) {
@GetMapping(BASE_URL + "/add")
public ModelAndView showAddAnalysis() {
ModelAndView mav = new ModelAndView("bootstrap/dave/analysis/detail");
mav.addObject("possibleQueries", this.daveAnalysisService.getAllQueries().toList());
mav.addObject("possibleGraphs", this.daveAnalysisService.getAllGraphDescriptions().toList());
mav.addObject("possibleQueries", this.daveAnalysisService.getAllQueries()
.sorted(Comparator.comparing(DaveQuery::getName))
.toList());
mav.addObject("possibleGraphs", this.daveAnalysisService.getAllGraphDescriptions()
.sorted(Comparator.comparing(DaveGraphDescription::getName))
.toList());
mav.addObject("method", "add");
return mav;
}
Expand Down

0 comments on commit b995925

Please sign in to comment.