mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-07-04 13:06:09 +00:00
fixed filters to display PR section
This commit is contained in:
parent
920e072e91
commit
255e87c78e
|
@ -139,7 +139,7 @@ app.config(['$routeProvider', '$locationProvider', '$httpProvider', function($ro
|
||||||
$httpProvider.interceptors.push(function($q, $location) {
|
$httpProvider.interceptors.push(function($q, $location) {
|
||||||
return {
|
return {
|
||||||
'responseError': function(rejection) {
|
'responseError': function(rejection) {
|
||||||
if (rejection.status == 401) {
|
if (rejection.status == 401 && rejection.config.url != "/v1/user") {
|
||||||
$location.path('/login');
|
$location.path('/login');
|
||||||
}
|
}
|
||||||
return $q.reject(rejection);
|
return $q.reject(rejection);
|
||||||
|
|
|
@ -24,6 +24,18 @@ angular.module('app').filter('toDate', function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
angular.module('app').filter('pullRequests', function() {
|
||||||
|
return function(commits) {
|
||||||
|
var filtered = [];
|
||||||
|
angular.forEach(commits, function(commit) {
|
||||||
|
if(commit.pull_request.length != 0) {
|
||||||
|
filtered.push(commit);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return filtered;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
angular.module('app').filter('fullName', function() {
|
angular.module('app').filter('fullName', function() {
|
||||||
return function(repo) {
|
return function(repo) {
|
||||||
return repo.owner+"/"+repo.name;
|
return repo.owner+"/"+repo.name;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,20 +2,27 @@
|
||||||
@import "base.less";
|
@import "base.less";
|
||||||
|
|
||||||
// Standard Colors
|
// Standard Colors
|
||||||
|
// http://www.google.com/design/spec/style/color.html#color-ui-color-palette
|
||||||
|
|
||||||
@link: #68c598;
|
@link: #68c598;
|
||||||
@link2: #4ab1ce;
|
@link2: #4ab1ce;
|
||||||
@cneg: #e97041;
|
@cfailure: #f44336;
|
||||||
@cok: #68c598;
|
@csuccess: #7cb342;
|
||||||
@c0: #262626;
|
@cpending: #ffb300;
|
||||||
|
@c0: #212121;
|
||||||
@c1: #45494b;
|
@c1: #45494b;
|
||||||
@c2: #849299;
|
@c2: #849299;
|
||||||
|
|
||||||
|
|
||||||
|
// @csuccess: #68c598;
|
||||||
|
// @cfailure: #e97041;
|
||||||
|
|
||||||
// Standard Fonts
|
// Standard Fonts
|
||||||
|
|
||||||
@logo: 'Orbitron';
|
@logo: 'Orbitron';
|
||||||
@sans: 'Open Sans';
|
@sans: 'Open Sans';
|
||||||
@mono: 'Droid Sans Mono';
|
@mono: 'Droid Sans Mono';
|
||||||
|
@fontawesome: 'FontAwesome';
|
||||||
|
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -64,6 +71,7 @@ body {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 55px;
|
line-height: 55px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 1px 1px 4px rgba(0,0,0,0.5);
|
||||||
|
|
||||||
.brand {
|
.brand {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -296,7 +304,7 @@ nav {
|
||||||
|
|
||||||
&[data-status="Success"] {
|
&[data-status="Success"] {
|
||||||
em {
|
em {
|
||||||
border-top:5px solid @cok;
|
border-top:5px solid @csuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,11 +312,11 @@ nav {
|
||||||
&[data-status="Failure"],
|
&[data-status="Failure"],
|
||||||
&[data-status="Error"] {
|
&[data-status="Error"] {
|
||||||
em {
|
em {
|
||||||
border-top:5px solid @cneg;
|
border-top:5px solid @cfailure;
|
||||||
}
|
}
|
||||||
|
|
||||||
.l-box {
|
.l-box {
|
||||||
border: 1px solid @cneg;
|
border: 1px solid @cfailure;
|
||||||
&:hover {
|
&:hover {
|
||||||
border:1px solid @c0;
|
border:1px solid @c0;
|
||||||
}
|
}
|
||||||
|
@ -321,7 +329,7 @@ nav {
|
||||||
right:12px;
|
right:12px;
|
||||||
top:-8px;
|
top:-8px;
|
||||||
content:"\f111";
|
content:"\f111";
|
||||||
color: @cneg;
|
color: @cfailure;
|
||||||
min-width:16px;
|
min-width:16px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
@ -467,7 +475,7 @@ nav {
|
||||||
|
|
||||||
.progressContainer {
|
.progressContainer {
|
||||||
height:5px;
|
height:5px;
|
||||||
background-color: @cneg;
|
background-color: @cfailure;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom:65px;
|
bottom:65px;
|
||||||
left:20px;
|
left:20px;
|
||||||
|
@ -481,11 +489,11 @@ nav {
|
||||||
}
|
}
|
||||||
|
|
||||||
.activeProgress {
|
.activeProgress {
|
||||||
background-color: @cok;
|
background-color: @csuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
.secondaryProgress {
|
.secondaryProgress {
|
||||||
background-color: @cok;
|
background-color: @csuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -507,7 +515,7 @@ nav {
|
||||||
padding:20px 45px;
|
padding:20px 45px;
|
||||||
display:block;
|
display:block;
|
||||||
border-bottom: 1px solid #dadcdd;
|
border-bottom: 1px solid #dadcdd;
|
||||||
color:#262626;
|
color: @c0;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
position:relative;
|
position:relative;
|
||||||
.border_box;
|
.border_box;
|
||||||
|
@ -556,13 +564,13 @@ nav {
|
||||||
&[data-status="Failure"] {
|
&[data-status="Failure"] {
|
||||||
background: #fff9f5;
|
background: #fff9f5;
|
||||||
&:before {
|
&:before {
|
||||||
background: @cneg;
|
background: @cfailure;
|
||||||
content: "!";
|
content: "!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-status="Success"]:before {
|
&[data-status="Success"]:before {
|
||||||
background: @cok;
|
background: @csuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -728,7 +736,7 @@ nav {
|
||||||
.card[data-status="Failure"],
|
.card[data-status="Failure"],
|
||||||
.card[data-status="Error"] {
|
.card[data-status="Error"] {
|
||||||
.l-box {
|
.l-box {
|
||||||
border: 1px solid @cneg;
|
border: 1px solid @cfailure;
|
||||||
&:hover {
|
&:hover {
|
||||||
border:1px solid @c0;
|
border:1px solid @c0;
|
||||||
}
|
}
|
||||||
|
@ -805,7 +813,7 @@ nav {
|
||||||
margin-left:20px;
|
margin-left:20px;
|
||||||
margin-top:15px;
|
margin-top:15px;
|
||||||
&.fa-check-circle-o {
|
&.fa-check-circle-o {
|
||||||
color:@cok;
|
color:@csuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1045,7 +1053,7 @@ nav {
|
||||||
|
|
||||||
.card[data-status="Success"] {
|
.card[data-status="Success"] {
|
||||||
&:nth-child(2) .l-box {
|
&:nth-child(2) .l-box {
|
||||||
border-color: @cok;
|
border-color: @csuccess;
|
||||||
&:hover {
|
&:hover {
|
||||||
border:1px solid @c0;
|
border:1px solid @c0;
|
||||||
}
|
}
|
||||||
|
@ -1056,7 +1064,7 @@ nav {
|
||||||
.card[data-status="Failure"],
|
.card[data-status="Failure"],
|
||||||
.card[data-status="Error"] {
|
.card[data-status="Error"] {
|
||||||
&:nth-child(2) .l-box {
|
&:nth-child(2) .l-box {
|
||||||
border-color: @cneg;
|
border-color: @cfailure;
|
||||||
&:hover {
|
&:hover {
|
||||||
border:1px solid @c0;
|
border:1px solid @c0;
|
||||||
}
|
}
|
||||||
|
@ -1075,7 +1083,7 @@ nav {
|
||||||
left: 0px;
|
left: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background: #fee172;
|
background: @cpending;
|
||||||
background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.55) 75%, transparent 75%, transparent);
|
background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.55) 75%, transparent 75%, transparent);
|
||||||
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.55) 75%, transparent 75%, transparent);
|
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.55) 75%, transparent 75%, transparent);
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
|
@ -1111,7 +1119,7 @@ nav {
|
||||||
padding-bottom:50px;
|
padding-bottom:50px;
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
color: #262626;
|
color: @c0;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -1183,7 +1191,7 @@ nav {
|
||||||
.large {font-size:18px; padding-bottom:5px;}
|
.large {font-size:18px; padding-bottom:5px;}
|
||||||
.time {float:right; margin-left:8px;}
|
.time {float:right; margin-left:8px;}
|
||||||
.photo {margin-right:4px;}
|
.photo {margin-right:4px;}
|
||||||
.negative {color:@cneg;}
|
.negative {color:@cfailure;}
|
||||||
.photoline {display:inline-block; position:relative; top:-10px; font-weight:bold;}
|
.photoline {display:inline-block; position:relative; top:-10px; font-weight:bold;}
|
||||||
.small {padding-bottom:5px; font-weight:bold; font-size:12px;}
|
.small {padding-bottom:5px; font-weight:bold; font-size:12px;}
|
||||||
}
|
}
|
||||||
|
@ -1199,18 +1207,18 @@ nav {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
&:before {float:left; margin-left:-5px;}
|
&:before {float:left; margin-left:-5px;}
|
||||||
&.status_ok {
|
&.status_ok {
|
||||||
color:@cok; border-color:@cok;
|
color:@csuccess; border-color:@csuccess;
|
||||||
&:before {content:"\f00c"; font-family:'FontAwesome';}
|
&:before {content:"\f00c"; font-family:'FontAwesome';}
|
||||||
}
|
}
|
||||||
&.status_error {
|
&.status_error {
|
||||||
color:@cneg; border-color:@cneg;
|
color:@cfailure; border-color:@cfailure;
|
||||||
&:before {content:"!";}
|
&:before {content:"!";}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.result {
|
.result {
|
||||||
background:@link2;
|
background:@link2;
|
||||||
background:@cok;
|
background:@csuccess;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
margin:-30px -30px -6px;
|
margin:-30px -30px -6px;
|
||||||
padding:30px;
|
padding:30px;
|
||||||
|
@ -1233,7 +1241,7 @@ nav {
|
||||||
&[data-result="Killed"],
|
&[data-result="Killed"],
|
||||||
&[data-result="Failure"],
|
&[data-result="Failure"],
|
||||||
&[data-result="Error"] {
|
&[data-result="Error"] {
|
||||||
background: @cneg;
|
background: @cfailure;
|
||||||
.status:before {
|
.status:before {
|
||||||
content:"!";
|
content:"!";
|
||||||
}
|
}
|
||||||
|
@ -1241,7 +1249,14 @@ nav {
|
||||||
|
|
||||||
&[data-result="Pending"],
|
&[data-result="Pending"],
|
||||||
&[data-result="Started"] {
|
&[data-result="Started"] {
|
||||||
background:@link2;
|
background:@cpending;
|
||||||
|
.status:before {
|
||||||
|
content:"\f021";
|
||||||
|
-webkit-animation: spin 2s infinite linear;
|
||||||
|
-moz-animation: spin 2s infinite linear;
|
||||||
|
-o-animation: spin 2s infinite linear;
|
||||||
|
animation: spin 2s infinite linear;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1249,7 +1264,9 @@ nav {
|
||||||
#main {
|
#main {
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
&.output {
|
&.output {
|
||||||
background: #525252;
|
position:relative;
|
||||||
|
//background: #424242;
|
||||||
|
background: @c0;
|
||||||
pre {
|
pre {
|
||||||
margin:0px auto;
|
margin:0px auto;
|
||||||
padding:30px;
|
padding:30px;
|
||||||
|
@ -1259,6 +1276,21 @@ nav {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[data-result="Pending"]:after,
|
||||||
|
&[data-result="Started"]:after {
|
||||||
|
position: absolute;
|
||||||
|
right:20px;
|
||||||
|
bottom:20px;
|
||||||
|
color:#9e9e9e;
|
||||||
|
font-size:18px;
|
||||||
|
font-family:@fontawesome;
|
||||||
|
content: "\f021";
|
||||||
|
-webkit-animation: spin 2s infinite linear;
|
||||||
|
-moz-animation: spin 2s infinite linear;
|
||||||
|
-o-animation: spin 2s infinite linear;
|
||||||
|
animation: spin 2s infinite linear;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1441,7 +1473,7 @@ nav {
|
||||||
border-top:1px solid #FFF;
|
border-top:1px solid #FFF;
|
||||||
}
|
}
|
||||||
&:nth-child(2):hover > .pure-g {
|
&:nth-child(2):hover > .pure-g {
|
||||||
border-top:1px solid #262626;
|
border-top:1px solid @c0;
|
||||||
}
|
}
|
||||||
i {
|
i {
|
||||||
margin-left:0px;
|
margin-left:0px;
|
||||||
|
|
|
@ -50,10 +50,10 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section ng-show="(commits | filter: !{ pull_request: '' }).length">
|
<section ng-if="(commits | pullRequests).length!=0">
|
||||||
<div class="pure-g cards">
|
<div class="pure-g cards">
|
||||||
<h2 class="pure-u-1" style="font-size:22px;margin-bottom:20px;"><i class="fa fa-code-fork"></i> Pull Requests</h2>
|
<h2 class="pure-u-1" style="font-size:22px;margin-bottom:20px;"><i class="fa fa-code-fork"></i> Pull Requests</h2>
|
||||||
<a class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-4 pure-u-xl-1-4 card card" ng-href="/{{ repo | fullPath }}/{{ commit.branch }}/{{ commit.sha }}" ng-repeat="commit in commits | filter: { pull_request: '' } | limitTo:4" data-status="{{ commit.status }}">
|
<a class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-4 pure-u-xl-1-4 card card" ng-href="/{{ repo | fullPath }}/{{ commit.branch }}/{{ commit.sha }}" ng-repeat="commit in commits | pullRequests | limitTo:4" data-status="{{ commit.status }}">
|
||||||
<div class="l-box">
|
<div class="l-box">
|
||||||
<h2>{{ commit.message }}</h2>
|
<h2>{{ commit.message }}</h2>
|
||||||
<em ng-if="commit.finished_at != 0">{{ commit.author }}<br/>{{ commit.finished_at | fromNow }}</em>
|
<em ng-if="commit.finished_at != 0">{{ commit.author }}<br/>{{ commit.finished_at | fromNow }}</em>
|
||||||
|
|
Loading…
Reference in a new issue