Oleksii Petrenko | 6826817 | 2020-09-28 16:58:13 +0300 | [diff] [blame] | 1 | const updateButton = document.querySelector("button"); |
2 | updateButton.addEventListener("click", updateJenkins); | ||||
3 | |||||
4 | function updateJenkins(){ | ||||
5 | fetch("update_jenkins_plot").then( | ||||
6 | (response) => response.text() | ||||
7 | ).then( | ||||
8 | (text) => { | ||||
9 | alert(text); | ||||
10 | updateButton.setAttribute('disabled', true); | ||||
11 | updateButton.textContent = "Update in progress"; | ||||
12 | }) | ||||
13 | } |