-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[dashboard] sort projects by activity #6073
Conversation
I think it should be a server side sort, otherwise it may not be handled when there is paging ? |
in a following iteration, and yes that sounds reasonable. currently, the last prebuild infos are fetched by the frontend async, which makes it hard to move the sorting to the api server. AFAIC, pagination is not in scope of this issue/pr. |
/werft run 👍 started the job as gitpod-build-jk-sort-projects-by-activity.2 |
@@ -73,6 +73,10 @@ export default function () { | |||
return true; | |||
} | |||
|
|||
function hasNewerPrebuild(p0: Project, p1: Project): number { | |||
return moment(lastPrebuilds.get(p1.id)?.info?.startedAt || '1970-01-01').diff(moment(lastPrebuilds.get(p0.id)?.info?.startedAt || '1970-01-01')); |
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.
nit: a.startedAt.localeCompare(b.startetAt)
works as well and doesn't require momentjs
/lgtm works as advertised! |
LGTM label has been added. Git tree hash: 4bb4052379ec509ffcbbf40172a78d9e3ddb400e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlexTugarev Associated issue: #6062 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Project list is now sorted by most recent pre-build
Related Issue(s)
Fixes #6062
How to test
Release Notes