Skip to content

Commit

Permalink
Fixes #36713 - Fix errata workflow in host collections
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 committed Sep 18, 2023
1 parent 2309127 commit 506c528
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
};

$scope.selectedErrataIds = function () {
return $scope.table.getSelected();
return $scope.nutupane.getAllSelectedResults('errata_id');
};

$scope.installErrataViaRemoteExecution = function(customize) {
Expand All @@ -88,6 +88,10 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
$scope.errataActionFormValues.remoteAction = 'errata_install';
$scope.errataActionFormValues.bulkErrataIds = angular.toJson(errataIds);
$scope.errataActionFormValues.customize = customize;

$timeout(function () {
angular.element('#errataActionForm').submit();
}, 0);
};

$scope.ok = function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ describe('Controller: ContentHostsBulkErrataModalController', function() {
};

this.enableSelectAllResults = function () {};
this.getAllSelectedResults = function() {
return [1, 2, 3, 4]
};
this.setParams = function () {}
};

Expand Down Expand Up @@ -51,6 +54,7 @@ describe('Controller: ContentHostsBulkErrataModalController', function() {
}));

it("can install errata on multiple content hosts", function () {
$scope.remoteExecutionPresent = true;
$scope.installErrata();

expect($scope.errataActionFormValues.remoteAction).toEqual('errata_install');
Expand Down

0 comments on commit 506c528

Please sign in to comment.