Skip to content
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

Paginate available versions and return them in descending semver order #166

Merged

Conversation

achingbrain
Copy link
Contributor

@achingbrain achingbrain commented Nov 2, 2017

At the moment the client-side data service requests a list of available versions, sorts them by their version numbers using semver and then shows them to the user.

The default behaviour of Sails is to return the first 30 database rows, sorted by the primary key in ascending order. This means you'll only get the first 30 versions of your app - if you create a 31st version it will not appear in the release server UI.

This PR:

  1. Fetches all the versions from the database
  2. Sorts them by semver in descending order on the server side
  3. Returns a page at a time to the UI (default size: 50 versions, configurable in config/views.js)
  4. Adds a 'load more' button to the download list and version admin table

Happy to make whatever changes are required.

@ArekSredzki
Copy link
Owner

Many thanks for this!

@ArekSredzki ArekSredzki merged commit 43bbd5a into ArekSredzki:master Nov 5, 2017
DustinBrett pushed a commit to voxter/electron-release-server that referenced this pull request Sep 26, 2019
Fixes bug introduced in PR 166 (ArekSredzki#166). The issue is that `/versions/sorted` (changed at line 537 of `data-service.js`) is not a proper blueprint api call and doesn’t initiate web sockets properly to monitor for updates to the version records.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants