23 lines
714 B
JavaScript
23 lines
714 B
JavaScript
|
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)
|
||
|
})
|