diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/connection/ModeledConnectionRecord.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/connection/ModeledConnectionRecord.java index 41615c794..7e61cdb11 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/connection/ModeledConnectionRecord.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/connection/ModeledConnectionRecord.java @@ -52,6 +52,11 @@ public class ModeledConnectionRecord implements ConnectionRecord { this.model = model; } + @Override + public String getIdentifier() { + return model.getConnectionIdentifier(); + } + @Override public Date getStartDate() { return model.getStartDate(); diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/socket/ActiveConnectionRecord.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/socket/ActiveConnectionRecord.java index 500b274f8..c7c46470d 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/socket/ActiveConnectionRecord.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/socket/ActiveConnectionRecord.java @@ -149,6 +149,11 @@ public class ActiveConnectionRecord implements ConnectionRecord { public boolean hasBalancingGroup() { return balancingGroup != null; } + + @Override + public String getIdentifier() { + return connection.getIdentifier(); + } @Override public Date getStartDate() { diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionRecord.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionRecord.java index 7a4b4d219..98c1b87c7 100644 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionRecord.java +++ b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionRecord.java @@ -33,6 +33,16 @@ import org.glyptodon.guacamole.net.GuacamoleSocket; */ public interface ConnectionRecord { + /** + * Returns the identifier of the connection associated with this connection + * record. + * + * @return + * The identifier of the connection associated with this connection + * record. + */ + public String getIdentifier(); + /** * Returns the date and time the connection began. * diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/tunnel/APITunnel.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/tunnel/APITunnel.java index 795b4e05e..279500ba1 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/tunnel/APITunnel.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/tunnel/APITunnel.java @@ -32,6 +32,11 @@ import org.glyptodon.guacamole.net.auth.ConnectionRecord; */ public class APITunnel { + /** + * The identifier of the connection associated with this tunnel. + */ + private final String identifier; + /** * The date and time the connection began. */ @@ -60,12 +65,23 @@ public class APITunnel { * The record to copy data from. */ public APITunnel(ConnectionRecord record) { + this.identifier = record.getIdentifier(); this.startDate = record.getStartDate(); this.remoteHost = record.getRemoteHost(); this.username = record.getUsername(); this.uuid = "STUB"; // STUB } + /** + * Returns the identifier of the connection associated with this tunnel. + * + * @return + * The identifier of the connection associated with this tunnel. + */ + public String getIdentifier() { + return identifier; + } + /** * Returns the date and time the connection began. * diff --git a/guacamole/src/main/webapp/app/rest/types/ActiveTunnel.js b/guacamole/src/main/webapp/app/rest/types/ActiveTunnel.js index e5fe66bc9..996105a64 100644 --- a/guacamole/src/main/webapp/app/rest/types/ActiveTunnel.js +++ b/guacamole/src/main/webapp/app/rest/types/ActiveTunnel.js @@ -40,6 +40,13 @@ angular.module('rest').factory('ActiveTunnel', [function defineActiveTunnel() { // Use empty object by default template = template || {}; + /** + * The identifier of the connection associated with this tunnel. + * + * @type String + */ + this.identifier = template.identifier; + /** * The time that the tunnel began, in seconds since * 1970-01-01 00:00:00 UTC.