GUACAMOLE-339: Add remote host field to database and populate appropriately.

This commit is contained in:
Nick Couchman
2017-07-16 21:58:28 -04:00
parent 7c162fde95
commit f2120c8d14
9 changed files with 57 additions and 3 deletions

View File

@@ -63,6 +63,11 @@ public class ConnectionRecordModel {
*/
private String username;
/**
* The remote host associated with this connection record.
*/
private String remoteHost;
/**
* The time the connection was initiated by the associated user.
*/
@@ -216,6 +221,26 @@ public class ConnectionRecordModel {
this.username = username;
}
/**
* Returns the remote host associated with this connection record.
*
* @return
* The remote host associated with this connection record.
*/
public String getRemoteHost() {
return remoteHost;
}
/**
* Sets the remote host associated with this connection record.
*
* @param remoteHost
* The remote host to associate with this connection record.
*/
public void setRemoteHost(String remoteHost) {
this.remoteHost = remoteHost;
}
/**
* Returns the date that the associated connection was established.
*

View File

@@ -77,7 +77,7 @@ public class ModeledConnectionRecord implements ConnectionRecord {
@Override
public String getRemoteHost() {
return null;
return model.getRemoteHost();
}
@Override

View File

@@ -306,6 +306,7 @@ public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelS
recordModel.setUsername(record.getUsername());
recordModel.setConnectionIdentifier(record.getConnectionIdentifier());
recordModel.setConnectionName(record.getConnectionName());
recordModel.setRemoteHost(record.getRemoteHost());
recordModel.setSharingProfileIdentifier(record.getSharingProfileIdentifier());
recordModel.setSharingProfileName(record.getSharingProfileName());
recordModel.setStartDate(record.getStartDate());