CLOUDSTACK-8231: Fixed UI empty drop-down list for LB rules

This closes #302

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 94f1ebb60a)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Vadim Kimlaychuk 2015-05-29 21:18:49 +02:00 committed by Rohit Yadav
parent 00fffbe081
commit f8e1ff12ab
1 changed files with 6 additions and 4 deletions

View File

@ -1697,8 +1697,9 @@
name: 'source',
description: _l('label.lb.algorithm.source')
}];
if (typeof args.context == 'undefined') {
data = getLBAlgorithms(args.context.networks[0]);
if (typeof args.context != 'undefined') {
var lbAlgs = getLBAlgorithms(args.context.networks[0]);
data = (lbAlgs.length == 0) ? data : lbAlgs;
}
args.response.success({
data: data
@ -3541,8 +3542,9 @@
name: 'source',
description: _l('label.lb.algorithm.source')
}];
if (typeof args.context == 'undefined') {
data = getLBAlgorithms(args.context.networks[0]);
if (typeof args.context != 'undefined') {
var lbAlgs = getLBAlgorithms(args.context.networks[0]);
data = (lbAlgs.length == 0) ? data : lbAlgs;
}
args.response.success({
data: data