mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: support contest record projection
This commit is contained in:
4 files changed
+110
-51
No files matched your search
@@ -9,7 +9,7 @@ import {
|
||||
emulateAnchorClick, i18n, mongoId, substitute,
|
||||
} from 'vj/utils';
|
||||
|
||||
const shouldShowDetail = (data) => recordEnum.STATUS_SCRATCHPAD_SHOW_DETAIL_FLAGS[data.status];
|
||||
const shouldShowDetail = (data) => recordEnum.STATUS_SCRATCHPAD_SHOW_DETAIL_FLAGS[data.status] && data.testCases?.length;
|
||||
|
||||
const getRecordDetail = (data) => {
|
||||
if (!shouldShowDetail(data)) {
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
<dl class="large horizontal" id="summary">
|
||||
<dt>{{ _('Score') }}</dt>
|
||||
<dd>{{ rdoc['score'] }}</dd>
|
||||
<dt>{{ _('Total Time') }}</dt>
|
||||
<dd>{% if rdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}≥{% endif %}{{ rdoc.time|round|int }}ms</dd>
|
||||
<dt>{{ _('Peak Memory') }}</dt>
|
||||
<dd>{% if rdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}≥{% endif %}{{ size(rdoc.memory, 1024) }}</dd>
|
||||
{% if typeof(rdoc['score']) == 'number' %}
|
||||
<dt>{{ _('Score') }}</dt>
|
||||
<dd>{{ rdoc['score'] }}</dd>
|
||||
{% endif %}
|
||||
{% if rdoc['time'] %}
|
||||
<dt>{{ _('Total Time') }}</dt>
|
||||
<dd>{% if rdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}≥{% endif %}{{ rdoc.time|round|int }}ms</dd>
|
||||
{% endif %}
|
||||
{% if rdoc['memory'] %}
|
||||
<dt>{{ _('Peak Memory') }}</dt>
|
||||
<dd>{% if rdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}≥{% endif %}{{ size(rdoc.memory, 1024) }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
Reference in new issue
Block a user