Skip to content

Commit

Permalink
Add Scheduler hints and region select.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Nixon authored and Anthony Nixon committed Jan 31, 2018
1 parent 426ba67 commit 3d80231
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/scripts/modules/openstack/src/help/openstack.help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const helpContents: {[key: string]: string} = {
'openstack.network.floatpool': 'The network from which to allocate a floating ip',
'openstack.serverGroup.userData': '<p>Provides a script that will run when each server group instance starts.</p>',
'openstack.serverGroup.availabilityZones': 'The zones which will be used to deploy the application. If left blank all zones will be utilized.',
'openstack.serverGroup.tags': '<p>Key-value pairs of metadata that will be associate to each server group instance.</p>'
'openstack.serverGroup.tags': '<p>Key-value pairs of metadata that will be associate to each server group instance.</p>',
'openstack.serverGroup.schedulerHints': '<p>Key-value pairs for server scheduling hints</p>'
};

export const OPENSTACK_HELP = 'spinnaker.openstack.help.contents';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = angular
])
.controller('openstackServerGroupAdvancedSettingsCtrl', function ($scope, v2modalWizardService) {

$scope.selectedAZs = $scope.command.availabilityZones ?
$scope.command.availabilityZones.map(i => {
$scope.selectedAZs = $scope.command.zones ?
$scope.command.zones.map(i => {
return {id: i, name: i};
}) : [];

Expand All @@ -22,7 +22,7 @@ module.exports = angular
};

$scope.selectedAZsChanged = function () {
$scope.command.availabilityZones = _.map($scope.selectedAZs, 'id');
$scope.command.zones = _.map($scope.selectedAZs, 'id');
};

$scope.$watch('selectedAZs', $scope.selectedAZsChanged);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
on-change="selectedAZsChanged()">
</os-cache-backed-multi-select-field>
</div>
<div class="form-group">
<div class="sm-label-left">
<b>Scheduler Hints (optional)</b>
<help-field key="openstack.serverGroup.schedulerHints"></help-field>
</div>
<map-editor model="command.schedulerHints" allow-empty="true"></map-editor>
</div>
<div class="form-group">
<div class="sm-label-left">
<b>Tags (optional)</b>
Expand Down

0 comments on commit 3d80231

Please sign in to comment.