diff --git a/src/components/Submissions/TestResultsTable/TestResultsTable.js b/src/components/Submissions/TestResultsTable/TestResultsTable.js index 2ca8965fe..191bbab5d 100644 --- a/src/components/Submissions/TestResultsTable/TestResultsTable.js +++ b/src/components/Submissions/TestResultsTable/TestResultsTable.js @@ -12,7 +12,7 @@ import exitCodeMapping from '../../helpers/exitCodeMapping'; const hasValue = value => value !== null; const tickOrCrossAndRatioOrValue = (isOK, ratio, value, pretty, multiplier) => - {hasValue(value) && ') '} {hasValue(value) && pretty(value * multiplier)} - ; + ; + +const showTimeResults = ( + key, + wallTime, + wallTimeRatio, + wallTimeExceeded, + cpuTime, + cpuTimeRatio, + cpuTimeExceeded +) => { + const showWall = + Boolean(wallTimeRatio) || (wallTimeExceeded && !cpuTimeExceeded); + const showCpu = Boolean(cpuTimeRatio) || cpuTimeExceeded || !showWall; + return ( + + + {showCpu && + + + + } + {showWall && + + + + } + +
+ + + + } + > + + + + {tickOrCrossAndRatioOrValue( + cpuTimeExceeded === false, + cpuTimeRatio, + cpuTime, + prettyMs, + 1000 + )} +
+ + + + } + > + + + + {tickOrCrossAndRatioOrValue( + wallTimeExceeded === false, + wallTimeRatio, + wallTime, + prettyMs, + 1000 + )} +
+ ); +}; const TestResultsTable = ({ results, runtimeEnvironmentId }) => @@ -85,7 +159,7 @@ const TestResultsTable = ({ results, runtimeEnvironmentId }) => >    - + @@ -133,11 +207,14 @@ const TestResultsTable = ({ results, runtimeEnvironmentId }) => status, memoryExceeded, wallTimeExceeded, + cpuTimeExceeded, message, - wallTimeRatio, memoryRatio, - wallTime, + wallTimeRatio, + cpuTimeRatio, memory, + wallTime, + cpuTime, exitCode }) => @@ -181,20 +258,26 @@ const TestResultsTable = ({ results, runtimeEnvironmentId }) => - {tickOrCrossAndRatioOrValue( - memoryExceeded === false, - memoryRatio, - memory, - prettyPrintBytes, - 1024 - )} - {tickOrCrossAndRatioOrValue( - wallTimeExceeded === false, - wallTimeRatio, - wallTime, - prettyMs, - 1000 - )} + +
+ {tickOrCrossAndRatioOrValue( + memoryExceeded === false, + memoryRatio, + memory, + prettyPrintBytes, + 1024 + )} + + {showTimeResults( + testName, + wallTime, + wallTimeRatio, + wallTimeExceeded, + cpuTime, + cpuTimeRatio, + cpuTimeExceeded + )} + {exitCodeMapping(runtimeEnvironmentId, exitCode)} diff --git a/src/locales/cs.json b/src/locales/cs.json index 395329483..077b5cd92 100644 --- a/src/locales/cs.json +++ b/src/locales/cs.json @@ -141,6 +141,7 @@ "app.confirm.no": "Ne", "app.confirm.yes": "Ano", "app.createGroup.externalId": "Externí identifikátor skupiny (například ID ze školního informačního systému):", + "app.createGroup.hasThreshold": "Students require cetrain number of points to complete the course", "app.createGroup.isPublic": "Studenti se mohou sami přidávat k této skupině", "app.createGroup.publicStats": "Studenti mohou vidět dosažené body ostatních", "app.createGroup.threshold": "Minimální procentuální hranice potřebná ke splnění tohoto kurzu:", @@ -375,6 +376,8 @@ "app.editSimpleLimitsField.tooltip.cloneHorizontal": "Copy this value horizontally to all environments of the test.", "app.editSimpleLimitsField.tooltip.cloneVertical": "Copy this value vertically to all tests within the environment.", "app.editSimpleLimitsForm.failed": "Nepodařilo se uložit limity. Prosím, opakujte akci později.", + "app.editSimpleLimitsForm.preciseTime": "Precise Time Measurement", + "app.editSimpleLimitsForm.preciseTimeTooltip": "If precise time measurement is selected, ReCodEx will measure the consumed CPU time of tested soltions. Otherwise, the wall time will be measured. CPU is better in cases when serial time complexity of the solution is tested and tight time limits are set. Wall time is better in general cases as it better reflects the actual time consumed by the solution (indcluing I/O), but it is more susceptible to errors of measurement.", "app.editSimpleLimitsForm.reset": "Obnovit původní", "app.editSimpleLimitsForm.submit": "Uložit limity", "app.editSimpleLimitsForm.submitting": "Ukládám limity ...", @@ -397,9 +400,12 @@ "app.editTestsTest.remove": "Odebrat", "app.editTestsTest.weight": "Váha testu:", "app.editUser.description": "Upravit nastavení uživatele", + "app.editUser.makeLocal": "Create local account", "app.editUser.title": "Upravit uživatelský profil", "app.editUserProfile.degreesAfterName": "Tituly za jménem:", "app.editUserProfile.degreesBeforeName": "Tituly před jménem:", + "app.editUserProfile.emptyLocalPassword": "Local account does not have a password", + "app.editUserProfile.emptyLocalPasswordExplain": "You may not sign in to ReCodEx using local account until you set the password.", "app.editUserProfile.firstName": "Jméno:", "app.editUserProfile.lastName": "Příjmění:", "app.editUserProfile.passwordInstructions": "Pokud nechcete změnit heslo, nechte tato pole prázná", @@ -627,6 +633,12 @@ "app.failedGroupDetail.msg": "Načtení skupiny se nezdařilo. Prosíme zkuste dotaz opakovat později.", "app.failedSubmissionDetail.description": "Prosíme zkontroluje své připojení k internetu a zkuste dotaz později.", "app.failedSubmissionDetail.title": "Načtení vyhodnocení úlohy se nezdařilo", + "app.failureList.headCreatedAt": "Created at", + "app.failureList.headDescription": "Description", + "app.failureList.headResolutionNote": "Resolution note", + "app.failureList.headResolvedAt": "Resolved at", + "app.failureList.headType": "Type", + "app.failureList.noFailures": "There are no failures in this list.", "app.faq.description": "ReCodEx FAQ", "app.faq.title": "FAQ", "app.feedbackAndBugs.contribution": "If you are interested in frontend web development, feel free to fix the bug itself and send a pull request! Any help will be much appreciated!", @@ -865,6 +877,7 @@ "app.referenceSolutionDetail.exercise": "Exercise", "app.referenceSolutionDetail.refreshEvaluations": "Obnovit", "app.referenceSolutionDetail.resubmit": "Znovu vyhodnotit", + "app.referenceSolutionDetail.resubmitDebug": "Resubmit in Debug Mode", "app.referenceSolutionDetail.title.details": "Detail referenčního řešení", "app.referenceSolutionDetail.uploadedAt": "Nahráno:", "app.referenceSolutionEvaluation.title": "Evaluations of reference solution", @@ -918,6 +931,7 @@ "app.resultsTable.total": "Celkem", "app.search.query": "Vyhledaný dotaz: ", "app.search.title": "Hledat:", + "app.sidebar.menu.admin.failures": "Submission Failures", "app.sidebar.menu.admin.instances": "Instance", "app.sidebar.menu.admin.users": "Uživatelé", "app.sidebar.menu.createAccount": "Zaregistrovat se", @@ -983,8 +997,24 @@ "app.submissionEvaluation.select": "Select", "app.submissionEvaluation.selected": "Selected", "app.submissionEvaluation.title": "Other submissions of this solution", + "app.submissionFailures.description": "Browse all submission failures", + "app.submissionFailures.failed": "Cannot load the list of failures", + "app.submissionFailures.failedDescription": "We are sorry for the inconvenience, please try again later.", + "app.submissionFailures.listTitle": "Submission Failures", + "app.submissionFailures.loading": "Loading list of failures ...", + "app.submissionFailures.loadingDescription": "Please wait while we are getting the list of failures ready.", + "app.submissionFailures.resolve": "Resolve", + "app.submissionFailures.resolveClose": "Close", + "app.submissionFailures.resolveMaxLengthExceeded": "Maximum length of the note exceeded.", + "app.submissionFailures.resolveNote": "Resolve note:", + "app.submissionFailures.resolveSave": "Save", + "app.submissionFailures.resolveSaving": "Saving ...", + "app.submissionFailures.resolveSuccesss": "Saved", + "app.submissionFailures.resolveTitle": "Resolve Failure", + "app.submissionFailures.title": "Submission Failures", "app.submissionStatus.accepted": "Toto řešení bylo připnuto cvičícím.", "app.submissions.testResultsTable.correctness": "Správnost odevzdaného řešení (rozhodnutí sudího)", + "app.submissions.testResultsTable.cpuTimeExplain": "Procesorový čas (celový čas využití CPU všech spuštěných vláken dohromady)", "app.submissions.testResultsTable.exitCode": "Návratový kód (případně chybová hláška, pokud pro daný kód existuje)", "app.submissions.testResultsTable.memoryExceeded": "Naměřená spotřeba paměti", "app.submissions.testResultsTable.overallTestResult": "Celkové výsledky testu", @@ -992,6 +1022,7 @@ "app.submissions.testResultsTable.statusOK": "OK", "app.submissions.testResultsTable.statusSkipped": "Přeskočeno", "app.submissions.testResultsTable.timeExceeded": "Naměřený čas spuštění", + "app.submissions.testResultsTable.wallTimeExplain": "Reálný čas (tzv. 'wall-time' měřený systémovými hodinami)", "app.submissionsTable.commentsIcon.count": "Počet komentářů: {count}", "app.submissionsTable.commentsIcon.last": "Poslední komentář: {last}", "app.submissionsTable.environment": "Target language", diff --git a/src/locales/en.json b/src/locales/en.json index 876186bdf..8f0d8b39a 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -141,6 +141,7 @@ "app.confirm.no": "No", "app.confirm.yes": "Yes", "app.createGroup.externalId": "External ID of the group (e. g. ID of the group in the school IS):", + "app.createGroup.hasThreshold": "Students require cetrain number of points to complete the course", "app.createGroup.isPublic": "Students can join the group themselves", "app.createGroup.publicStats": "Students can see statistics of each other", "app.createGroup.threshold": "Minimum percent of the total points count needed to complete the course:", @@ -375,6 +376,8 @@ "app.editSimpleLimitsField.tooltip.cloneHorizontal": "Copy this value horizontally to all environments of the test.", "app.editSimpleLimitsField.tooltip.cloneVertical": "Copy this value vertically to all tests within the environment.", "app.editSimpleLimitsForm.failed": "Cannot save the exercise limits. Please try again later.", + "app.editSimpleLimitsForm.preciseTime": "Precise Time Measurement", + "app.editSimpleLimitsForm.preciseTimeTooltip": "If precise time measurement is selected, ReCodEx will measure the consumed CPU time of tested soltions. Otherwise, the wall time will be measured. CPU is better in cases when serial time complexity of the solution is tested and tight time limits are set. Wall time is better in general cases as it better reflects the actual time consumed by the solution (indcluing I/O), but it is more susceptible to errors of measurement.", "app.editSimpleLimitsForm.reset": "Reset", "app.editSimpleLimitsForm.submit": "Save Limits", "app.editSimpleLimitsForm.submitting": "Saving Limits ...", @@ -397,9 +400,12 @@ "app.editTestsTest.remove": "Remove", "app.editTestsTest.weight": "Test weight:", "app.editUser.description": "Edit user's profile", + "app.editUser.makeLocal": "Create local account", "app.editUser.title": "Edit user's profile", "app.editUserProfile.degreesAfterName": "Degrees after name:", "app.editUserProfile.degreesBeforeName": "Degrees before name:", + "app.editUserProfile.emptyLocalPassword": "Local account does not have a password", + "app.editUserProfile.emptyLocalPasswordExplain": "You may not sign in to ReCodEx using local account until you set the password.", "app.editUserProfile.firstName": "First name:", "app.editUserProfile.lastName": "Last name:", "app.editUserProfile.passwordInstructions": "If you don't want to change your password leave these inputs blank", @@ -627,6 +633,12 @@ "app.failedGroupDetail.msg": "Cannot load group detail. Please try again later.", "app.failedSubmissionDetail.description": "Make sure you are connected to the Internet and repeat the action after a while.", "app.failedSubmissionDetail.title": "Cannot load evaluation of the solution", + "app.failureList.headCreatedAt": "Created at", + "app.failureList.headDescription": "Description", + "app.failureList.headResolutionNote": "Resolution note", + "app.failureList.headResolvedAt": "Resolved at", + "app.failureList.headType": "Type", + "app.failureList.noFailures": "There are no failures in this list.", "app.faq.description": "ReCodEx FAQ", "app.faq.title": "FAQ", "app.feedbackAndBugs.contribution": "If you are interested in frontend web development, feel free to fix the bug itself and send a pull request! Any help will be much appreciated!", @@ -865,6 +877,7 @@ "app.referenceSolutionDetail.exercise": "Exercise", "app.referenceSolutionDetail.refreshEvaluations": "Refresh", "app.referenceSolutionDetail.resubmit": "Resubmit", + "app.referenceSolutionDetail.resubmitDebug": "Resubmit in Debug Mode", "app.referenceSolutionDetail.title.details": "Reference solution detail", "app.referenceSolutionDetail.uploadedAt": "Uploaded at:", "app.referenceSolutionEvaluation.title": "Evaluations of reference solution", @@ -918,6 +931,7 @@ "app.resultsTable.total": "Total", "app.search.query": "Searched query: ", "app.search.title": "Search:", + "app.sidebar.menu.admin.failures": "Submission Failures", "app.sidebar.menu.admin.instances": "Instances", "app.sidebar.menu.admin.users": "Users", "app.sidebar.menu.createAccount": "Create account", @@ -983,8 +997,24 @@ "app.submissionEvaluation.select": "Select", "app.submissionEvaluation.selected": "Selected", "app.submissionEvaluation.title": "Other submissions of this solution", + "app.submissionFailures.description": "Browse all submission failures", + "app.submissionFailures.failed": "Cannot load the list of failures", + "app.submissionFailures.failedDescription": "We are sorry for the inconvenience, please try again later.", + "app.submissionFailures.listTitle": "Submission Failures", + "app.submissionFailures.loading": "Loading list of failures ...", + "app.submissionFailures.loadingDescription": "Please wait while we are getting the list of failures ready.", + "app.submissionFailures.resolve": "Resolve", + "app.submissionFailures.resolveClose": "Close", + "app.submissionFailures.resolveMaxLengthExceeded": "Maximum length of the note exceeded.", + "app.submissionFailures.resolveNote": "Resolve note:", + "app.submissionFailures.resolveSave": "Save", + "app.submissionFailures.resolveSaving": "Saving ...", + "app.submissionFailures.resolveSuccesss": "Saved", + "app.submissionFailures.resolveTitle": "Resolve Failure", + "app.submissionFailures.title": "Submission Failures", "app.submissionStatus.accepted": "This solution was marked by one of the supervisors as accepted.", "app.submissions.testResultsTable.correctness": "Correctness of the result (verdict of the judge)", + "app.submissions.testResultsTable.cpuTimeExplain": "CPU time (total time the CPU was used by all threads)", "app.submissions.testResultsTable.exitCode": "Exit code (possibly translated into error message if translation is available)", "app.submissions.testResultsTable.memoryExceeded": "Measured memory utilization", "app.submissions.testResultsTable.overallTestResult": "Overall test result", @@ -992,6 +1022,7 @@ "app.submissions.testResultsTable.statusOK": "OK", "app.submissions.testResultsTable.statusSkipped": "SKIPPED", "app.submissions.testResultsTable.timeExceeded": "Measured execution time", + "app.submissions.testResultsTable.wallTimeExplain": "Wall time (real-time measured by external clock)", "app.submissionsTable.commentsIcon.count": "Total Comments: {count}", "app.submissionsTable.commentsIcon.last": "Last Comment: {last}", "app.submissionsTable.environment": "Target language",