mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Merge pull request #449 from Bugagazavr/exp-frontend-enchantments
Rebuild button and fix commit info for bitbucket
This commit is contained in:
commit
eabe5415bd
2 changed files with 12 additions and 0 deletions
|
@ -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' })
|
||||
}
|
||||
|
||||
|
||||
});
|
|
@ -19,9 +19,11 @@
|
|||
</strong>
|
||||
</dd>
|
||||
<dd class="large" ng-if="repo.remote == 'bitbucket.org' ">
|
||||
<strong>
|
||||
commit
|
||||
<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
|
||||
</strong>
|
||||
</dd>
|
||||
<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>
|
||||
|
@ -35,6 +37,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>
|
||||
|
|
Loading…
Reference in a new issue