Add --default-time-range CLI option#369
Open
kimjune01 wants to merge 1 commit into
Open
Conversation
Implements jasonish#237: Allow default time range to be set on the command line. This is particularly useful for oneshot or training environments where setting the default to "all" avoids manual time range selection. Changes: - Added --default-time-range CLI argument to server command - Wired the argument through to ServerContext.defaults.time_range - The value is exposed via /api/config endpoint to the frontend - Accepts any valid time range format (e.g., "24h", "7d", "all") Example usage: evebox server --default-time-range all evebox server --default-time-range 7d Testing: - Verified CLI help includes the new option - Verified default is null when not specified - Verified custom values ("all", "7d") are correctly set - Verified /api/config endpoint returns the configured default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For oneshot or training environments, it's useful to set a default time range (like "all") without modifying config files. This adds a
--default-time-rangecommand-line option for the server command.What Changed
--default-time-rangeargument to server commanddefaults.time-rangefrom config and apply to contextparse_durationfunction which handles values like '24h', '7d', 'all'This allows operators to override the default time range at startup without config file changes.
Fixes #237