diff options
author | Pedro Alvarez <palvarez89@gmail.com> | 2015-10-02 16:48:16 +0200 |
---|---|---|
committer | Pedro Alvarez <palvarez89@gmail.com> | 2015-10-02 16:48:16 +0200 |
commit | 5cf363c212191678fa7e7a22c3efae81a35390cf (patch) | |
tree | 0dd3effef52f667820be881da326d6b1b87c6629 | |
parent | 26a6549436a82c09d18bf6ca5a74f3dc04e76c0a (diff) | |
download | ciat-ui-5cf363c212191678fa7e7a22c3efae81a35390cf.tar.gz |
Add currentBuild information in details dialogpedroalvarez/third-version
-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; +} |