Commit a677d9e1 authored by yann300's avatar yann300

add auto run opotion

parent 83b60ae4
...@@ -19,7 +19,9 @@ function staticAnalysisView (compilerEvent, renderer, editor, offsetToColumnConv ...@@ -19,7 +19,9 @@ function staticAnalysisView (compilerEvent, renderer, editor, offsetToColumnConv
$('#staticanalysisresult').empty() $('#staticanalysisresult').empty()
if (success) { if (success) {
self.lastCompilationResult = data self.lastCompilationResult = data
self.run() if (self.view.querySelector('#autorunstaticanalysis').checked) {
self.run()
}
} }
}) })
} }
...@@ -28,7 +30,8 @@ staticAnalysisView.prototype.render = function () { ...@@ -28,7 +30,8 @@ staticAnalysisView.prototype.render = function () {
var self = this var self = this
var view = yo`<div> var view = yo`<div>
<strong>Static Analysis</strong> <strong>Static Analysis</strong>
<div>Select analyser to run against current compiled contracts</div> <div>Select analyser to run against current compiled contracts <label><input id="autorunstaticanalysis" type="checkbox" checked="true">Auto run Static Analysis</label></div>
<br />
${this.modulesView} ${this.modulesView}
<div> <div>
<button onclick=${function () { self.run() }} >Run</button> <button onclick=${function () { self.run() }} >Run</button>
...@@ -95,6 +98,6 @@ module.exports = staticAnalysisView ...@@ -95,6 +98,6 @@ module.exports = staticAnalysisView
function renderModules (modules) { function renderModules (modules) {
return modules.map(function (item, i) { return modules.map(function (item, i) {
return yo`<div><input type="checkbox" name="staticanalysismodule" checked='true' index=${i} >${item.name} (${item.description})</div>` return yo`<label><input id="staticanalysismodule${i}" type="checkbox" name="staticanalysismodule" index=${i} checked="true">${item.name} (${item.description})</label>`
}) })
} }
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