From b59b4effd9a561a1cb9fe4d5337819e6c3a84306 Mon Sep 17 00:00:00 2001 From: pengyuesheng Date: Tue, 2 Apr 2019 13:49:28 +0800 Subject: [PATCH] Policy translation in server group form Change-Id: Id628b2ef92582b7ecad1923ffe075bf40ed0b6fb Closes-Bug: #1822719 --- .../server-groups/server-groups.controller.js | 6 ++++++ .../launch-instance/server-groups/server-groups.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.controller.js index 0101d14954..4ab5faf311 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.controller.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.controller.js @@ -34,6 +34,12 @@ */ function LaunchInstanceServerGroupsController(launchInstanceModel) { 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 = { available: launchInstanceModel.serverGroups, diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.html b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.html index c2b1c85bbf..252f241948 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.html +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/server-groups/server-groups.html @@ -42,7 +42,7 @@ {$ row.name $} - {$ row.policies[0] | noValue $} + {$ ctrl.policies[row.policies[0]] | noValue $}