Eventlog updates (#9633)

* Eventlog updates
remove host from eventlog table, retain in api
allow most fields nullable

* updated schema

* revert auth for legacy log_event function
safer check in the model

* add function modifiers
This commit is contained in:
Tony Murray
2019-01-10 00:52:00 -06:00
committed by GitHub
parent 98f75bd9ce
commit daffa7e274
12 changed files with 67 additions and 32 deletions

View File

@@ -41,7 +41,7 @@ while ($end == 0) {
$query = "SELECT *,DATE_FORMAT(datetime, '".$config['dateformat']['mysql']['compact']."') as humandate FROM `eventlog` AS E $sql ORDER BY `datetime` DESC LIMIT 20";
foreach (dbFetchRows($query, $param) as $entry) {
$tbl->addRow(array($entry['datetime'], gethostbyid($entry['host']), $entry['message'], $entry['type'], $entry['reference']));
$tbl->addRow(array($entry['datetime'], gethostbyid($entry['device_id']), $entry['message'], $entry['type'], $entry['reference']));
}
echo $tbl->getTable();