You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2017/02/20 11:54:20 UTC

[1/2] git commit: updated refs/heads/master to dafd393

Repository: cloudstack
Updated Branches:
  refs/heads/master ca27394da -> dafd3938f


CLOUDSTACK-9588: Add Load Balancer functionality in Network page is redundant.
The "Add Load Balancer" functionality is redundant.
The above is used to create LB rule without any public IP.
This commit removes the tab from network page.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5a5b453a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5a5b453a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5a5b453a

Branch: refs/heads/master
Commit: 5a5b453a14f40f2cf82895a33fb8a76c8a00f065
Parents: 13bfdd7
Author: Nitin Kumar Maharana <ni...@accelerite.com>
Authored: Thu Nov 10 15:27:52 2016 +0530
Committer: Nitin Kumar Maharana <ni...@accelerite.com>
Committed: Wed Feb 15 00:11:42 2017 +0530

----------------------------------------------------------------------
 ui/scripts/network.js | 239 ---------------------------------------------
 1 file changed, 239 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a5b453a/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 78c90e1..cc6e9a7 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1186,10 +1186,6 @@
                                 }
                             });
 
-                            if (!networkHavingELB) {
-                                hiddenTabs.push("addloadBalancer");
-                            }
-
                             if (isVPC || isAdvancedSGZone || isSharedNetwork) {
                                 hiddenTabs.push('egressRules');
                             }
@@ -1657,241 +1653,6 @@
                                         }
                                     });
                                 }
-                            },
-
-                            addloadBalancer: { // EIP/ELB Basic zone: Add Load Balancer tab in network detailView
-                                title: 'label.add.load.balancer',
-                                custom: function(args) {
-                                    var context = args.context;
-
-                                    return $('<div>').addClass('loadBalancer').multiEdit({
-                                        context: context,
-                                        listView: $.extend(true, {}, cloudStack.sections.instances, {
-                                            listView: {
-                                                filters: false,
-
-                                                dataProvider: function(args) {
-                                                    var data = {
-                                                        page: args.page,
-                                                        pageSize: pageSize,
-                                                        domainid: g_domainid,
-                                                        account: g_account,
-                                                        networkid: args.context.networks[0].id,
-                                                        listAll: true
-                                                    };
-
-                                                    $.ajax({
-                                                        url: createURL('listVirtualMachines'),
-                                                        data: data,
-                                                        dataType: 'json',
-                                                        async: true,
-                                                        success: function(data) {
-                                                            args.response.success({
-                                                                data: $.grep(
-                                                                    data.listvirtualmachinesresponse.virtualmachine ?
-                                                                    data.listvirtualmachinesresponse.virtualmachine : [],
-                                                                    function(instance) {
-                                                                        var nonAutoScale = 0;
-                                                                        if (instance.displayname == null)
-                                                                            nonAutoScale = 1;
-                                                                        else {
-                                                                            if (instance.displayname.match(/AutoScale-LB-/) == null)
-                                                                                nonAutoScale = 1;
-                                                                            else {
-                                                                                if (instance.displayname.match(/AutoScale-LB-/).length)
-                                                                                    nonAutoScale = 0;
-                                                                            }
-                                                                        }
-                                                                        var isActiveState = $.inArray(instance.state, ['Destroyed', 'Expunging']) == -1;
-                                                                        return nonAutoScale && isActiveState;
-                                                                    }
-                                                                )
-                                                            });
-                                                        },
-                                                        error: function(data) {
-                                                            args.response.error(parseXMLHttpResponse(data));
-                                                        }
-                                                    });
-                                                }
-                                            }
-                                        }),
-                                        multipleAdd: true,
-                                        fields: {
-                                            'name': {
-                                                edit: true,
-                                                label: 'label.name'
-                                            },
-                                            'publicport': {
-                                                edit: true,
-                                                label: 'label.public.port'
-                                            },
-                                            'privateport': {
-                                                edit: true,
-                                                label: 'label.private.port'
-                                            },
-                                            'algorithm': {
-                                                label: 'label.algorithm',
-                                                select: function(args) {
-                                                    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') {
-                                                        var lbAlgs = getLBAlgorithms(args.context.networks[0]);
-                                                        data = (lbAlgs.length == 0) ? data : lbAlgs;
-                                                    }
-                                                    args.response.success({
-                                                        data: data
-                                                    });
-                                                }
-                                            },
-                                            'sticky': {
-                                                label: 'label.stickiness',
-                                                custom: {
-                                                    buttonLabel: 'label.configure',
-                                                    action: cloudStack.lbStickyPolicy.dialog()
-                                                }
-                                            },
-                                            'autoScale': {
-                                                label: 'label.autoscale',
-                                                custom: {
-                                                    requireValidation: true,
-                                                    buttonLabel: 'label.configure',
-                                                    action: cloudStack.uiCustom.autoscaler(cloudStack.autoscaler)
-                                                }
-                                            },
-                                            'add-vm': {
-                                                label: 'label.add.vms',
-                                                addButton: true
-                                            },
-                                            'state' : {
-                                                edit: 'ignore',
-                                                label: 'label.state'
-                                            }
-                                        },
-
-                                        add: { //basic zone - elastic IP - Add Load Balancer tab - Add VMs button
-                                            label: 'label.add.vms',
-                                            action: function(args) {
-                                                var data = {
-                                                    algorithm: args.data.algorithm,
-                                                    name: args.data.name,
-                                                    privateport: args.data.privateport,
-                                                    publicport: args.data.publicport,
-                                                    openfirewall: false,
-                                                    domainid: g_domainid,
-                                                    account: g_account
-                                                };
-
-                                                if ('vpc' in args.context) { //from VPC section
-                                                    if (args.data.tier == null) {
-                                                        args.response.error('Tier is required');
-                                                        return;
-                                                    }
-                                                    $.extend(data, {
-                                                        networkid: args.data.tier
-                                                    });
-                                                } else { //from Guest Network section
-                                                    $.extend(data, {
-                                                        networkid: args.context.networks[0].id
-                                                    });
-                                                }
-
-                                                var stickyData = $.extend(true, {}, args.data.sticky);
-
-                                                $.ajax({
-                                                    url: createURL('createLoadBalancerRule'),
-                                                    data: data,
-                                                    dataType: 'json',
-                                                    async: true,
-                                                    success: function(data) {
-                                                        var itemData = args.itemData;
-                                                        //var jobID = data.createloadbalancerruleresponse.jobid; //CS-16964: use jobid from assignToLoadBalancerRule instead of createLoadBalancerRule
-
-                                                        $.ajax({
-                                                            url: createURL('assignToLoadBalancerRule'),
-                                                            data: {
-                                                                id: data.createloadbalancerruleresponse.id,
-                                                                virtualmachineids: $.map(itemData, function(elem) {
-                                                                    return elem.id;
-                                                                }).join(',')
-                                                            },
-                                                            dataType: 'json',
-                                                            async: true,
-                                                            success: function(data) {
-                                                                var jobID = data.assigntoloadbalancerruleresponse.jobid; //CS-16964: use jobid from assignToLoadBalancerRule instead of createLoadBalancerRule
-                                                                var lbCreationComplete = false;
-
-                                                                args.response.success({
-                                                                    _custom: {
-                                                                        jobId: jobID
-                                                                    },
-                                                                    notification: {
-                                                                        label: 'label.add.load.balancer',
-                                                                        poll: function(args) {
-                                                                            var complete = args.complete;
-                                                                            var error = args.error;
-
-                                                                            pollAsyncJobResult({
-                                                                                _custom: args._custom,
-                                                                                complete: function(args) {
-                                                                                    if (lbCreationComplete) {
-                                                                                        return;
-                                                                                    }
-
-                                                                                    lbCreationComplete = true;
-                                                                                    cloudStack.dialog.notice({
-                                                                                        message: _l('message.add.load.balancer.under.ip') + args.data.loadbalancer.publicip
-                                                                                    });
-
-                                                                                    if (stickyData &&
-                                                                                        stickyData.methodname &&
-                                                                                        stickyData.methodname != 'None') {
-                                                                                        cloudStack.lbStickyPolicy.actions.add(
-                                                                                            args.data.loadbalancer.id,
-                                                                                            stickyData,
-                                                                                            complete, // Complete
-                                                                                            complete // Error
-                                                                                        );
-                                                                                    } else {
-                                                                                        complete();
-                                                                                    }
-                                                                                },
-                                                                                error: error
-                                                                            });
-                                                                        }
-                                                                    }
-                                                                });
-                                                            },
-                                                            error: function(data) {
-                                                                args.response.error(parseXMLHttpResponse(data));
-                                                            }
-                                                        });
-                                                    },
-                                                    error: function(data) {
-                                                        args.response.error(parseXMLHttpResponse(data));
-                                                    }
-                                                });
-                                            }
-                                        },
-
-
-                                        dataProvider: function(args) {
-                                            args.response.success({ //no LB listing in AddLoadBalancer tab
-                                                data: []
-                                            });
-                                        }
-                                    });
-                                }
                             }
                         }
                     }


