diff --git a/assets/scripts/test.js b/assets/scripts/test.js index b348996..75441c3 100644 --- a/assets/scripts/test.js +++ b/assets/scripts/test.js @@ -1,19 +1,17 @@ const testId = $("#results-table").data("test-id"); -$(function () { - $("#test-result-form").on("submit", function (e) { - e.preventDefault(); +$("#test-result-form").on("submit", function (e) { + e.preventDefault(); - const form = $(this); - const formData = form.serialize(); - const benchmarkId = form.find('[name="result_benchmark"]').val(); + const form = $(this); + const formData = form.serialize(); + const benchmarkId = form.find('[name="result_benchmark"]').val(); - $.post("/api/v1/result/add", formData, function (response) { - if (response === "success") { - fetchTestBenchmarkResults(testId, benchmarkId); - form[0].reset(); - } - }); + $.post("/api/v1/result/add", formData, function (response) { + if (response === "success") { + fetchTestBenchmarkResults(testId, benchmarkId); + form[0].reset(); + } }); }); @@ -75,8 +73,10 @@ async function fetchTestBenchmarkResults(testId, benchmarkId) { } } -$("#results-table tbody tr").each(function (index, tr) { - const benchmarkId = $(tr).data("benchmark-id"); - console.log("Fetching results for benchmark id: " + benchmarkId); - fetchTestBenchmarkResults(testId, benchmarkId); +$(document).ready(function() { + $("#results-table tbody tr").each(function (index, tr) { + const benchmarkId = $(tr).data("benchmark-id"); + console.log("Fetching results for benchmark id: " + benchmarkId); + fetchTestBenchmarkResults(testId, benchmarkId); + }); }); diff --git a/assets/styles/eye.scss b/assets/styles/eye.scss index 47b485b..46c16c3 100644 --- a/assets/styles/eye.scss +++ b/assets/styles/eye.scss @@ -1,5 +1,5 @@ $primary-color: teal; body { - background: #eee; + background: white; } diff --git a/views/layouts/default.twig b/views/layouts/default.twig index 6511a8d..75e28d4 100644 --- a/views/layouts/default.twig +++ b/views/layouts/default.twig @@ -5,9 +5,11 @@