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