Skip to content

Commit 94f1ebb

Browse files
vadimkimyadvr
authored andcommitted
CLOUDSTACK-8231: Fixed UI empty drop-down list for LB rules
This closes apache#302 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 666263e commit 94f1ebb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎ui/scripts/network.js‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,8 +1703,9 @@
17031703
name: 'source',
17041704
description: _l('label.lb.algorithm.source')
17051705
}];
1706-
if (typeof args.context == 'undefined') {
1707-
data = getLBAlgorithms(args.context.networks[0]);
1706+
if (typeof args.context != 'undefined') {
1707+
var lbAlgs = getLBAlgorithms(args.context.networks[0]);
1708+
data = (lbAlgs.length == 0) ? data : lbAlgs;
17081709
}
17091710
args.response.success({
17101711
data: data
@@ -3551,8 +3552,9 @@
35513552
name: 'source',
35523553
description: _l('label.lb.algorithm.source')
35533554
}];
3554-
if (typeof args.context == 'undefined') {
3555-
data = getLBAlgorithms(args.context.networks[0]);
3555+
if (typeof args.context != 'undefined') {
3556+
var lbAlgs = getLBAlgorithms(args.context.networks[0]);
3557+
data = (lbAlgs.length == 0) ? data : lbAlgs;
35563558
}
35573559
args.response.success({
35583560
data: data

0 commit comments

Comments
 (0)