mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #2836 from laf/issue-2833
Added eventlog to show when device has been removed
This commit is contained in:
@@ -235,6 +235,7 @@ function delete_device($id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ret .= "Removed device $host\n";
|
$ret .= "Removed device $host\n";
|
||||||
|
log_event("Device $host has been removed", 0, 'system');
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -690,7 +691,7 @@ function log_event($text, $device = NULL, $type = NULL, $reference = NULL) {
|
|||||||
$device = device_by_id_cache($device);
|
$device = device_by_id_cache($device);
|
||||||
}
|
}
|
||||||
|
|
||||||
$insert = array('host' => ($device['device_id'] ? $device['device_id'] : "NULL"),
|
$insert = array('host' => ($device['device_id'] ? $device['device_id'] : 0),
|
||||||
'reference' => ($reference ? $reference : "NULL"),
|
'reference' => ($reference ? $reference : "NULL"),
|
||||||
'type' => ($type ? $type : "NULL"),
|
'type' => ($type ? $type : "NULL"),
|
||||||
'datetime' => array("NOW()"),
|
'datetime' => array("NOW()"),
|
||||||
|
Reference in New Issue
Block a user