diff --git a/src/main/resources/hudson/tasks/junit/History/history.js b/src/main/resources/hudson/tasks/junit/History/history.js index 8d5b891f..b0aa9195 100644 --- a/src/main/resources/hudson/tasks/junit/History/history.js +++ b/src/main/resources/hudson/tasks/junit/History/history.js @@ -10,13 +10,15 @@ var resultSeries var durationSeries var trendChartId = 'test-trend-chart' -function onBuildWindowChange(selectObj) { +function onBuildWindowChange(changeEvent) { + let selectObj = changeEvent.target; let idx = selectObj.selectedIndex; let c = selectObj.options[idx].value document.location = `${appRootUrl}${testObjectUrl}/history?start=${start}&count=${c}&interval=${interval}` } -function onBuildIntervalChange(selectObj) { +function onBuildIntervalChange(changeEvent) { + let selectObj = changeEvent.target; let idx = selectObj.selectedIndex; let i = selectObj.options[idx].value document.location = `${appRootUrl}${testObjectUrl}/history?start=${start}&count=${count}&interval=${i}` @@ -24,6 +26,8 @@ function onBuildIntervalChange(selectObj) { (function ($) { $(document).ready(function ($) { + document.querySelector("#history-window").addEventListener("change", onBuildWindowChange); + document.querySelector("#history-interval").addEventListener("change", onBuildIntervalChange); let dataEl = document.getElementById("history-data"); start = dataEl.getAttribute("data-start") end = dataEl.getAttribute("data-end") diff --git a/src/main/resources/hudson/tasks/junit/History/index.jelly b/src/main/resources/hudson/tasks/junit/History/index.jelly index 76c41c19..5fc7d704 100644 --- a/src/main/resources/hudson/tasks/junit/History/index.jelly +++ b/src/main/resources/hudson/tasks/junit/History/index.jelly @@ -70,7 +70,7 @@ THE SOFTWARE.