`);
// delete the div when the modal is closed
div.on("hidden.bs.modal", function() {
div.remove();
});
div.modal("show");
let controlsList = div.find(".controls-list");
const controls = await $.post(`https://${resName}/detectPressedControls`);
controlsList.empty();
return new Promise((resolve, reject) => {
controls.forEach(control => {
let row = $(`