@shzlx/ui-default 4.58.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/api.ts +61 -0
- package/backendlib/builder.ts +182 -0
- package/backendlib/markdown-it-imsize.ts +235 -0
- package/backendlib/markdown-it-katex.ts +139 -0
- package/backendlib/markdown-it-media.ts +163 -0
- package/backendlib/markdown-it-xss.ts +200 -0
- package/backendlib/markdown.js +64 -0
- package/backendlib/misc.ts +54 -0
- package/backendlib/template.ts +279 -0
- package/breakpoints.json +5 -0
- package/components/DOMAttachedObject.ts +128 -0
- package/components/autocomplete/AssignSelectAutoComplete.tsx +22 -0
- package/components/autocomplete/CustomSelectAutoComplete.tsx +23 -0
- package/components/autocomplete/DomainSelectAutoComplete.tsx +18 -0
- package/components/autocomplete/FileSelectAutoComplete.tsx +26 -0
- package/components/autocomplete/LanguageSelectAutoComplete.tsx +24 -0
- package/components/autocomplete/ProblemSelectAutoComplete.tsx +18 -0
- package/components/autocomplete/UserSelectAutoComplete.tsx +23 -0
- package/components/autocomplete/components/AssignSelectAutoComplete.tsx +118 -0
- package/components/autocomplete/components/DomainSelectAutoComplete.tsx +53 -0
- package/components/autocomplete/components/FileSelectAutoComplete.tsx +50 -0
- package/components/autocomplete/components/LanguageSelectAutoComplete.tsx +48 -0
- package/components/autocomplete/components/ProblemSelectAutoComplete.tsx +54 -0
- package/components/autocomplete/components/UserSelectAutoComplete.tsx +54 -0
- package/components/autocomplete/domainselectautocomplete.page.styl +6 -0
- package/components/autocomplete/index.tsx +110 -0
- package/components/autocomplete/problemselectautocomplete.page.styl +6 -0
- package/components/autocomplete/userselectautocomplete.page.styl +6 -0
- package/components/browser-update.page.ts +27 -0
- package/components/calendar/calendar.page.styl +129 -0
- package/components/calendar/index.js +367 -0
- package/components/clipboard.page.ts +23 -0
- package/components/contest/contest.page.styl +119 -0
- package/components/contest/contest.page.ts +23 -0
- package/components/contest/contest_sidebar.page.styl +21 -0
- package/components/contest/problem-contest-bg.png +0 -0
- package/components/contest/problem-contest-bg@2x.png +0 -0
- package/components/customFont.page.tsx +90 -0
- package/components/datepicker/datepicker.page.tsx +94 -0
- package/components/dialog/DomDialog.ts +145 -0
- package/components/dialog/dialog.page.styl +40 -0
- package/components/dialog/index.tsx +285 -0
- package/components/discussion/CommentBox.js +103 -0
- package/components/discussion/collapsible.page.styl +40 -0
- package/components/discussion/collapsible.page.tsx +62 -0
- package/components/discussion/comments.page.styl +142 -0
- package/components/discussion/comments.page.tsx +192 -0
- package/components/discussion/discussion.page.styl +17 -0
- package/components/discussion/history.page.tsx +81 -0
- package/components/discussion/reaction.page.styl +30 -0
- package/components/discussion/reaction.page.tsx +103 -0
- package/components/drop/drop.page.styl +40 -0
- package/components/dropdown/Dropdown.js +50 -0
- package/components/dropdown/dropdown.page.styl +33 -0
- package/components/dropdown/dropdown.page.ts +8 -0
- package/components/editor/cmeditor.page.ts +23 -0
- package/components/editor/cmeditor.styl +10 -0
- package/components/editor/index.tsx +293 -0
- package/components/editor/mdeditor.ts +60 -0
- package/components/editor/textareaHandler.ts +29 -0
- package/components/footer/footer.page.styl +94 -0
- package/components/footer/footer.page.ts +26 -0
- package/components/form/button.page.default.styl +59 -0
- package/components/form/button.page.styl +36 -0
- package/components/form/checkbox.page.styl +89 -0
- package/components/form/form.page.styl +200 -0
- package/components/form/form.page.ts +20 -0
- package/components/form/multiSelectCheckbox.page.js +46 -0
- package/components/form/radiobox.page.styl +62 -0
- package/components/form/select.page.styl +29 -0
- package/components/form/textbox.page.styl +79 -0
- package/components/form/textbox.page.ts +21 -0
- package/components/form/var.inc.styl +14 -0
- package/components/header/header.page.styl +79 -0
- package/components/highlighter/code-example.js +111 -0
- package/components/highlighter/highlighter.page.styl +99 -0
- package/components/highlighter/highlighter.page.ts +72 -0
- package/components/highlighter/meta.js +15 -0
- package/components/highlighter/prismjs.js +122 -0
- package/components/hint.page.styl +9 -0
- package/components/hint.ts +19 -0
- package/components/hitokoto/index.page.js +21 -0
- package/components/hotkey/hotkey.page.js +83 -0
- package/components/katex/katex.page.js +26 -0
- package/components/katex/katex.page.styl +2 -0
- package/components/languageselect.tsx +94 -0
- package/components/loader/loader.page.styl +40 -0
- package/components/mantine.page.tsx +39 -0
- package/components/marker/Marker.js +192 -0
- package/components/marker/MarkerReactive.js +55 -0
- package/components/marker/marker.page.js +8 -0
- package/components/marker/marker.page.styl +57 -0
- package/components/media/media.page.js +46 -0
- package/components/menu/menu-heading.page.js +28 -0
- package/components/menu/menu.page.js +18 -0
- package/components/menu/menu.page.styl +68 -0
- package/components/message/index.page.ts +166 -0
- package/components/message/worker.ts +110 -0
- package/components/messagepad/DialogueListItem.page.styl +28 -0
- package/components/messagepad/DialogueListItemComponent.jsx +39 -0
- package/components/messagepad/Message.page.styl +64 -0
- package/components/messagepad/MessageComponent.jsx +33 -0
- package/components/messagepad/MessagePad.page.styl +99 -0
- package/components/messagepad/MessagePadDialogueContentContainer.jsx +104 -0
- package/components/messagepad/MessagePadDialogueListContainer.jsx +49 -0
- package/components/messagepad/MessagePadInputContainer.jsx +100 -0
- package/components/messagepad/index.jsx +49 -0
- package/components/messagepad/reducers/activeId.ts +36 -0
- package/components/messagepad/reducers/dialogues.js +53 -0
- package/components/messagepad/reducers/index.ts +14 -0
- package/components/messagepad/reducers/inputs.js +43 -0
- package/components/messagepad/reducers/isPosting.ts +49 -0
- package/components/monaco/index.ts +178 -0
- package/components/monaco/languages/markdown.ts +97 -0
- package/components/monaco/languages/typescript.ts +45 -0
- package/components/monaco/languages/yaml.ts +22 -0
- package/components/monaco/loader.ts +96 -0
- package/components/monaco/monaco.styl +30 -0
- package/components/monaco/nls.js +31 -0
- package/components/monaco/schema/problemconfig.ts +123 -0
- package/components/navigation/hamburgers.page.styl +87 -0
- package/components/navigation/nav-logo-small_dark.png +0 -0
- package/components/navigation/navigation.page.js +203 -0
- package/components/navigation/navigation.page.styl +211 -0
- package/components/notification/index.ts +105 -0
- package/components/notification/notification.page.js +14 -0
- package/components/notification/notification.page.styl +84 -0
- package/components/nprogress.page.styl +50 -0
- package/components/omnisearch/index.page.tsx +124 -0
- package/components/omnisearch/omnibar.page.styl +138 -0
- package/components/pager/pager.page.styl +57 -0
- package/components/preview/preview.page.ts +187 -0
- package/components/problem/create.page.js +12 -0
- package/components/problem/list.page.js +9 -0
- package/components/problem/rp.page.styl +4 -0
- package/components/problem/tag.page.styl +84 -0
- package/components/problemconfig/BasicForm.tsx +92 -0
- package/components/problemconfig/ProblemConfigEditor.tsx +170 -0
- package/components/problemconfig/ProblemConfigForm.tsx +140 -0
- package/components/problemconfig/ProblemConfigTree.tsx +163 -0
- package/components/problemconfig/ProblemType.tsx +165 -0
- package/components/problemconfig/index.tsx +91 -0
- package/components/problemconfig/reducer/config.ts +173 -0
- package/components/problemconfig/reducer/index.ts +11 -0
- package/components/problemconfig/reducer/testdata.ts +16 -0
- package/components/problemconfig/tree/AddTestcase.tsx +137 -0
- package/components/problemconfig/tree/SelectionManager.tsx +140 -0
- package/components/problemconfig/tree/SubtaskSettings.tsx +180 -0
- package/components/problemconfig/tree/Testcase.tsx +98 -0
- package/components/profile/backgrounds/1.jpg +0 -0
- package/components/profile/backgrounds/10.jpg +0 -0
- package/components/profile/backgrounds/11.jpg +0 -0
- package/components/profile/backgrounds/12.jpg +0 -0
- package/components/profile/backgrounds/13.jpg +0 -0
- package/components/profile/backgrounds/14.jpg +0 -0
- package/components/profile/backgrounds/15.jpg +0 -0
- package/components/profile/backgrounds/16.jpg +0 -0
- package/components/profile/backgrounds/17.jpg +0 -0
- package/components/profile/backgrounds/18.jpg +0 -0
- package/components/profile/backgrounds/19.jpg +0 -0
- package/components/profile/backgrounds/2.jpg +0 -0
- package/components/profile/backgrounds/20.jpg +0 -0
- package/components/profile/backgrounds/21.jpg +0 -0
- package/components/profile/backgrounds/3.jpg +0 -0
- package/components/profile/backgrounds/4.jpg +0 -0
- package/components/profile/backgrounds/5.jpg +0 -0
- package/components/profile/backgrounds/6.jpg +0 -0
- package/components/profile/backgrounds/7.jpg +0 -0
- package/components/profile/backgrounds/8.jpg +0 -0
- package/components/profile/backgrounds/9.jpg +0 -0
- package/components/profile/backgrounds/gen_thumbnails.sh +7 -0
- package/components/profile/backgrounds/thumbnail/1.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/10.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/11.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/12.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/13.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/14.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/15.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/16.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/17.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/18.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/19.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/2.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/20.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/21.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/3.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/4.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/5.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/6.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/7.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/8.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/9.jpg +0 -0
- package/components/profile/profile.page.styl +23 -0
- package/components/react/DomComponent.tsx +14 -0
- package/components/react/IconComponent.tsx +20 -0
- package/components/record/record.page.styl +26 -0
- package/components/rotator/index.js +75 -0
- package/components/rotator/rotator.page.styl +20 -0
- package/components/scratchpad/DataInput.page.styl +17 -0
- package/components/scratchpad/DataInputComponent.jsx +45 -0
- package/components/scratchpad/Editor.page.styl +13 -0
- package/components/scratchpad/Panel.page.styl +18 -0
- package/components/scratchpad/PanelButton.page.styl +15 -0
- package/components/scratchpad/PanelButtonComponent.jsx +19 -0
- package/components/scratchpad/PanelComponent.jsx +25 -0
- package/components/scratchpad/ScratchpadEditorContainer.tsx +137 -0
- package/components/scratchpad/ScratchpadPretestContainer.jsx +57 -0
- package/components/scratchpad/ScratchpadRecordsContainer.jsx +45 -0
- package/components/scratchpad/ScratchpadRecordsRowContainer.jsx +83 -0
- package/components/scratchpad/ScratchpadSettings.tsx +48 -0
- package/components/scratchpad/ScratchpadToolbarContainer.jsx +190 -0
- package/components/scratchpad/Tab.page.styl +24 -0
- package/components/scratchpad/Toolbar.page.styl +53 -0
- package/components/scratchpad/ToolbarComponent.jsx +85 -0
- package/components/scratchpad/index.tsx +132 -0
- package/components/scratchpad/reducers/editor.ts +24 -0
- package/components/scratchpad/reducers/index.ts +17 -0
- package/components/scratchpad/reducers/pretest.ts +34 -0
- package/components/scratchpad/reducers/records.ts +40 -0
- package/components/scratchpad/reducers/state.ts +10 -0
- package/components/scratchpad/reducers/ui.ts +152 -0
- package/components/scratchpad/scratchpad.page.styl +55 -0
- package/components/scratchpad/var.inc.styl +2 -0
- package/components/selectUser.tsx +16 -0
- package/components/signin/signInDialog.page.js +84 -0
- package/components/signin/signin_dialog.page.styl +57 -0
- package/components/smoothscroll/smoothscroll.page.js +44 -0
- package/components/socket/index.ts +68 -0
- package/components/star/star.page.styl +20 -0
- package/components/star/star.page.ts +58 -0
- package/components/sticky/sticky.page.js +66 -0
- package/components/tab/Tab.js +168 -0
- package/components/tab/tab.page.js +9 -0
- package/components/tab/tab.page.styl +105 -0
- package/components/tab/var.inc.styl +3 -0
- package/components/table/StyledTable.js +51 -0
- package/components/table/styledTable.page.js +8 -0
- package/components/table/table.page.styl +73 -0
- package/components/time/time.page.js +47 -0
- package/components/tooltip/Tooltip.js +49 -0
- package/components/tooltip/tooltip.page.js +29 -0
- package/components/tooltip/tooltip.page.styl +69 -0
- package/components/training/training.page.styl +25 -0
- package/components/upload.tsx +103 -0
- package/components/vote/vote.page.js +43 -0
- package/components/zipDownloader/index.ts +157 -0
- package/constant/domain.js +21 -0
- package/constant/message.js +5 -0
- package/constant/record.js +52 -0
- package/context.ts +11 -0
- package/entry.js +72 -0
- package/hydro.ts +112 -0
- package/index.ts +226 -0
- package/lazyload.ts +69 -0
- package/locales/en.yaml +71 -0
- package/locales/ko.yaml +823 -0
- package/locales/zh.yaml +1137 -0
- package/locales/zh_TW.yaml +1133 -0
- package/misc/Page.ts +49 -0
- package/misc/PageLoader.js +31 -0
- package/misc/float.styl +14 -0
- package/misc/grid.styl +1048 -0
- package/misc/immersive-background.jpg +0 -0
- package/misc/immersive-background@2x.jpg +0 -0
- package/misc/immersive.styl +23 -0
- package/misc/nothing.styl +13 -0
- package/misc/puzzled_twd2.svg +1 -0
- package/misc/section.styl +105 -0
- package/misc/slideout.styl +46 -0
- package/misc/structure.styl +158 -0
- package/misc/textalign.styl +11 -0
- package/misc/typography.styl +485 -0
- package/package.json +148 -0
- package/polyfill.ts +90 -0
- package/postcss.config.js +15 -0
- package/sentry.ts +26 -0
- package/service-worker.ts +265 -0
- package/setting.yaml +98 -0
- package/templates/about.html +14 -0
- package/templates/bsod.html +35 -0
- package/templates/components/comments_discussion.html +165 -0
- package/templates/components/comments_solution.html +171 -0
- package/templates/components/contest.html +12 -0
- package/templates/components/form.html +214 -0
- package/templates/components/home.html +20 -0
- package/templates/components/homework.html +8 -0
- package/templates/components/md_hint.html +39 -0
- package/templates/components/noscript_note.html +15 -0
- package/templates/components/nothing.html +6 -0
- package/templates/components/paginator.html +25 -0
- package/templates/components/problem.html +33 -0
- package/templates/components/record.html +21 -0
- package/templates/components/sidemenu.html +11 -0
- package/templates/components/user.html +49 -0
- package/templates/contest_balloon.html +48 -0
- package/templates/contest_clarification.html +103 -0
- package/templates/contest_detail.html +56 -0
- package/templates/contest_edit.html +259 -0
- package/templates/contest_main.html +146 -0
- package/templates/contest_manage.html +80 -0
- package/templates/contest_print.html +27 -0
- package/templates/contest_problemlist.html +231 -0
- package/templates/contest_scoreboard.html +46 -0
- package/templates/contest_scoreboard_download_html.html +71 -0
- package/templates/contest_user.html +47 -0
- package/templates/discussion_create.html +28 -0
- package/templates/discussion_detail.html +149 -0
- package/templates/discussion_edit.html +30 -0
- package/templates/discussion_main_or_node.html +47 -0
- package/templates/domain_base.html +26 -0
- package/templates/domain_create.html +55 -0
- package/templates/domain_dashboard.html +45 -0
- package/templates/domain_edit.html +6 -0
- package/templates/domain_group.html +51 -0
- package/templates/domain_join.html +47 -0
- package/templates/domain_join_applications.html +67 -0
- package/templates/domain_permission.html +66 -0
- package/templates/domain_role.html +71 -0
- package/templates/domain_user.html +86 -0
- package/templates/domain_user_raw.html +5 -0
- package/templates/error.html +25 -0
- package/templates/home_domain.html +64 -0
- package/templates/home_files.html +16 -0
- package/templates/home_messages.html +9 -0
- package/templates/home_security.html +224 -0
- package/templates/home_settings.html +21 -0
- package/templates/homework_detail.html +82 -0
- package/templates/homework_edit.html +138 -0
- package/templates/homework_files.html +24 -0
- package/templates/homework_main.html +76 -0
- package/templates/layout/basic.html +27 -0
- package/templates/layout/home_base.html +13 -0
- package/templates/layout/html5.html +74 -0
- package/templates/layout/immersive.html +22 -0
- package/templates/layout/mail.html +31 -0
- package/templates/layout/simple.html +4 -0
- package/templates/layout/wiki_base.html +16 -0
- package/templates/main.html +22 -0
- package/templates/manage_base.html +24 -0
- package/templates/manage_config.html +6 -0
- package/templates/manage_dashboard.html +27 -0
- package/templates/manage_script.html +56 -0
- package/templates/manage_setting.html +6 -0
- package/templates/manage_user_import.html +23 -0
- package/templates/manage_user_priv.html +76 -0
- package/templates/partials/category.html +19 -0
- package/templates/partials/contest.html +3 -0
- package/templates/partials/contest_balloon.html +37 -0
- package/templates/partials/contest_sidebar.html +150 -0
- package/templates/partials/contest_sidebar_management.html +56 -0
- package/templates/partials/contest_user.html +19 -0
- package/templates/partials/discussion_edit_form.html +45 -0
- package/templates/partials/discussion_list.html +50 -0
- package/templates/partials/discussion_nodes_widget.html +17 -0
- package/templates/partials/files.html +49 -0
- package/templates/partials/footer.html +108 -0
- package/templates/partials/hamburger.html +7 -0
- package/templates/partials/header_mobile.html +12 -0
- package/templates/partials/homepage/bulletin.html +7 -0
- package/templates/partials/homepage/contest.html +48 -0
- package/templates/partials/homepage/discussion.html +13 -0
- package/templates/partials/homepage/discussion_nodes.html +4 -0
- package/templates/partials/homepage/error.html +5 -0
- package/templates/partials/homepage/hitokoto.html +6 -0
- package/templates/partials/homepage/homework.html +45 -0
- package/templates/partials/homepage/problem_search.html +13 -0
- package/templates/partials/homepage/ranking.html +39 -0
- package/templates/partials/homepage/recent_problems.html +17 -0
- package/templates/partials/homepage/starred_problems.html +15 -0
- package/templates/partials/homepage/suggestion.html +34 -0
- package/templates/partials/homepage/training.html +50 -0
- package/templates/partials/homework.html +3 -0
- package/templates/partials/homework_default_penalty_rules.yaml +6 -0
- package/templates/partials/homework_sidebar.html +93 -0
- package/templates/partials/login_dialog.html +56 -0
- package/templates/partials/manage_user_priv.html +78 -0
- package/templates/partials/nav.html +138 -0
- package/templates/partials/problem-sidebar-information.html +25 -0
- package/templates/partials/problem.html +2 -0
- package/templates/partials/problem_category_dialog.html +43 -0
- package/templates/partials/problem_default.md +26 -0
- package/templates/partials/problem_description.html +33 -0
- package/templates/partials/problem_files.html +63 -0
- package/templates/partials/problem_list.html +68 -0
- package/templates/partials/problem_lucky.html +10 -0
- package/templates/partials/problem_sidebar.html +14 -0
- package/templates/partials/problem_sidebar_contest.html +43 -0
- package/templates/partials/problem_sidebar_homework.html +42 -0
- package/templates/partials/problem_sidebar_normal.html +152 -0
- package/templates/partials/problem_stat.html +3 -0
- package/templates/partials/scoreboard.html +79 -0
- package/templates/partials/setting.html +92 -0
- package/templates/partials/training_default.json +14 -0
- package/templates/partials/training_detail.html +153 -0
- package/templates/partials/user.html +2 -0
- package/templates/partials/user_detail/activity.html +18 -0
- package/templates/partials/user_detail/solution.html +29 -0
- package/templates/problem_config.html +39 -0
- package/templates/problem_detail.html +150 -0
- package/templates/problem_edit.html +111 -0
- package/templates/problem_files.html +91 -0
- package/templates/problem_hack.html +41 -0
- package/templates/problem_import.html +58 -0
- package/templates/problem_main.html +100 -0
- package/templates/problem_solution.html +55 -0
- package/templates/problem_statistics.html +96 -0
- package/templates/problem_submit.html +40 -0
- package/templates/ranking.html +81 -0
- package/templates/record_detail.html +134 -0
- package/templates/record_detail_status.html +93 -0
- package/templates/record_detail_summary.html +19 -0
- package/templates/record_main.html +142 -0
- package/templates/record_main_tr.html +35 -0
- package/templates/status.html +75 -0
- package/templates/training_detail.html +120 -0
- package/templates/training_edit.html +68 -0
- package/templates/training_files.html +64 -0
- package/templates/training_main.html +107 -0
- package/templates/user_changemail_mail.html +6 -0
- package/templates/user_changemail_mail_sent.html +9 -0
- package/templates/user_delete_pending.html +10 -0
- package/templates/user_detail.html +181 -0
- package/templates/user_login.html +46 -0
- package/templates/user_logout.html +13 -0
- package/templates/user_lostpass.html +27 -0
- package/templates/user_lostpass_mail.html +6 -0
- package/templates/user_lostpass_mail_sent.html +9 -0
- package/templates/user_lostpass_with_code.html +29 -0
- package/templates/user_register.html +22 -0
- package/templates/user_register_mail.html +6 -0
- package/templates/user_register_mail_sent.html +9 -0
- package/templates/user_register_with_code.html +35 -0
- package/templates/user_sudo.html +54 -0
- package/templates/user_sudo_redirect.html +18 -0
- package/templates/wiki_help.html +189 -0
- package/theme/bp6-compat.css +48 -0
- package/theme/dark.styl +397 -0
- package/theme/default.js +33 -0
- package/typed.d.ts +20 -0
- package/utils/base.ts +209 -0
- package/utils/base64.js +104 -0
- package/utils/db.ts +32 -0
- package/utils/index.ts +73 -0
- package/utils/loadReactRedux.ts +32 -0
- package/utils/mediaQuery.ts +13 -0
- package/utils/pjax.js +148 -0
- package/utils/slide.ts +57 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{% import "components/user.html" as user with context %}
|
|
2
|
+
{% import "components/problem.html" as problem with context %}
|
|
3
|
+
{% import "components/nothing.html" as nothing with context %}
|
|
4
|
+
{% extends "layout/basic.html" %}
|
|
5
|
+
{% block content %}
|
|
6
|
+
{{ set(UiContext, 'pdoc', pdoc) }}
|
|
7
|
+
<div class="row">
|
|
8
|
+
<div class="medium-9 columns">
|
|
9
|
+
<div class="section nojs--hide">
|
|
10
|
+
<div class="section__header">
|
|
11
|
+
<h1 class="section__title">{{ _('Statistics') }}</h1>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="row">
|
|
14
|
+
<div class="medium-6 columns" id="submission-status-placeholder" style="height:230px"></div>
|
|
15
|
+
<div class="medium-6 columns" id="submission-score-placeholder" style="height:230px"></div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="section">
|
|
19
|
+
<div class="section__header">
|
|
20
|
+
<h1 class="section__title">{{ _('Submission Statistics') }}</h1>
|
|
21
|
+
<div class="section__tools">
|
|
22
|
+
<form method="get" class="filter-form" name="filter-form">
|
|
23
|
+
{{ _('Show') }}:
|
|
24
|
+
<select class="inline compact select" name="sort">
|
|
25
|
+
{%- for g in types -%}
|
|
26
|
+
<option value="{{ g }}"{% if sort == g %} selected{% endif %}>{{ _('problem.stats.sort.'+g) }}</option>
|
|
27
|
+
{%- endfor -%}
|
|
28
|
+
</select>
|
|
29
|
+
<select class="inline compact select" name="direction">
|
|
30
|
+
<option value="1"{% if direction == 1 %} selected{% endif %}>ASC</option>
|
|
31
|
+
<option value="-1"{% if direction == -1 %} selected{% endif %}>DESC</option>
|
|
32
|
+
</select>
|
|
33
|
+
<select class="inline compact select" name="lang">
|
|
34
|
+
<option value="">{{ _('All Languages') }}</option>
|
|
35
|
+
</select>
|
|
36
|
+
<button type="submit" class="compact button">
|
|
37
|
+
{{ _('Search') }}
|
|
38
|
+
</button>
|
|
39
|
+
</form>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="section__body no-padding">
|
|
43
|
+
{% if not rsdocs|length %}
|
|
44
|
+
{{ nothing.render('Oh, there is no submission!') }}
|
|
45
|
+
{% else %}
|
|
46
|
+
<table class="data-table record_main__table">
|
|
47
|
+
<colgroup>
|
|
48
|
+
<col class="col--status">
|
|
49
|
+
<col class="col--submit-by">
|
|
50
|
+
<col class="col--time">
|
|
51
|
+
<col class="col--memory">
|
|
52
|
+
<col class="col--lang">
|
|
53
|
+
<col class="col--code">
|
|
54
|
+
<col class="col--submit-at">
|
|
55
|
+
</colgroup>
|
|
56
|
+
<thead>
|
|
57
|
+
<tr>
|
|
58
|
+
<th class="col--status record-status--border">{{ _('Status') }}</th>
|
|
59
|
+
<th class="col--submit-by">{{ _('Submit By') }}</th>
|
|
60
|
+
<th class="col--time">{{ _('Time') }}</th>
|
|
61
|
+
<th class="col--memory">{{ _('Memory') }}</th>
|
|
62
|
+
<th class="col--lang">{{ _('Language') }}</th>
|
|
63
|
+
<th class="col--code">{{ _('Code') }}</th>
|
|
64
|
+
<th class="col--submit-at">{{ _('Submit At') }}</th>
|
|
65
|
+
</tr>
|
|
66
|
+
</thead>
|
|
67
|
+
<tbody>
|
|
68
|
+
{%- for rsdoc in rsdocs -%}
|
|
69
|
+
<tr data-rid="{{ rsdoc['_id'] }}">
|
|
70
|
+
<td class="col--status record-status--border pass">
|
|
71
|
+
<div class="col--status__text">
|
|
72
|
+
<span class="icon record-status--icon pass"></span>
|
|
73
|
+
<a href="{{ url('record_detail', rid=rsdoc._id) }}" class="record-status--text pass">AC</a>
|
|
74
|
+
</div>
|
|
75
|
+
</td>
|
|
76
|
+
<td class="col--submit-by">{{ user.render_inline(udict[rsdoc['uid']], badge=false) }}</td>
|
|
77
|
+
<td class="col--time">{% if rsdoc['time'] %}{% if [STATUS.STATUS_TIME_LIMIT_EXCEEDED, STATUS.STATUS_MEMORY_LIMIT_EXCEEDED, STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED].includes(rsdoc['status']) %}≥{% endif %}{{ rsdoc.time|round|int }}ms{% else %}-{% endif %}</td>
|
|
78
|
+
<td class="col--memory">{% if rsdoc['memory'] %}{% if [STATUS.STATUS_TIME_LIMIT_EXCEEDED, STATUS.STATUS_MEMORY_LIMIT_EXCEEDED, STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED].includes(rsdoc['status']) %}≥{% endif %}{{ size(rsdoc.memory, 1024) }}{% else %}-{% endif %}</td>
|
|
79
|
+
<td class="col--lang">{{ model.setting.langs[rsdoc['lang']].display }}</td>
|
|
80
|
+
<td class="col--code">{{ size(rsdoc.length) }}</td>
|
|
81
|
+
<td class="col--submit-at">{{ datetimeSpan(rsdoc['_id'], false)|safe }}</td>
|
|
82
|
+
</tr>
|
|
83
|
+
{%- endfor -%}
|
|
84
|
+
</tbody>
|
|
85
|
+
</table>
|
|
86
|
+
{{ paginator.render(page, pcount, add_qs=('direction=' + direction + ('&sort=' + sort if sort else ''))) }}
|
|
87
|
+
{% endif %}
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="medium-3 columns">
|
|
92
|
+
{% include "partials/problem_sidebar.html" %}
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
{% endblock %}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{% extends "layout/basic.html" %}
|
|
2
|
+
{% block content %}
|
|
3
|
+
{{ set(UiContext, 'pdoc', pdoc) }}
|
|
4
|
+
<div class="row">
|
|
5
|
+
<div class="medium-9 columns">
|
|
6
|
+
<div class="section">
|
|
7
|
+
<div class="section__header">
|
|
8
|
+
<h1 class="section__title">{{ _('Submit to Judge') }}</h1>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="section__body typo" name="submit_section">
|
|
11
|
+
<form method="post" enctype="multipart/form-data">
|
|
12
|
+
<div class="hasjs--hide">
|
|
13
|
+
{{ form.form_select({
|
|
14
|
+
label:'Code language',
|
|
15
|
+
options:langRange,
|
|
16
|
+
name:'lang',
|
|
17
|
+
value:handler.user.codeLang
|
|
18
|
+
}) }}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="row nojs--hide" id="codelang-selector"></div>
|
|
21
|
+
{{ form.form_textarea({label:'Code', columns:12, name:'code', extra_class:'monospace', autofocus:true, nospellcheck:true}) }}
|
|
22
|
+
<div class="row">
|
|
23
|
+
<div class="medium-12 columns">
|
|
24
|
+
<p>{{ _('Or upload a file:') }} <input type="file" name="file"></p>
|
|
25
|
+
<br />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="row"><div class="columns">
|
|
29
|
+
<input type="submit" class="rounded primary button" value="{{ _('Submit') }}">
|
|
30
|
+
</div></div>
|
|
31
|
+
</form>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="medium-3 columns">
|
|
36
|
+
{% include "partials/problem_sidebar.html" %}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
{% endblock %}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{% extends "layout/basic.html" %}
|
|
2
|
+
{% import "components/paginator.html" as paginator with context %}
|
|
3
|
+
{% import "components/nothing.html" as nothing with context %}
|
|
4
|
+
{% block content %}
|
|
5
|
+
<div class="row">
|
|
6
|
+
<div class="medium-12 columns">
|
|
7
|
+
<div class="section">
|
|
8
|
+
<div class="section__body no-padding">
|
|
9
|
+
<div data-fragment-id="ranking">
|
|
10
|
+
{% if not udocs.length %}
|
|
11
|
+
{% if page == 1 %}
|
|
12
|
+
<blockquote class="note">{{ _('The ranking page is not updated realtime.') }}</blockquote>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{{ nothing.render('Sorry, there are no users in this domain.') }}
|
|
15
|
+
{% else %}
|
|
16
|
+
<table class="data-table">
|
|
17
|
+
<colgroup>
|
|
18
|
+
<col class="col--rank">
|
|
19
|
+
<col class="col--user">
|
|
20
|
+
<col class="col--rp">
|
|
21
|
+
{% for key, def in model.rp %}
|
|
22
|
+
{% if not def.hidden %}
|
|
23
|
+
<col class="col--detail rp-{{ key }}">
|
|
24
|
+
{% endif %}
|
|
25
|
+
{% endfor %}
|
|
26
|
+
<col class="col--ac">
|
|
27
|
+
<col class="col--bio">
|
|
28
|
+
</colgroup>
|
|
29
|
+
<thead>
|
|
30
|
+
<tr>
|
|
31
|
+
<th class="col--rank">{{ _('Rank') }}</th>
|
|
32
|
+
<th class="col--user">{{ _('Username') }}</th>
|
|
33
|
+
<th class="col--rp">{{ _('RP') }}</th>
|
|
34
|
+
{% for key, def in model.rp %}
|
|
35
|
+
{% if not def.hidden %}
|
|
36
|
+
<th class="col--detail rp-{{ key }}">{{ _('rpDetailText_' + key) }}</th>
|
|
37
|
+
{% endif %}
|
|
38
|
+
{% endfor %}
|
|
39
|
+
<th class="col--ac">{{ _('Accept') }}</th>
|
|
40
|
+
<th class="col--bio">{{ _('Bio') }}</th>
|
|
41
|
+
</tr>
|
|
42
|
+
</thead>
|
|
43
|
+
<tbody>
|
|
44
|
+
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
|
45
|
+
<tr>
|
|
46
|
+
<td class="col--rank">{{ handler.user.rank|default('-') }}</td>
|
|
47
|
+
<td class="col--user">{{ user.render_inline(handler.user) }}</td>
|
|
48
|
+
<td class="col--rp">{{ handler.user.rp|default(0)|round(0) }}</td>
|
|
49
|
+
{% for key, def in model.rp %}
|
|
50
|
+
{% if not def.hidden %}
|
|
51
|
+
<td class="col--detail rp-{{ key }}">{{ handler.user.rpInfo[key]|round if (handler.user.rpInfo|default({}))[key] else '-' }}</td>
|
|
52
|
+
{% endif %}
|
|
53
|
+
{% endfor %}
|
|
54
|
+
<td class="col--ac">{{ handler.user.nAccept|default(0) }}</td>
|
|
55
|
+
<td class="col--bio">{{ handler.user.bio|default('')|truncate(64, true)|markdownInline|safe }}</td>
|
|
56
|
+
</tr>
|
|
57
|
+
{% endif %}
|
|
58
|
+
{%- for udoc in udocs -%}
|
|
59
|
+
<tr>
|
|
60
|
+
<td class="col--rank">{{ (page - 1) * model.system.get('pagination.ranking') + loop.index }}</td>
|
|
61
|
+
<td class="col--user">{{ user.render_inline(udoc) }}</td>
|
|
62
|
+
<td class="col--rp">{{ udoc.rp|default(0)|round(0) }}</td>
|
|
63
|
+
{% for key, def in model.rp %}
|
|
64
|
+
{% if not def.hidden %}
|
|
65
|
+
<td class="col--detail rp-{{ key }}">{{ udoc.rpInfo[key]|round if udoc.rpInfo[key] else '-' }}</td>
|
|
66
|
+
{% endif %}
|
|
67
|
+
{% endfor %}
|
|
68
|
+
<td class="col--ac">{{ udoc.nAccept|default(0) }}</td>
|
|
69
|
+
<td class="col--bio">{{ udoc.bio|default('')|truncate(64, true)|markdownInline|safe }}</td>
|
|
70
|
+
</tr>
|
|
71
|
+
{%- endfor -%}
|
|
72
|
+
</tbody>
|
|
73
|
+
</table>
|
|
74
|
+
{{ paginator.render(page, upcount) }}
|
|
75
|
+
{% endif %}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
{% endblock %}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{% import "components/problem.html" as problem with context %}
|
|
2
|
+
{% extends "layout/basic.html" %}
|
|
3
|
+
{% block content %}
|
|
4
|
+
{% if typeof(rdoc['status']) === 'number' and not rev %}
|
|
5
|
+
{{ set(UiContext, 'socketUrl', "record-detail-conn?domainId=" + rdoc.domainId + "&rid=" + rdoc._id) }}
|
|
6
|
+
{% endif %}
|
|
7
|
+
<div class="row">
|
|
8
|
+
<div class="medium-9 columns collapsed">
|
|
9
|
+
{% if typeof(rdoc['status']) === 'number' %}
|
|
10
|
+
{% include 'record_detail_status.html' %}
|
|
11
|
+
{% endif %}
|
|
12
|
+
{% if rdoc['code'] or rdoc.files.code %}
|
|
13
|
+
<div class="section">
|
|
14
|
+
<div class="section__header">
|
|
15
|
+
<h1 class="section__title">{{ _('Code') }}</h1>
|
|
16
|
+
<div class="section__tools">
|
|
17
|
+
<a class="primary rounded button" href="?download=true">
|
|
18
|
+
<span class="icon icon-download"></span>
|
|
19
|
+
{% if rdoc.files.hack %}{{ _('Download Hack Input') }}{% else %}{{ _('Download') }}{% endif %}
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="section__body">
|
|
24
|
+
<pre class="line-numbers"><code class="language-{{ model.setting.langs[rdoc.lang].highlight }}">{{ rdoc['code'] }}</code></pre>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
{% endif %}
|
|
28
|
+
</div>
|
|
29
|
+
<div class="medium-3 columns">
|
|
30
|
+
<div class="section side">
|
|
31
|
+
<div class="section__header">
|
|
32
|
+
<h1 class="section__title">{{ _('Information') }}</h1>
|
|
33
|
+
</div>
|
|
34
|
+
{% if handler.user.hasPerm(perm.PERM_REJUDGE) and not rdoc.files.hack %}
|
|
35
|
+
<div class="section__body no-padding">
|
|
36
|
+
<ol class="menu">
|
|
37
|
+
<li class="menu__item">
|
|
38
|
+
<form method="post">
|
|
39
|
+
<button type="submit" name="operation" value="rejudge" class="menu__link">
|
|
40
|
+
<span class="icon icon-refresh"></span> {{ _('Rejudge') }}
|
|
41
|
+
</button>
|
|
42
|
+
</form>
|
|
43
|
+
</li>
|
|
44
|
+
<li class="menu__item">
|
|
45
|
+
<form method="post">
|
|
46
|
+
<button type="submit" name="operation" value="cancel" class="menu__link">
|
|
47
|
+
<span class="icon icon-close"></span> {{ _('Cancel Score') }}
|
|
48
|
+
</button>
|
|
49
|
+
</form>
|
|
50
|
+
</li>
|
|
51
|
+
</ol>
|
|
52
|
+
</div>
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% if handler.user.hasPerm(perm.PERM_SUBMIT_PROBLEM) and pdoc.config.hackable and rdoc.status === STATUS.STATUS_ACCEPTED and rdoc.uid !== handler.user._id %}
|
|
55
|
+
<div class="section__body no-padding">
|
|
56
|
+
<ol class="menu">
|
|
57
|
+
<li class="menu__item">
|
|
58
|
+
<a class="menu__link" href="{{ url('problem_hack', pid=pdoc.pid|default(pdoc.docId), rid=rdoc._id, query={tid:rdoc.contest} if rdoc.contest else {}) }}">
|
|
59
|
+
<span class="icon icon-debug"></span> {{ _('Hack') }}
|
|
60
|
+
</a>
|
|
61
|
+
</li>
|
|
62
|
+
</ol>
|
|
63
|
+
</div>
|
|
64
|
+
{% endif %}
|
|
65
|
+
<div class="section__body typo no-media">
|
|
66
|
+
<dl class="large horizontal">
|
|
67
|
+
<dt>{{ _('Submit By') }}</dt>
|
|
68
|
+
<dd>{{ user.render_inline(udoc, modbadge=false) }}</dd>
|
|
69
|
+
{% if rdoc.hackTarget %}
|
|
70
|
+
<dt>{{ _('Hacked') }}</dt>
|
|
71
|
+
<dd><a href="{{ url('record_detail', rid=rdoc.hackTarget) }}">{{ rdoc.hackTarget }}</a></dd>
|
|
72
|
+
{% endif %}
|
|
73
|
+
{% if pdoc %}
|
|
74
|
+
<dt>{{ _('Problem') }}</dt>
|
|
75
|
+
<dd>
|
|
76
|
+
{{ problem.render_problem_title(pdoc, tdoc, show_tags=false, show_invisible_flag=false) }}
|
|
77
|
+
</dd>
|
|
78
|
+
{% endif %}
|
|
79
|
+
{% if tdoc %}
|
|
80
|
+
<dt>{{ _('Homework') if tdoc.rule == 'homework' else _('Contest') }}</dt>
|
|
81
|
+
<dd>
|
|
82
|
+
<a href="{{ url('homework_detail' if tdoc.rule == 'homework' else 'contest_detail', tid=tdoc.docId) }}">{{ tdoc.title }}</a>
|
|
83
|
+
</dd>
|
|
84
|
+
{% endif %}
|
|
85
|
+
{% if pdoc.config.type != 'objective' %}
|
|
86
|
+
<dt>{{ _('Language') }}</dt>
|
|
87
|
+
<dd>{{ model.setting.langs[rdoc.lang].display }}</dd>
|
|
88
|
+
{% endif %}
|
|
89
|
+
{% if rdoc.code %}
|
|
90
|
+
<dt>{{ _('Code Length') }}</dt>
|
|
91
|
+
<dd>{{ size(rdoc.code|length) }}</dd>
|
|
92
|
+
{% endif %}
|
|
93
|
+
<dt>{{ _('Submit At') }}</dt>
|
|
94
|
+
<dd>{{ datetimeSpan(rdoc._id, false)|safe }}</dd>
|
|
95
|
+
{% if rdoc.judgeAt %}
|
|
96
|
+
<dt>{{ _('Judged At') }}</dt>
|
|
97
|
+
<dd>{{ datetimeSpan(rdoc.judgeAt, false)|safe }}</dd>
|
|
98
|
+
{% endif %}
|
|
99
|
+
{% if judge_udoc %}
|
|
100
|
+
<dt>{{ _('Judged By') }}</dt>
|
|
101
|
+
<dd>{{ user.render_inline(judge_udoc, badge=false) }}</dd>
|
|
102
|
+
{% endif %}
|
|
103
|
+
</dl>
|
|
104
|
+
{% if typeof(rdoc['status']) === 'number' %}
|
|
105
|
+
{% include 'record_detail_summary.html' %}
|
|
106
|
+
{% endif %}
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
{% if allRevs|length %}
|
|
110
|
+
<div class="section side">
|
|
111
|
+
<div class="section__header">
|
|
112
|
+
<h1 class="section__title">{{ _('History') }}</h1>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="section__body no-padding">
|
|
115
|
+
<ol class="menu">
|
|
116
|
+
<li class="menu__item">
|
|
117
|
+
<a href="?rev=" {% if not rev %}style="border-color: #4690d0;"{% endif %} class="menu__link">
|
|
118
|
+
{{ _('Latest Version') }}
|
|
119
|
+
</a>
|
|
120
|
+
</li>
|
|
121
|
+
{% for r, rtime in allRevs %}
|
|
122
|
+
<li class="menu__item">
|
|
123
|
+
<a href="?rev={{ r }}" {% if rev and rev.equals(r) %}style="border-color: #4690d0;"{% endif %} class="menu__link">
|
|
124
|
+
{{ datetimeSpan(rtime, false)|safe }}
|
|
125
|
+
</a>
|
|
126
|
+
</li>
|
|
127
|
+
{% endfor %}
|
|
128
|
+
</ol>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
{% endif %}
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
{% endblock %}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<div class="section visible" id="status" data-status="{{ rdoc.status }}">
|
|
2
|
+
<div class="section__header">
|
|
3
|
+
<h1 class="section__title">
|
|
4
|
+
<span class="icon record-status--icon {{ model.builtin.STATUS_CODES[rdoc['status']] }}"></span>
|
|
5
|
+
{% if typeof(rdoc['score']) == 'number' %}
|
|
6
|
+
<span style="color: {{ utils.status.getScoreColor(rdoc.score|default(0)) }}">{{ rdoc.score|default(0) }}</span>
|
|
7
|
+
{% endif %}
|
|
8
|
+
<span class="record-status--text {{ model.builtin.STATUS_CODES[rdoc['status']] }}">
|
|
9
|
+
{{ model.builtin.STATUS_TEXTS[rdoc['status']] }}
|
|
10
|
+
</span>
|
|
11
|
+
{% if rdoc.progress %}{{ rdoc.progress|int }}%{% endif %}
|
|
12
|
+
</h1>
|
|
13
|
+
</div>
|
|
14
|
+
{% if rdoc.compilerTexts.length %}
|
|
15
|
+
<div class="section__body">
|
|
16
|
+
<pre class="compiler-text">{{ rdoc.compilerTexts|join('\n')|ansi|safe }}<div class="compiler-text-mask"><p><span class="icon icon-expand_more">{{ _('Expand') }}</span></p></div></pre>
|
|
17
|
+
</div>
|
|
18
|
+
{% endif %}
|
|
19
|
+
{% if rdoc.judgeTexts.length %}
|
|
20
|
+
<div class="section__body">
|
|
21
|
+
<pre class="judge-text">{{ formatJudgeTexts(rdoc.judgeTexts)|ansi|safe }}</pre>
|
|
22
|
+
</div>
|
|
23
|
+
{% endif %}
|
|
24
|
+
{% if rdoc.testCases.length %}
|
|
25
|
+
<div class="section__body no-padding">
|
|
26
|
+
<table class="data-table record_detail__table">
|
|
27
|
+
<colgroup>
|
|
28
|
+
<col class="col--case">
|
|
29
|
+
<col class="col--status">
|
|
30
|
+
<col class="col--time">
|
|
31
|
+
<col class="col--memory">
|
|
32
|
+
</colgroup>
|
|
33
|
+
<thead>
|
|
34
|
+
<tr>
|
|
35
|
+
<th class="col--case record-status--border">#</th>
|
|
36
|
+
<th class="col--status">
|
|
37
|
+
{{ _('Status') }}
|
|
38
|
+
{% if rdoc.subtasks and (rdoc.subtasks|length > 1 or rdoc.subtasks[Object.keys(rdoc.subtasks)[0]].type == 'sum') %}
|
|
39
|
+
<span class="float-right">{{ _('Score') }}</span>
|
|
40
|
+
{% endif %}
|
|
41
|
+
</th>
|
|
42
|
+
<th class="col--time">{{ _('Time Cost') }}</th>
|
|
43
|
+
<th class="col--memory">{{ _('Memory Cost') }}</th>
|
|
44
|
+
</tr>
|
|
45
|
+
</thead>
|
|
46
|
+
<tbody>
|
|
47
|
+
{% set _key = 'id' if rdoc.testCases|groupby('subtaskId')|length == 1 else 'subtaskId' %}
|
|
48
|
+
{%- for subtaskId, rcdocs in rdoc.testCases|sort(false,false,_key)|groupby(_key) -%}
|
|
49
|
+
{% if rcdocs.length > 1 %}
|
|
50
|
+
<tr class="subtask">
|
|
51
|
+
<td class="col--case">
|
|
52
|
+
#{{ subtaskId|int|default(1) }}
|
|
53
|
+
</td>
|
|
54
|
+
{% if rdoc.subtasks %}
|
|
55
|
+
<td class="col--status">
|
|
56
|
+
<span class="icon record-status--icon {{ model.builtin.STATUS_CODES[rdoc.subtasks[subtaskId]['status']] }}"></span>
|
|
57
|
+
<span class="record-status--text {{ model.builtin.STATUS_CODES[rdoc.subtasks[subtaskId]['status']] }}">
|
|
58
|
+
{{ model.builtin.STATUS_TEXTS[rdoc.subtasks[subtaskId]['status']] }}
|
|
59
|
+
</span>
|
|
60
|
+
<span class="float-right record-status--text {{ model.builtin.STATUS_CODES[rdoc.subtasks[subtaskId]['status']] }}">{{ rdoc.subtasks[subtaskId]['score']|default(0) }}</span>
|
|
61
|
+
</td>
|
|
62
|
+
<td class="col--time"></td>
|
|
63
|
+
<td class="col--memory"></td>
|
|
64
|
+
{% endif %}
|
|
65
|
+
</tr>
|
|
66
|
+
{% endif %}
|
|
67
|
+
{%- for rcdoc in rcdocs|sort(false,false,'id') -%}
|
|
68
|
+
<tr class="{{ 'subtask-case' if rcdocs.length == 1 else 'case' }}">
|
|
69
|
+
<td class="col--case record-status--border {{ model.builtin.STATUS_CODES[rcdoc['status']] }}">
|
|
70
|
+
#{{ subtaskId|int|default(1) }}{% if rcdocs.length > 1 %}-{{ rcdoc.id|default(loop.index) }}{% endif %}
|
|
71
|
+
</td>
|
|
72
|
+
<td class="col--status">
|
|
73
|
+
<span class="icon record-status--icon {{ model.builtin.STATUS_CODES[rcdoc['status']] }}"></span>
|
|
74
|
+
<span class="record-status--text {{ model.builtin.STATUS_CODES[rcdoc['status']] }}">
|
|
75
|
+
{{ model.builtin.STATUS_TEXTS[rcdoc['status']] }}
|
|
76
|
+
</span>
|
|
77
|
+
{% if (rdoc.subtasks and _key != 'id' and rcdocs.length == 1) or (_key == 'id' and rdoc.subtasks[rcdoc.subtaskId].type == 'sum') %}
|
|
78
|
+
<span class="float-right record-status--text {{ model.builtin.STATUS_CODES[(rdoc.subtasks[subtaskId]['status'] if _key != 'id' else rcdoc.status)] }}">
|
|
79
|
+
{{ (rdoc.subtasks[subtaskId]['score'] if _key != 'id' else rcdoc.score)|default(0) }}
|
|
80
|
+
</span>
|
|
81
|
+
{% endif %}
|
|
82
|
+
<span class="message">{{ formatJudgeTexts([rcdoc.message])|ansi|safe if rcdoc.message else '' }}</span>
|
|
83
|
+
</td>
|
|
84
|
+
<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>
|
|
85
|
+
<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>
|
|
86
|
+
</tr>
|
|
87
|
+
{%- endfor -%}
|
|
88
|
+
{%- endfor -%}
|
|
89
|
+
</tbody>
|
|
90
|
+
</table>
|
|
91
|
+
</div>
|
|
92
|
+
{% endif %}
|
|
93
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<dl class="large horizontal" id="summary">
|
|
2
|
+
{% if typeof(rdoc['score']) == 'number' %}
|
|
3
|
+
<dt>{{ _('Score') }}</dt>
|
|
4
|
+
<dd>{{ rdoc['score'] }}</dd>
|
|
5
|
+
{% endif %}
|
|
6
|
+
{% set _ge = rdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}
|
|
7
|
+
{% if rdoc['time'] %}
|
|
8
|
+
<dt>{{ _('Total Time') }}</dt>
|
|
9
|
+
<dd>{% if _ge %}≥{% endif %}{{ rdoc.time|round(0) }}ms</dd>
|
|
10
|
+
{% endif %}
|
|
11
|
+
{% if rdoc.testCases.length %}
|
|
12
|
+
<dt>{{ _('Peak Time') }}</dt>
|
|
13
|
+
<dd>{% if _ge %}≥{% endif %}{{ (rdoc.testCases|sort(true, true, "time")|first)["time"]|round(0) }}ms</dd>
|
|
14
|
+
{% endif %}
|
|
15
|
+
{% if rdoc['memory'] %}
|
|
16
|
+
<dt>{{ _('Peak Memory') }}</dt>
|
|
17
|
+
<dd>{% if _ge %}≥{% endif %}{{ size(rdoc.memory, 1024) }}</dd>
|
|
18
|
+
{% endif %}
|
|
19
|
+
</dl>
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{% extends "layout/basic.html" %}
|
|
2
|
+
{% block content %}
|
|
3
|
+
{{ set(
|
|
4
|
+
UiContext, 'socketUrl',
|
|
5
|
+
"record-conn?domainId=" + handler.args.domainId
|
|
6
|
+
+ (("&tid=" + filterTid) if filterTid else "")
|
|
7
|
+
+ (("&uidOrName=" + filterUidOrName) if filterUidOrName else "")
|
|
8
|
+
+ (("&pid=" + filterPid) if filterPid else "")
|
|
9
|
+
+ ("&all=1" if all else "")
|
|
10
|
+
+ ("&allDomain=1" if allDomain else "")
|
|
11
|
+
) }}
|
|
12
|
+
{{ set(UiContext, 'rids', rdocs.map(eval("rdoc=>rdoc._id.toString()"))) }}
|
|
13
|
+
<div class="row">
|
|
14
|
+
<div class="medium-12 columns">
|
|
15
|
+
<form method="get">
|
|
16
|
+
<div class="section">
|
|
17
|
+
<div class="section__header">
|
|
18
|
+
<h1 class="section__title">{{ _('Filter') }}</h1>
|
|
19
|
+
<div class="section__tools">
|
|
20
|
+
<button type="submit" class="primary button"><span class="icon icon-filter"></span> {{ _('Filter') }}</button>
|
|
21
|
+
<a href="{{ url('record_main') }}" class="button">{{ _('Reset') }}</a>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="section__body">
|
|
25
|
+
<div class="row">
|
|
26
|
+
<div class="medium-2 columns">
|
|
27
|
+
<label class="filter-user">
|
|
28
|
+
{{ _('By Username / UID') }}
|
|
29
|
+
<input name="uidOrName" type="text" class="textbox" value="{{ filterUidOrName }}" autocomplete="off" data-autofocus>
|
|
30
|
+
</label>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="medium-2 columns">
|
|
33
|
+
<label>
|
|
34
|
+
{{ _('By Problem') }}
|
|
35
|
+
<input name="pid" type="text" class="textbox" value="{{ filterPid }}">
|
|
36
|
+
</label>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="medium-2 columns">
|
|
39
|
+
<label>
|
|
40
|
+
{{ _('By Contest') }}
|
|
41
|
+
<input name="tid" type="text" class="textbox" value="{{ filterTid }}">
|
|
42
|
+
</label>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="medium-3 columns">
|
|
45
|
+
<label>
|
|
46
|
+
{{ _('By Language') }}
|
|
47
|
+
</label>
|
|
48
|
+
<select class="compact select" name="lang">
|
|
49
|
+
<option value="">{{ _('All Languages') }}</option>
|
|
50
|
+
</select>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="medium-3 columns">
|
|
53
|
+
<label>
|
|
54
|
+
{{ _('By Status') }}
|
|
55
|
+
</label>
|
|
56
|
+
<select class="compact select" name="status">
|
|
57
|
+
<option value="" {% if typeof(filterStatus) != 'number' %}selected{% else %}{% endif %}>{{ _('All Submissions') }}</option>
|
|
58
|
+
{%- for k,v in utils.status.STATUS_TEXTS -%}
|
|
59
|
+
<option value="{{k}}" {% if filterStatus == k %}selected{% else %}{% endif %}>{{v}}</option>
|
|
60
|
+
{%- endfor -%}
|
|
61
|
+
</select>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</form>
|
|
67
|
+
<div class="section">
|
|
68
|
+
<div class="section__body no-padding">
|
|
69
|
+
{% if not rdocs.length %}
|
|
70
|
+
{% if not filterUidOrName and not filterPid and not filterTid %}
|
|
71
|
+
{{ nothing.render('Oh, there is no task in the queue!') }}
|
|
72
|
+
{% else %}
|
|
73
|
+
{{ nothing.render('Oh, there are no tasks that match the filter!') }}
|
|
74
|
+
{% endif %}
|
|
75
|
+
{% else %}
|
|
76
|
+
<table class="data-table record_main__table">
|
|
77
|
+
<colgroup>
|
|
78
|
+
<col class="col--status">
|
|
79
|
+
<col class="col--problem">
|
|
80
|
+
<col class="col--submit-by">
|
|
81
|
+
<col class="col--time">
|
|
82
|
+
<col class="col--memory">
|
|
83
|
+
<col class="col--lang">
|
|
84
|
+
<col class="col--submit-at">
|
|
85
|
+
</colgroup>
|
|
86
|
+
<thead>
|
|
87
|
+
<tr>
|
|
88
|
+
<th class="col--status record-status--border">{{ _('Status') }}</th>
|
|
89
|
+
<th class="col--problem">{{ _('Problem') }}</th>
|
|
90
|
+
<th class="col--submit-by">{{ _('Submit By') }}</th>
|
|
91
|
+
<th class="col--time">{{ _('Time') }}</th>
|
|
92
|
+
<th class="col--memory">{{ _('Memory') }}</th>
|
|
93
|
+
<th class="col--lang">{{ _('Language') }}</th>
|
|
94
|
+
<th class="col--submit-at">{{ _('Submit At') }}</th>
|
|
95
|
+
</tr>
|
|
96
|
+
</thead>
|
|
97
|
+
<tbody>
|
|
98
|
+
{%- for rdoc in rdocs -%}
|
|
99
|
+
{% set udoc = udict[rdoc['uid']] %}
|
|
100
|
+
{% set pdoc = pdict[rdoc['pid']] %}
|
|
101
|
+
{% include 'record_main_tr.html' %}
|
|
102
|
+
{%- endfor -%}
|
|
103
|
+
</tbody>
|
|
104
|
+
</table>
|
|
105
|
+
{% if handler.user.hasPriv(PRIV.PRIV_VIEW_JUDGE_STATISTICS) or filterTid or filterPid or filterUidOrName %}
|
|
106
|
+
<ul class="pager">
|
|
107
|
+
<li>
|
|
108
|
+
<a class="pager__item next link" href="?page={{ page + 1 }}{{
|
|
109
|
+
(('&tid=' + filterTid) if filterTid else '')
|
|
110
|
+
+ (('&uidOrName=' + filterUidOrName) if filterUidOrName else '')
|
|
111
|
+
+ (('&lang=' + filterLang) if filterLang else '')
|
|
112
|
+
+ (('&status=' + filterStatus) if filterStatus else '')
|
|
113
|
+
+ (('&pid=' + filterPid) if filterPid else '')
|
|
114
|
+
+ ('&all=1' if all else '')
|
|
115
|
+
+ ('&allDomain=1' if allDomain else '') }}">{{ _('pager_next') }}</a>
|
|
116
|
+
</li>
|
|
117
|
+
</ul>
|
|
118
|
+
{% endif %}
|
|
119
|
+
{% endif %}
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
{% if statistics %}
|
|
123
|
+
<div class="section">
|
|
124
|
+
<div class="section__header">
|
|
125
|
+
<h1 class="section__title">{{ _('Statistics') }}</h1>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="section__body">
|
|
128
|
+
<dl class="large horizontal">
|
|
129
|
+
<dt>{{ _('5 Min')}}</dt><dd>{{ statistics['d5min'] }}</dd>
|
|
130
|
+
<dt>{{ _('1 Hour')}}</dt><dd>{{ statistics['d1h'] }}</dd>
|
|
131
|
+
<dt>{{ _('Day') }}</dt><dd>{{ statistics['day'] }}</dd>
|
|
132
|
+
<dt>{{ _('Week') }}</dt><dd>{{ statistics['week'] }}</dd>
|
|
133
|
+
<dt>{{ _('Month') }}</dt><dd>{{ statistics['month'] }}</dd>
|
|
134
|
+
<dt>{{ _('Year') }}</dt><dd>{{ statistics['year'] }}</dd>
|
|
135
|
+
<dt>{{ _('Total') }}</dt><dd>{{ statistics['total'] }}</dd>
|
|
136
|
+
</dl>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
{% endif %}
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
{% endblock %}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{% import "components/record.html" as record with context %}
|
|
2
|
+
{% import "components/user.html" as user with context %}
|
|
3
|
+
{% import "components/problem.html" as problem with context %}
|
|
4
|
+
<tr data-rid="{{ rdoc['_id'] }}">
|
|
5
|
+
{% set _isPretest = rdoc.contest and rdoc.contest.toString() == '000000000000000000000000' %}
|
|
6
|
+
{{ record.render_status_td(rdoc, allDomain = allDomain) }}
|
|
7
|
+
<td class="col--problem col--problem-name">
|
|
8
|
+
{% if handler.user.hasPerm(perm.PERM_REJUDGE) and not rdoc.files.hack and not _isPretest %}
|
|
9
|
+
<form class="form--inline" method="post" action="{{ url('record_detail', rid=rdoc._id, domainId=rdoc.domainId) }}">
|
|
10
|
+
<button type="submit" name="operation" value="rejudge" class="link text-maroon lighter">
|
|
11
|
+
<span class="icon icon-refresh"></span>
|
|
12
|
+
{{ _('Rejudge') }}
|
|
13
|
+
</button>
|
|
14
|
+
<button type="submit" name="operation" value="cancel" class="link text-maroon lighter">
|
|
15
|
+
<span class="icon icon-close"></span>
|
|
16
|
+
{{ _('Cancel Score') }}
|
|
17
|
+
</button> |
|
|
18
|
+
</form>
|
|
19
|
+
{% endif %}
|
|
20
|
+
{% if pdoc and rdoc.contest %}
|
|
21
|
+
{{ problem.render_problem_title(pdoc, tdoc=tdoc, show_tags=false, show_invisible_flag=false) }}
|
|
22
|
+
{% elif pdoc and (not pdoc.hidden or handler.user.hasPerm(perm.PERM_VIEW_PROBLEM_HIDDEN) or handler.user.own(pdoc)) %}
|
|
23
|
+
{{ problem.render_problem_title(pdoc, show_tags=false) }}
|
|
24
|
+
{% else %}
|
|
25
|
+
*
|
|
26
|
+
{% endif %}
|
|
27
|
+
{% if rdoc.files.hack %}<span class="text-orange">({{ _('Hack') }})</span>{% endif %}
|
|
28
|
+
{% if _isPretest %}<span class="text-orange">({{ _('Pretest') }})</span>{% endif %}
|
|
29
|
+
</td>
|
|
30
|
+
<td class="col--submit-by">{{ user.render_inline(udoc, avatar=false, badge=false) }}</td>
|
|
31
|
+
<td class="col--time">{% if rdoc['time'] %}{% if [STATUS.STATUS_TIME_LIMIT_EXCEEDED, STATUS.STATUS_MEMORY_LIMIT_EXCEEDED, STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED].includes(rdoc['status']) %}≥{% endif %}{{ rdoc.time|round|int }}ms{% else %}-{% endif %}</td>
|
|
32
|
+
<td class="col--memory">{% if rdoc['memory'] %}{% if [STATUS.STATUS_TIME_LIMIT_EXCEEDED, STATUS.STATUS_MEMORY_LIMIT_EXCEEDED, STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED].includes(rdoc['status']) %}≥{% endif %}{{ size(rdoc.memory, 1024) }}{% else %}-{% endif %}</td>
|
|
33
|
+
<td class="col--lang">{{ model.setting.langs[rdoc['lang']].display }}</td>
|
|
34
|
+
<td class="col--submit-at">{{ datetimeSpan(rdoc['_id'])|safe }}</td>
|
|
35
|
+
</tr>
|