Add cur_ScanMethod & fix Plugins display name in lists

This commit is contained in:
Jokob-sk
2023-09-06 22:03:28 +10:00
parent cd43935656
commit 8676b7ccde
10 changed files with 123 additions and 41 deletions

View File

@@ -506,6 +506,32 @@ function getNameByMacAddress(macAddress) {
return "Unknown"; // Return a default value if MAC address is not found
}
// -----------------------------------------------------------------------------
function initDeviceListAll()
{
$.get('php/server/devices.php?action=getDevicesList&status=all&forceDefaultOrder', function(data) {
rawData = JSON.parse (data)
devicesListAll = rawData["data"].map(item => { return {
"name":item[0],
"type":item[2],
"icon":item[3],
"mac":item[11],
"parentMac":item[14],
"rowid":item[13],
"status":item[10]
}})
setCache('devicesListAll', JSON.stringify(devicesListAll))
});
}
var devicesListAll = []; // this will contain a list off all devices
// -----------------------------------------------------------------------------
function isEmpty(value)
{
@@ -515,6 +541,7 @@ function isEmpty(value)
// initialize
cacheSettings()
cacheStrings()
initDeviceListAll()
console.log("init pialert_common.js")