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( + $('