mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1193: Include connection identifier within history records.
This commit is contained in:
@@ -51,6 +51,11 @@ public class ModeledConnectionRecord implements ConnectionRecord {
|
|||||||
this.model = model;
|
this.model = model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConnectionIdentifier() {
|
||||||
|
return model.getConnectionIdentifier();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getStartDate() {
|
public Date getStartDate() {
|
||||||
return model.getStartDate();
|
return model.getStartDate();
|
||||||
|
@@ -164,6 +164,11 @@ public class ActiveConnectionRecord implements ConnectionRecord {
|
|||||||
return balancingGroup != null;
|
return balancingGroup != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConnectionIdentifier() {
|
||||||
|
return connection.getIdentifier();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getStartDate() {
|
public Date getStartDate() {
|
||||||
return startDate;
|
return startDate;
|
||||||
|
@@ -32,6 +32,16 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
public interface ConnectionRecord {
|
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 getConnectionIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the date and time the connection began.
|
* Returns the date and time the connection began.
|
||||||
*
|
*
|
||||||
|
@@ -32,6 +32,11 @@ import org.glyptodon.guacamole.net.auth.ConnectionRecord;
|
|||||||
*/
|
*/
|
||||||
public class APIConnectionRecord {
|
public class APIConnectionRecord {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier of the connection associated with this record.
|
||||||
|
*/
|
||||||
|
private final String connectionIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date and time the connection began.
|
* The date and time the connection began.
|
||||||
*/
|
*/
|
||||||
@@ -66,6 +71,7 @@ public class APIConnectionRecord {
|
|||||||
* The record to copy data from.
|
* The record to copy data from.
|
||||||
*/
|
*/
|
||||||
public APIConnectionRecord(ConnectionRecord record) {
|
public APIConnectionRecord(ConnectionRecord record) {
|
||||||
|
this.connectionIdentifier = record.getConnectionIdentifier();
|
||||||
this.startDate = record.getStartDate();
|
this.startDate = record.getStartDate();
|
||||||
this.endDate = record.getEndDate();
|
this.endDate = record.getEndDate();
|
||||||
this.remoteHost = record.getRemoteHost();
|
this.remoteHost = record.getRemoteHost();
|
||||||
@@ -73,6 +79,17 @@ public class APIConnectionRecord {
|
|||||||
this.active = record.isActive();
|
this.active = record.isActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the identifier of the connection associated with this
|
||||||
|
* record.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The identifier of the connection associated with this record.
|
||||||
|
*/
|
||||||
|
public String getConnectionIdentifier() {
|
||||||
|
return connectionIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the date and time the connection began.
|
* Returns the date and time the connection began.
|
||||||
*
|
*
|
||||||
|
@@ -41,6 +41,13 @@ angular.module('rest').factory('ConnectionHistoryEntry', [function defineConnect
|
|||||||
// Use empty object by default
|
// Use empty object by default
|
||||||
template = template || {};
|
template = template || {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier of the connection associated with this history entry.
|
||||||
|
*
|
||||||
|
* @type String
|
||||||
|
*/
|
||||||
|
this.connectionIdentifier = template.connectionIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time that usage began, in seconds since 1970-01-01 00:00:00 UTC.
|
* The time that usage began, in seconds since 1970-01-01 00:00:00 UTC.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user