Add ability to rebuild commit

This commit is contained in:
Kirill Zaitsev 2014-09-08 02:11:20 +04:00
parent 34698d9aed
commit 4b07aedf67
2 changed files with 10 additions and 0 deletions

View file

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

View file

@ -35,6 +35,13 @@
<div id="main" class="output">
<div id="main" class="output" data-result="{{ commit.status }}">
<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>
<span>{{ repo.owner }}</span>
<span>/</span>