Comments (9)
Just jumping on the thread - one way to solve this is to not think about pagination but about displaying results from a certain point (in time or in sequence). Using ObjectId makes is easy because they are incremental and comparable in time.
Instead of passing through a page parameter you can use a from
parameter with the ID of the last job visible on the current page. The most annoying issue is that it stops you from showing all the pages and for you to use previous/next links.
from agendash.
I did attempt this, and the issue came up that when you're looking at a certain page, like you're looking at page 3, the jobs on the page keep changing. Suppose you're looking at jobs 200 through 299 on a page. Well, sorting by date the jobs keep cycling and every time the data refreshes the jobs keep changing! Very annoying.
One solution is to add the ability to "pause" the refreshes. If you're looking at historical data on page 5, you may want to pause refreshes.
Another solution is, rather than doing paging like "page 1, page 2, page 3" like hackernews does it, instead do it like reddit does: Load the next 100 jobs that occur after the datetime "2016-03-15T17:33:00Z" or something like that.
So here are two possible solutions, feel free to add more possibilities. It is on my radar though! Thanks!
from agendash.
Until then I will add a limit to get only the first x jobs like you suggested. That is a good suggestion. The ability to view historical data will then be a feature request in the future.
from agendash.
Ahh yeah I understand, thanks for your quick answer. I guess navigating the pages could stop the refresh, at least that's the simpliest way to resolve it
For the first x jobs it could be in the UI with a default value that we set in the code, so every time we open the page it loads quickly but we are still allowed to see more/all if needed... Since most of the time we want to see the recent things and not the whole collection that would help pretty much.
Anyway, just throwing ideas here!
from agendash.
This problem is also described here: https://www.discovermeteor.com/blog/pagination-problems-meteor/ with some suggestions, like publishing counts.
Also, just linking this here; https://github.com/expressjs/express-paginate
from agendash.
Several people are running into this, and the solution may need more time to do "correctly". Until then I am suggesting this quick limit of 200: #15
Is this a good start?
from agendash.
#15 has been merged with a default value of 200. This Issue title now reflects the remaining work to wire up the UI controls.
from agendash.
If any of you have a chance the new vue branch should have pagination built in.
from agendash.
Pagination is now a thing in Agendash v2.
from agendash.
Related Issues (20)
- Why are these jobs still marked as "running"? HOT 3
- Agendash not loading properly HOT 1
- [Bug] Agenda 4.2.1 produces an error on Agendash when rescheduling a job HOT 11
- Cant delete schedule HOT 4
- Invalid date is showed on completed jobs HOT 1
- Suggestion: Support setting repeatTimezone when scheduling a job HOT 1
- Mongodb latest version problem HOT 1
- Does the "Refresh Interval" really work? HOT 4
- Can't connect to MongoDB Atlas anymore HOT 4
- Support for ARM64 docker images and v3 HOT 2
- Readonly mode HOT 1
- Is this repo maintained? HOT 2
- Error 404 for "api/jobs/requeue" and "api/jobs/delete" HOT 5
- not working with express HOT 3
- Typescript types
- How to support Typescript language?
- Multiple job deletion button is not working when have more jobs
- Not working with fastify + prefix HOT 2
- Error "QueryExceededMemoryLimitNoDiskUseAllowed" with V4.0 HOT 2
- Error: CDN files for popper and vue etc not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agendash.