Add handy functions for path and name parsing from the connection ID.

This commit is contained in:
Michael Jumper
2013-08-06 15:09:33 -07:00
parent 737c206950
commit 0cf513afa4

View File

@@ -51,6 +51,24 @@ GuacamoleService.Connection = function(protocol, id) {
*/
this.parameters = {};
/**
* The hierarchy of groups containing this connection. The first element
* in this array is the highest-level group. If the connection is within
* the root group, this array will be empty.
*
* @type String[]
*/
this.path = id.split("/");
/**
* The name of this connection. This name is arbitrary and local to the
* group containing the connection. If the connection is in the root
* group, this name will be effectively equal to the ID.
*
* @type String
*/
this.name = guac_connection.path.pop();
/**
* An array of GuacamoleService.Connection.Record listing the usage
* history of this connection.