This commit is contained in:
Barış Soner Uşaklı
2018-10-24 11:24:37 -04:00
parent 11c2a65b5a
commit 9f36ce3997
4 changed files with 82 additions and 13 deletions

View File

@@ -145,6 +145,9 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress'
var t = translator.Translator.create();
Promise.all([
t.translateKey('admin/general/dashboard:graphs.page-views', []),
t.translateKey('admin/general/dashboard:graphs.page-views-registered', []),
t.translateKey('admin/general/dashboard:graphs.page-views-guest', []),
t.translateKey('admin/general/dashboard:graphs.page-views-bot', []),
t.translateKey('admin/general/dashboard:graphs.unique-visitors', []),
t.translateKey('admin/general/dashboard:graphs.registered-users', []),
t.translateKey('admin/general/dashboard:graphs.anonymous-users', []),
@@ -169,6 +172,36 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress'
},
{
label: translations[1],
backgroundColor: 'rgba(220,110,110,0.2)',
borderColor: 'rgba(220,110,110,1)',
pointBackgroundColor: 'rgba(220,110,110,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(220,220,220,1)',
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
},
{
label: translations[2],
backgroundColor: 'rgba(220,220,220,0.2)',
borderColor: 'rgba(220,220,220,1)',
pointBackgroundColor: 'rgba(220,220,220,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(220,220,220,1)',
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
},
{
label: translations[3],
backgroundColor: 'rgba(220,220,220,0.2)',
borderColor: 'rgba(220,220,220,1)',
pointBackgroundColor: 'rgba(220,220,220,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(220,220,220,1)',
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
},
{
label: translations[4],
backgroundColor: 'rgba(151,187,205,0.2)',
borderColor: 'rgba(151,187,205,1)',
pointBackgroundColor: 'rgba(151,187,205,1)',
@@ -215,7 +248,7 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress'
position: 'right',
scaleLabel: {
display: true,
labelString: translations[1],
labelString: translations[4],
},
}],
},
@@ -415,7 +448,10 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress'
}
graphs.traffic.data.datasets[0].data = data.pageviews;
graphs.traffic.data.datasets[1].data = data.uniqueVisitors;
graphs.traffic.data.datasets[1].data = data.pageviewsRegistered;
graphs.traffic.data.datasets[2].data = data.pageViewsGuest;
graphs.traffic.data.datasets[3].data = data.pageViewsBot;
graphs.traffic.data.datasets[4].data = data.uniqueVisitors;
graphs.traffic.data.labels = graphs.traffic.data.xLabels;
graphs.traffic.update();