Added function to report generation page to change the selection of tests based on the benchmark wanted to compare
This commit is contained in:
parent
cedad0e48d
commit
b4bd116367
@ -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(
|
||||
$('<option/>')
|
||||
.attr('value', test.id)
|
||||
.text(test.title)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user