mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-29 13:21:10 +00:00
status icons, animated running icon
This commit is contained in:
parent
c6b9d09602
commit
819fa9db87
7 changed files with 102 additions and 43 deletions
|
@ -60,12 +60,34 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* message is a helper function that return the build icon.
|
||||
*/
|
||||
function icon() {
|
||||
return function(status) {
|
||||
switch(status) {
|
||||
case "pending":
|
||||
case "running":
|
||||
return "refresh";
|
||||
case "failure":
|
||||
return "clear";
|
||||
case "success":
|
||||
return "check";
|
||||
case "killed":
|
||||
case "error":
|
||||
return "remove";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
angular
|
||||
.module('drone')
|
||||
.filter('trunc', trunc)
|
||||
.filter('author', author)
|
||||
.filter('message', message)
|
||||
.filter('sha', sha)
|
||||
.filter('icon', icon)
|
||||
.filter('ref', ref);
|
||||
|
||||
})();
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
<div class="list">
|
||||
<a ng-repeat="build in builds | orderBy:'-number' | filter: search_text" ng-href="/{{ repo.full_name }}/{{ build.number}}">
|
||||
<div class="column-status">
|
||||
<div class="status {{ build.status }}"></div>
|
||||
<div class="status {{ build.status }}">
|
||||
<i class="material-icons">{{ build.status | icon }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column-fill">
|
||||
<h2>{{ build.head_commit.message }}</h2>
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<div class="list job-list">
|
||||
<a ng-repeat="job in build.jobs" ng-href="{{ repo.full_name }}/{{ build.number }}/{{ job.number }}">
|
||||
<div>
|
||||
<div class="status {{ job.status }}">
|
||||
<i class="material-icons">check</i>
|
||||
<div class="status {{ job.status }} status-small">
|
||||
<i class="material-icons">{{ job.status | icon }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<div>{{ job.number }}</div>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
min-width: 60px;
|
||||
}
|
||||
.list .column-status {
|
||||
width: 45px;
|
||||
min-width: 45px;
|
||||
width: 60px;
|
||||
min-width: 60px;
|
||||
}
|
||||
.list .column-fill {
|
||||
flex: 1 1 auto;
|
||||
|
@ -51,6 +51,12 @@
|
|||
border-radius:4px;
|
||||
margin-left:5px;
|
||||
}
|
||||
.user-list .column-avatar img {
|
||||
width:32px;
|
||||
height:32px;
|
||||
border-radius:50%;
|
||||
margin-left:5px;
|
||||
}
|
||||
.list h2 {
|
||||
line-height:32px;
|
||||
font-size:18px;
|
||||
|
|
|
@ -133,8 +133,8 @@ main article {
|
|||
margin-bottom:20px;
|
||||
}
|
||||
main aside {
|
||||
min-width:500px;
|
||||
width:500px;
|
||||
min-width:450px;
|
||||
width:450px;
|
||||
box-sizing: border-box;
|
||||
padding:40px 50px;
|
||||
}
|
||||
|
@ -306,10 +306,10 @@ main aside > div {
|
|||
box-sizing: border-box;
|
||||
}
|
||||
.build-summary h2 {
|
||||
line-height:25px;
|
||||
line-height:21px;
|
||||
}
|
||||
.build-summary p {
|
||||
margin-top:15px;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -326,8 +326,8 @@ main aside > div {
|
|||
|
||||
.job-list > a > div:first-child,
|
||||
.job-list > li > div:first-child {
|
||||
width:40px;
|
||||
min-width:40px;
|
||||
width:50px;
|
||||
min-width:50px;
|
||||
}
|
||||
.job-list > a > div:nth-child(2),
|
||||
.job-list > li > div:nth-child(2) { /** TEMPORARILY HIDDEN. MAY DECIDE TO REMOVE */
|
||||
|
@ -507,18 +507,17 @@ menu .button span {
|
|||
width: 36px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
font-size:32px;
|
||||
font-size:24px;
|
||||
color:rgba(255,255,255,0.7);
|
||||
}
|
||||
.status-small {
|
||||
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
.status.error,
|
||||
.status.killed,
|
||||
.status.failure {
|
||||
color: #bf616a;
|
||||
}
|
||||
.status.success {
|
||||
color:#a3be8c;
|
||||
.status-small i {
|
||||
line-height: 32px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
/* Search Form */
|
||||
|
@ -607,13 +606,7 @@ pre.snippet {
|
|||
|
||||
/* ROUND INDICATORS */
|
||||
.status {
|
||||
width:12px;
|
||||
height:12px;
|
||||
border-radius:50px;
|
||||
margin-top:10px;
|
||||
}
|
||||
.status i {
|
||||
font-size:0px;
|
||||
border-radius:50%;
|
||||
}
|
||||
.status.error,
|
||||
.status.killed,
|
||||
|
@ -623,10 +616,32 @@ pre.snippet {
|
|||
.status.success {
|
||||
background:#a3be8c;
|
||||
}
|
||||
.status.running,
|
||||
.status.pending {
|
||||
background:#ebcb8b;
|
||||
}
|
||||
|
||||
.status.running i,
|
||||
.status.pending i {
|
||||
-webkit-animation-name: delayed-rotate;
|
||||
-webkit-animation-duration: 1s;
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
|
||||
-moz-animation-name: delayed-rotate;
|
||||
-moz-animation-duration: 1s;
|
||||
-moz-animation-iteration-count: infinite;
|
||||
-moz-animation-timing-function: ease-in-out;
|
||||
|
||||
animation-name: delayed-rotate;
|
||||
animation-duration: 1s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
.build-list li > div:first-child,
|
||||
.job-list li > div:first-child {
|
||||
width: 45px;
|
||||
min-width: 45px;
|
||||
width: 55px;
|
||||
min-width: 55px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,12 +9,26 @@ DATABASE_CONFIG="/var/lib/drone/drone.sqlite"
|
|||
|
||||
## Sqlite3 configuration
|
||||
|
||||
The following is the standard URI connection scheme:
|
||||
|
||||
```
|
||||
file:path[?options]
|
||||
```
|
||||
|
||||
The components of the datasource connection string are:
|
||||
|
||||
* `path` local path to sqlite database. The default value is `/var/lib/drone/drone.sqlite`.
|
||||
* `file:` URI prefix to identify database files.
|
||||
* `path` local path to the database file. The default value is `/var/lib/drone/drone.sqlite`.
|
||||
* `?options` connection specific options. **not recommended**
|
||||
|
||||
This is an example connection string:
|
||||
## Sqlite3 options
|
||||
|
||||
```bash
|
||||
DATABASE_CONFIG="/var/lib/drone/drone.sqlite"
|
||||
```
|
||||
This section lists all connection options used in the connection string format. Connection options are pairs in the following form: `name=value`. The value is always case sensitive. Separate options with the ampersand (i.e. &) character:
|
||||
|
||||
* `vfs` opens the database connection using the VFS value.
|
||||
* `mode` opens the database as `ro`, `rw`, `rwc` or `memory`.
|
||||
* `cache` opens the database with `shared` or `private` cache.
|
||||
* `psow` overrides the powersafe overwrite property of the database file being opened.
|
||||
* `_loc` sets the location of the time format. Use `auto` to auto-detect.
|
||||
* `_busy_timeout` sets the value of the `sqlite3_busy_timeout`
|
||||
* `_txlock` sets the locking behavior to `immediate`, `deferred`, or `exclusive`
|
||||
|
|
|
@ -18,15 +18,15 @@ type Build struct {
|
|||
Finished int64 `json:"finished_at"`
|
||||
|
||||
Commit *Commit `json:"head_commit"`
|
||||
PullRequest *PullRequest `json:"pull_request"`
|
||||
PullRequest *PullRequest `json:"pull_request,omitempty"`
|
||||
|
||||
Jobs []*Job `json:"jobs,omitempty" sql:"-"`
|
||||
}
|
||||
|
||||
type PullRequest struct {
|
||||
Number int `json:"number"`
|
||||
Title string `json:"title"`
|
||||
Base *Commit `json:"base_commit"`
|
||||
Number int `json:"number,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Base *Commit `json:"base_commit,omitempty"`
|
||||
}
|
||||
|
||||
type Commit struct {
|
||||
|
@ -34,12 +34,12 @@ type Commit struct {
|
|||
Ref string `json:"ref"`
|
||||
Branch string `json:"branch" sql:"index:ix_commit_branch"`
|
||||
Message string `json:"message"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
Remote string `json:"remote"`
|
||||
Author *Author `json:"author"`
|
||||
Timestamp string `json:"timestamp,omitempty"`
|
||||
Remote string `json:"remote,omitempty"`
|
||||
Author *Author `json:"author,omitempty"`
|
||||
}
|
||||
|
||||
type Author struct {
|
||||
Login string `json:"login"`
|
||||
Email string `json:"email"`
|
||||
Login string `json:"login,omitempty"`
|
||||
Email string `json:"email,omitempty"`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue