From eae4090944fb922d44899913b6d5cdaa97dc1041 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 2 Aug 2023 16:50:08 +0200 Subject: [statistics] Add button to copy existing rule --- modules-available/statistics/api.inc.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules-available/statistics/api.inc.php') diff --git a/modules-available/statistics/api.inc.php b/modules-available/statistics/api.inc.php index d6549392..6875193d 100644 --- a/modules-available/statistics/api.inc.php +++ b/modules-available/statistics/api.inc.php @@ -193,6 +193,11 @@ if ($type[0] === '~') { // Add anything not present in $new from $old $new += $old; $new['oldlastboot'] = $old['lastboot']; + } else { + // First boot, mock some important fields for event log filtering + $new['oldlastboot'] = 0; + $new['oldlastseen'] = 0; + $new['oldstate'] = 'OFFLINE'; } unset($new['data']); -- cgit v1.2.3-55-g7522