]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toastergui: changes to release change notifications
authorBelen Barros Pena <belen.barros.pena@intel.com>
Thu, 19 Mar 2015 14:29:58 +0000 (14:29 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Mar 2015 22:54:37 +0000 (22:54 +0000)
* Remove the branch name from the list of the layers
deleted (it does not apply).

* In the modal dialog that warns you before layer
deletion, use the release description instead of
the release name

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
lib/toaster/toastergui/static/js/projectapp.js
lib/toaster/toastergui/templates/project.html

index 40e7643822a0168501781e975a2b5eb2ac9fef50..26e054dc238562d0eda2f921ab5ae385acde80e9 100644 (file)
@@ -532,9 +532,10 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
                      // activate modal
                      var modalInstance = $modal.open({
                        templateUrl: 'change_version_modal',
-                       controller: function ($scope, $modalInstance, items, releaseName) {
+                       controller: function ($scope, $modalInstance, items, releaseName, releaseDescription) {
                          $scope.items =  items;
                          $scope.releaseName = releaseName;
+                         $scope.releaseDescription = releaseDescription;
 
                          $scope.ok = function() {
                              $modalInstance.close();
@@ -552,6 +553,9 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
                          releaseName: function () {
                              return $scope.releases.filter(function (e) { if (e.id == $scope.projectVersion) return e;})[0].name;
                          },
+                         releaseDescription: function () {
+                             return $scope.releases.filter(function (e) { if (e.id == $scope.projectVersion) return e;})[0].description;
+                         },
                        }
                      });
 
@@ -639,7 +643,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
                         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>";
                     }
                     if (deletedLayers.length > 0) {
-                        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>";
+                        alertText += "<li><strong>"+deletedLayers.length+"</strong> layer" + ((deletedLayers.length>1)?"s":"") + " deleted: " + deletedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>";
                     }
 
                 }
index 65c0919bc908ee1e00f9bcf766b1f265cde3c5db..d208bf8cfb9046b1ef9fce1efb68d829d1f1cb11 100644 (file)
@@ -77,14 +77,14 @@ vim: expandtab tabstop=2
   <script type="text/ng-template" id="change_version_modal">
     <div class="modal-header">
         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
-        <h3>Changing release to {[releaseName]}</h3>
+        <h3>Changing release to {[releaseDescription]}</h3>
       </div>
       <div class="modal-body">
-        <p>The following project layers do not exist for {[releaseName]}:</p>
+        <p>The following project layers do not exist for the {[releaseDescription]} release:</p>
         <ul>
           <li ng-repeat="i in items"><span class="layer-info" data-toggle="tooltip" tooltip="{[i.detail]}">{[i.name]}</span></li>
         </ul>
-        <p>If you change the release to {[releaseName]}, the above layers will be deleted from your project layers.</p>
+        <p>If you change the release to {[releaseDescription]}, the above layers will be deleted from your project.</p>
       </div>
       <div class="modal-footer">
         <button class="btn btn-primary" ng-click="ok()">Change release and delete layers</button>