mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-08 21:24:53 -05:00
Device paging refresh fix.
This commit is contained in:
@@ -2099,7 +2099,7 @@
|
||||
// Fetch list of meshes, nodes, files
|
||||
meshserver.send({ action: 'usergroups' });
|
||||
meshserver.send({ action: 'meshes' });
|
||||
meshserver.send({ action: 'nodes', id: '{{currentNode}}' });
|
||||
meshserver.send({ action: 'nodes', id: '{{currentNode}}', skip: (devicePagingState == null) ? 0 : devicePagingState.skip });
|
||||
meshserver.send({ action: 'loginTokens' });
|
||||
if (pluginHandler != null) { meshserver.send({ action: 'plugins' }); }
|
||||
if ('{{currentNode}}'.toLowerCase() == '') { meshserver.send({ action: 'files' }); }
|
||||
@@ -3104,7 +3104,7 @@
|
||||
}
|
||||
|
||||
// If our list of nodes may have changes, request the new list now.
|
||||
if (message.event.nodeListChange == userinfo._id) { meshserver.send({ action: 'nodes' }); }
|
||||
if (message.event.nodeListChange == userinfo._id) { meshserver.send({ action: 'nodes', skip: (devicePagingState == null) ? 0 : devicePagingState.skip }); }
|
||||
}
|
||||
if (currentNode) { refreshDevice(currentNode._id); }
|
||||
if (users == null) break;
|
||||
@@ -3146,7 +3146,7 @@
|
||||
|
||||
// Group update, refresh all our device groups and nodes. TODO: Optimize this to only do this when needed.
|
||||
meshserver.send({ action: 'meshes' });
|
||||
meshserver.send({ action: 'nodes' });
|
||||
meshserver.send({ action: 'nodes', skip: (devicePagingState == null) ? 0 : devicePagingState.skip });
|
||||
break;
|
||||
}
|
||||
case 'deleteusergroup': {
|
||||
@@ -3181,7 +3181,7 @@
|
||||
// This is a new mesh for us
|
||||
if (add) {
|
||||
meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links, amt: message.event.amt, invite: message.event.invite, expireDevs: message.event.expireDevs, relayid: message.event.relayid };
|
||||
meshserver.send({ action: 'nodes' }); // Request a refresh of all nodes (TODO: We could optimize this to only request nodes for the new mesh).
|
||||
meshserver.send({ action: 'nodes', skip: (devicePagingState == null) ? 0 : devicePagingState.skip }); // Request a refresh of all nodes (TODO: We could optimize this to only request nodes for the new mesh).
|
||||
}
|
||||
} else {
|
||||
// This is an existing device group
|
||||
|
||||
Reference in New Issue
Block a user