summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics
diff options
context:
space:
mode:
authorSimon Rettberg2023-08-02 16:50:08 +0200
committerSimon Rettberg2023-08-02 16:50:08 +0200
commiteae4090944fb922d44899913b6d5cdaa97dc1041 (patch)
tree7bbb14fdbb3b5229e3b1c08d65b13f2c82435f35 /modules-available/statistics
parent[minilinux] Only create new branch if it contains any versions (diff)
downloadslx-admin-eae4090944fb922d44899913b6d5cdaa97dc1041.tar.gz
slx-admin-eae4090944fb922d44899913b6d5cdaa97dc1041.tar.xz
slx-admin-eae4090944fb922d44899913b6d5cdaa97dc1041.zip
[statistics] Add button to copy existing rule
Diffstat (limited to 'modules-available/statistics')
-rw-r--r--modules-available/statistics/api.inc.php5
1 files changed, 5 insertions, 0 deletions
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']);