Skip to content

Commit f8e1ff1

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> (cherry picked from commit 94f1ebb) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 00fffbe commit f8e1ff1

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
@@ -1697,8 +1697,9 @@
16971697
name: 'source',
16981698
description: _l('label.lb.algorithm.source')
16991699
}];
1700-
if (typeof args.context == 'undefined') {
1701-
data = getLBAlgorithms(args.context.networks[0]);
1700+
if (typeof args.context != 'undefined') {
1701+
var lbAlgs = getLBAlgorithms(args.context.networks[0]);
1702+
data = (lbAlgs.length == 0) ? data : lbAlgs;
17021703
}
17031704
args.response.success({
17041705
data: data
@@ -3541,8 +3542,9 @@
35413542
name: 'source',
35423543
description: _l('label.lb.algorithm.source')
35433544
}];
3544-
if (typeof args.context == 'undefined') {
3545-
data = getLBAlgorithms(args.context.networks[0]);
3545+
if (typeof args.context != 'undefined') {
3546+
var lbAlgs = getLBAlgorithms(args.context.networks[0]);
3547+
data = (lbAlgs.length == 0) ? data : lbAlgs;
35463548
}
35473549
args.response.success({
35483550
data: data

0 commit comments

Comments
 (0)