Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tflow2.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ <h1>tflow Netflow Analyzer</h1>
</fieldset>
<input type="submit" value="Run Query" id="submit">
</form>
<div id="drillDown_div"></div>
<div id="chart_div"></div>
</body>
</html>
16 changes: 16 additions & 0 deletions tflow2.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ function drawChart() {
$("#chart_div").text("No data found")
return
}
pres = Papa.parse(rdata.trim())
$("#drillDown_div").html("");
//$("#drillDown_div").attr("style", "border:1px solid black");
for (var i = 1; i < pres.data[0].length; i++) {
if (pres.data[0][i] != "Rest") {
$("#drillDown_div").append("<div style='display:inline; background: lightgreen'>"+pres.data[0][i]+"</div> ");
}
}
$("#drillDown_div div").on( "click", function() {
evaluators = this.innerHTML.split(',');
for(var i = 0; i < evaluators.length; i++) {
$("#"+evaluators[i].split(':')[0]).val(evaluators[i].split(':')[1]);
//console.log(evaluators[i]);
}
});
renderChart(rdata)
},
error: function(xhr) {
Expand All @@ -39,6 +54,7 @@ function drawChart() {
})
}


function renderChart(rdata) {
pres = Papa.parse(rdata.trim())

Expand Down