<commit_before>extends base
-load staticfiles

block media
    link(rel='stylesheet', href='{% static "status.css" %}')
    script(type='text/javascript', src='{% static "common.js" %}')
    script(type='text/javascript', src='{% static "event.js" %}')
    style
        #submissions-table {
            width: 75%;
            border: 0;
            margin-left: 0
        }

        td.sub-result {
            min-width: 80px;
        }

        td.sub-result .state {
            font-size: 0.7em;
            font-weight: bold;
            padding-top: 0.5em
        }

        td.sub-result .score {
            font-size: 1.3em;
            color: black
        }

        td.sub-info {
            width: 90%;
            text-align: left;
            padding-left: 20px;
            border-right: none;
        }

        td.sub-info-grading {
            width: auto !important;
            min-width: 58% !important;
        }
        
        td.sub-testcase {
            color: #555;
            min-width: 32%;
            vertical-align: middle;
            text-align: right;
            padding-right: 2%;
            border-right: none;
        }

        td.sub-info .name {
            font-size: 1.3em;
            font-weight: bold
        }

        td.sub-info .time {
            color: #555
        }

        td.sub-prop, td.sub-usage {
            white-space: nowrap;
        }

        td.sub-usage .time {
            font-weight: bold;
        }

    if dynamic_update
        script(type='text/javascript')
            $(function () {
                var table = $('#submissions-table');
                var receiver = new EventReceiver(
                        "{{ EVENT_DAEMON_LOCATION }}", "{{ EVENT_DAEMON_POLL_LOCATION }}",
                        ['submissions'], {{ last_msg }}, function (message) {
                            if (message.type == 'update-submission') {
                                var id = message.id;
                                var cell = table.find('tr#' + id);
                                if (cell.length < 1) {
                                    table.prepend('<tr id="{0}"></tr>'.format(id));
                                    cell = table.find('tr#' + id);
                                }
                                $.ajax({
                                    url: '{% url "judge.views.single_submission_query" %}',
                                    data: {id: id}
                                }).done(function (data) {
                                    cell.html(data);
                                }).fail(function (data) {
                                    console.log('Failed to update submission: ' + id);
                                });
                            }
                        }
                );
            });
    script(type='text/javascript')
        $(function () {
            var info = $('.info-float');
            var info_offset = info.offset().top;
            var info_right = $(window).width() - info.width() - info.offset().left;
            var moving = function () {
                info.css('position', 'absolute').css('top', info_offset).css('right', info_right);
            };
            var fix = function () {
                info.css('position', 'fixed').css('top', 200).css('right', info_right);
            };
            moving();
            $(window).scroll(function () {
                ($(window).scrollTop() - info_offset > 200) ? fix() : moving();
            });
        });


block body
    .info-float(style='width:20%')
        include results_table
    if submissions.num_pages > 1
        div(style='margin-bottom:10px;')
            include submissions_pages

    table#submissions-table.table
        each submission in submissions
            tr(id=submission.id)
                include submission_row

    if submissions.num_pages > 1
        div(style='margin-top:10px;')
            include submissions_pages<commit_msg>More magic and let's see if it works.<commit_after>extends base
-load staticfiles

block media
    link(rel='stylesheet', href='{% static "status.css" %}')
    script(type='text/javascript', src='{% static "common.js" %}')
    script(type='text/javascript', src='{% static "event.js" %}')
    style
        #submissions-table {
            width: 75%;
            border: 0;
            margin-left: 0
        }

        td.sub-result {
            min-width: 80px;
        }

        td.sub-result .state {
            font-size: 0.7em;
            font-weight: bold;
            padding-top: 0.5em
        }

        td.sub-result .score {
            font-size: 1.3em;
            color: black
        }

        td.sub-info {
            width: 90%;
            text-align: left;
            padding-left: 20px;
            border-right: none;
        }

        td.sub-info-grading {
            width: auto !important;
            min-width: 58% !important;
        }
        
        td.sub-testcase {
            color: #555;
            min-width: 32%;
            vertical-align: middle;
            text-align: right;
            padding-right: 2%;
            border-right: none;
        }

        td.sub-info .name {
            font-size: 1.3em;
            font-weight: bold
        }

        td.sub-info .time {
            color: #555
        }

        td.sub-prop, td.sub-usage {
            white-space: nowrap;
        }

        td.sub-usage .time {
            font-weight: bold;
        }

    if dynamic_update
        script(type='text/javascript')
            $(function () {
                var table = $('#submissions-table');
                var receiver = new EventReceiver(
                        "{{ EVENT_DAEMON_LOCATION }}", "{{ EVENT_DAEMON_POLL_LOCATION }}",
                        ['submissions'], {{ last_msg }}, function (message) {
                            if (message.type == 'update-submission') {
                                var id = message.id;
                                var cell = table.find('tr#' + id);
                                if (cell.length < 1) {
                                    table.prepend('<tr id="{0}"></tr>'.format(id));
                                    cell = table.find('tr#' + id);
                                }
                                $.ajax({
                                    url: '{% url "judge.views.single_submission_query" %}',
                                    data: {id: id}
                                }).done(function (data) {
                                    cell.html(data);
                                }).fail(function (data) {
                                    console.log('Failed to update submission: ' + id);
                                });
                            }
                        }
                );
            });
    script(type='text/javascript')
        $(function () {
            var info = $('.info-float');
            var info_offset = info.offset().top;
            var info_right = $(window).width() - info.offset().left - info.outerWidth();
            var moving = function () {
                info.css('position', 'absolute').css('top', info_offset).css('right', info_right);
            };
            var fix = function () {
                info.css('position', 'fixed').css('top', 200).css('right', info_right);
            };
            moving();
            $(window).scroll(function () {
                ($(window).scrollTop() - info_offset > 200) ? fix() : moving();
            });
        });


block body
    .info-float(style='width:20%')
        include results_table
    if submissions.num_pages > 1
        div(style='margin-bottom:10px;')
            include submissions_pages

    table#submissions-table.table
        each submission in submissions
            tr(id=submission.id)
                include submission_row

    if submissions.num_pages > 1
        div(style='margin-top:10px;')
            include submissions_pages
{'fraction_non_alphanumeric': 0.12822751652737932, 'fraction_numerical': 0.0112261444430585, 'mean_word_length': 1.119481892677769, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1751624', 'n_tokens_mistral': 2226, 'n_tokens_neox': 2040, 'n_words': 408}