[2/2] git commit: updated refs/heads/master to dafd393

Posted by ra...@apache.org.
Merge pull request #1758 from nitin-maharana/CloudStack-Nitin-4.9

CLOUDSTACK-9588: Add Load Balancer functionality in Network page is Redundant.Steps to Reproduce:
Network -> Select any network -> Observe Add Load Balancer tab
The "Add Load Balancer" functionality is redundant.
The above is used to create LB rule without any public IP.

Resolution:
There exist similar functionality in Network -> Any Network -> Details Tab -> View IP Addresses -> Any public IP -> Configuration Tab -> Observe Load Balancing.
The above is used to create LB rule with a public IP. This is a more convenient way of creating LB rule as the IP is involved.

* pr/1758:
  CLOUDSTACK-9588: Add Load Balancer functionality in Network page is redundant. The "Add Load Balancer" functionality is redundant. The above is used to create LB rule without any public IP. This commit removes the tab from network page.

Signed-off-by: Rajani Karuturi <ra...@accelerite.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dafd3938
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dafd3938
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dafd3938

Branch: refs/heads/master
Commit: dafd3938f4d19cd434aba7ef23ec8ada505e9c2b
Parents: ca27394 5a5b453
Author: Rajani Karuturi <ra...@accelerite.com>
Authored: Mon Feb 20 17:23:19 2017 +0530
Committer: Rajani Karuturi <ra...@accelerite.com>
Committed: Mon Feb 20 17:23:20 2017 +0530

----------------------------------------------------------------------
 ui/scripts/network.js | 239 ---------------------------------------------
 1 file changed, 239 deletions(-)
----------------------------------------------------------------------