mirror of https://github.com/apache/cloudstack.git
- Fixed NPE caused when calling listRemoteAccessVpn API command with no vpn record in DB.
- Fixed UI to pass in ipaddress when you create/delete remote access vpn.
This commit is contained in:
parent
a73b9dd7fb
commit
de6b9eb0e2
|
|
@ -471,7 +471,10 @@ public class RemoteAccessVpnManagerImpl implements RemoteAccessVpnService, Manag
|
|||
_accountMgr.checkAccess(caller, publicIp);
|
||||
|
||||
List<RemoteAccessVpnVO> vpns = new ArrayList<RemoteAccessVpnVO>(1);
|
||||
vpns.add(_remoteAccessVpnDao.findById(ipAddress));
|
||||
RemoteAccessVpnVO remoteVpn = _remoteAccessVpnDao.findById(ipAddress);
|
||||
if (remoteVpn != null) {
|
||||
vpns.add(remoteVpn);
|
||||
}
|
||||
return vpns;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ function showEnableVPNDialog($thisTab) {
|
|||
var $thisDialog = $(this);
|
||||
$spinningWheel = $thisDialog.find("#spinning_wheel").show();
|
||||
$.ajax({
|
||||
data: createURL("command=createRemoteAccessVpn&account="+ipObj.account+"&domainid="+ipObj.domainid+"&zoneid="+ipObj.zoneid),
|
||||
data: createURL("command=createRemoteAccessVpn&publicip="+ipObj.ipaddress+"&account="+ipObj.account+"&domainid="+ipObj.domainid+"&zoneid="+ipObj.zoneid),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.createremoteaccessvpnresponse.jobid;
|
||||
|
|
@ -595,7 +595,7 @@ function showVpnUsers(presharedkey, publicip) {
|
|||
var $thisDialog = $(this);
|
||||
$spinningWheel = $thisDialog.find("#spinning_wheel").show();
|
||||
$.ajax({
|
||||
data: createURL("command=deleteRemoteAccessVpn&account="+ipObj.account+"&domainid="+ipObj.domainid+"&zoneid="+ipObj.zoneid),
|
||||
data: createURL("command=deleteRemoteAccessVpn&publicip="+ipObj.ipaddress+"&account="+ipObj.account+"&domainid="+ipObj.domainid+"&zoneid="+ipObj.zoneid),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.deleteremoteaccessvpnresponse.jobid;
|
||||
|
|
|
|||
Loading…
Reference in New Issue