Added basic table to display results - last step is the JS to dynamically show it.

This commit is contained in:
Jordan Wright 2016-02-01 21:53:00 -06:00
parent 94e43fe557
commit 528d8525b1
2 changed files with 17 additions and 0 deletions

4
static/css/main.css vendored
View file

@ -441,3 +441,7 @@ table.dataTable thead .sorting_desc:after {
.timeline-event-details>.table-responsive{
display:none;
}
.timeline-event-details{
margin-top: 10px;
margin-bottom: 10px;
}

View file

@ -131,6 +131,19 @@ function renderTimeline(data) {
' <span class="timeline-date">' + moment(event.time).format('MMMM Do YYYY h:mm') + '</span>'
if (event.details) {
results += '<div class="timeline-event-details"><i class="fa fa-caret-right"></i> View Details</div>'
results += '<div class="timeline-event-table">'
results += ' <table class="table table-condensed table-bordered table-striped">'
results += ' <thead><tr><th>Parameter</th><th>Value(s)</tr></thead><tbody>'
details = JSON.parse(event.details)
$.each(Object.keys(details.payload), function(i, param){
if (param == "rid") { return true; }
results += ' <tr>'
results += ' <td>' + param + '</td>'
results += ' <td>' + details.payload[param] + '</td>'
results += ' </tr>'
})
results += ' </tbody></table>'
results += '</div>'
}
results += '</div></div>'
}