diff options
author | Michael Wood <michael.g.wood@intel.com> | 2014-12-05 17:25:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-18 10:24:07 +0000 |
commit | dadc11a52f7048891f9be0118fa19c96c3061547 (patch) | |
tree | bfa0f453b46f507ccc67b2d588b80d4e161216b5 /bitbake/lib/toaster/toastergui/static/js/projectapp.js | |
parent | bd6b8796a1e12c06b98a9bd0a746d5b6896ca85c (diff) | |
download | poky-dadc11a52f7048891f9be0118fa19c96c3061547.tar.gz |
bitbake: toaster: Importlayer add notify exactly which layers changed
This changes when the dependencies are added to the project so that we
can know which ones were successfully added by waiting for the server to
respond with a list. This is more reliable because we may have specified
dependencies which are already in the project.
To pass this information to the project page a temporary cookie is used
with the values for the notification.
(Bitbake rev: 23ca89dc3e0f0ea387649f1e9e8d7d50846048d6)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/projectapp.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projectapp.js | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index 8e3499a94c..94c24f4a56 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js | |||
@@ -128,7 +128,7 @@ projectApp.filter('timediff', function() { | |||
128 | 128 | ||
129 | 129 | ||
130 | // main controller for the project page | 130 | // main controller for the project page |
131 | projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $location, $cookies, $q, $sce, $anchorScroll, $animate, $sanitize) { | 131 | projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $location, $cookies, $cookieStore, $q, $sce, $anchorScroll, $animate, $sanitize) { |
132 | 132 | ||
133 | $scope.getSuggestions = function(type, currentValue) { | 133 | $scope.getSuggestions = function(type, currentValue) { |
134 | var deffered = $q.defer(); | 134 | var deffered = $q.defer(); |
@@ -572,9 +572,28 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
572 | }); | 572 | }); |
573 | 573 | ||
574 | _cmdExecuteWithParam("/layerimported", function (layer) { | 574 | _cmdExecuteWithParam("/layerimported", function (layer) { |
575 | $scope.displayAlert($scope.zone2alerts, | 575 | var imported = $cookieStore.get("layer-imported-alert"); |
576 | "You have imported <strong>" + layer + | 576 | var text; |
577 | "</strong> and added it to your project.", "alert-success"); | 577 | |
578 | if (!imported) | ||
579 | return; | ||
580 | |||
581 | if (imported.layersAdded.length == 0) { | ||
582 | text = "You have imported <strong>"+imported.name+ | ||
583 | "</strong> and added it to your project."; | ||
584 | } else { | ||
585 | text = "You have imported <strong>"+imported.name+ | ||
586 | "</strong> and added <strong>"+imported.layersAdded.length+ | ||
587 | "</strong> layers to your project. <strong>"+ | ||
588 | imported.layersAdded.join(", ")+"</strong>"; | ||
589 | } | ||
590 | |||
591 | $scope.displayAlert($scope.zone2alerts, text, "alert-info"); | ||
592 | |||
593 | // This doesn't work | ||
594 | $cookieStore.remove("layer-imported-alert"); | ||
595 | //use jquery plugin instead | ||
596 | $.removeCookie("layer-imported-alert", { path: "/"}); | ||
578 | }); | 597 | }); |
579 | 598 | ||
580 | _cmdExecuteWithParam("/targetbuild=", function (targets) { | 599 | _cmdExecuteWithParam("/targetbuild=", function (targets) { |