Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Filter and sort releases list, then show the latest ones for 7.x and 8.x #47

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

Merged
hjoliver merged 1 commit into cylc:master from kinow:fix-show-latest-release-version
May 18, 2020

Conversation

Copy link
Member

@kinow kinow commented May 18, 2020

Tested locally.

image

@kinow kinow requested a review from hjoliver May 18, 2020 21:43
@kinow kinow self-assigned this May 18, 2020
load balancing at start-up, and it scales arbitrarily well with the
number of host VMs. Running workflows can self-migrate to another
host at maintenance time. </p>
host at maintenance time. </p>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes above were added automatically by the IDE, but I thought it was OK. Removing extra spaces.

"cylc8",
latestCylc8.name,
`${TAGS_URL}${latestCylc8.tag_name}`,
getReleaseDate(latestCylc8))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterating arrays is cheap, so we just iterate twice, filtering by the release name, sorting by date asc, and getting the last item with .pop(), which may return undefined.

If not undefined, then we use the old code to populate the HTML elements in the UI.

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @kinow 👍

@hjoliver hjoliver merged commit f3cd834 into cylc:master May 18, 2020
@kinow kinow deleted the fix-show-latest-release-version branch May 18, 2020 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hjoliver hjoliver hjoliver approved these changes

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /