]> git.proxmox.com Git - pve-firewall.git/commit
api: Add optional parameters `since` and `until` for timestamp filter
authorChristian Ebner <c.ebner@proxmox.com>
Thu, 19 Jan 2023 10:25:04 +0000 (11:25 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 27 Jan 2023 09:49:55 +0000 (10:49 +0100)
commit8bd9b3e4796abfa536aca77fbdfae3dda9eab7a5
treec8a5c743029628a20837ac3ee4c8b8792d9c6ab0
parentc9536959ab906ff7df40c3994bb0022330a6966e
api: Add optional parameters `since` and `until` for timestamp filter

The optional unix epoch timestamps parameters `since` and `until` are introduced
in order to filter firewall logs files. If one of these flags is set, also
rotated logfiles are included. This is handled in the `dump_fw_logfile` helper
function. Filtering is now performed based on a callback function passed to
`dump_fw_logfile`.

This patch depends on the corresponding patch in the pve-common repository.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
[w.bumiller@proxmox.com: fixup 'continue' -> 'next']
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/API2/Firewall/Host.pm
src/PVE/API2/Firewall/VM.pm
src/PVE/Firewall/Helpers.pm