Merge pull request #449 from Bugagazavr/exp-frontend-enchantments

Rebuild button and fix commit info for bitbucket
This commit is contained in:
Brad Rydzewski 2014-09-07 15:34:55 -07:00
commit eabe5415bd
2 changed files with 12 additions and 0 deletions

View file

@ -260,6 +260,9 @@ app.controller("CommitController", function($scope, $http, $routeParams, stdout,
console.log(data); console.log(data);
}); });
$scope.rebuildCommit = function() {
$http({method: 'POST', url: '/v1/repos/'+remote+'/'+owner+'/'+name+'/'+'branches/'+branch+'/'+'commits/'+commit+'/?action=rebuild' })
}
}); });

View file

@ -19,9 +19,11 @@
</strong> </strong>
</dd> </dd>
<dd class="large" ng-if="repo.remote == 'bitbucket.org' "> <dd class="large" ng-if="repo.remote == 'bitbucket.org' ">
<strong>
commit commit
<a href="http://{{ repo.host }}/{{ repo.owner }}/{{ repo.name }}/commits/{{ commit.sha }}" >{{ commit.sha | shortHash}}</a> <a href="http://{{ repo.host }}/{{ repo.owner }}/{{ repo.name }}/commits/{{ commit.sha }}" >{{ commit.sha | shortHash}}</a>
to <a href="http://{{ repo.host }}/{{ repo.owner }}/{{ repo.name }}/src/?at={{ commit.branch }}">{{ commit.branch }}</a> branch to <a href="http://{{ repo.host }}/{{ repo.owner }}/{{ repo.name }}/src/?at={{ commit.branch }}">{{ commit.branch }}</a> branch
</strong>
</dd> </dd>
<dd class="large" ng-if="repo.remote != 'gitlab.com' && repo.remote != 'github.com' && repo.remote != 'enterprise.github.com' && repo.remote != 'bitbucket.org' "> <dd class="large" ng-if="repo.remote != 'gitlab.com' && repo.remote != 'github.com' && repo.remote != 'enterprise.github.com' && repo.remote != 'bitbucket.org' ">
<strong>commit <u>{{ commit.sha | shortHash}}</u> to <u>{{ commit.branch }}</u> branch</strong> <strong>commit <u>{{ commit.sha | shortHash}}</u> to <u>{{ commit.branch }}</u> branch</strong>
@ -35,6 +37,13 @@
<div id="main" class="output"> <div id="main" class="output">
<div id="main" class="output" data-result="{{ commit.status }}"> <div id="main" class="output" data-result="{{ commit.status }}">
<nav> <nav>
<div class="options ng-scope" ng-if="repo.role.admin || repo.role.write">
<a class="pure-button pure-button-primary" ng-click="rebuildCommit()" href="#">
<i class="fa fa-refresh"></i>
<span>Rebuild</span>
</a>
</div>
<a href="/"><span class="fa fa-th"></span></a> <a href="/"><span class="fa fa-th"></span></a>
<span>{{ repo.owner }}</span> <span>{{ repo.owner }}</span>
<span>/</span> <span>/</span>