Commit 9daa521c authored by Michael Pyne's avatar Michael Pyne

mojo: Make clear that sample client dropdown doesn't work.

This also gives a better error message when trying to set the modules to
build, in the event that there is an error.
parent 745d40d9
Pipeline #7574 passed with stage
in 1 minute and 26 seconds
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<button id="btnSubmitModuleList">Enter modules to build:</button> <button id="btnSubmitModuleList">Enter modules to build:</button>
<div class="module_list_div"> <div class="module_list_div">
<label for="module_select">Or use the dropdown to select</label> <label for="module_select">Or <strike>use the dropdown to select</strike></label>
<select multiple id="module_select" size="15"> <select multiple id="module_select" size="15">
<option value="">All</option> <option value="">All</option>
<option value="###">--- Module names loading ---</option> <option value="###">--- Module names loading ---</option>
...@@ -33,7 +33,17 @@ btnSubmitModuleList.addEventListener('click', (ev) => { ...@@ -33,7 +33,17 @@ btnSubmitModuleList.addEventListener('click', (ev) => {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
}) })
.then(resp => resp.json()) .then(resp => {
if(resp.ok) {
return resp.json()
}
else {
return resp.text().then(err => {
lkup('modules_result_div').innerHTML = "<b>ERROR</b>: " + err;
throw ("Posting selectors to kdesrc-build backend led to error: " + err);
});
}
})
.then(resp => { .then(resp => {
console.log(`Response received ${resp}`); console.log(`Response received ${resp}`);
lkup('btnStartBuild').disabled = false; lkup('btnStartBuild').disabled = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment