diff options
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projectapp.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index d52ba73f3d..1fd4a54f57 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js | |||
@@ -424,6 +424,24 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
424 | $scope.layerAddId = item.id; | 424 | $scope.layerAddId = item.id; |
425 | }; | 425 | }; |
426 | 426 | ||
427 | $scope.machineSelect = function (machineName) { | ||
428 | $scope._makeXHRCall({ | ||
429 | method: "POST", url: $scope.urls.xhr_edit, | ||
430 | data: { | ||
431 | machineName: machineName, | ||
432 | } | ||
433 | }).then(function () { | ||
434 | $scope.machine.name = machineName; | ||
435 | |||
436 | $scope.displayAlert($scope.zone2alerts, "You have changed the machine to: <strong>" + $scope.machine.name + "</strong>", "alert-info"); | ||
437 | var machineDistro = angular.element("#machine-distro"); | ||
438 | |||
439 | angular.element("html, body").animate({ scrollTop: machineDistro.position().top }, 700).promise().done(function() { | ||
440 | $animate.addClass(machineDistro, "machines-highlight"); | ||
441 | }); | ||
442 | }); | ||
443 | }; | ||
444 | |||
427 | 445 | ||
428 | $scope.layerAddById = function (id) { | 446 | $scope.layerAddById = function (id) { |
429 | $scope.layerAddId = id; | 447 | $scope.layerAddId = id; |
@@ -752,7 +770,9 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
752 | 770 | ||
753 | _cmdExecuteWithParam("/machineselect=", function (machine) { | 771 | _cmdExecuteWithParam("/machineselect=", function (machine) { |
754 | $scope.machineName = machine; | 772 | $scope.machineName = machine; |
755 | $scope.toggle('#select-machine'); | 773 | $scope.machine.name = machine; |
774 | $scope.machineSelect(machine); | ||
775 | |||
756 | }); | 776 | }); |
757 | 777 | ||
758 | 778 | ||