- Issue created by @tunic
- Assigned to lpeidro
- 🇪🇸Spain lpeidro Madrid
The problem here is caused for a change in the routing architecture of the module during the develop.
Now we are pass the id of the task plugin using the url to build the page:
route name: "xray_audit.task_page" path: "/admin/reports/xray-audit/{group_plugin}/{task_plugin}/{operation}"
But there is not a page for the path: "/admin/reports/xray-audit/{group_plugin}/{task_plugin}", given that all the operation of a task plugin is show in the drop-down in the Group Plugin page.
From my point of view there are two options:
- Replace the way we pass the task plugin id, and not using it as parameter
- Create a new controller to build the page for the route "/admin/reports/xray-audit/{group_plugin}/{task_plugin}"
In the new page we can include more information about the different operations of the plugin and of of course, links to the operation.
Here we are including another click to get the valuable information, so I don not know if at this moment is good increase the complexity.
I
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 6:11pm 29 April 2023 - 🇪🇸Spain lpeidro Madrid
I decided to select the option number 2, "Create a new controller to build the page for the route /admin/reports/xray-audit/{group_plugin}/{task_plugin}/{operation}".
Now the route path looks: "/admin/reports/xray-audit/{group_plugin}/{task_plugin_operation}", where the last parameter is the combination of the task plugin id and the operation. When the controller receives the value of the parameter, explode the value and get the task plugin id and the operation id.
I have taken advantage and I have created a service named "xray_audit.plugin_repository" that contains logic related with the plugin, for example, to instance and plugin, get the url for a plugin, etc. This service should grow with the time with new methods.
I think this is the best option.
- Status changed to RTBC
over 1 year ago 9:21pm 29 April 2023 - 🇪🇸Spain tunic Madrid
I agree on the selected approach. Tested, it works ok, I just added a commit for a typo.
I can't find the option to create the MR :(
- @tunic opened merge request.
- Status changed to Fixed
over 1 year ago 5:17pm 30 April 2023 - 🇪🇸Spain tunic Madrid
Ok, mental note: be logged in Gitlab when you want to create a MR.
Found, created MR, merged, fixed!
Automatically closed - issue fixed for 2 weeks with no activity.