mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Add parentID to service calls.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user