diff --git a/cmd/drone-server/drone-server b/cmd/drone-server/drone-server
new file mode 100755
index 00000000..abd4d8bd
Binary files /dev/null and b/cmd/drone-server/drone-server differ
diff --git a/cmd/drone-server/static/scripts/controllers/builds.js b/cmd/drone-server/static/scripts/controllers/builds.js
index d37ad76c..974b14be 100644
--- a/cmd/drone-server/static/scripts/controllers/builds.js
+++ b/cmd/drone-server/static/scripts/controllers/builds.js
@@ -98,7 +98,6 @@
});
$scope.restart = function () {
- console.log('restart');
builds.restart(fullName, number).then(function (payload) {
$scope.build = payload.data;
}).catch(function (err) {
@@ -191,8 +190,26 @@
$scope.error = err;
});
+ repos.subscribe(fullName, function (event) {
+ if (event.number !== parseInt(number)) {
+ return; // ignore
+ }
+ // update the build
+ $scope.build = event;
+ console.log(event.builds);
+ $scope.task = event.builds[step - 1];
+ $scope.$apply();
+
+ // start streaming the current build
+ if ($scope.task.status === 'running') {
+ stream();
+ } else {
+ // resets our streaming state
+ streaming = false;
+ }
+ });
+
$scope.restart = function () {
- console.log('restart');
builds.restart(fullName, number).then(function (payload) {
$scope.build = payload.data;
$scope.task = payload.data.builds[step - 1];
@@ -213,24 +230,6 @@
$scope.tail = function () {
tail = !tail;
};
-
- repos.subscribe(fullName, function (event) {
- if (event.number !== parseInt(number)) {
- return; // ignore
- }
- // update the build
- $scope.build = event;
- $scope.task = event.builds[step - 1];
- $scope.$apply();
-
- // start streaming the current build
- if ($scope.task.status === 'running') {
- stream();
- } else {
- // resets our streaming state
- streaming = false;
- }
- });
}
angular
diff --git a/cmd/drone-server/static/scripts/drone.js b/cmd/drone-server/static/scripts/drone.js
index cf8e8c58..b3e98dd4 100644
--- a/cmd/drone-server/static/scripts/drone.js
+++ b/cmd/drone-server/static/scripts/drone.js
@@ -188,7 +188,7 @@
},
title: 'Build'
})
- .state('app.build_step', {
+ .state('app.job', {
url: '/:owner/:name/:number/:step',
views: {
'toolbar': {
@@ -200,7 +200,8 @@
templateUrl: '/static/scripts/views/builds/step/content.html',
controller: 'BuildOutCtrl',
resolve: resolveUser
- }
+ },
+ title: 'Build Job'
}
});
diff --git a/cmd/drone-server/static/scripts/views/builds/index/content.html b/cmd/drone-server/static/scripts/views/builds/index/content.html
index e55d239c..cb113cdf 100644
--- a/cmd/drone-server/static/scripts/views/builds/index/content.html
+++ b/cmd/drone-server/static/scripts/views/builds/index/content.html
@@ -1,15 +1,15 @@
-
+
+
Build jobs
+
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/cmd/drone-server/static/scripts/views/builds/step/content.html b/cmd/drone-server/static/scripts/views/builds/step/content.html
index 40351b42..3c3a578f 100644
--- a/cmd/drone-server/static/scripts/views/builds/step/content.html
+++ b/cmd/drone-server/static/scripts/views/builds/step/content.html
@@ -9,8 +9,7 @@
{{ build.head_commit.message }}
-
{{ build.head_commit.author.login }} pushed to {{ build.head_commit.branch
- }} {{ build.started_at | fromNow }}
+
{{ build.head_commit.author.login }} pushed to {{ build.head_commit.branch}} {{ build.started_at | fromNow }}
diff --git a/cmd/drone-server/static/scripts/views/builds/step/toolbar.html b/cmd/drone-server/static/scripts/views/builds/step/toolbar.html
index 37018ff5..8fc3302c 100644
--- a/cmd/drone-server/static/scripts/views/builds/step/toolbar.html
+++ b/cmd/drone-server/static/scripts/views/builds/step/toolbar.html
@@ -3,10 +3,10 @@
home
{{ repo.owner }} / {{ repo.name }}
+
+ Build # {{ build.number }}
- {{ build.sequence }}
-
- {{ task.sequence }}
+ Job #{{ task.number }}