mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improvements for automatic device removal, #3089
This commit is contained in:
parent
a9116c2d26
commit
7d25391f78
2 changed files with 19 additions and 8 deletions
10
meshuser.js
10
meshuser.js
|
@ -6248,9 +6248,15 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
if (cmdData.result == '') { cmdData.result = 'No relays.'; }
|
||||
}
|
||||
|
||||
// removeinactivedevices showall|showremoved
|
||||
function serverUserCommandRemoveInactiveDevices(cmdData) {
|
||||
parent.db.removeInactiveDevices();
|
||||
cmdData.result = 'Ok';
|
||||
var arg = cmdData.cmdargs['_'][0];
|
||||
if ((arg == null) && (arg != 'showremoved') && (arg != 'showall')) {
|
||||
cmdData.result = 'Usage: removeinactivedevices [showremoved|showall]';
|
||||
} else {
|
||||
parent.db.removeInactiveDevices((arg == 'showall'), function (msg) { try { ws.send(JSON.stringify({ action: 'serverconsole', value: msg, tag: cmdData.command.tag })); } catch (ex) { } });
|
||||
cmdData.result = 'Ok';
|
||||
}
|
||||
}
|
||||
|
||||
function serverUserCommandAutoBackup(cmdData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue