seomoz/qless — pull request #52 by myronmarston (2012-10-12 21:44:46+00:00)
Title: Pagination Support

This provides pagination support as I asked for in #50.

I tried to add generic pagination support that can be used for lots of pages. There are probably pages I missed.

The failed page was a bit weird, as the order things came back in was reversed from the normal order--is that a bug or expected?

I also found that the 26th job would show up on page 1 (as the last job) and page 2 (as the first job), so there's an off-by-one error in there but I think it might be in the qless-core scripts.

Lastly, it'd be nice to provide more than next/prev (i.e. numbers to click) but that requires knowledge of how many jobs there are, and the object returned by the qless client don't provide that sort of rich metadata. I think what we have here is sufficient given that the UI is for developers--we can always edit the URL manually to go to a later page.

Please review!

/cc @dlecocq @proby