mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: support extending case comparasion detail
This commit is contained in:
2 files changed
+12
-4
No files matched your search
+11
-3
@@ -1,7 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import React from 'react';
|
||||
import { InfoDialog } from 'vj/components/dialog';
|
||||
import { NamedPage } from 'vj/misc/Page';
|
||||
import { tpl } from 'vj/utils';
|
||||
|
||||
const page = new NamedPage('record_detail', async () => {
|
||||
export default new NamedPage('record_detail', async () => {
|
||||
if (!UiContext.socketUrl) return;
|
||||
const [{ default: WebSocket }, { DiffDOM }] = await Promise.all([
|
||||
import('../components/socket'),
|
||||
@@ -20,6 +23,11 @@ const page = new NamedPage('record_detail', async () => {
|
||||
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
|
||||
if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status });
|
||||
};
|
||||
$(document).on('click', '.subtask-case', function () {
|
||||
const data = $(this).find('.message').text();
|
||||
if (!data?.trim()) return;
|
||||
new InfoDialog({
|
||||
$body: tpl(<pre>{data}</pre>),
|
||||
}).open();
|
||||
});
|
||||
});
|
||||
|
||||
export default page;
|
||||
@@ -79,7 +79,7 @@
|
||||
{{ (rdoc.subtasks[subtaskId]['score'] if _key != 'id' else rcdoc.score)|default(0) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span>{{ formatJudgeTexts([rcdoc.message]) if rcdoc.message else '' }}</span>
|
||||
<span class="message">{{ formatJudgeTexts([rcdoc.message]) if rcdoc.message else '' }}</span>
|
||||
</td>
|
||||
<td class="col--time">{% if rcdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rcdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rcdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}≥{% endif %}{{ rcdoc.time|round|int }}ms</td>
|
||||
<td class="col--memory">{% if rcdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rcdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rcdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}≥{% endif %}{{ size(rcdoc.memory, 1024) }}</td>
|
||||
|
||||
Reference in new issue
Block a user