Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added verbose parameter to add historical flow info to the response #8484

Merged
merged 6 commits into from
Jul 1, 2024

Conversation

DGabri
Copy link
Contributor

@DGabri DGabri commented Jul 1, 2024

Please sign (check) the below before submitting the Pull Request:

Link to the related issue:

Describe changes:

Added verbose parameter to add historical flow info to the response

@DGabri DGabri requested a review from cardigliano July 1, 2024 08:23
@@ -3,9 +3,12 @@
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/pro/modules/flow_db/?.lua;" .. package.path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add "if ntop.isPro()"

@@ -904,6 +894,47 @@ function flow_alert_store:format_record(value, no_html)
end
end

-- add additional flow related info
if (verbose == "true") then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use "if verbose then" (do not use a string, convert the string to a boolean in the caller)

@@ -69,7 +70,7 @@ if not download then

for _, _value in ipairs(alerts or {}) do
-- tprint(_value)
res[#res + 1] = flow_alert_store:format_record(_value, no_html)
res[#res + 1] = flow_alert_store:format_record(_value, no_html, verbose)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use toboolean(verbose)

@cardigliano cardigliano merged commit 23aa42c into ntop:dev Jul 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants