-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Ability to hide extra args from web ui #1881
Conversation
After looking at your code more closely, I think it would be preferable to store the flag on the action itself (instead of in a separate list) Is that possible? |
We probably can. |
One question: is it be possible to hide/unhide an argument after the fact? And maybe we should invert the parameter? (change it to include_in_web_ui, default to True). What do you think? |
Yeah, we can invert the flag, no problem. |
Lets say a library, like locust-plugins, or some shared file that you import in all your locust files adds a parameter that is hidden (or visible) in the web UI, and you want to show it (or hide it). e.g (in your library)
and then in your specific locustfile, it would be nice to be able to override that, by doing something like this:
|
I am not an Maybe something like this ?? def include_in_web_ui(self, arg):
for action in self._actions:
if (vars(action)['option_strings']
and vars(action)['option_strings'][0] == arg) \
or vars(action)['dest'] == arg:
action.include_in_web_ui = True
return
for action in self._action_groups:
vars_action = vars(action)
var_group_actions = vars_action['_group_actions']
for x in var_group_actions:
if x.dest == arg:
x.include_in_web_ui = True
return |
That looks complicated, so lets not bother. it is an acceptable limitation not to be able to modify it. Thanks for the PR! |
Resolves #1876