mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Ticket #269: Limit maximum number of connection history records to 100.
This commit is contained in:
@@ -70,6 +70,7 @@ import net.sourceforge.guacamole.properties.GuacamoleProperties;
|
|||||||
import net.sourceforge.guacamole.protocol.ConfiguredGuacamoleSocket;
|
import net.sourceforge.guacamole.protocol.ConfiguredGuacamoleSocket;
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleClientInformation;
|
import net.sourceforge.guacamole.protocol.GuacamoleClientInformation;
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleConfiguration;
|
import net.sourceforge.guacamole.protocol.GuacamoleConfiguration;
|
||||||
|
import org.apache.ibatis.session.RowBounds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service which provides convenience methods for creating, retrieving, and
|
* Service which provides convenience methods for creating, retrieving, and
|
||||||
@@ -290,8 +291,12 @@ public class ConnectionService {
|
|||||||
// We want to return the newest records first
|
// We want to return the newest records first
|
||||||
example.setOrderByClause("start_date DESC");
|
example.setOrderByClause("start_date DESC");
|
||||||
|
|
||||||
|
// Set the maximum number of history records returned to 100
|
||||||
|
RowBounds rowBounds = new RowBounds(0, 100);
|
||||||
|
|
||||||
// Retrieve all connection history entries
|
// Retrieve all connection history entries
|
||||||
List<ConnectionHistory> connectionHistories = connectionHistoryDAO.selectByExample(example);
|
List<ConnectionHistory> connectionHistories =
|
||||||
|
connectionHistoryDAO.selectByExampleWithRowbounds(example, rowBounds);
|
||||||
|
|
||||||
// Convert history entries to connection records
|
// Convert history entries to connection records
|
||||||
List<MySQLConnectionRecord> connectionRecords = new ArrayList<MySQLConnectionRecord>();
|
List<MySQLConnectionRecord> connectionRecords = new ArrayList<MySQLConnectionRecord>();
|
||||||
|
Reference in New Issue
Block a user