Skip to content

Commit

Permalink
Show Submission Detail when compile error occurs
Browse files Browse the repository at this point in the history
-- Submit했을 때 Compile Error가 발생하면 Submission Detail을 확인할 수 없는 문제해결
-- 342째 줄에서 data.info.data && 를 추가해 compile error의 경우 map을 하지 않도록 함.
-- Compile Error의 경우에는 기존 api response를 활용,
-- submission_detail.statistic_info.err_inf보여줌
  • Loading branch information
jimin9038 committed Jul 27, 2021
1 parent 2a60b0e commit e88fc1a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion frontend/src/pages/oj/views/problem/ProblemSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@
</template>
</b-table>
</div>
<div id="submission-compile-error-message" v-if="compile_error_message_show">
<p class="text-danger"> Compile error message: {{ submission_detail.statistic_info.err_info }} </p>
</div>
<div id="submission-source-code">
<h3>Source Code</h3>
<p>({{submission_detail.bytes}} Bytes)</p>
Expand Down Expand Up @@ -225,6 +228,7 @@ export default {
all_submissions_page: 1,
submission_detail_modal_show: false,
compile_error_message_show: false,
// for re-rendering when codemirror content is ready
codemirror_key: 1
Expand Down Expand Up @@ -335,7 +339,7 @@ export default {
create_time: time.utcToLocal(data.create_time, 'YYYY-MM-DD HH:mm'),
result: JUDGE_STATUS[data.result].name,
bytes: new Blob([data.code]).size,
testcases: data.info.data.map(
testcases: data.info.data && data.info.data.map(
tc => {
return {
title: tc.test_case,
Expand All @@ -346,6 +350,7 @@ export default {
}
)
}
this.compile_error_message_show = data.result === 'Compile Error'
if (data.info && data.info.data) {
// score exist means the submission is OI problem submission
Expand Down Expand Up @@ -508,6 +513,10 @@ export default {
}
}
#submission-compile-error-message {
padding: 20px 50px;
}
#submission-source-code {
padding: 20px 50px;
padding-bottom: 40px;
Expand Down

0 comments on commit e88fc1a

Please sign in to comment.