diff options
author | Dave Lerner <dave.lerner@windriver.com> | 2015-03-18 10:52:48 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-25 12:39:54 +0000 |
commit | 2b59512e0d08e77940d752b6fac0c08508ac8646 (patch) | |
tree | 2d458aa837bd2046a6e24421672e350e731c0e79 /bitbake | |
parent | 6a934f488fd636829efbcb24058f92621e5a9fc6 (diff) | |
download | poky-2b59512e0d08e77940d752b6fac0c08508ac8646.tar.gz |
bitbake: toaster: alert fixes for project release change
When a project release changes, if there are layers included with the
project, then show the release branch name in the layer list. If there
aren't any layers in the project, then suppress the statement on the
changed layers.
[YOCTO # 7168]
(Bitbake rev: 24d0938001da27c7ebcf36ce076f2aa58cbcf256)
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projectapp.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index 6b1bbb40fb..40e7643822 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js | |||
@@ -608,7 +608,6 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
608 | 608 | ||
609 | // requirement https://bugzilla.yoctoproject.org/attachment.cgi?id=2229, notification for changed version to include layers | 609 | // requirement https://bugzilla.yoctoproject.org/attachment.cgi?id=2229, notification for changed version to include layers |
610 | $scope.zone2alerts.forEach(function (e) { e.close(); }); | 610 | $scope.zone2alerts.forEach(function (e) { e.close(); }); |
611 | alertText += "This has caused the following changes in your project layers:<ul>"; | ||
612 | 611 | ||
613 | 612 | ||
614 | // warnings - this is executed AFTER the generic XHRCall handling is done; at this point, | 613 | // warnings - this is executed AFTER the generic XHRCall handling is done; at this point, |
@@ -620,6 +619,10 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
620 | function (e) {addedLayers.push(e); }, | 619 | function (e) {addedLayers.push(e); }, |
621 | function (e) {deletedLayers.push(e); }); | 620 | function (e) {deletedLayers.push(e); }); |
622 | 621 | ||
622 | var hasDifferentLayers = (addedLayers.length || deletedLayers.length) | ||
623 | if (hasDifferentLayers) { | ||
624 | alertText += "This has caused the following changes in your project layers:<ul>"; | ||
625 | } | ||
623 | // some of the deleted layers are actually replaced (changed) layers | 626 | // some of the deleted layers are actually replaced (changed) layers |
624 | var changedLayers = []; | 627 | var changedLayers = []; |
625 | deletedLayers.forEach(function (e) { | 628 | deletedLayers.forEach(function (e) { |
@@ -633,14 +636,16 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
633 | }); | 636 | }); |
634 | 637 | ||
635 | if (addedLayers.length > 0) { | 638 | if (addedLayers.length > 0) { |
636 | alertText += "<li><strong>"+addedLayers.length+"</strong> layer" + ((addedLayers.length>1)?"s changed: ":" changed: ") + addedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>"; | 639 | alertText += "<li><strong>"+addedLayers.length+"</strong> layer" + ((addedLayers.length>1)?"s":"") + " changed to the <strong> " + $scope.project.release.name + " </strong> branch: " + addedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>"; |
637 | } | 640 | } |
638 | if (deletedLayers.length > 0) { | 641 | if (deletedLayers.length > 0) { |
639 | alertText += "<li><strong>"+deletedLayers.length+"</strong> layer" + ((deletedLayers.length>1)?"s deleted: ":"deleted: ") + deletedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>"; | 642 | alertText += "<li><strong>"+deletedLayers.length+"</strong> layer" + ((deletedLayers.length>1)?"s":"") + " deleted from the <strong> " + $scope.project.release.name + " </strong> branch: " + deletedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>"; |
640 | } | 643 | } |
641 | 644 | ||
642 | } | 645 | } |
643 | alertText += "</ul>"; | 646 | if (hasDifferentLayers) { |
647 | alertText += "</ul>"; | ||
648 | } | ||
644 | } | 649 | } |
645 | $scope.displayAlert(alertZone, alertText, "alert-info"); | 650 | $scope.displayAlert(alertZone, alertText, "alert-info"); |
646 | }); | 651 | }); |