Skip to content

Commit

Permalink
default branch name to master if there's none supplied yet #532
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Sep 10, 2013
1 parent cecc296 commit 01e2b34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/wiki/html/viewPage.html
Expand Up @@ -2,7 +2,7 @@
<div class="logbar" ng-controller="Wiki.NavBarController">
<div class="wiki logbar-container">
<ul class="nav nav-tabs">
<li ng-show="branches.length" class="dropdown">
<li ng-show="branches.length || branch" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
title="The branch to view">
{{branch || 'branch'}}
Expand Down
4 changes: 4 additions & 0 deletions hawtio-web/src/main/webapp/app/wiki/js/view.ts
Expand Up @@ -388,6 +388,10 @@ module Wiki {

function onBranches(response) {
$scope.branches = response;
// default the branch name if we have 'master'
if (!$scope.branch && $scope.branches.find("master")) {
$scope.branch = "master";
}
}

function onFormSchema(json) {
Expand Down

0 comments on commit 01e2b34

Please sign in to comment.