Skip to content

Commit

Permalink
sort branches by decreasing version order
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Dec 4, 2013
1 parent d1118ed commit 3c9fe19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion hawtio-web/src/main/webapp/app/wiki/js/view.ts
Expand Up @@ -67,7 +67,6 @@ module Wiki {


$scope.$on('wikiBranchesUpdated', function () {
log.info("Wiki branches updated!");
updateView();
});

Expand Down
4 changes: 3 additions & 1 deletion hawtio-web/src/main/webapp/app/wiki/js/wikiHelpers.ts
Expand Up @@ -400,7 +400,9 @@ module Wiki {
*/
export function loadBranches(wikiRepository, $scope) {
wikiRepository.branches((response) => {
$scope.branches = response;
// lets sort by version number
$scope.branches = response.sortBy((v) => Core.versionToSortableString(v), true);

// default the branch name if we have 'master'
if (!$scope.branch && $scope.branches.find((branch) => {
return branch === "master";
Expand Down

0 comments on commit 3c9fe19

Please sign in to comment.