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

Create contest monitoring page #359

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

zggf-zggf
Copy link
Contributor

Add monitoring page for contest Jury, containing information such as rounds: start and end times, published files, number of users with specific permissions, number of tasks in queue and information about unaswered questions.

@zggf-zggf zggf-zggf force-pushed the contest-monitoring branch from 8914013 to 979449f Compare April 7, 2024 17:40
oioioi/statistics/views.py Outdated Show resolved Hide resolved
@twalen twalen linked an issue Apr 17, 2024 that may be closed by this pull request
@SZonkil SZonkil marked this pull request as ready for review June 5, 2024 15:01
@SZonkil SZonkil requested a review from twalen as a code owner June 5, 2024 15:01
dawidratynski
dawidratynski previously approved these changes Jun 12, 2024
Copy link
Contributor

@dawidratynski dawidratynski left a comment

Choose a reason for hiding this comment

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

Ok

def monitoring_view(request):
cur_time = UTC.localize(datetime.now())
r_times = []
for round_, rt in rounds_times(request, request.contest).items():
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks fishy, especially [:-7]
you could try using huminize module and naturaldelta/precisedelta
https://python-humanize.readthedocs.io/en/latest/time/#humanize.time.precisedelta

maybe this logic can be moved to template + extra tag that present timedelta between end & cur_time
(something similar to https://github.com/sio2project/oioioi/blob/master/oioioi/base/templatetags/format_data_range.py)

@zggf-zggf zggf-zggf force-pushed the contest-monitoring branch from 7ee1ba6 to c259d1c Compare July 4, 2024 03:44
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.

Page with important stats for Jury
6 participants