mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
Add parentID to service calls.
This commit is contained in:
@@ -535,6 +535,10 @@ GuacamoleService.Connections = {
|
|||||||
// Init POST data
|
// Init POST data
|
||||||
var data = "protocol=" + encodeURIComponent(connection.protocol);
|
var data = "protocol=" + encodeURIComponent(connection.protocol);
|
||||||
|
|
||||||
|
// Add group if given
|
||||||
|
if (connection.parent)
|
||||||
|
data += "&parentID=" + encodeURIComponent(connection.parent.id);
|
||||||
|
|
||||||
// Add parameters
|
// Add parameters
|
||||||
for (var name in connection.parameters)
|
for (var name in connection.parameters)
|
||||||
data += "&_" + encodeURIComponent(name)
|
data += "&_" + encodeURIComponent(name)
|
||||||
@@ -570,6 +574,10 @@ GuacamoleService.Connections = {
|
|||||||
"name=" + encodeURIComponent(connection.name)
|
"name=" + encodeURIComponent(connection.name)
|
||||||
+ "&protocol=" + encodeURIComponent(connection.protocol);
|
+ "&protocol=" + encodeURIComponent(connection.protocol);
|
||||||
|
|
||||||
|
// Add group if given
|
||||||
|
if (connection.parent)
|
||||||
|
data += "&parentID=" + encodeURIComponent(connection.parent.id);
|
||||||
|
|
||||||
// Add parameters
|
// Add parameters
|
||||||
for (var name in connection.parameters)
|
for (var name in connection.parameters)
|
||||||
data += "&_" + encodeURIComponent(name)
|
data += "&_" + encodeURIComponent(name)
|
||||||
@@ -639,6 +647,10 @@ GuacamoleService.ConnectionGroups = {
|
|||||||
else if (group.type === GuacamoleService.ConnectionGroup.Type.BALANCING)
|
else if (group.type === GuacamoleService.ConnectionGroup.Type.BALANCING)
|
||||||
data = "type=balancing";
|
data = "type=balancing";
|
||||||
|
|
||||||
|
// Add parent group if given
|
||||||
|
if (group.parent)
|
||||||
|
data += "&parentID=" + encodeURIComponent(group.parent.id);
|
||||||
|
|
||||||
// Create group
|
// Create group
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", groups_url, false);
|
xhr.open("POST", groups_url, false);
|
||||||
@@ -673,6 +685,10 @@ GuacamoleService.ConnectionGroups = {
|
|||||||
else if (group.type === GuacamoleService.ConnectionGroup.Type.BALANCING)
|
else if (group.type === GuacamoleService.ConnectionGroup.Type.BALANCING)
|
||||||
data += "&type=balancing";
|
data += "&type=balancing";
|
||||||
|
|
||||||
|
// Add parent group if given
|
||||||
|
if (group.parent)
|
||||||
|
data += "&parentID=" + encodeURIComponent(group.parent.id);
|
||||||
|
|
||||||
// Update group
|
// Update group
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", groups_url, false);
|
xhr.open("POST", groups_url, false);
|
||||||
|
Reference in New Issue
Block a user