workflow_launcher/workflows/retrofit/run.js

23 lines
714 B
JavaScript
Raw Normal View History

2024-03-11 11:01:07 -04:00
let param = {
'workflow': 'retrofit',
'application': '',
'buildings': []
}
document.getElementById("runScenario").addEventListener("click", runScenario)
async function runScenario() {
try {
param['application'] = document.getElementById('application').value
let buildingsString = document.getElementById('buildings').value
buildings = buildingsString.replace('\r', '').replace('\n', '').replace('\t', '').split(';').map(e => e.trim())
param['buildings'] = buildings
await window.functions.run(param)
}
catch(ex) {
alert(ex)
}
}
const links = document.getElementById('links')
window.functions.onTaskCompleted((value) => {
links.innerHTML = value
console.log(value)
})