diff options
-rw-r--r-- | js/main.js | 10 | ||||
-rw-r--r-- | partials/visualisation.html | 14 | ||||
-rw-r--r-- | style.css | 4 |
3 files changed, 27 insertions, 1 deletions
@@ -48,6 +48,9 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval) var state = value.state; var latestBuildNumber = value.cachedBuilds.length - 1; + if (state === 'building') { + latestBuildNumber = value.currentBuilds[0]; + } var latestBuildsPath = apiBase + '/builders/' + key + '/builds/' + latestBuildNumber; $http.get(latestBuildsPath).then(function(estimationResponse) { @@ -82,6 +85,7 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval) $scope.integrations.push({ name: key, lastBuild: details, + currentBuild: estimationResponse.data, data: value }); } @@ -101,16 +105,17 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval) $scope.builds.push({ name: key, lastBuild: details, + currentBuild: estimationResponse.data, data: value, progress: progress, style: progressStyle - }); } else if(key.indexOf("Deploy") > -1) { $scope.deploys.push({ name: key, lastBuild: details, + currentBuild: estimationResponse.data, data: value }); } @@ -118,6 +123,7 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval) $scope.tests.push({ name: key, lastBuild: details, + currentBuild: estimationResponse.data, data: value }); } @@ -125,6 +131,7 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval) $scope.publishings.push({ name: key, lastBuild: details, + currentBuild: estimationResponse.data, data: value }); } @@ -157,6 +164,7 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval) } else { $scope.selected.state = "Idle"; + $scope.selected.class = "hide"; } }; diff --git a/partials/visualisation.html b/partials/visualisation.html index b3f8631..78d6da6 100644 --- a/partials/visualisation.html +++ b/partials/visualisation.html @@ -75,6 +75,20 @@ <h3>{{selected.name}}</h3> <div class="detail-contents"> <p><strong>State:</strong> {{selected.state}}</p> + <p class="{{selected.class}}"> + <strong>Current Job:</strong> + <a ng-href="http://ciat.baserock.org:8010/builders/{{selected.name}}/builds/{{selected.currentBuild.number}}"> + {{selected.currentBuild.sourceStamps[0].changes[0].at}} + / Job ID: {{selected.currentBuild.number}} + </a> + </p> + <p class="{{selected.class}}"><strong>Current Job logs:</strong></p> + <ul class="{{selected.class}}"> + <li ng-repeat="step in selected.currentBuild.steps"> + <a ng-href="{{step.logs[0][1]}}">Log for step: {{step.name}}</a> + </li> + </ul> + <hr class="{{selected.class}}"> <p> <strong>Last Job:</strong> <a ng-href="http://ciat.baserock.org:8010/builders/{{selected.name}}/builds/{{selected.lastBuild.number}}"> @@ -136,3 +136,7 @@ h1>em>a:hover { :not(.active) > .progress { display: none; } + +.hide { + display: none; +} |