mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Changed how stript-task will be integrated into MeshCentral, added run button to device general tab.
This commit is contained in:
parent
1b67b84369
commit
44af3a2408
10 changed files with 44 additions and 2550 deletions
|
|
@ -708,7 +708,6 @@ db = require('SimpleDataStore').Shared();
|
|||
sha = require('SHA256Stream');
|
||||
mesh = require('MeshAgent');
|
||||
childProcess = require('child_process');
|
||||
try { scriptTask = require('script-task').CreateScriptTask(mesh); } catch (ex) { }
|
||||
|
||||
if (mesh.hasKVM == 1) { // if the agent is compiled with KVM support
|
||||
// Check if this computer supports a desktop
|
||||
|
|
@ -1556,10 +1555,6 @@ function handleServerCommand(data) {
|
|||
try { require(data.plugin).consoleaction(data, data.rights, data.sessionid, this); } catch (ex) { throw ex; }
|
||||
break;
|
||||
}
|
||||
case 'task': {
|
||||
if (scriptTask) { scriptTask.consoleAction(data, data.rights, data.sessionid, false); }
|
||||
break;
|
||||
}
|
||||
case 'coredump':
|
||||
// Set the current agent coredump situation.s
|
||||
if (data.value === true) {
|
||||
|
|
@ -4565,11 +4560,6 @@ function processConsoleCommand(cmd, args, rights, sessionid) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'task': {
|
||||
if (!scriptTask) { response = "Tasks are not supported on this agent"; }
|
||||
else { response = scriptTask.consoleAction(args, rights, sessionid, true); }
|
||||
break;
|
||||
}
|
||||
case 'plugin': {
|
||||
if (typeof args['_'][0] == 'string') {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue