-
Notifications
You must be signed in to change notification settings - Fork 479
Custom test groups feature #1154
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
base: develop
Are you sure you want to change the base?
Conversation
Rebasing.
viyatb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments. I would add some tests for the backend and frontend changes so that we can be sure that these changes don't break the existing functionality.
| if action == "add": | ||
| plugin_data_list = plugin_data.split("&") | ||
| plugin_dict = {} | ||
| for plugin_element in plugin_data_list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this parsing seems weird -- I think urlparsing these parameters into a dictionary or a list would be a cleaner approach.
| plugin_dict = {} | ||
| for plugin_element in plugin_data_list: | ||
| plugin_dict[plugin_element.split("=")[0]] = plugin_element.split("=")[1] | ||
| custom_group_name = plugin_dict['group'].split('%3B')[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| plugin_data = plugin_data.split("=") | ||
| if plugin_data[0] == "group": | ||
| if "%" in plugin_data[1]: | ||
| groups = plugin_data[1].split('%2C') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| if criteria.get("group", None): | ||
| if isinstance(criteria["group"], str): | ||
| query = query.filter(Plugin.group == criteria["group"]) | ||
| plugin_groups_list = Plugin.get_all_plugin_groups(session) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you write some tests for this? this is a critical piece of code which might break functionality
| const requestURL = `${API_BASE_URL}group/add`; | ||
| const options = { | ||
| headers: { | ||
| 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON based POST will be simpler than form encoded parameters to parse here imo
| const requestURL = `${API_BASE_URL}group/delete`; | ||
| const options = { | ||
| headers: { | ||
| 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
Thank you! Working on them. |
A feature to create custom plugin groups from the front end. The user can select plugins and create groups according to their convenience and execute a custom list of plugins
Description
Add groups functionality:
Steps:
Select plugins & click add group

Enter plugin group name

Groups added:
Delete groups functionality:
Motivation and Context
The reason for adding this feature is to make it easy for the user to run specific plugins that they run frequently and need to select them repeatedly. This feature aims to reduce this hassle.
Reviewers
@viyatb @sharmamohit123
Types of changes
Checklist: