Skip to content

Tags: yuandj/icpctools

Tags

v2.3.484

Toggle v2.3.484's commit message
Add support for AdminLTE 3.1 dark mode

v2.3.483

Toggle v2.3.483's commit message
Support redirects on contest URL

Handle redirects on base contest URL, make redirects more consistent, and handle 307/308 status the same way

v2.3.482

Toggle v2.3.482's commit message
Upgrade AdminLTE theme

v2.3.481

Toggle v2.3.481's commit message
Prettier problems and judgement types, scoreboard templating

A few UI improvements to make things a bit cleaner and better looking:
- Change problem labels to coloured badges.
- Judgement types - change id to coloured badge, and Penalty and Solved columns to checkmark/X badges.
- Submission - switch to use new problem badge.
- Scoreboard - start using templates for most <td>s, and switch problem header to new badges.
- Details page - for teams, move teams and orgs into the same row to use the space better.

v2.3.480

Toggle v2.3.480's commit message
Split team and admin details

Move details admin pages into their own folder and split details.jsp into two files. This just makes it easier to work with each set of files and let them evolve separately, plus it incidentally fixes a bug where submissions and runs were loaded for teams even though they weren't shown on the page.

v2.3.479

Toggle v2.3.479's commit message
HTML Templating

Switched to using HTML templates for generating the UI pages. This cleanly splits the HTML template (UI) from javascript code (logic), allows more common code between team and admin (they share the object to display mapping now), and makes the code shorter and cleaner.

Details:
- Unused getURL() methods removed from cds.js and contest.js.
- mustache.js has been added for html templating.
- types.js has methods to convert from a contest object to a 'display' object. Some fields can be mapped directly (e.g. problem.color), but many need additional or computed fields (e.g. logo). id and API are added by default; sanitizing the HTML isn't required because mustache does that. It may be possible to just return the object directly in some cases but I haven't tried that yet.
- The type mapping can now be shared between team and admin pages - the template for each page decides which fields to show.
- registerContestObjectTable() added to ui.js to add common spinner, API link, and sorter.
- fillContestObjectTable() updated to use a named template and automatically look up mapping functions in types.js. It also does a step-by-step updating of the table, so it doesn't matter what was in it before and is ready for inline updating/refreshing.
- Updates to each html/jsp page to:
   - Remove spinner and register the table instead.
   - Add template using a script tag, and remove *Td() methods.
   - Remove unnecessary tabbing in script.

v2.3.478

Toggle v2.3.478's commit message
Move contest card to client-side logic, separate out CDS-specific fun…

…ction

Further cleanup of server-side logic:
- Moved the CDS-specific ability for admins to add/remove/update any object from contest.js to it's own cds.js to keep contest.js with the spec. Used fixed base URL for the CDS.
- Changed contest (info) from JSP to javascript pages and renamed.
- Renamed awards.jsp to .html since it was already 'clean'.
- Moved calls to setContestURL() up front instead of waiting for page to load.

v2.3.477

Toggle v2.3.477's commit message
Add state and runs to client-side contest model

More work towards cleaning up the server-side logic (contest state and submissions/judgements/runs info on Details page) and improving the contest model:
- Created a loadObject() method to reduce some of the boilerplate code in each of the load() methods.
- Added state and runs to contest.js.
- Changed from just setting contest id to setting base URL + id (to disconnect the model from the CDS' api root).
- Created a utility method to provide the URL for any type or object so API links can use javascript.
- Split out the ability to set an object count and API link to a section header in ui.js, and used it for submissions, judgements, and runs on the Details page.
- Added a function to format timestamps in ui.js.
- Switched state from jsp to javascript and renamed to .html.

v2.3.476

Toggle v2.3.476's commit message
Move scoreboard and submissions pages toward client-side logic

Changed the Scoreboard (just problem header) and Submissions page (both judge queue and list of submissions) from server-side (jsp) to client-side (javascript) logic. This doesn't make either page completely 'clean', but it moves the bulk of the logic over. This will make it easier later to dynamically refresh parts of the page or reuse the pages when pointing at another Contest API server.

Minimal UI differences, and where there are it's more consistent with other pages (e.g. there was a footer on the judge queue that said how many there are, now it uses the card-tool at the top-right like everything in the Details page).

I didn't specifically test performance, but this page has always been slightly slower than other pages (due to sheer complexity compared to other pages) and even without optimizing the contest model or building lookup tables it appears to be performing fine even on large contests.

- Added submissions and judgements to contest.js.
- Changed findGroups() more generic findManyById() and fixed references in teams pages.
- Added findManyBySubmissionId() and isFirstToSolve() to model.
- Found and fixed problems with negative contest time in both parsing (model.js) and formatting (ui.js).

v2.3.475

Toggle v2.3.475's commit message
Add documentation on how to run everything inside IntelliJ IDEA.