Repository navigation
Add admin timelapse GIF export of round status - #181
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an Export Timelapse button to the admin engine page. It downloads an animated GIF of the service status heatmap, with one frame per round, so you can watch how every active team's services went up and down over the whole event.
How it works
GET /api/engine/export/timelapse(admin only) loads the round, team, service and result columns for the active teams with one query (GetCheckResults). It skips the error and debug text.www/timelapsepackage lays out the image and encodes it withimage/gif:golang.org/x/text/collate, which matches the browser'slocaleCompare.static/assets/services/*.png), loaded from those files so the two can't drift apart. Their colors and the 55° service-label angle match /graphs.fetchand shows the error message instead of saving a broken file.Dependencies
golang.org/x/imagefor the Go fonts, TrueType rendering and label rotation.golang.org/x/text, already an indirect dependency, is now a direct one.Tests
www/timelapse:image/gif, composites the frames, and checks every cell's color in every round, plus the frame delays and the loop count;www/api: the sort order against a list taken fromlocaleCompare.tests/integration:GetCheckResultsordering and team filtering.