|
|
@ -27,11 +27,12 @@ function processOverallResult(source, config) { |
|
|
|
} |
|
|
|
} |
|
|
|
return { |
|
|
|
return { |
|
|
|
compile: source.compile, |
|
|
|
compile: source.compile, |
|
|
|
judge: config.showDetailResult ? (source.judge && { |
|
|
|
judge: { |
|
|
|
subtasks: source.judge.subtasks && source.judge.subtasks.map(st => ({ |
|
|
|
subtasks: source.judge && source.judge.subtasks ? source.judge.subtasks.map(st => ({ |
|
|
|
score: st.score, |
|
|
|
score: st.score, |
|
|
|
cases: st.cases.map(cs => ({ |
|
|
|
cases: st.cases.map(cs => ({ |
|
|
|
status: cs.status, |
|
|
|
status: cs.status, |
|
|
|
|
|
|
|
errorMessage: cs.errorMessage, |
|
|
|
result: cs.result && { |
|
|
|
result: cs.result && { |
|
|
|
type: cs.result.type, |
|
|
|
type: cs.result.type, |
|
|
|
time: config.showUsage ? cs.result.time : undefined, |
|
|
|
time: config.showUsage ? cs.result.time : undefined, |
|
|
@ -45,8 +46,8 @@ function processOverallResult(source, config) { |
|
|
|
spjMessage: config.showTestdata ? cs.result.spjMessage : undefined, |
|
|
|
spjMessage: config.showTestdata ? cs.result.spjMessage : undefined, |
|
|
|
} |
|
|
|
} |
|
|
|
})) |
|
|
|
})) |
|
|
|
})) |
|
|
|
})) : null |
|
|
|
}) : null |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
function getCompileStatus(status) { |
|
|
|
function getCompileStatus(status) { |
|
|
@ -149,7 +150,8 @@ function initializeSocketIO(s) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
ok: true, |
|
|
|
ok: true, |
|
|
|
finished: false, |
|
|
|
finished: false, |
|
|
|
running: false |
|
|
|
running: false, |
|
|
|
|
|
|
|
result: processOverallResult(finishedJudgeList[taskId], clientDisplayConfigList[socket.id]) |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|