Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS load balancer network and sg bugfixes #4281

Merged
merged 1 commit into from
Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ui-select>
</div>
<div class="col-md-1 sm-label-left">
<a href="" ng-click="forceRefreshCache()" uib-tooltip-template="refreshTooltipTemplate">
<a href="" ng-click="forceRefreshCache()">
<span class="fa fa-refresh" ng-class="{'fa-spin':cache.loading}"></span>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<ng-form class="container-fluid form-horizontal" name="interfaceForm">
<div class="modal-body">
<network-select-field model="loadBalancer.networkId" help-key="openstack.loadBalancer.network" read-only="!isNew"></network-select-field>
<network-select-field
model="loadBalancer.networkId"
help-key="openstack.loadBalancer.network"
read-only="!isNew"
filter="{ account: loadBalancer.account }">
</network-select-field>

<os-cache-backed-multi-select-field label="Security Groups"
cache="allSecurityGroups"
refresh-cache="updateSecurityGroups"
required="true"
model="loadBalancer.securityGroups"></os-cache-backed-multi-select-field>
<os-cache-backed-multi-select-field
label="Security Groups"
cache="allSecurityGroups"
refresh-cache="updateSecurityGroups"
required="true"
model="loadBalancer.securityGroups">
</os-cache-backed-multi-select-field>
</div>
</ng-form>
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module.exports = angular.module('spinnaker.loadBalancer.openstack.create.control
$scope.allSecurityGroups = [];
$scope.$watch('loadBalancer.account', updateSecurityGroups);
$scope.$watch('loadBalancer.region', updateSecurityGroups);
$scope.updateSecurityGroups = updateSecurityGroups;
updateSecurityGroups();

// initialize controller
Expand Down Expand Up @@ -158,6 +159,9 @@ module.exports = angular.module('spinnaker.loadBalancer.openstack.create.control
this.accountUpdated = function() {
ctrl.updateName();
$scope.subnetFilter = {type: 'openstack', account: $scope.loadBalancer.account, region: $scope.loadBalancer.region};
if ($scope.loadBalancer) {
$scope.loadBalancer.securityGroups = [];
}
updateLoadBalancerNames();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ module.exports = angular.module('spinnaker.openstack.network.networkSelectField.
scope.onChange({network: newValue});
}
}

});

scope.$watch('filter', function() { scope.$broadcast('updateOptions'); });
scope.$watch('filter', function() {
scope.$broadcast('onValueChanged');
scope.updateOptions();
});
}
};
});