harness-drone/cmd/drone-server/static/scripts/views/build.html
2015-06-22 22:36:50 -07:00

64 lines
2.3 KiB
HTML

<header>
<a class="logo float-left" href="/"></a>
<a class="menu-item settings float-right" href="/profile"></a>
<a class="menu-item users float-right" href="/users" ng-if="user.admin"></a>
<a class="menu-item help float-right" href="http://readme.drone.io" target="_blank"></a>
<a class="menu-item user-name float-right" href="/profile">{{ "+"+user.login }}</a>
</header>
<div class="toolbar">
<div class="breadcrumb" style="position:relative;top:0px;">
<a ng-href="/{{ repo.full_name }}" class="icon icon-home"></a>
<a ng-href="/{{ repo.full_name }}">{{ repo.owner }} / {{ repo.name }}</a>
<span class="spacer"></span>
<a ng-href="#">{{ build.number }}</a>
</div>
<div class="menu">
<a href="settings.html" class="icon icon-settings"></a>
<a ng-href="/{{ repo.full_name }}/edit" class="nav-item settings float-right"></a>
<button ng-click="watch(repo)" ng-if="!repo.starred" class="nav-item star float-right"></button>
<button ng-click="unwatch(repo)" ng-if="repo.starred" class="nav-item unstar float-right"></button>
</div>
</div>
<article>
<section class="commit-section">
<div class="row build-row">
<div>
<div ng-class="[ 'build-num', build.status ]"></div>
</div>
<div>
<h3>{{ build.head_commit.message }}</h3>
<p><strong>{{ build.head_commit.author.login }}</strong> pushed to <strong>{{ build.head_commit.branch }}</strong> {{ build.started_at | fromNow }}</p>
<div style="position:absolute;top:30px;right:30px;color:#CCC;"># {{build.number}}</div>
</div>
</div>
</section>
<section>
<a class="row build-row sub-build-row" ng-repeat="job in build.jobs" ng-href="{{ repo.full_name }}/{{ build.number }}/{{ job.number }}">
<div>
<div ng-class="[ 'build-num', build.status ]"></div>
</div>
<div>
<h3>
<div ng-repeat="(key, value) in job.environment">
{{ key.toUpperCase() }}={{ value }}
</div>
</h3>
<div style="position:absolute;top:30px;right:30px;color:#CCC;"># {{job.number}}</div>
</div>
</a>
</section>
</article>
<button ng-if="build.status !== 'pending' && build.status !== 'running'" ng-click="restart()">Restart</button>
<button ng-if="build.status === 'pending' || build.status === 'running'" ng-click="cancel()">Cancel</button>