mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
@@ -113,7 +113,9 @@ function getServerDeviceData() {
|
||||
"devEvents" => 0,
|
||||
"devDownAlerts" => 0,
|
||||
"devPresenceHours" => 0,
|
||||
"devFQDN" => ""
|
||||
"devFQDN" => "",
|
||||
"devParentRelType" => "default",
|
||||
"devReqNicsOnline" => 0
|
||||
];
|
||||
echo json_encode($deviceData);
|
||||
return;
|
||||
@@ -139,6 +141,19 @@ function getServerDeviceData() {
|
||||
|
||||
$deviceData['devIsRandomMAC'] = isRandomMAC($mac);
|
||||
|
||||
// devChildrenDynamic
|
||||
$sql = 'SELECT rowid, * FROM Devices WHERE devParentMAC = "' . $mac . '"';
|
||||
$result = $db->query($sql);
|
||||
|
||||
$children = [];
|
||||
if ($result) {
|
||||
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
|
||||
$children[] = $row;
|
||||
}
|
||||
}
|
||||
$deviceData['devChildrenDynamic'] = $children;
|
||||
|
||||
|
||||
// Count Totals
|
||||
$condition = ' WHERE eve_MAC="'. $mac .'" AND eve_DateTime >= '. $periodDate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user