mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
removed idle added recent tags presence info
This commit is contained in:
@@ -98,10 +98,14 @@
|
|||||||
border-color: #FDB45C;
|
border-color: #FDB45C;
|
||||||
background-color: #FFC870;
|
background-color: #FFC870;
|
||||||
}
|
}
|
||||||
&.idle {
|
&.recent {
|
||||||
border-color: #949FB1;
|
border-color: #949FB1;
|
||||||
background-color: #A8B3C5;
|
background-color: #A8B3C5;
|
||||||
}
|
}
|
||||||
|
&.tags {
|
||||||
|
border-color: #FDB45C;
|
||||||
|
background-color: #8FA633;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,10 +141,8 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
'<div>Connections</div>' +
|
'<div>Connections</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
var idle = data.socketCount - (data.users.categories + data.users.topics + data.users.category);
|
|
||||||
|
|
||||||
updateRegisteredGraph(data.onlineRegisteredCount, data.onlineGuestCount);
|
updateRegisteredGraph(data.onlineRegisteredCount, data.onlineGuestCount);
|
||||||
updatePresenceGraph(data.users.categories, data.users.topics, data.users.category, idle);
|
updatePresenceGraph(data.users);
|
||||||
updateTopicsGraph(data.topics);
|
updateTopicsGraph(data.topics);
|
||||||
|
|
||||||
$('#active-users').html(html);
|
$('#active-users').html(html);
|
||||||
@@ -284,7 +282,13 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
value: 1,
|
value: 1,
|
||||||
color: "#949FB1",
|
color: "#949FB1",
|
||||||
highlight: "#A8B3C5",
|
highlight: "#A8B3C5",
|
||||||
label: "Idle"
|
label: "Recent/Unread"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
color: "#8FA633",
|
||||||
|
highlight: "#3FA7B8",
|
||||||
|
label: "Tags"
|
||||||
}], {
|
}], {
|
||||||
responsive: true
|
responsive: true
|
||||||
});
|
});
|
||||||
@@ -345,11 +349,13 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
graphs.registered.update();
|
graphs.registered.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePresenceGraph(categories, posts, topics, idle) {
|
function updatePresenceGraph(users) {
|
||||||
graphs.presence.segments[0].value = categories;
|
graphs.presence.segments[0].value = users.categories;
|
||||||
graphs.presence.segments[1].value = posts;
|
graphs.presence.segments[1].value = users.topics;
|
||||||
graphs.presence.segments[2].value = topics;
|
graphs.presence.segments[2].value = users.category;
|
||||||
graphs.presence.segments[3].value = idle;
|
graphs.presence.segments[3].value = users.recent;
|
||||||
|
graphs.presence.segments[4].value = users.tags;
|
||||||
|
|
||||||
graphs.presence.update();
|
graphs.presence.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ SocketMeta.rooms.getAll = function(socket, data, callback) {
|
|||||||
socketCount: websockets.getSocketCount(),
|
socketCount: websockets.getSocketCount(),
|
||||||
users: {
|
users: {
|
||||||
categories: roomClients.categories ? roomClients.categories.length : 0,
|
categories: roomClients.categories ? roomClients.categories.length : 0,
|
||||||
|
recent: roomClients.recent_posts ? roomClients.recent_posts.length : 0,
|
||||||
|
tags: roomClients.tags ? roomClients.tags.length : 0,
|
||||||
topics: 0,
|
topics: 0,
|
||||||
category: 0
|
category: 0
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -110,7 +110,8 @@
|
|||||||
<li><div class="on-categories"></div><span>On categories list</span></li>
|
<li><div class="on-categories"></div><span>On categories list</span></li>
|
||||||
<li><div class="reading-posts"></div><span>Reading posts</span></li>
|
<li><div class="reading-posts"></div><span>Reading posts</span></li>
|
||||||
<li><div class="browsing-topics"></div><span>Browsing topics</span></li>
|
<li><div class="browsing-topics"></div><span>Browsing topics</span></li>
|
||||||
<li><div class="idle"></div><span>Idle</span></li>
|
<li><div class="recent"></div><span>Recent / Unread</span></li>
|
||||||
|
<li><div class="tags"></div><span>Tags</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
<canvas id="analytics-presence"></canvas>
|
<canvas id="analytics-presence"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user