You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
2.3 KiB
51 lines
2.3 KiB
<% include util %> |
|
<% |
|
let problemUrl; |
|
if (typeof contest !== 'undefined' && contest) problemUrl = syzoj.utils.makeUrl(['contest', contest.id, judge.problem_id]); |
|
else problemUrl = syzoj.utils.makeUrl(['problem', judge.problem_id]); |
|
%> |
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>">#<%= judge.id %></a></td> |
|
<td><a href="<%= problemUrl %>">#<%= judge.problem_id %>. <%= judge.problem.title %></a></td> |
|
<% if (!judge.hidden) { %> |
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>"> |
|
<span class="status <%= getStatusMeta(judge.status).toLowerCase().split(' ').join('_') %>"> |
|
<i class="<%= icon[getStatusMeta(judge.status)] || 'remove' %> icon"></i> |
|
<%= judge.status %> |
|
</span> |
|
</a></td> |
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>"><span class="score score_<%= parseInt(judge.result.score / 10) || 0 %>"><%= judge.result.score %></span></a></td> |
|
<td><%= judge.result.total_time %> ms</td> |
|
<td><%= parseInt(judge.result.max_memory) || 0 %> K</td> |
|
<% if (judge.allowedSeeCode) { %> |
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>"><%= syzoj.config.languages[judge.language].show %></a> / <%= syzoj.utils.formatSize(judge.code.length) %></td> |
|
<% } else { %> |
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>"><%= syzoj.config.languages[judge.language].show %></a> / 隐藏</td> |
|
<% } %> |
|
<% } else { %> |
|
<td>隐藏</td> |
|
<td>隐藏</td> |
|
<td>隐藏</td> |
|
<td>隐藏</td> |
|
<td>隐藏</td> |
|
<% } %> |
|
<td><a href="<%= syzoj.utils.makeUrl(['user', judge.user_id]) %>"><%= judge.user.username %></a><% if (judge.user.nameplate) { %><%- judge.user.nameplate %><% } %></td> |
|
<td><%= syzoj.utils.formatDate(judge.submit_time) %></td> |
|
<% if (isPending(judge.status)) { %> |
|
<script> |
|
function update_judge_<%= judge.id %>() { |
|
setTimeout(function () { |
|
<% |
|
let url; |
|
if (typeof contest !== 'undefined' && contest) url = syzoj.utils.makeUrl(['contest', contest.id, 'submissions', judge.id, 'ajax']); |
|
else url = syzoj.utils.makeUrl(['submissions', judge.id, 'ajax']); |
|
%> |
|
$.get('<%= url %>', function (data) { |
|
var e = $('#submissions_<%= judge.id %>'); |
|
if (e.html() != data) e.html(data); |
|
else update_judge_<%= judge.id %>(); |
|
}); |
|
}, 500); |
|
} |
|
update_judge_<%= judge.id %>(); |
|
</script> |
|
<% } %>
|
|
|