mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
fixed many minor UI bugs
This commit is contained in:
parent
35d05b0cce
commit
f6078a4b71
4 changed files with 68 additions and 7 deletions
|
@ -202,8 +202,7 @@
|
||||||
}
|
}
|
||||||
// update the build
|
// update the build
|
||||||
$scope.build = event;
|
$scope.build = event;
|
||||||
console.log(event.builds);
|
$scope.task = event.jobs[step - 1];
|
||||||
$scope.task = event.builds[step - 1];
|
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
|
||||||
// start streaming the current build
|
// start streaming the current build
|
||||||
|
@ -218,7 +217,7 @@
|
||||||
$scope.restart = function () {
|
$scope.restart = function () {
|
||||||
builds.restart(fullName, number).then(function (payload) {
|
builds.restart(fullName, number).then(function (payload) {
|
||||||
$scope.build = payload.data;
|
$scope.build = payload.data;
|
||||||
$scope.task = payload.data.builds[step - 1];
|
$scope.task = payload.data.jobs[step - 1];
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
$scope.error = err;
|
$scope.error = err;
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,14 +24,22 @@
|
||||||
<div class="param" ng-repeat="(key, value) in job.environment">
|
<div class="param" ng-repeat="(key, value) in job.environment">
|
||||||
{{ key.toUpperCase() }}={{ value }}
|
{{ key.toUpperCase() }}={{ value }}
|
||||||
</div>
|
</div>
|
||||||
<div class="meta-group">
|
<div class="meta-group" ng-if="job.status !== 'pending' && job.status !== 'running'">
|
||||||
<div class="meta">finished {{ job.started_at | fromNow }}</div>
|
<div class="meta">finished {{ job.started_at | fromNow }}</div>
|
||||||
<div class="meta">duration of {{ job.finished_at - job.started_at | toDuration }}</div>
|
<div class="meta">duration of {{ job.finished_at - job.started_at | toDuration }}</div>
|
||||||
<div class="meta">with exit code {{ job.exit_code }}</div>
|
<div class="meta">with exit code {{ job.exit_code }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="meta-group" ng-if="job.status === 'running'">
|
||||||
|
<div class="meta">started {{ job.started_at | fromNow }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="meta-group" ng-if="job.status === 'pending'">
|
||||||
|
<div class="meta">pending execution</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button ng-if="build.status !== 'pending' && build.status !== 'running'" ng-click="restart()" style="display:none;">Restart</button>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
|
|
@ -356,7 +356,7 @@ main aside > div {
|
||||||
flex:1 1 auto;
|
flex:1 1 auto;
|
||||||
font-size:13px;
|
font-size:13px;
|
||||||
}
|
}
|
||||||
.job-list > a > div.param,
|
.job-list > a div.param,
|
||||||
.job-list > li div.param {
|
.job-list > li div.param {
|
||||||
margin-top:5px;
|
margin-top:5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,34 @@ func (db *Buildstore) KillBuilds() error {
|
||||||
|
|
||||||
// SQL query to retrieve the latest builds across all branches.
|
// SQL query to retrieve the latest builds across all branches.
|
||||||
const buildListQuery = `
|
const buildListQuery = `
|
||||||
SELECT *
|
SELECT
|
||||||
|
build_id
|
||||||
|
,build_repo_id
|
||||||
|
,build_number
|
||||||
|
,build_status
|
||||||
|
,build_started
|
||||||
|
,build_finished
|
||||||
|
,build_commit_sha
|
||||||
|
,build_commit_ref
|
||||||
|
,build_commit_link
|
||||||
|
,build_commit_branch
|
||||||
|
,build_commit_message
|
||||||
|
,build_commit_timestamp
|
||||||
|
,build_commit_remote
|
||||||
|
,build_commit_author_login
|
||||||
|
,build_commit_author_email
|
||||||
|
,build_pull_request_number
|
||||||
|
,build_pull_request_title
|
||||||
|
,build_pull_request_link
|
||||||
|
,build_pull_request_base_sha
|
||||||
|
,build_pull_request_base_ref
|
||||||
|
,build_pull_request_base_link
|
||||||
|
,build_pull_request_base_branch
|
||||||
|
,build_pull_request_base_message
|
||||||
|
,build_pull_request_base_timestamp
|
||||||
|
,build_pull_request_base_remote
|
||||||
|
,build_pull_request_base_author_login
|
||||||
|
,build_pull_request_base_author_email
|
||||||
FROM builds
|
FROM builds
|
||||||
WHERE build_repo_id = ?
|
WHERE build_repo_id = ?
|
||||||
ORDER BY build_number DESC
|
ORDER BY build_number DESC
|
||||||
|
@ -112,7 +139,34 @@ LIMIT ? OFFSET ?
|
||||||
// SQL query to retrieve the most recent build.
|
// SQL query to retrieve the most recent build.
|
||||||
// TODO exclude pull requests
|
// TODO exclude pull requests
|
||||||
const buildLastQuery = `
|
const buildLastQuery = `
|
||||||
SELECT *
|
SELECT
|
||||||
|
build_id
|
||||||
|
,build_repo_id
|
||||||
|
,build_number
|
||||||
|
,build_status
|
||||||
|
,build_started
|
||||||
|
,build_finished
|
||||||
|
,build_commit_sha
|
||||||
|
,build_commit_ref
|
||||||
|
,build_commit_link
|
||||||
|
,build_commit_branch
|
||||||
|
,build_commit_message
|
||||||
|
,build_commit_timestamp
|
||||||
|
,build_commit_remote
|
||||||
|
,build_commit_author_login
|
||||||
|
,build_commit_author_email
|
||||||
|
,build_pull_request_number
|
||||||
|
,build_pull_request_title
|
||||||
|
,build_pull_request_link
|
||||||
|
,build_pull_request_base_sha
|
||||||
|
,build_pull_request_base_ref
|
||||||
|
,build_pull_request_base_link
|
||||||
|
,build_pull_request_base_branch
|
||||||
|
,build_pull_request_base_message
|
||||||
|
,build_pull_request_base_timestamp
|
||||||
|
,build_pull_request_base_remote
|
||||||
|
,build_pull_request_base_author_login
|
||||||
|
,build_pull_request_base_author_email
|
||||||
FROM builds
|
FROM builds
|
||||||
WHERE build_repo_id = ?
|
WHERE build_repo_id = ?
|
||||||
AND build_commit_branch = ?
|
AND build_commit_branch = ?
|
||||||
|
|
Loading…
Reference in a new issue