2024-06-03 12:44:13 -04:00
|
|
|
$ ->
|
|
|
|
console.log('ready.')
|
2024-06-03 13:18:38 -04:00
|
|
|
|
|
|
|
$('#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(
|
|
|
|
$('<option/>')
|
|
|
|
.attr('value', test.id)
|
|
|
|
.text(test.title)
|
|
|
|
)
|