Skip to content

Commit

Permalink
web set height of results pane based on number of violations
Browse files Browse the repository at this point in the history
  • Loading branch information
lhitchon committed Apr 9, 2018
1 parent f6929cc commit b730f3f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/templates/index.tmpl
Expand Up @@ -84,10 +84,16 @@ $(function() {
url: "/lint",
data: data,
success: function(results) {
var height = 200;
if (results && results.Violations ) {
height = 100 + ( 200 * results.Violations.length)
}
resultsEditor.setValue(JSON.stringify(results, null, ' '));
resultsEditor.setSize("100%", height);
},
error: function(response) {
resultsEditor.setValue(JSON.stringify(response.responseJSON, null, ' '));
resultsEditor.setSize("100%", 200);
}
});
});
Expand Down

0 comments on commit b730f3f

Please sign in to comment.