mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-27 02:04:30 +03:00
Device paging refresh fix.
This commit is contained in:
parent
7296206aa6
commit
ad22876219
@ -1373,7 +1373,7 @@
|
|||||||
// Fetch list of meshes, nodes, files
|
// Fetch list of meshes, nodes, files
|
||||||
meshserver.send({ action: 'usergroups' });
|
meshserver.send({ action: 'usergroups' });
|
||||||
meshserver.send({ action: 'meshes' });
|
meshserver.send({ action: 'meshes' });
|
||||||
meshserver.send({ action: 'nodes' });
|
meshserver.send({ action: 'nodes', skip: (devicePagingState == null) ? 0 : devicePagingState.skip });
|
||||||
meshserver.send({ action: 'files' });
|
meshserver.send({ action: 'files' });
|
||||||
authCookieRenewTimer = setInterval(function () { meshserver.send({ action: 'authcookie' }); }, 1800000); // Request a cookie refresh every 30 minutes.
|
authCookieRenewTimer = setInterval(function () { meshserver.send({ action: 'authcookie' }); }, 1800000); // Request a cookie refresh every 30 minutes.
|
||||||
}
|
}
|
||||||
@ -1776,7 +1776,7 @@
|
|||||||
updateSelf();
|
updateSelf();
|
||||||
|
|
||||||
// If our list of nodes may have changes, request the new list now.
|
// 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 }); }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1799,7 +1799,7 @@
|
|||||||
|
|
||||||
// Group update, refresh all our device groups and nodes. TODO: Optimize this to only do this when needed.
|
// 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: 'meshes' });
|
||||||
meshserver.send({ action: 'nodes' });
|
meshserver.send({ action: 'nodes', skip: (devicePagingState == null) ? 0 : devicePagingState.skip });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'deleteusergroup': {
|
case 'deleteusergroup': {
|
||||||
@ -1834,7 +1834,7 @@
|
|||||||
// This is a new mesh for us
|
// This is a new mesh for us
|
||||||
if (add) {
|
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, relayid: message.event.relayid };
|
meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links, 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 {
|
} else {
|
||||||
// This is an existing mesh
|
// This is an existing mesh
|
||||||
|
@ -2099,7 +2099,7 @@
|
|||||||
// Fetch list of meshes, nodes, files
|
// Fetch list of meshes, nodes, files
|
||||||
meshserver.send({ action: 'usergroups' });
|
meshserver.send({ action: 'usergroups' });
|
||||||
meshserver.send({ action: 'meshes' });
|
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' });
|
meshserver.send({ action: 'loginTokens' });
|
||||||
if (pluginHandler != null) { meshserver.send({ action: 'plugins' }); }
|
if (pluginHandler != null) { meshserver.send({ action: 'plugins' }); }
|
||||||
if ('{{currentNode}}'.toLowerCase() == '') { meshserver.send({ action: 'files' }); }
|
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 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 (currentNode) { refreshDevice(currentNode._id); }
|
||||||
if (users == null) break;
|
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.
|
// 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: 'meshes' });
|
||||||
meshserver.send({ action: 'nodes' });
|
meshserver.send({ action: 'nodes', skip: (devicePagingState == null) ? 0 : devicePagingState.skip });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'deleteusergroup': {
|
case 'deleteusergroup': {
|
||||||
@ -3181,7 +3181,7 @@
|
|||||||
// This is a new mesh for us
|
// This is a new mesh for us
|
||||||
if (add) {
|
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 };
|
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 {
|
} else {
|
||||||
// This is an existing device group
|
// This is an existing device group
|
||||||
|
Loading…
Reference in New Issue
Block a user