File tree 2 files changed +9
-2
lines changed
src/frontend/components/timeline/lib
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,11 @@ sub _build_items
428
428
429
429
$self -> _set_display_to($oldest )
430
430
if $oldest > ($self -> display_to || AT_BIGBANG);
431
+
432
+ if (scalar (@items ) > 1000) # XXX Arbitrary limit
433
+ { warning __" Too many items to display on the timeline - showing first 1000 results" ;
434
+ last ;
435
+ }
431
436
}
432
437
433
438
if (!@items )
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ class TimelineComponent extends Component {
12
12
this . el = $ ( this . element )
13
13
14
14
this . initTimeline ( )
15
+ this . tl_request = undefined
15
16
}
16
17
17
18
initTimeline ( ) {
@@ -257,12 +258,13 @@ class TimelineComponent extends Component {
257
258
if ( is_dashboard ) {
258
259
url = url + '&dashboard=1&view=' + $container . data ( 'view' )
259
260
}
260
- $ . ajax ( {
261
- async : false ,
261
+ if ( self . tl_request ) self . tl_request . abort ( )
262
+ self . tl_request = $ . ajax ( {
262
263
url : url ,
263
264
dataType : 'json' ,
264
265
success : function ( data ) {
265
266
items . add ( data )
267
+ self . tl_request = undefined
266
268
}
267
269
} )
268
270
}
You can’t perform that action at this time.
0 commit comments