Skip to content

Commit

Permalink
LogTraffic: Add -duration parameter for check specific value (like ti…
Browse files Browse the repository at this point in the history
…meout...)
  • Loading branch information
alagoutte committed Dec 27, 2024
1 parent a01560a commit 9155332
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PowerFGT/Public/log/traffic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ function Get-FGTLogTraffic {
[Parameter (ParameterSetName = "poluuid")]
[string]$poluuid,
[Parameter (Mandatory = $false)]
[Parameter (ParameterSetName = "duration")]
[int]$duration,
[Parameter (Mandatory = $false)]
[ValidateSet('country_id', 'reverse_lookup', IgnoreCase = $false)]
[string[]]$extra,
[Parameter (Mandatory = $false)]
Expand All @@ -100,6 +103,7 @@ function Get-FGTLogTraffic {
[Parameter (ParameterSetName = "action")]
[Parameter (ParameterSetName = "policyid")]
[Parameter (ParameterSetName = "poluuid")]
[Parameter (ParameterSetName = "duration")]
[Parameter (ParameterSetName = "filter")]
[ValidateSet('equal', 'contains')]
[string]$filter_type = "equal",
Expand Down Expand Up @@ -160,6 +164,10 @@ function Get-FGTLogTraffic {
$filter_value = $poluuid
$filter_attribute = "poluuid"
}
"duration" {
$filter_value = [string]$duration
$filter_attribute = "duration"
}
default { }
}

Expand Down

0 comments on commit 9155332

Please sign in to comment.