diff --git a/guacamole/src/main/webapp/scripts/service.js b/guacamole/src/main/webapp/scripts/service.js index 8f2f00e9b..b56f8660b 100644 --- a/guacamole/src/main/webapp/scripts/service.js +++ b/guacamole/src/main/webapp/scripts/service.js @@ -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);