Browse Source

Policy translation in server group form

Change-Id: Id628b2ef92582b7ecad1923ffe075bf40ed0b6fb
Closes-Bug: #1822719
tags/16.0.0.0b1
pengyuesheng 2 months ago
parent
commit
b59b4effd9

+ 6
- 0
openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.controller.js View File

@@ -34,6 +34,12 @@
34 34
    */
35 35
   function LaunchInstanceServerGroupsController(launchInstanceModel) {
36 36
     var ctrl = this;
37
+    ctrl.policies = {
38
+      'affinity': gettext('Affinity'),
39
+      'anti-affinity': gettext('Anti Affinity'),
40
+      'soft-anti-affinity': gettext('Soft Anti Affinity'),
41
+      'soft-affinity': gettext('Soft Affinity')
42
+    };
37 43
 
38 44
     ctrl.tableData = {
39 45
       available: launchInstanceModel.serverGroups,

+ 1
- 1
openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.html View File

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

Loading…
Cancel
Save