-moved code from run.js to jinja admin template