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 });