mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-28 04:41:09 +00:00
2d837cc3db
This allows the same SHA to have different builds on different branches, each separately viewable. This is useful for expressing a "pipeline" in terms of branches, e.g. a commit starts on branch A and progress through B and C to master, with the build script switching on branch name. Previously viewing each build would arbitrarily choose which branch's commit to show.
81 lines
2.5 KiB
HTML
81 lines
2.5 KiB
HTML
{{ define "title" }}{{.Repo.Slug}} · Dashboard{{ end }}
|
|
|
|
{{ define "content" }}
|
|
<div class="subhead">
|
|
<div class="container">
|
|
<ul class="nav nav-tabs pull-right">
|
|
<li class="active"><a href="/{{.Repo.Slug}}">Commits</a></li>
|
|
<li><a href="/{{.Repo.Slug}}/settings">Settings</a></li>
|
|
</ul> <!-- ./nav -->
|
|
<h1>
|
|
<span>{{.Repo.Name}}</span>
|
|
<small>{{.Repo.Owner}}</small>
|
|
</h1>
|
|
</div><!-- ./container -->
|
|
</div><!-- ./subhead -->
|
|
|
|
{{ $repo := .Repo }}
|
|
{{ $branch := .Branch }}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-8" role="main">
|
|
<a class="btn btn-refresh hide" href="/{{.Repo.Slug}}/tree?branch={{.Branch}}">
|
|
<i class="fa fa-rotate-right"></i>
|
|
<span>0 new</span>
|
|
</a>
|
|
|
|
{{ if .Commits }}
|
|
<ul class="commit-list commit-list-alt">
|
|
{{ range .Commits }}
|
|
<li>
|
|
<a href="/{{$repo.Slug}}/commit/{{.Branch}}/{{.Hash}}" class="btn btn-{{.Status}}"></a>
|
|
<h3>
|
|
<a href="/{{$repo.Slug}}/commit/{{.Branch}}/{{.Hash}}">{{.HashShort}}</a>
|
|
<small class="timeago" title="{{.CreatedString}}"></small>
|
|
{{ if .PullRequest }}
|
|
<p>opened pull request <a href="/{{$repo.Slug}}/commit/{{.Branch}}/{{.Hash}}"># {{.PullRequest}}</a></p>
|
|
{{ else }}
|
|
<p>{{.Message}} </p>
|
|
{{ end }}
|
|
</h3>
|
|
<img src="{{.Image}}" />
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</div><!-- ./col-xs-8 -->
|
|
|
|
<div class="col-xs-4" style="padding-left:20px;">
|
|
<ul class="nav nav-pills nav-stacked nav-branches">
|
|
{{ range .Branches }}
|
|
<li{{ if eq $branch .Branch }} class="active"{{end}}>
|
|
<a href="/{{ $repo.Slug }}/tree?branch={{.Branch}}">
|
|
<span class="btn btn-mini btn-{{.Status}} "></span>
|
|
<span>{{.Branch}}</span>
|
|
</a>
|
|
<li>
|
|
{{ end }}
|
|
</ul>
|
|
</div><!-- ./col-xs-4 -->
|
|
</div><!-- ./row -->
|
|
</div><!-- ./container -->
|
|
{{ end }}
|
|
|
|
{{ define "script" }}
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.1.0/jquery.timeago.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
$(".timeago").timeago();
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
var updates = 0;
|
|
var ws = new WebSocket((window.location.protocol=='http:'?'ws':'wss')+'://'+window.location.host+'/feed?token='+{{ .Token}});
|
|
ws.onmessage = function (e) {
|
|
updates = updates+1;
|
|
$(".btn-refresh span").text(updates + " new")
|
|
$(".btn-refresh").show().removeClass("hide");
|
|
};
|
|
</script>
|
|
{{ end }}
|