Add parentID to service calls.

This commit is contained in:
Michael Jumper
2013-08-14 14:22:28 -07:00
parent 8f328d68f9
commit 0127aec1b9

View File

@@ -535,6 +535,10 @@ GuacamoleService.Connections = {
// Init POST data
var data = "protocol=" + encodeURIComponent(connection.protocol);
// Add group if given
if (connection.parent)
data += "&parentID=" + encodeURIComponent(connection.parent.id);
// Add parameters
for (var name in connection.parameters)
data += "&_" + encodeURIComponent(name)
@@ -570,6 +574,10 @@ GuacamoleService.Connections = {
"name=" + encodeURIComponent(connection.name)
+ "&protocol=" + encodeURIComponent(connection.protocol);
// Add group if given
if (connection.parent)
data += "&parentID=" + encodeURIComponent(connection.parent.id);
// Add parameters
for (var name in connection.parameters)
data += "&_" + encodeURIComponent(name)
@@ -639,6 +647,10 @@ GuacamoleService.ConnectionGroups = {
else if (group.type === GuacamoleService.ConnectionGroup.Type.BALANCING)
data = "type=balancing";
// Add parent group if given
if (group.parent)
data += "&parentID=" + encodeURIComponent(group.parent.id);
// Create group
var xhr = new XMLHttpRequest();
xhr.open("POST", groups_url, false);
@@ -673,6 +685,10 @@ GuacamoleService.ConnectionGroups = {
else if (group.type === GuacamoleService.ConnectionGroup.Type.BALANCING)
data += "&type=balancing";
// Add parent group if given
if (group.parent)
data += "&parentID=" + encodeURIComponent(group.parent.id);
// Update group
var xhr = new XMLHttpRequest();
xhr.open("POST", groups_url, false);