mirror of
https://github.com/gophish/gophish
synced 2024-11-14 16:27:23 +00:00
Make Campaign Results Pie Chart Consistent with Dashboard (#1272)
This commit is contained in:
parent
7fd0657a91
commit
3b248d25c7
2 changed files with 10 additions and 8 deletions
2
static/js/dist/app/campaign_results.min.js
vendored
2
static/js/dist/app/campaign_results.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -518,7 +518,7 @@ var renderPieChart = function (chartopts) {
|
|||
pie = chart.series[0],
|
||||
left = chart.plotLeft + pie.center[0],
|
||||
top = chart.plotTop + pie.center[1];
|
||||
this.innerText = rend.text(chartopts['data'][0].y, left, top).
|
||||
this.innerText = rend.text(chartopts['data'][0].count, left, top).
|
||||
attr({
|
||||
'text-anchor': 'middle',
|
||||
'font-size': '24px',
|
||||
|
@ -529,7 +529,7 @@ var renderPieChart = function (chartopts) {
|
|||
},
|
||||
render: function () {
|
||||
this.innerText.attr({
|
||||
text: chartopts['data'][0].y
|
||||
text: chartopts['data'][0].count
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ var renderPieChart = function (chartopts) {
|
|||
if (this.key == undefined) {
|
||||
return false
|
||||
}
|
||||
return '<span style="color:' + this.color + '">\u25CF</span>' + this.point.name + ': <b>' + this.y + '</b><br/>'
|
||||
return '<span style="color:' + this.color + '">\u25CF</span>' + this.point.name + ': <b>' + this.y + '%</b><br/>'
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
|
@ -677,11 +677,12 @@ function poll() {
|
|||
}
|
||||
email_data.push({
|
||||
name: status,
|
||||
y: count
|
||||
y: Math.floor((count / campaign.results.length) * 100),
|
||||
count: count
|
||||
})
|
||||
email_data.push({
|
||||
name: '',
|
||||
y: campaign.results.length - count
|
||||
y: 100 - Math.floor((count / campaign.results.length) * 100)
|
||||
})
|
||||
var chart = $("#" + statusMapping[status] + "_chart").highcharts()
|
||||
chart.series[0].update({
|
||||
|
@ -862,11 +863,12 @@ function load() {
|
|||
}
|
||||
email_data.push({
|
||||
name: status,
|
||||
y: count
|
||||
y: Math.floor((count / campaign.results.length) * 100),
|
||||
count: count
|
||||
})
|
||||
email_data.push({
|
||||
name: '',
|
||||
y: campaign.results.length - count
|
||||
y: 100 - Math.floor((count / campaign.results.length) * 100)
|
||||
})
|
||||
var chart = renderPieChart({
|
||||
elemId: statusMapping[status] + '_chart',
|
||||
|
|
Loading…
Reference in a new issue