You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by kansal <gi...@git.apache.org> on 2015/10/17 18:14:57 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-8961: Changes related to the U...

GitHub user kansal opened a pull request:

    https://github.com/apache/cloudstack/pull/941

    CLOUDSTACK-8961: Changes related to the UI of VPN Users management.

    The current VPN uses are added in the VPN tab inside the public IP after the VPN is enabled. For each network(for which VPN is supported and enabled), the VPN users are shared. As the Cloudstack doc says “ The account owner can create and manage users for their VPN. CloudStack does not use its account database for this purpose but uses a separate table. The VPN user database is shared across all the VPNs created by the account owner. All VPN users get access to all VPNs created by the account owner.”
    
    The current implementation of going inside each network and adding VPN users give a first feel as if the users are network based. To fix this, Shifted the VPN users to networks tab views.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kansal/cloudstack CLOUDSTACK-8961

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/941.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #941
    
----
commit b89fe3b61b6f47756120979ed1b78e5fe69963a2
Author: Kshitij Kansal <ka...@gmail.com>
Date:   2015-10-13T07:26:24Z

    CLOUDSTACK-8961: Changes related to the UI of VPN Users management.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8961: Changes related to the U...

Posted by milamberspace <gi...@git.apache.org>.
Github user milamberspace commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/941#discussion_r43433480
  
    --- Diff: ui/scripts/network.js ---
    @@ -4495,99 +4511,11 @@
                                                     $('<li>').addClass('psk').html(_l('message.enabled.vpn.ip.sec') + ' ')
                                                     .append($('<strong>').html(psk))
                                                 )
    -                                    ).multiEdit({
    -                                        context: args.context,
    -                                        noSelect: true,
    -                                        fields: {
    -                                            'username': {
    -                                                edit: true,
    -                                                label: 'label.username'
    -                                            },
    -                                            'password': {
    -                                                edit: true,
    -                                                isPassword: true,
    -                                                label: 'label.password'
    -                                            },
    -                                            'add-user': {
    -                                                addButton: true,
    -                                                label: 'label.add.user'
    -                                            }
    -                                        },
    -                                        add: {
    -                                            label: 'label.add.user',
    -                                            action: function(args) {
    -                                                $.ajax({
    -                                                    url: createURL('addVpnUser'),
    -                                                    data: $.extend(args.data, {
    -                                                        domainid: args.context.ipAddresses[0].domainid,
    -                                                        account: args.context.ipAddresses[0].account
    -                                                    }),
    -                                                    dataType: 'json',
    -                                                    type: "POST",
    -                                                    success: function(data) {
    -                                                        args.response.success({
    -                                                            _custom: {
    -                                                                jobId: data.addvpnuserresponse.jobid
    -                                                            },
    -                                                            notification: {
    -                                                                label: 'label.add.vpn.user',
    -                                                                poll: pollAsyncJobResult
    -                                                            }
    -                                                        });
    -                                                    },
    -                                                    error: function(data) {
    -                                                        args.response.error(parseXMLHttpResponse(data));
    -                                                    }
    -                                                });
    -                                            }
    -                                        },
    -                                        actions: {
    -                                            destroy: {
    -                                                label: 'label.action.delete.user',
    -                                                action: function(args) {
    -                                                    $.ajax({
    -                                                        url: createURL('removeVpnUser'),
    -                                                        data: {
    -                                                            domainid: args.context.multiRule[0].domainid,
    -                                                            account: args.context.multiRule[0].account,
    -                                                            username: args.context.multiRule[0].username
    -                                                        },
    -                                                        dataType: 'json',
    -                                                        async: true,
    -                                                        success: function(data) {
    -                                                            var jobID = data.removevpnuserresponse.jobid;
    -
    -                                                            args.response.success({
    -                                                                _custom: {
    -                                                                    jobId: jobID
    -                                                                },
    -                                                                notification: {
    -                                                                    label: 'label.delete.vpn.user',
    -                                                                    poll: pollAsyncJobResult
    -                                                                }
    -                                                            });
    -                                                        }
    -                                                    });
    -                                                }
    -                                            }
    -                                        },
    -                                        dataProvider: function(args) {
    -                                            $.ajax({
    -                                                url: createURL('listVpnUsers'),
    -                                                data: {
    -                                                    domainid: args.context.ipAddresses[0].domainid,
    -                                                    account: args.context.ipAddresses[0].account
    -                                                },
    -                                                dataType: 'json',
    -                                                async: true,
    -                                                success: function(data) {
    -                                                    args.response.success({
    -                                                        data: data.listvpnusersresponse.vpnuser
    -                                                    });
    -                                                }
    -                                            });
    -                                        }
    -                                    });
    +                                            .append(
    +                                                //Note
    +                                                $('<li>').html('Note: VPN users are now accessed by changing views at the networks tab.')
    --- End diff --
    
    Would be better to use a new localization key and put the text in messages.properties file. Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8961: Changes related to the U...

Posted by kansal <gi...@git.apache.org>.
Github user kansal commented on the pull request:

    https://github.com/apache/cloudstack/pull/941#issuecomment-165340109
  
    Closing this PR, will create a new one against 4.6


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8961: Changes related to the U...

Posted by kansal <gi...@git.apache.org>.
Github user kansal closed the pull request at:

    https://github.com/apache/cloudstack/pull/941


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8961: Changes related to the U...

Posted by milamberspace <gi...@git.apache.org>.
Github user milamberspace commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/941#discussion_r43433493
  
    --- Diff: ui/scripts/network.js ---
    @@ -6504,7 +6432,123 @@
                             }
                         }
                     }
    -            }
    +            },
    +            vpnuser: {
    +                        type: 'select',
    +                        title: 'VPN Users',
    --- End diff --
    
    Would be better to use a new localization key and put the text in messages.properties file. Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8961: Changes related to the U...

Posted by milamberspace <gi...@git.apache.org>.
Github user milamberspace commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/941#discussion_r43433516
  
    --- Diff: ui/scripts/network.js ---
    @@ -6504,7 +6432,123 @@
                             }
                         }
                     }
    -            }
    +            },
    +            vpnuser: {
    +                        type: 'select',
    +                        title: 'VPN Users',
    +
    +                        listView: {
    +                        id: 'vpnUsers',
    +                        fields: {
    +                            username: { label: 'label.name' },
    +                            domain: { label: 'label.domain' },
    +                            state: { label: 'label.state',
    +                                indicator: {
    +                                    'Active': 'on',
    +                                }
    +                            }
    +                        },
    +                        dataProvider: function(args) {
    +                            var data = {};
    +                            listViewDataProvider(args, data);
    +                            $.ajax({
    +                                url: createURL('listVpnUsers'),
    +                                data: data,
    +                                dataType: 'json',
    +                                async: true,
    +                                success: function(data) {
    +                                    args.response.success({
    +                                        data: data.listvpnusersresponse.vpnuser
    +                                    });
    +                                }
    +                            });
    +                        },
    +                        actions:{
    +                            destroy: {
    +                                label: 'label.action.delete.user',
    +                                messages: {
    +                                    confirm: function(args) { return 'Are you sure you want to delete the VPN user'},
    --- End diff --
    
    Would be better to use a new localization key and put the text in messages.properties file. Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8961: Changes related to the U...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the pull request:

    https://github.com/apache/cloudstack/pull/941#issuecomment-152971271
  
    @kansal Can you address the localization concerns? 
    Also, if possible could you provide screenshots of the change?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---