summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/projectapp.js13
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 });