From 7144e9b35d4efabe9956dda396a799fcfba26be6 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 27 Mar 2015 09:28:16 +0530 Subject: [PATCH] CLOUDSTACK-8231: use hardcoded list of LB algorithms as backup Signed-off-by: Rohit Yadav (cherry picked from commit 6f2facfa3900f064e19cee34add2895862ef0556) Signed-off-by: Rohit Yadav --- ui/scripts/network.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 46475bbbd53..f62502f09a1 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1684,7 +1684,22 @@ 'algorithm': { label: 'label.algorithm', select: function(args) { - var data = getLBAlgorithms(args.context.networks[0]); + var data = [{ + id: 'roundrobin', + name: 'roundrobin', + description: _l('label.lb.algorithm.roundrobin') + }, { + id: 'leastconn', + name: 'leastconn', + description: _l('label.lb.algorithm.leastconn') + }, { + id: 'source', + name: 'source', + description: _l('label.lb.algorithm.source') + }]; + if (typeof args.context != 'undefined') { + data = getLBAlgorithms(args.context.networks[0]); + } args.response.success({ data: data });