|
|
|
@ -2,12 +2,17 @@
|
|
|
|
|
/*global define, ajaxify, app, socket, RELATIVE_PATH*/
|
|
|
|
|
|
|
|
|
|
define('forum/admin/general/dashboard', ['semver'], function(semver) {
|
|
|
|
|
var Admin = {};
|
|
|
|
|
var updateIntervalId = 0;
|
|
|
|
|
var Admin = {},
|
|
|
|
|
updateIntervalId = 0,
|
|
|
|
|
isMobile = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Admin.init = function() {
|
|
|
|
|
app.enterRoom('admin');
|
|
|
|
|
socket.emit('meta.rooms.getAll', Admin.updateRoomUsage);
|
|
|
|
|
|
|
|
|
|
isMobile = !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
|
|
|
|
|
|
|
|
if (updateIntervalId) {
|
|
|
|
|
clearInterval(updateIntervalId);
|
|
|
|
|
}
|
|
|
|
@ -195,6 +200,10 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) {
|
|
|
|
|
topicsCtx = topicsCanvas.getContext('2d'),
|
|
|
|
|
trafficLabels = getHoursArray();
|
|
|
|
|
|
|
|
|
|
if (isMobile) {
|
|
|
|
|
Chart.defaults.global.showTooltips = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
labels: trafficLabels,
|
|
|
|
|
datasets: [
|
|
|
|
|