mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
committed by
Julian Lam
parent
9856cf282a
commit
c44c689ebf
@@ -29,7 +29,7 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
|
||||
dailyLabels = dailyLabels.slice(-7);
|
||||
|
||||
if (utils.isMobile()) {
|
||||
Chart.defaults.global.showTooltips = false;
|
||||
Chart.defaults.global.tooltips.enabled = false;
|
||||
}
|
||||
|
||||
var data = {
|
||||
@@ -38,12 +38,12 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
|
||||
datasets: [
|
||||
{
|
||||
label: "",
|
||||
fillColor: "rgba(186,139,175,0.2)",
|
||||
strokeColor: "rgba(186,139,175,1)",
|
||||
pointColor: "rgba(186,139,175,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(186,139,175,1)",
|
||||
backgroundColor: "rgba(186,139,175,0.2)",
|
||||
borderColor: "rgba(186,139,175,1)",
|
||||
pointBackgroundColor: "rgba(186,139,175,1)",
|
||||
pointHoverBackgroundColor: "#fff",
|
||||
pointBorderColor: "#fff",
|
||||
pointHoverBorderColor: "rgba(186,139,175,1)",
|
||||
data: ajaxify.data.analytics['not-found']
|
||||
}
|
||||
]
|
||||
@@ -53,12 +53,12 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
|
||||
datasets: [
|
||||
{
|
||||
label: "",
|
||||
fillColor: "rgba(151,187,205,0.2)",
|
||||
strokeColor: "rgba(151,187,205,1)",
|
||||
pointColor: "rgba(151,187,205,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(151,187,205,1)",
|
||||
backgroundColor: "rgba(151,187,205,0.2)",
|
||||
borderColor: "rgba(151,187,205,1)",
|
||||
pointBackgroundColor: "rgba(151,187,205,1)",
|
||||
pointHoverBackgroundColor: "#fff",
|
||||
pointBorderColor: "#fff",
|
||||
pointHoverBorderColor: "rgba(151,187,205,1)",
|
||||
data: ajaxify.data.analytics['toobusy']
|
||||
}
|
||||
]
|
||||
@@ -67,13 +67,41 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
|
||||
|
||||
notFoundCanvas.width = $(notFoundCanvas).parent().width();
|
||||
tooBusyCanvas.width = $(tooBusyCanvas).parent().width();
|
||||
new Chart(notFoundCanvas.getContext('2d')).Line(data['not-found'], {
|
||||
|
||||
new Chart(notFoundCanvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: data['not-found'],
|
||||
options: {
|
||||
responsive: true,
|
||||
animation: false
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
new Chart(tooBusyCanvas.getContext('2d')).Line(data['toobusy'], {
|
||||
|
||||
new Chart(tooBusyCanvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: data['toobusy'],
|
||||
options: {
|
||||
responsive: true,
|
||||
animation: false
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -165,8 +165,7 @@ define('admin/general/dashboard', ['semver', 'Chart'], function(semver, Chart) {
|
||||
trafficLabels = utils.getHoursArray();
|
||||
|
||||
if (isMobile) {
|
||||
Chart.defaults.global.showTooltips = false;
|
||||
Chart.defaults.global.animation = false;
|
||||
Chart.defaults.global.tooltips.enabled = false;
|
||||
}
|
||||
|
||||
var data = {
|
||||
|
||||
Reference in New Issue
Block a user