diff options
-rw-r--r-- | js/controller/generations.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/controller/generations.js b/js/controller/generations.js index 2b17a59..5eb237f 100644 --- a/js/controller/generations.js +++ b/js/controller/generations.js @@ -17,8 +17,13 @@ guix.generations.controller = function() { var generations = K.fromPromise(guix.generations.Generations()); + var sortedGenerations = generations.map(function(generations) { + return _.sortBy(generations, function(g) { + return -g.number; + }); + }); - return guix.ui.spinUntil(generations.map(function(generations) { + return guix.ui.spinUntil(sortedGenerations.map(function(generations) { return [ guix.ui.headerWithBadge("Generations", generations.length), m("table.table.table-bordered", [ |