diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/css/default.css | 4 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projectapp.js | 24 |
2 files changed, 23 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index 9e62c6c8e7..fb20fc9241 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css | |||
@@ -61,8 +61,8 @@ dd p { line-height: 20px; } | |||
61 | 61 | ||
62 | /* Override default Twitter Boostrap styles for anchor tags inside tables */ | 62 | /* Override default Twitter Boostrap styles for anchor tags inside tables */ |
63 | td a, td a > code { color: #333333; } | 63 | td a, td a > code { color: #333333; } |
64 | td a > code { white-space: normal; } | 64 | td code { white-space: normal; } |
65 | td a:hover { color: #000000; text-decoration: underline; } | 65 | td a:hover, td a > code:hover { color: #000000; text-decoration: underline; } |
66 | 66 | ||
67 | /* Override default Twitter Bootstrap styles for tr.error */ | 67 | /* Override default Twitter Bootstrap styles for tr.error */ |
68 | .table tbody tr.error > td { background-color: transparent; } /* override default Bootstrap behaviour */ | 68 | .table tbody tr.error > td { background-color: transparent; } /* override default Bootstrap behaviour */ |
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index e674d8ffd1..b347451e88 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js | |||
@@ -92,6 +92,24 @@ projectApp.config(function($interpolateProvider) { | |||
92 | $interpolateProvider.endSymbol("]}"); | 92 | $interpolateProvider.endSymbol("]}"); |
93 | }); | 93 | }); |
94 | 94 | ||
95 | |||
96 | // add time interval to HH:mm filter | ||
97 | projectApp.filter('timediff', function() { | ||
98 | return function(input) { | ||
99 | function pad(j) { | ||
100 | if (parseInt(j) < 10) {return "0" + j} | ||
101 | return j; | ||
102 | } | ||
103 | seconds = parseInt(input); | ||
104 | minutes = Math.floor(seconds / 60); | ||
105 | seconds = seconds - minutes * 60; | ||
106 | hours = Math.floor(seconds / 3600); | ||
107 | seconds = seconds - hours * 3600; | ||
108 | return pad(hours) + ":" + pad(minutes) + ":" + pad(seconds); | ||
109 | } | ||
110 | }); | ||
111 | |||
112 | |||
95 | // main controller for the project page | 113 | // main controller for the project page |
96 | projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $location, $cookies, $q, $sce) { | 114 | projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $location, $cookies, $q, $sce) { |
97 | 115 | ||
@@ -150,7 +168,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
150 | 168 | ||
151 | // identify canceled builds here, so we can display them. | 169 | // identify canceled builds here, so we can display them. |
152 | _diffArrays(oldbuilds, $scope.builds, | 170 | _diffArrays(oldbuilds, $scope.builds, |
153 | function (e,f) { return e.status == f.status && e.id == f.id }, // compare | 171 | function (e,f) { return e.id == f.id }, // compare |
154 | undefined, // added | 172 | undefined, // added |
155 | function (e) { // deleted | 173 | function (e) { // deleted |
156 | if (e.status == "deleted") return; | 174 | if (e.status == "deleted") return; |
@@ -421,7 +439,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
421 | }).then( function () { | 439 | }).then( function () { |
422 | $scope.toggle(elementid); | 440 | $scope.toggle(elementid); |
423 | if (data['projectVersion'] != undefined) { | 441 | if (data['projectVersion'] != undefined) { |
424 | alertText += "<b>" + $scope.release.name + "</b>"; | 442 | alertText += "<b>" + $scope.project.release.name + "</b>"; |
425 | } | 443 | } |
426 | $scope.displayAlert(alertZone, alertText, "alert-info"); | 444 | $scope.displayAlert(alertZone, alertText, "alert-info"); |
427 | }); | 445 | }); |
@@ -506,7 +524,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
506 | // init code | 524 | // init code |
507 | // | 525 | // |
508 | $scope.init = function() { | 526 | $scope.init = function() { |
509 | $scope.pollHandle = $interval(function () { $scope._makeXHRCall({method: "POST", url: $scope.urls.xhr_edit, data: undefined});}, 4000, 0); | 527 | $scope.pollHandle = $interval(function () { $scope._makeXHRCall({method: "GET", url: $scope.urls.xhr_edit, data: undefined});}, 4000, 0); |
510 | } | 528 | } |
511 | 529 | ||
512 | $scope.init(); | 530 | $scope.init(); |