From 0127aec1b98c75cdde88e57b7deae516fc909913 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 14 Aug 2013 14:22:28 -0700 Subject: [PATCH] Add parentID to service calls. --- guacamole/src/main/webapp/scripts/service.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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);