-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replication paginate #1075
Replication paginate #1075
Conversation
@@ -343,3 +343,10 @@ td.replication__empty-row { | |||
.replication__activity-caveat { | |||
padding-left: 80px; | |||
} | |||
|
|||
.replication__paginate-footer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use BEM here? Styling would be easier to read and class names would be the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get an error after creating a new rep and after deleting one. It seems to be because getReplicationActivity()
is not receiving the pagination params when called inside replicate()
and deleteDocs()
. Lines 83 and 233 of actions.js
return supportNewApi() | ||
.then(newApi => { | ||
const docsPromise = get('/_replicator/_all_docs?include_docs=true&limit=100') | ||
const docsPromise = get(`/_replicator/_all_docs?startkey=%22_designZ%22&${app.utils.queryParams(params)}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I know what is this suppose to do? When I run locally your branch, I don't have anything in my replicator activity and I suspect this line to the be the cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fetches all the docs in the replicator db except the design doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @popojargo - because of the startkey
param, the query won't return any docs whose ID starts with a number or uppercased letter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only viable solution I see is splitting the request in two API calls. One to fetch documents before the _design (?endkey="_design*") and another one to fetch documents after design docs (startkey="_designZ"
@garrensmith Do you plan on finishing this or do you want someone else to complete the work? |
@popojargo I'm happy to close this. I won't be able to work on it further and I know @Antonio-Maranhao had some reservations around it. |
Hi @garrensmith @popojargo @Antonio-Maranhao , Just ran into this one. Any chance this PR can be freshened and merged for a new release of Fauxton? |
I'll keep that in mine but my schedule is overloaded atm |
Same for me, unfortunately. IIRC, it still requires reworking how the docs are retrieved because
|
I don't remember suggesting a mango query but that does sound like the best option. Mango indexes automatically do not include _design docs so you can just do:
|
Closing in favour of #1288 . If I have misunderstood, please re-open. |
Overview
This adds the ability to paginate through your replications in the replication tab. I've only added pagination to the Replication DB's tab since I can't think of a way of replicating through the _replicate replications. The _replicate replication uses the /jobs endpoint which is a mixture of replication DB and _replicate results.
Testing recommendations
Create a few replications and then paginate.
GitHub issue number
#1022