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

This closes #302

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 666263e84d
commit 94f1ebb60a
1 changed files with 6 additions and 4 deletions

View File

@ -1703,8 +1703,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
@ -3551,8 +3552,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