Commit
·
5a7babe
1
Parent(s):
5702264
fix: log detail
Browse files
competitions/templates/index.html
CHANGED
|
@@ -63,12 +63,14 @@
|
|
| 63 |
|
| 64 |
// Iterate over each submission and add it to the table
|
| 65 |
data.response.submissions.forEach(submission => {
|
|
|
|
|
|
|
| 66 |
tableHTML += `<tr>
|
| 67 |
<td>${submission.datetime}</td>
|
| 68 |
<td>${submission.submission_id}</td>
|
| 69 |
<td>${submission.score}</td>
|
| 70 |
<td>${submission.status}</td>
|
| 71 |
-
<td>${submission.error_message}</td>
|
| 72 |
</tr>`;
|
| 73 |
});
|
| 74 |
|
|
@@ -76,9 +78,6 @@
|
|
| 76 |
tableHTML += '</table>';
|
| 77 |
// add a text field which displays team name and a button to update team name
|
| 78 |
contentDiv.innerHTML = marked.parse(data.response.submission_text) + tableHTML;
|
| 79 |
-
document.getElementById('updateSelectedSubmissionsButton').addEventListener('click', function () {
|
| 80 |
-
updateSelectedSubmissions();
|
| 81 |
-
});
|
| 82 |
} else {
|
| 83 |
// Display message if there are no submissions
|
| 84 |
contentDiv.innerHTML = teamNameDiv + marked.parse(data.response.submission_text) + marked.parse(data.response.error);
|
|
|
|
| 63 |
|
| 64 |
// Iterate over each submission and add it to the table
|
| 65 |
data.response.submissions.forEach(submission => {
|
| 66 |
+
logFileLink = submission.log_file_url === "" ? "" : `<a href="${submission.log_file_url}" target="_blank">log_file.txt</a>`;
|
| 67 |
+
console.log(logFileLink)
|
| 68 |
tableHTML += `<tr>
|
| 69 |
<td>${submission.datetime}</td>
|
| 70 |
<td>${submission.submission_id}</td>
|
| 71 |
<td>${submission.score}</td>
|
| 72 |
<td>${submission.status}</td>
|
| 73 |
+
<td>${submission.error_message}<br> ${logFileLink}</td>
|
| 74 |
</tr>`;
|
| 75 |
});
|
| 76 |
|
|
|
|
| 78 |
tableHTML += '</table>';
|
| 79 |
// add a text field which displays team name and a button to update team name
|
| 80 |
contentDiv.innerHTML = marked.parse(data.response.submission_text) + tableHTML;
|
|
|
|
|
|
|
|
|
|
| 81 |
} else {
|
| 82 |
// Display message if there are no submissions
|
| 83 |
contentDiv.innerHTML = teamNameDiv + marked.parse(data.response.submission_text) + marked.parse(data.response.error);
|