mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core, ui, judge: rewrite http & ws layer (#352)
This commit is contained in:
1 parent
3d2384f31a
commit
5af082eac8
37 files changed
+868
-889
No files matched your search
@@ -2,11 +2,11 @@
|
||||
{%- if not invalid -%}
|
||||
{% set _linkArgs = { pid:pdoc.pid|default(pdoc.docId) } %}
|
||||
{% if tdoc %}{{ set(_linkArgs, 'query', {tid:tdoc.docId}) }}{% endif %}
|
||||
{% if pdoc.domainId !== handler.domainId %}{{ set(_linkArgs, 'domainId', pdoc.domainId) }}{% endif %}
|
||||
{% if pdoc.domainId !== handler.args.domainId %}{{ set(_linkArgs, 'domainId', pdoc.domainId) }}{% endif %}
|
||||
<a href="{{ url('problem_detail', _linkArgs) }}"{% if small %} data-tooltip="{{ pdoc.title }}"{% endif %}>
|
||||
{%- endif -%}
|
||||
{%- if pdoc.domainId !== handler.domainId -%}<b>{{ pdoc.domainId }}#</b>{%- endif -%}
|
||||
<b>{{ pdoc.pid or 'P'+pdoc.docId if pdoc.domainId === handler.domainId else pdoc.docId }}</b>
|
||||
{%- if pdoc.domainId !== handler.args.domainId -%}<b>{{ pdoc.domainId }}#</b>{%- endif -%}
|
||||
<b>{{ pdoc.pid or 'P'+pdoc.docId if pdoc.domainId === handler.args.domainId else pdoc.docId }}</b>
|
||||
{%- if not small -%} {{ pdoc.title }}{%- endif -%}
|
||||
{%- if not invalid -%}
|
||||
</a>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<td class="col--pid display-mode-hide">{{ pdoc.docId }}</td>
|
||||
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||
{% if psdoc['rid'] %}
|
||||
{{ record.render_status_td(psdoc, rid_key='rid', class="edit-mode-hide", allDomain=pdoc.domainId!==handler.domainId) }}
|
||||
{{ record.render_status_td(psdoc, rid_key='rid', class="edit-mode-hide", allDomain=pdoc.domainId!==handler.args.domainId) }}
|
||||
{% else %}
|
||||
<td class="col--status record-status--border edit-mode-hide"></td>
|
||||
{% endif %}
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
{{ set(UiContext, 'postSubmitUrl', url('problem_submit', pid=pdoc.docId, query={tid:tdoc.docId})) }}
|
||||
{{ set(UiContext, 'getSubmissionsUrl', url('record_main', query={fullStatus:'true', pid:pdoc.docId, tid:tdoc.docId})) }}
|
||||
{{ set(UiContext, 'getRecordDetailUrl', url('record_detail', rid='{rid}', query={tid:tdoc.docId})) }}
|
||||
{{ set(UiContext, 'pretestConnUrl', "/record-conn?pretest=1&uidOrName=" + handler.user._id + "&pid=" + pdoc.docId + "&domainId=" + handler.domainId + "&tid=" + tdoc.docId) }}
|
||||
{{ set(UiContext, 'pretestConnUrl', "/record-conn?pretest=1&uidOrName=" + handler.user._id + "&pid=" + pdoc.docId + "&domainId=" + handler.args.domainId + "&tid=" + tdoc.docId) }}
|
||||
{{ set(UiContext, 'tdoc', tdoc) }}
|
||||
{% else %}
|
||||
{{ set(UiContext, 'canViewRecord', true) }}
|
||||
{{ set(UiContext, 'postSubmitUrl', url('problem_submit', pid=pdoc.docId)) }}
|
||||
{{ set(UiContext, 'getSubmissionsUrl', url('record_main', query={fullStatus:'true', pid:pdoc.docId})) }}
|
||||
{{ set(UiContext, 'getRecordDetailUrl', url('record_detail', rid='{rid}')) }}
|
||||
{{ set(UiContext, 'pretestConnUrl', "/record-conn?pretest=1&uidOrName=" + handler.user._id + "&pid=" + pdoc.docId + "&domainId=" + handler.domainId) }}
|
||||
{{ set(UiContext, 'pretestConnUrl', "/record-conn?pretest=1&uidOrName=" + handler.user._id + "&pid=" + pdoc.docId + "&domainId=" + handler.args.domainId) }}
|
||||
{% endif %}
|
||||
</script>
|
||||
<div class="row">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% block content %}
|
||||
{{ set(
|
||||
UiContext, 'socketUrl',
|
||||
"/record-conn?domainId=" + handler.domainId
|
||||
"/record-conn?domainId=" + handler.args.domainId
|
||||
+ (("&tid=" + filterTid) if filterTid else "")
|
||||
+ (("&uidOrName=" + filterUidOrName) if filterUidOrName else "")
|
||||
+ (("&pid=" + filterPid) if filterPid else "")
|
||||
|
||||
Reference in new issue
Block a user