Skip to content

Commit 005b6ba

Browse files
compare startdate and enddate parameters with the created attribute
1 parent ae7f440 commit 005b6ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

api/src/main/java/org/apache/cloudstack/api/command/user/consoleproxy/ListConsoleSessionsCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ public class ListConsoleSessionsCmd extends BaseListCmd {
6868
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, authorized = {RoleType.Admin}, description = "Lists console sessions from the specified host.")
6969
private Long hostId;
7070

71-
@Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "Lists console sessions acquired from this date onwards. " +
71+
@Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "Lists console sessions generated from this date onwards. " +
7272
ApiConstants.PARAMETER_DESCRIPTION_START_DATE_POSSIBLE_FORMATS)
7373
private Date startDate;
7474

75-
@Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "Lists console sessions acquired up until this date. " +
75+
@Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "Lists console sessions generated up until this date. " +
7676
ApiConstants.PARAMETER_DESCRIPTION_END_DATE_POSSIBLE_FORMATS)
7777
private Date endDate;
7878

engine/schema/src/main/java/com/cloud/vm/dao/ConsoleSessionDaoImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ private SearchBuilder<ConsoleSessionVO> createListConsoleSessionsSearchBuilder(b
139139
searchBuilder.and(USER_ID, searchBuilder.entity().getUserId(), SearchCriteria.Op.EQ);
140140
searchBuilder.and(HOST_ID, searchBuilder.entity().getHostId(), SearchCriteria.Op.EQ);
141141
searchBuilder.and(INSTANCE_ID, searchBuilder.entity().getInstanceId(), SearchCriteria.Op.EQ);
142-
searchBuilder.and(START_DATE, searchBuilder.entity().getAcquired(), SearchCriteria.Op.GTEQ);
143-
searchBuilder.and(END_DATE, searchBuilder.entity().getAcquired(), SearchCriteria.Op.LTEQ);
142+
searchBuilder.and(START_DATE, searchBuilder.entity().getCreated(), SearchCriteria.Op.GTEQ);
143+
searchBuilder.and(END_DATE, searchBuilder.entity().getCreated(), SearchCriteria.Op.LTEQ);
144144
searchBuilder.and(CREATOR_ADDRESS, searchBuilder.entity().getConsoleEndpointCreatorAddress(), SearchCriteria.Op.EQ);
145145
searchBuilder.and(CLIENT_ADDRESS, searchBuilder.entity().getClientAddress(), SearchCriteria.Op.EQ);
146146

0 commit comments

Comments
 (0)