mirror of https://github.com/gophish/gophish
parent
0c72e8b69a
commit
79627d5579
|
@ -232,18 +232,23 @@ function poll() {
|
||||||
/* Update the datatable */
|
/* Update the datatable */
|
||||||
resultsTable = $("#resultsTable").DataTable()
|
resultsTable = $("#resultsTable").DataTable()
|
||||||
resultsTable.rows().every(function(i, tableLoop, rowLoop) {
|
resultsTable.rows().every(function(i, tableLoop, rowLoop) {
|
||||||
var rowData = this.row(i).data()
|
var row = this.row(i)
|
||||||
|
var rowData = row.data()
|
||||||
var rid = rowData[0]
|
var rid = rowData[0]
|
||||||
$.each(campaign.results, function(j, result) {
|
$.each(campaign.results, function(j, result) {
|
||||||
if (result.id == rid) {
|
if (result.id == rid) {
|
||||||
var label = statuses[result.status].label || "label-default";
|
var label = statuses[result.status].label || "label-default";
|
||||||
rowData[6] = "<span class=\"label " + label + "\">" + result.status + "</span>"
|
rowData[6] = "<span class=\"label " + label + "\">" + result.status + "</span>"
|
||||||
resultsTable.row(i).data(rowData).draw()
|
resultsTable.row(i).data(rowData).draw()
|
||||||
|
if (row.child.isShown()) {
|
||||||
|
row.child(renderTimeline(row.data()))
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
/* Update the map information */
|
/* Update the map information */
|
||||||
|
bubbles = []
|
||||||
$.each(campaign.results, function(i, result) {
|
$.each(campaign.results, function(i, result) {
|
||||||
// Check that it wasn't an internal IP
|
// Check that it wasn't an internal IP
|
||||||
if (result.latitude == 0 && result.longitude == 0) {
|
if (result.latitude == 0 && result.longitude == 0) {
|
||||||
|
@ -372,19 +377,20 @@ function load() {
|
||||||
$('#resultsTable tbody').on('click', 'td.details-control', function() {
|
$('#resultsTable tbody').on('click', 'td.details-control', function() {
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
var row = resultsTable.row(tr);
|
var row = resultsTable.row(tr);
|
||||||
|
|
||||||
if (row.child.isShown()) {
|
if (row.child.isShown()) {
|
||||||
// This row is already open - close it
|
// This row is already open - close it
|
||||||
row.child.hide();
|
row.child.hide();
|
||||||
tr.removeClass('shown');
|
tr.removeClass('shown');
|
||||||
$(this).find("i").removeClass("fa-caret-down")
|
$(this).find("i").removeClass("fa-caret-down")
|
||||||
$(this).find("i").addClass("fa-caret-right")
|
$(this).find("i").addClass("fa-caret-right")
|
||||||
|
row.invalidate('dom').draw()
|
||||||
} else {
|
} else {
|
||||||
// Open this row
|
// Open this row
|
||||||
$(this).find("i").removeClass("fa-caret-right")
|
$(this).find("i").removeClass("fa-caret-right")
|
||||||
$(this).find("i").addClass("fa-caret-down")
|
$(this).find("i").addClass("fa-caret-down")
|
||||||
row.child(renderTimeline(row.data())).show();
|
row.child(renderTimeline(row.data())).show();
|
||||||
tr.addClass('shown');
|
tr.addClass('shown');
|
||||||
|
row.invalidate('dom').draw()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Setup the graphs
|
// Setup the graphs
|
||||||
|
|
Loading…
Reference in New Issue