mirror of https://github.com/gophish/gophish
Merge 78aa421f89
into 9561846979
commit
e282620261
|
@ -666,5 +666,10 @@ func CompleteCampaign(id int64, uid int64) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
|
// Add event
|
||||||
|
err = AddEvent(&Event{Message: "Campaign Completed"}, c.Id)
|
||||||
|
if err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -396,6 +396,7 @@ $(document).ready(function () {
|
||||||
</button></div>"
|
</button></div>"
|
||||||
]
|
]
|
||||||
if (campaign.status == 'Completed') {
|
if (campaign.status == 'Completed') {
|
||||||
|
row.splice(2, 0, moment(campaign.completed_date).format('MMMM Do YYYY, h:mm:ss a'));
|
||||||
rows['archived'].push(row)
|
rows['archived'].push(row)
|
||||||
} else {
|
} else {
|
||||||
rows['active'].push(row)
|
rows['active'].push(row)
|
||||||
|
|
|
@ -303,23 +303,23 @@ $(document).ready(function () {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
className: "color-sent",
|
className: "color-sent",
|
||||||
targets: [2]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
className: "color-opened",
|
|
||||||
targets: [3]
|
targets: [3]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
className: "color-clicked",
|
className: "color-opened",
|
||||||
targets: [4]
|
targets: [4]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
className: "color-success",
|
className: "color-clicked",
|
||||||
targets: [5]
|
targets: [5]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
className: "color-reported",
|
className: "color-success",
|
||||||
targets: [6]
|
targets: [6]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
className: "color-reported",
|
||||||
|
targets: [7]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
order: [
|
order: [
|
||||||
|
@ -329,6 +329,7 @@ $(document).ready(function () {
|
||||||
campaignRows = []
|
campaignRows = []
|
||||||
$.each(campaigns, function (i, campaign) {
|
$.each(campaigns, function (i, campaign) {
|
||||||
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a')
|
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a')
|
||||||
|
var completed_date = () => (campaign.status === "Completed" ? moment(campaign.completed_date).format('MMMM Do YYYY, h:mm:ss a') : '')
|
||||||
var label = statuses[campaign.status].label || "label-default";
|
var label = statuses[campaign.status].label || "label-default";
|
||||||
//section for tooltips on the status of a campaign to show some quick stats
|
//section for tooltips on the status of a campaign to show some quick stats
|
||||||
var launchDate;
|
var launchDate;
|
||||||
|
@ -343,6 +344,7 @@ $(document).ready(function () {
|
||||||
campaignRows.push([
|
campaignRows.push([
|
||||||
escapeHtml(campaign.name),
|
escapeHtml(campaign.name),
|
||||||
campaign_date,
|
campaign_date,
|
||||||
|
completed_date,
|
||||||
campaign.stats.sent,
|
campaign.stats.sent,
|
||||||
campaign.stats.opened,
|
campaign.stats.opened,
|
||||||
campaign.stats.clicked,
|
campaign.stats.clicked,
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-3">Name</th>
|
<th class="col-md-3">Name</th>
|
||||||
<th class="col-md-4">Created Date</th>
|
<th class="col-md-4">Created Date</th>
|
||||||
|
<th class="col-md-4">Completed Date</th>
|
||||||
<th class="col-md-2">Status</th>
|
<th class="col-md-2">Status</th>
|
||||||
<th class="col-md-3 no-sort"></th>
|
<th class="col-md-3 no-sort"></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-2 col-sm-2">Name</th>
|
<th class="col-md-2 col-sm-2">Name</th>
|
||||||
<th class="col-md-2 col-sm-2">Created Date</th>
|
<th class="col-md-2 col-sm-2">Created Date</th>
|
||||||
|
<th class="col-md-2 col-sm-2">Completed Date</th>
|
||||||
<th class="col-md-1 col-sm-1">
|
<th class="col-md-1 col-sm-1">
|
||||||
<i class="fa fa-envelope-o"></i>
|
<i class="fa fa-envelope-o"></i>
|
||||||
</th>
|
</th>
|
||||||
|
|
Loading…
Reference in New Issue