Policy translation in server group form

Change-Id: Id628b2ef92582b7ecad1923ffe075bf40ed0b6fb
Closes-Bug: #1822719
This commit is contained in:
pengyuesheng 2019-04-02 13:49:28 +08:00
parent e4bc70b290
commit b59b4effd9
2 changed files with 7 additions and 1 deletions

View File

@ -34,6 +34,12 @@
*/ */
function LaunchInstanceServerGroupsController(launchInstanceModel) { function LaunchInstanceServerGroupsController(launchInstanceModel) {
var ctrl = this; var ctrl = this;
ctrl.policies = {
'affinity': gettext('Affinity'),
'anti-affinity': gettext('Anti Affinity'),
'soft-anti-affinity': gettext('Soft Anti Affinity'),
'soft-affinity': gettext('Soft Affinity')
};
ctrl.tableData = { ctrl.tableData = {
available: launchInstanceModel.serverGroups, available: launchInstanceModel.serverGroups,

View File

@ -42,7 +42,7 @@
<tr ng-repeat="row in $displayedItems track by row.id" <tr ng-repeat="row in $displayedItems track by row.id"
ng-if="$isAllocatedTable || ($isAvailableTable && !trCtrl.allocatedIds[row.id])"> ng-if="$isAllocatedTable || ($isAvailableTable && !trCtrl.allocatedIds[row.id])">
<td class="rsp-p1">{$ row.name $}</td> <td class="rsp-p1">{$ row.name $}</td>
<td class="rsp-p1">{$ row.policies[0] | noValue $}</td> <td class="rsp-p1">{$ ctrl.policies[row.policies[0]] | noValue $}</td>
<td class="actions_column"> <td class="actions_column">
<action-list> <action-list>
<action ng-if="$isAllocatedTable" <action ng-if="$isAllocatedTable"