summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/projectapp.js
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-01-20 16:56:35 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-23 11:33:53 +0000
commit08e5a49afbc4c2b777be61785ecd7854837d6250 (patch)
treedd32b59fff8fb118ad059e9be83f15d9d8edf744 /bitbake/lib/toaster/toastergui/static/js/projectapp.js
parentc546815eeea92ebda4fe4120a7634218db763892 (diff)
downloadpoky-08e5a49afbc4c2b777be61785ecd7854837d6250.tar.gz
bitbake: toastegui: project page build selected targets
Fixing the action on the "Build selected targets" button. Remove "build-button" duplicate id from the build page. [YOCTO #7047] (Bitbake rev: 8278d7b15b58484af93d952e594f29dabb9200a9) Signed-off-by: Alexandru DAMIAN <alexandru.damian@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.js25
1 files changed, 22 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
index 74471a1a51..bee3c56be2 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
@@ -337,8 +337,12 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
337 } 337 }
338 338
339 $scope.buildExistingTarget = function(targets) { 339 $scope.buildExistingTarget = function(targets) {
340 $scope.buildTargetList(targets.map(function(v,i,a){return v.target}));
341 }
342
343 $scope.buildTargetList = function(targetlist) {
340 var oldTargetName = $scope.targetName; 344 var oldTargetName = $scope.targetName;
341 $scope.targetName = targets.map(function(v,i,a){return v.target}).join(' '); 345 $scope.targetName = targetlist.join(' ');
342 $scope.buildNamedTarget(); 346 $scope.buildNamedTarget();
343 $scope.targetName = oldTargetName; 347 $scope.targetName = oldTargetName;
344 } 348 }
@@ -733,12 +737,27 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
733 angular.element(id+"-opposite").toggle(); 737 angular.element(id+"-opposite").toggle();
734 } 738 }
735 739
736 $scope.selectedMostBuildTargets = function () { 740 /**
737 keys = Object.keys($scope.mostBuiltTargets); 741 * Functionality related to "Most build targets"
742 */
743
744 $scope.enableBuildSelectedTargets = function () {
745 var keys = Object.keys($scope.mostBuiltTargets);
738 keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e }); 746 keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
739 return keys.length == 0; 747 return keys.length == 0;
740 } 748 }
741 749
750 $scope.buildSelectedTargets = function () {
751 var keys = Object.keys($scope.mostBuiltTargets);
752 keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
753
754 $scope.buildTargetList(keys);
755 for (var i = 0; i < keys.length; i++)
756 {
757 $scope.mostBuiltTargets[keys[i]] = 0;
758 }
759 }
760
742 /** 761 /**
743 * Helper function to deal with error string recognition and manipulation 762 * Helper function to deal with error string recognition and manipulation
744 */ 763 */