dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25294
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12510: Event aggregate analytics, setting a max limit of 10 000 records for response to avoid client crash
------------------------------------------------------------
revno: 12510
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-08 18:55:41 +0200
message:
Event aggregate analytics, setting a max limit of 10 000 records for response to avoid client crash
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java 2013-10-02 14:40:51 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java 2013-10-08 16:55:41 +0000
@@ -60,6 +60,8 @@
public class JdbcEventAnalyticsManager
implements EventAnalyticsManager
{
+ private static final int MAX_LIMIT = 10000;
+
@Autowired
private JdbcTemplate jdbcTemplate;
@@ -103,6 +105,10 @@
{
sql += "limit " + params.getLimit();
}
+ else
+ {
+ sql += "limit " + MAX_LIMIT;
+ }
// ---------------------------------------------------------------------
// Grid