Skip to content

Commit

Permalink
Trying to make Jeremy happy pt1
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 committed Aug 11, 2023
1 parent 75930d2 commit 648f52d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostPackagesApplicabl
return $scope.getSelectedPackages().join(' ');
};

$scope.performDefaultUpdateAction = function () {
$scope.performViaRemoteExecution('packageUpdate', $scope.getRemoteExecutionCommand(), false);
};
$scope.performViaRemoteExecution('packageUpdate', $scope.getRemoteExecutionCommand(), false);

packagesNutupane = new Nutupane(Package, {'host_id': $scope.$stateParams.hostId, 'packages_restrict_upgradable': true});
$scope.controllerName = 'katello_erratum_packages';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ <h3 translate>Applicable Packages</h3>

<div data-block="list-actions" bst-feature-flag="remote_actions">
<div ng-hide="denied('edit_hosts', host)" class="nutupane-actions fr">
<form ng-submit="performDefaultUpdateAction()" role="form">
<form ng-submit="performViaRemoteExecution(false)" role="form">

<span uib-dropdown class="btn-group">
<button class="btn btn-primary" type="button"
ng-click="performDefaultUpdateAction()"
ng-click="performViaRemoteExecution(false)"
ng-hide="denied('edit_hosts', host)"
ng-disabled="working || table.numSelected === 0 || !hostToolingEnabled"
translate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Controller: ContentHostPackagesApplicableController', function() {
it("performs default action as appropriate for rex", function() {
spyOn($scope, 'performViaRemoteExecution');
$scope.remoteExecutionByDefault = true;
$scope.performDefaultUpdateAction();
$scope.performViaRemoteExecution();

expect($scope.performViaRemoteExecution).toHaveBeenCalledWith('packageUpdate', $scope.getRemoteExecutionCommand(), false);
});
Expand Down

0 comments on commit 648f52d

Please sign in to comment.