diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-05 21:31:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-05 21:31:30 +0900 |
| commit | 9b32f59a34e19a3709af4d4a8cf50b047f1021e2 (patch) | |
| tree | f580e3a34f8115fc53f19daa1c3f3d6ba03abc90 | |
| parent | a2f47eb106cd37d830272eeeb6ec5cc6cd417a14 (diff) | |
| download | phperkaigi-2024-albatross-9b32f59a34e19a3709af4d4a8cf50b047f1021e2.tar.gz phperkaigi-2024-albatross-9b32f59a34e19a3709af4d4a8cf50b047f1021e2.tar.zst phperkaigi-2024-albatross-9b32f59a34e19a3709af4d4a8cf50b047f1021e2.zip | |
do not show stdout/stderr to users
| -rw-r--r-- | services/app/assets/loading.js | 8 | ||||
| -rw-r--r-- | services/app/src/App.php | 2 | ||||
| -rw-r--r-- | services/app/src/Forms/LoginForm.php | 2 | ||||
| -rw-r--r-- | services/app/templates/answer_view.html.twig | 4 |
4 files changed, 2 insertions, 14 deletions
diff --git a/services/app/assets/loading.js b/services/app/assets/loading.js index 570a7e9..4699303 100644 --- a/services/app/assets/loading.js +++ b/services/app/assets/loading.js @@ -9,8 +9,6 @@ document.addEventListener('DOMContentLoaded', () => { ); const statusElemsMap = getElemsMap('js-testcase-execution-status'); const statusLoadingIndicatorElemsMap = getElemsMap('js-testcase-execution-status-loading-indicator'); - const stdoutElemsMap = getElemsMap('js-testcase-execution-stdout'); - const stderrElemsMap = getElemsMap('js-testcase-execution-stderr'); if (!aggregatedStatusLoadingIndicatorElem) { return; @@ -26,16 +24,12 @@ document.addEventListener('DOMContentLoaded', () => { for (const ex of testcase_executions) { const statusElem = statusElemsMap.get(ex.id); const loadingIndicatorElem = statusLoadingIndicatorElemsMap.get(ex.id); - const stdoutElem = stdoutElemsMap.get(ex.id); - const stderrElem = stderrElemsMap.get(ex.id); - const { status, stdout, stderr } = ex; + const { status } = ex; if (status.label === statusElem.textContent) { continue; } statusElem.textContent = status.label; - stdoutElem.textContent = stdout; - stderrElem.textContent = stderr; if (loadingIndicatorElem && !status.show_loading_indicator) { loadingIndicatorElem.remove(); } diff --git a/services/app/src/App.php b/services/app/src/App.php index 7b31e74..9d6cc70 100644 --- a/services/app/src/App.php +++ b/services/app/src/App.php @@ -892,8 +892,6 @@ final class App 'label' => $ex->status->label(), 'show_loading_indicator' => $ex->status->showLoadingIndicator(), ], - 'stdout' => $ex->stdout, - 'stderr' => $ex->stderr, ], $testcaseExecutions), ])->withStatus(200); } diff --git a/services/app/src/Forms/LoginForm.php b/services/app/src/Forms/LoginForm.php index 26f6ad1..4c69ad5 100644 --- a/services/app/src/Forms/LoginForm.php +++ b/services/app/src/Forms/LoginForm.php @@ -84,7 +84,7 @@ final class LoginForm extends FormBase try { $user_id = $this->userRepo->create( $username, - is_admin: true, // TODO + is_admin: false, ); } catch (EntityValidationException $e) { $this->state->setErrors($e->toFormErrors()); diff --git a/services/app/templates/answer_view.html.twig b/services/app/templates/answer_view.html.twig index a76e161..474f3d3 100644 --- a/services/app/templates/answer_view.html.twig +++ b/services/app/templates/answer_view.html.twig @@ -29,10 +29,6 @@ <div class="js-testcase-execution-status-loading-indicator spinner-border text-primary spinner-border-sm" role="status" data-testcase-execution-id="{{ ex.testcase_execution_id }}"><span class="visually-hidden">Loading...</span></div> {% endif %} </div> - <h4>標準出力</h4> - <pre><code class="js-testcase-execution-stdout hljs language-plaintext" data-testcase-execution-id="{{ ex.testcase_execution_id }}">{{ ex.stdout }}</code></pre> - <h4>標準エラー出力</h4> - <pre><code class="js-testcase-execution-stderr hljs language-plaintext" data-testcase-execution-id="{{ ex.testcase_execution_id }}">{{ ex.stderr }}</code></pre> {% endfor %} <script type="module" src="{{ base_path() }}/assets/loading.js"></script> {% endblock %} |
