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
Sites manager first last buttons #12276
Conversation
Thanks for the useful pull request @iMarkus we will review it soon. |
seems the travis tests aren't triggered anymore for this PR. I'll try closing and reopening... |
@iMarkus What was the intention of adding the additional offset params? Speeding up the requests as it does not need to query more sites than needed? |
@sgiehl Exactly |
{ | ||
$sitesId = $this->getSitesIdWithAdminAccess(); | ||
|
||
if ($pattern === false) { | ||
$sites = $this->getSitesFromIds($sitesId, $limit); | ||
$sites = $this->getSitesFromIds($sitesId, $limit, $offset); | ||
} else { | ||
$sites = $this->getModel()->getPatternMatchSites($sitesId, $pattern, $limit); |
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 offset would need to be applied here as well?
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 mean in getPatternMatchSites
@@ -63,6 +75,16 @@ | |||
fetchLimitedSitesWithAdminAccess(); | |||
} | |||
|
|||
function lastPage() | |||
{ | |||
sitesManagerAPI.getSitesIdWithAdminAccess(function (siteIds) { |
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 haven't tested it, but I reckon it might not work when the user is currently searching for a site and then goes to the last page because I think here getSitesIdWithAdminAccess
would return really all sites whereas the number of results be lower when searching.
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.
Hi, yes you are right.
@iMarkus will you be able to have a look at the comments soon? We would like to integrate this changes in our next release if possible |
@iMarkus not sure if you're still onto this. I presume it might not be needed anymore for you? If you could look at the comments that would be great. Otherwise we might instead just close the PR and create an issue for it so this awesome suggestion doesn't get lost 👍 |
@tsteur We can close it and maybe sometime the feature will come :) I am not onto this anymore. |
Adds First and Last buttons to SiteManager
Maybe this code is not the best way to get all sites count: