From b4bd11636724e12cd9c1dcb7b946c4555fc805d0 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Mon, 3 Jun 2024 13:18:38 -0400 Subject: [PATCH] Added function to report generation page to change the selection of tests based on the benchmark wanted to compare --- assets/scripts/bedabin.coffee | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/assets/scripts/bedabin.coffee b/assets/scripts/bedabin.coffee index 867c33a..844c584 100644 --- a/assets/scripts/bedabin.coffee +++ b/assets/scripts/bedabin.coffee @@ -1,2 +1,19 @@ $ -> console.log('ready.') + + $('#report-benchmarks').on('change', -> + url = '/api/benchmark/' + $('#report-benchmarks').val() + '/tests' + $.get(url, (data) -> + # clear old contents from the selector + $('#report-tests').empty() + # add new elements to the selector + addOption(test) for test in data + ) + ) + +addOption = (test) -> + $('#report-tests').append( + $('