harness-drone/server/app/views/repo.html
2014-07-14 00:00:04 -07:00

51 lines
No EOL
2.3 KiB
HTML

<div class="toast" ng-if="msg != undefined">
<span>commit </span>
<a href="/{{ msg.repo | fullPath }}/{{ msg.commit.branch }}/{{ msg.commit.sha }}">{{ msg.commit.sha | shortHash }}</a>
<span ng-if="msg.commit.status == 'Started'">is running</span>
<span ng-if="msg.commit.status == 'Success'">finished successfully</span>
<span ng-if="msg.commit.status == 'Failure'">finished with errors</span>
<button ng-click="reload()">Reload</button>
</div>
<article id="repopage">
<nav>
<div class="options" ng-if="repo.role.admin">
<a class="pure-button pure-button-primary" href="/{{ repo | fullPath }}/settings">
<i class="fa fa-sliders"></i> Settings
</a>
</div>
<a href="/"><span class="fa fa-th"></span></a>
<span>{{ repo.owner }}</span>
<span>/</span>
<a href="/{{ repo | fullPath}}">{{ repo.name }}</a>
</nav>
<section ng-if="repo.active == false" class="inactive">
<h1>This will be your commit stream</h1>
<p>Activate this repository to start testing your commits</p>
<div><i class="fa fa-long-arrow-down"></i></div>
<button ng-click="activate()" class="pure-button pure-button-primary">Activate Now</button>
</section>
<section ng-if="repo.active == true && commits != undefined && commits.length == 0" class="nobuilds">
<h1>This will be your commit stream</h1>
<p>Setup a .drone.yml file to configure the build</p>
<div><i class="fa fa-file-code-o"></i></div>
</section>
<section ng-repeat="group in commits | unique: 'branch'">
<div class="pure-g cards">
<h2 class="pure-u-1" style="font-size:22px;margin-bottom:20px;"><i class="fa fa-code-fork"></i> {{group.branch}}</h2>
<a class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-4 pure-u-xl-1-4 card card" href="/{{ repo | fullPath }}/{{ commit.branch }}/{{ commit.sha }}" ng-repeat="commit in commits | filter: { branch: group.branch } | limitTo:4" data-status="{{ commit.status }}">
<div class="l-box">
<h2>{{ commit.message }}</h2>
<em ng-if="commit.finished_at != 0">{{ commit.finished_at | fromNow }}</em>
<em ng-if="commit.finished_at == 0 && commit.started_at != 0">Started {{ commit.started_at | fromNow }}</em>
<em ng-if="commit.finished_at == 0 && commit.started_at == 0">Created {{ commit.created_at}}</em>
<img ng-src="{{ commit.gravatar | gravatar }}" />
</div>
</a>
</div>
</section>
</article>