mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-12-03 06:22:28 -05:00
Fixed Intel AMT local network scanning.
This commit is contained in:
@@ -3865,6 +3865,7 @@
|
||||
x += addHtmlValue("IP Range", '<input id=dp1range list=iprangelist style=width:184px value="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value="' + "Scan" + '" onclick=addAmtScanToMeshButton()></input>');
|
||||
}
|
||||
x += '<div id=dp1results style="width:100%;height:200px;background-color:white;border:1px gray solid;overflow-y:scroll"></div>';
|
||||
x += '<input type=hidden id=amtScanMeshId value="' + meshid + '" />';
|
||||
setDialogMode(2, "Scan for Intel® AMT devices", 3, addAmtScanToMeshEx, x, meshid);
|
||||
QE('idx_dlgOkButton', false);
|
||||
QH('dp1results', '<div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>');
|
||||
@@ -3879,7 +3880,7 @@
|
||||
}
|
||||
|
||||
// Called when OK is pressed on the Intel AMT scanning box
|
||||
function addAmtScanToMeshEx(button, meshid) {
|
||||
function addAmtScanToMeshEx(button) {
|
||||
var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0;
|
||||
for (var i=0;i<elements.length;i++) {
|
||||
if (elements[i].checked) {
|
||||
@@ -3887,7 +3888,7 @@
|
||||
var amtinfo = amtScanResults[ipaddr];
|
||||
var name = amtinfo.hostname;
|
||||
if (amtinfo.hosttype == 'host') { name = capitalizeFirstLetter(name.split('.')[0]); }
|
||||
meshserver.send({ action: 'addamtdevice', meshid: meshid, devicename: name, hostname: amtinfo.hostname, amtusername: '', amtpassword: '', amttls: amtinfo.tls });
|
||||
meshserver.send({ action: 'addamtdevice', meshid: Q('amtScanMeshId').value, devicename: name, hostname: amtinfo.hostname, amtusername: '', amtpassword: '', amttls: amtinfo.tls });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user