2014-06-04 21:25:38 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="{{"utf-8"}}" />
|
|
|
|
<meta name="{{"author"}}" content="{{"Brad Rydzewski"}}" />
|
|
|
|
<link rel="{{"shortcut icon"}}" href="{{"/static/images/favicon.png"}}" />
|
|
|
|
<link rel="{{"stylesheet"}}" href="{{"//yui.yahooapis.com/pure/0.4.2/pure-min.css"}}" />
|
|
|
|
<link rel="{{"stylesheet"}}" href="{{"//fonts.googleapis.com/css?family=Open+Sans"}}" />
|
|
|
|
<link rel="{{"stylesheet"}}" href="{{"//fonts.googleapis.com/css?family=Orbitron"}}" />
|
|
|
|
<link rel="{{"stylesheet"}}" href="{{"//fonts.googleapis.com/css?family=Droid+Sans+Mono"}}" />
|
|
|
|
<link rel="{{"stylesheet"}}" href="{{"//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"}}" />
|
|
|
|
<link rel="{{"stylesheet"}}" href="{{"/static/styles/drone.css"}}" />
|
|
|
|
<title>{{$__amber_1 := .Repo.Name}}{{$__amber_1}}
|
2014-06-07 19:17:48 +00:00
|
|
|
</title>
|
2014-06-04 21:25:38 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<a class="{{"header-brand"}}" href="{{"/"}}">Drone</a>{{if .User}}
|
|
|
|
<a href="{{"/account/profile"}}" class="{{"header-user"}}">{{$__amber_2 := .User.Gravatar}}{{$__amber_3 := __amber_add "//secure.gravatar.com/avatar/" $__amber_2}}{{$__amber_4 := __amber_add $__amber_3 "?s=64"}}
|
|
|
|
<img class="{{"header-avatar"}}" src="{{$__amber_4}}" />
|
|
|
|
<span class="{{"header-username"}}">{{$__amber_5 := .User.Login}}{{$__amber_5}}</span>
|
|
|
|
</a>{{else}}
|
2014-06-07 19:17:48 +00:00
|
|
|
<a href="{{"/login"}}" class="{{"header-login"}}">Login</a>{{end}}
|
2014-06-04 21:25:38 +00:00
|
|
|
</header>
|
|
|
|
<div>
|
|
|
|
<article class="{{"pure-g"}}">
|
|
|
|
<header class="{{"pure-u-1"}}">
|
|
|
|
<h1>
|
|
|
|
<span>{{$__amber_6 := .Repo.Owner}}{{$__amber_6}}</span>
|
|
|
|
<span>/</span>
|
|
|
|
<a href="{{"#"}}">{{$__amber_7 := .Repo.Name}}{{$__amber_7}}</a>
|
2014-06-06 00:10:58 +00:00
|
|
|
</h1>{{$__amber_8 := .Repo.Name}}{{$__amber_9 := .Repo.Owner}}{{$__amber_10 := .Repo.Host}}{{$__amber_11 := __amber_add "/" $__amber_10}}{{$__amber_12 := __amber_add $__amber_11 "/"}}{{$__amber_13 := __amber_add $__amber_12 $__amber_9}}{{$__amber_14 := __amber_add $__amber_13 "/"}}{{$__amber_15 := __amber_add $__amber_14 $__amber_8}}{{$__amber_16 := __amber_add $__amber_15 "/settings"}}
|
2014-06-04 21:25:38 +00:00
|
|
|
<a class="{{"pure-button"}}" href="{{$__amber_16}}">
|
|
|
|
<i class="{{"fa"}} {{"fa-cog"}}"></i>
|
|
|
|
</a>
|
2014-06-05 23:48:45 +00:00
|
|
|
</header>{{$repo := .Repo}}{{$__amber_17 := .Repo.Active}}{{if $__amber_17}}{{if .Commits}}
|
|
|
|
<section class="{{"pure-u-3-5"}}">
|
2014-06-06 00:10:58 +00:00
|
|
|
<div class="{{"commit-list"}}">{{range $commit := .Commits}}{{$__amber_18 := $repo.Name}}{{$__amber_19 := $repo.Owner}}{{$__amber_20 := $repo.Host}}{{$__amber_21 := __amber_add "/" $__amber_20}}{{$__amber_22 := __amber_add $__amber_21 "/"}}{{$__amber_23 := __amber_add $__amber_22 $__amber_19}}{{$__amber_24 := __amber_add $__amber_23 "/"}}{{$__amber_25 := __amber_add $__amber_24 $__amber_18}}{{$__amber_26 := __amber_add $__amber_25 "/branch/"}}{{$__amber_27 := __amber_add $__amber_26 .Branch}}{{$__amber_28 := __amber_add $__amber_27 "/commit/"}}{{$__amber_29 := __amber_add $__amber_28 .Sha}}
|
2014-06-05 23:48:45 +00:00
|
|
|
<a class="{{"pure-g"}} {{"commit-item"}}" data-status="{{.Status}}" href="{{$__amber_29}}">
|
|
|
|
<div class="{{"pure-u-1-8"}}">{{$__amber_30 := __amber_add "https://secure.gravatar.com/avatar/" .Gravatar}}{{$__amber_31 := __amber_add $__amber_30 "?s=48&d=identicon"}}
|
|
|
|
<img src="{{$__amber_31}}" />
|
2014-06-04 21:25:38 +00:00
|
|
|
</div>
|
|
|
|
<div class="{{"pure-u-3-4"}}">
|
|
|
|
<h2>{{.Message}}</h2>
|
|
|
|
<span class="{{"commit-sha"}}">{{.ShaShort}}</span>
|
|
|
|
<span class="{{"commit-branch"}}">{{.Branch}}</span>
|
|
|
|
<span class="{{"commit-date"}} {{"timeago"}}" title="{{.FinishedString}}"></span>
|
|
|
|
</div>
|
|
|
|
</a>{{end}}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<div class="{{"pure-u-2-5"}}">
|
|
|
|
<section class="{{"pure-g"}} {{"branches"}}">
|
|
|
|
<div class="{{"pure-u-1"}} {{"pure-menu"}} {{"pure-menu-open"}}">
|
|
|
|
<a class="{{"pure-menu-heading"}}">Recent Branches</a>
|
|
|
|
<ul>{{range $commit := .Branches}}
|
2014-06-06 00:10:58 +00:00
|
|
|
<li>{{$__amber_32 := $repo.Name}}{{$__amber_33 := $repo.Owner}}{{$__amber_34 := $repo.Host}}{{$__amber_35 := __amber_add "/" $__amber_34}}{{$__amber_36 := __amber_add $__amber_35 "/"}}{{$__amber_37 := __amber_add $__amber_36 $__amber_33}}{{$__amber_38 := __amber_add $__amber_37 "/"}}{{$__amber_39 := __amber_add $__amber_38 $__amber_32}}{{$__amber_40 := __amber_add $__amber_39 "/branch/"}}{{$__amber_41 := __amber_add $__amber_40 .Branch}}
|
2014-06-05 23:48:45 +00:00
|
|
|
<a data-status="{{.Status}}" href="{{$__amber_41}}">{{.Branch}}</a>
|
2014-06-04 21:25:38 +00:00
|
|
|
</li>{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</section>
|
2014-06-05 23:48:45 +00:00
|
|
|
</div>{{else}}
|
|
|
|
<section class="{{"pure-u-1"}}">
|
|
|
|
<div class="{{"alert"}} {{"alert-info"}}">Your Build history is empty. Push to your remote repository to trigger a build. </div>
|
|
|
|
</section>{{end}}{{else}}
|
|
|
|
<section class="{{"pure-u-1"}}">
|
2014-06-06 00:10:58 +00:00
|
|
|
<div class="{{"alert"}} {{"alert-info"}}" id="{{"alert"}}">This Repository is not yet active. Please activate to start testing commits.</div>
|
|
|
|
<br />{{$__amber_42 := .Repo.Name}}{{$__amber_43 := .Repo.Owner}}{{$__amber_44 := .Repo.Host}}{{$__amber_45 := __amber_add "/v1/repos/" $__amber_44}}{{$__amber_46 := __amber_add $__amber_45 "/"}}{{$__amber_47 := __amber_add $__amber_46 $__amber_43}}{{$__amber_48 := __amber_add $__amber_47 "/"}}{{$__amber_49 := __amber_add $__amber_48 $__amber_42}}
|
|
|
|
<form class="{{"pure-form"}} {{"pure-form-stacked"}}" action="{{$__amber_49}}">
|
2014-06-05 23:48:45 +00:00
|
|
|
<div class="{{"pure-controls"}}">
|
|
|
|
<button class="{{"pure-button"}} {{"pure-button-primary"}}">Click to Active Repository</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</section>{{end}}
|
2014-06-04 21:25:38 +00:00
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
<script src="{{"//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"}}"></script>
|
|
|
|
<script src="{{"//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.1.0/jquery.timeago.js"}}"></script>
|
|
|
|
<script src="{{"/static/scripts/main.js"}}"></script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$(".timeago").timeago();
|
|
|
|
});
|
2014-06-06 00:10:58 +00:00
|
|
|
|
|
|
|
</script>{{$__amber_50 := .Repo.Active}}{{if $__amber_50}}
|
|
|
|
<script></script>{{else}}
|
|
|
|
<script>
|
|
|
|
document.forms[0].onsubmit = function(event) {
|
2014-06-06 18:36:16 +00:00
|
|
|
var form = event.target;
|
2014-06-06 00:10:58 +00:00
|
|
|
var formData = new FormData(form);
|
|
|
|
xhr = new XMLHttpRequest();
|
|
|
|
xhr.open('POST', form.action);
|
|
|
|
xhr.onload = function() {
|
2014-06-06 18:36:16 +00:00
|
|
|
if (this.status == 201) {
|
2014-06-06 00:10:58 +00:00
|
|
|
window.location.reload();
|
|
|
|
} else {
|
|
|
|
$("#alert").text("Failed to activate the repository settings. Please try again");
|
|
|
|
$("#alert").attr("class", "alert alert-danger");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
xhr.send(formData);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
</script>{{end}}
|
2014-06-04 21:25:38 +00:00
|
|
|
</body>
|
|
|
|
</html>
|