mirror of https://github.com/gophish/gophish
Added table for displaying submitted data.
parent
528d8525b1
commit
99da20abc0
|
@ -445,3 +445,6 @@ table.dataTable thead .sorting_desc:after {
|
|||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.timeline-event-table{
|
||||
display:none;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,9 @@ function exportAsCSV(scope) {
|
|||
csvScope = campaign.timeline
|
||||
break;
|
||||
}
|
||||
if (!csvScope){return}
|
||||
if (!csvScope) {
|
||||
return
|
||||
}
|
||||
$("#exportButton").html('<i class="fa fa-spinner fa-spin"></i>')
|
||||
var csvString = Papa.unparse(csvScope, {})
|
||||
var csvData = new Blob([csvString], {
|
||||
|
@ -136,7 +138,9 @@ function renderTimeline(data) {
|
|||
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; }
|
||||
if (param == "rid") {
|
||||
return true;
|
||||
}
|
||||
results += ' <tr>'
|
||||
results += ' <td>' + param + '</td>'
|
||||
results += ' <td>' + details.payload[param] + '</td>'
|
||||
|
@ -161,6 +165,20 @@ $(document).ready(function() {
|
|||
$("#page-title").text("Results for " + c.name)
|
||||
// Setup tooltips
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
// Setup viewing the details of a result
|
||||
$("#resultsTable").on("click", ".timeline-event-details", function() {
|
||||
// Show the parameters
|
||||
payloadTable = $(this).parent().find(".timeline-event-table")
|
||||
if (payloadTable.is(":visible")) {
|
||||
$(this).find("i").removeClass("fa-caret-down")
|
||||
$(this).find("i").addClass("fa-caret-right")
|
||||
payloadTable.hide()
|
||||
} else {
|
||||
$(this).find("i").removeClass("fa-caret-right")
|
||||
$(this).find("i").addClass("fa-caret-down")
|
||||
payloadTable.show()
|
||||
}
|
||||
})
|
||||
// Setup our graphs
|
||||
var timeline_data = {
|
||||
series: [{
|
||||
|
|
Loading…
Reference in New Issue