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/12/17 06:18:00 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/1255

    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/1255.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 #1255
    
----
commit 8cecc255b4d3d12ac004743d2f8a0f1b6f148527
Author: Kshitij Kansal <ka...@gmail.com>
Date:   2015-10-13T07:26:24Z

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

commit 01690e3ac60a36c772bb965ff1c5135fc66d67e0
Author: Kshitij Kansal <ka...@gmail.com>
Date:   2015-12-15T09:37:24Z

    CLOUDSTACK-8961: Added an option for admins to add VPN users in the domains they have access to

----


---
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 nitin-maharana <gi...@git.apache.org>.
Github user nitin-maharana commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1255#discussion_r60544256
  
    --- Diff: ui/scripts/network.js ---
    @@ -4508,99 +4524,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 --
    
    @kansal : It would be better if you put the localisation key inplace of the english sentence.


---
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/1255#issuecomment-165342311
  
    cc @milamberspace @karuturi Have reopened this PR against the current master. This is in continuation with #941. 
    ![screen shot 2015-12-17 at 11 02 13 am](https://cloud.githubusercontent.com/assets/4276209/11862175/e1800faa-a4ad-11e5-90e2-34a39699eb82.png)
    ![screen shot 2015-12-17 at 11 02 49 am](https://cloud.githubusercontent.com/assets/4276209/11862177/eb01d46e-a4ad-11e5-9340-7f39652b0374.png)
    ![screen shot 2015-12-17 at 11 03 07 am](https://cloud.githubusercontent.com/assets/4276209/11862178/f058f370-a4ad-11e5-88a0-3e25c925f1de.png)
    ![screen shot 2015-12-17 at 11 03 27 am](https://cloud.githubusercontent.com/assets/4276209/11862180/f511e836-a4ad-11e5-9732-e292ca831e9f.png)



---
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 nitin-maharana <gi...@git.apache.org>.
Github user nitin-maharana commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1255#discussion_r60544689
  
    --- Diff: ui/scripts/network.js ---
    @@ -6517,7 +6445,192 @@
                             }
                         }
                     }
    -            }
    +            },
    +            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 --
    
    Here also you can replace this line ('Are you sure you want to delete the VPN user') with a localization key.


---
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.
---

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

Posted by Marcus Jorge <ma...@corp.globo.com>.
Fx"dxxxffzxzsd
Em 21 de abr de 2016 07:10, "jayapalu" <gi...@git.apache.org> escreveu:

> Github user jayapalu commented on the pull request:
>
>     https://github.com/apache/cloudstack/pull/1255#issuecomment-212842613
>
>     @kansal Can you please complete the localisation changes.
>
>
> ---
> 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 jayapalu <gi...@git.apache.org>.
Github user jayapalu commented on the pull request:

    https://github.com/apache/cloudstack/pull/1255#issuecomment-212842613
  
    @kansal Can you please complete the localisation changes.


---
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 nitin-maharana <gi...@git.apache.org>.
Github user nitin-maharana commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1255#discussion_r60544347
  
    --- Diff: ui/scripts/network.js ---
    @@ -6517,7 +6445,192 @@
                             }
                         }
                     }
    -            }
    +            },
    +            vpnuser: {
    +                        type: 'select',
    +                        title: 'VPN Users',
    --- End diff --
    
    Here also you can replace this with localization key.


---
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/1255#issuecomment-212834905
  
    @nitin-maharana Yes. Will update and rebase the PR.


---
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 rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:

    https://github.com/apache/cloudstack/pull/1255#issuecomment-216211177
  
    @kansal thanks, interesting fix. can you rebase against latest master
    
    We'll need some manual testing to verify this and evaluate if this is the right place to keep in (for example, in case of root admin etc, such UI won't make sense as they should see VPN users across all accounts etc?)
    
    tag:needlove


---
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.
---