-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
[Feature] Procedure filters #44
Comments
Thanks for the write up C0unt! It's going to be a great feature and I'm really excited by the possibilities here. I'm not sure how I will include it in the upcoming versions at this point, maybe hesitantly in 1.15. For now I will leave it as an enhancement. 🦎 |
Regex support at the library level will be using the already included regex crate. |
1.16.5 gets most of the way there. It doesn't allow you to match on anything other than the resource name though, and currently doesn't have any preview of which resources are matched. |
Looking good, thanks for the progress on this. I'm not sure about the decision of introducing duplicate actions with batch in name. Kinda crowds the action list imo. |
Thanks for the quick feedback. There is a reason it was done this way, I can try to explain. There is another issue #93 which request to be able to make executions on more than one Stacks / Containers by selecting multiple in the table. This is best accomplished by adding ability to eg Looking at the API for DeployStack, you see it returns a single Update. This is an issue, because a batch call to this API will under the hood call If you call to They all have this return type: BatchExecutionResponse. It is basically With this For The only downside I can see is the crowding of action list. But there is a search feature there, its not too bad when you start typing |
Ok, now that I understand the backend part it makes sense. The search feature does make it easy though, so I guess it's all good. |
At the moment creating a procedure to, for instance, deploy or redeploy all stacks on a server is tedious - you have to specifically add a DeployStack action for each stack on the server. And this is not limited to stacks only, any procedure action with a target resource is the same.
Based on our discussion on Discord, filters could help with this. The idea is to create one action with a filter target which could then filter on any resource property, like name, server, tag, image registry, git provider/account etc. The target dropdown should have a use custom filter option at the top which when pressed shows a query building window. This window should have a list of properties we can filter on for the relevant resource type (based on selected action). Each property to filter on would support exact name matching, simple wildcard search, or advanced regex matching. An example toml for a filter would be any of the three options below:
Once a filter is created and the query window is closed, the target column for the configured row should show the filter query instead of a specific resource name:
![image](https://private-user-images.githubusercontent.com/9478173/360823914-37068d4c-dba6-482d-be26-2d4f43e1224d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODQ1OTAsIm5iZiI6MTczOTU4NDI5MCwicGF0aCI6Ii85NDc4MTczLzM2MDgyMzkxNC0zNzA2OGQ0Yy1kYmE2LTQ4MmQtYmUyNi0yZDRmNDNlMTIyNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMDE1MTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWNjZDBkMzllZmY0MGZhOGU0YTZlYzQ1MWM1MWEyYmMyNDRlNzZiNWVjYWU0ODJkMzY1MmRhMTZkZTQ0MTFmNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.k_uPKagSGx78k9bjzodG2ztqTqEjcLGoVxASOf2EYcg)
Another nice to have feature would also be to show resource names that matched the query when the filter is hovered over, or maybe in the query config window at the bottom or something.
A simple implementation for this would be wildcard matching multiple resources based on one property.
A more advanced implementation could be built from this to support regex as well as matching on multiple properties using logic operators AND, OR, NOT, etc. Something akin to JQL - KQL (Komodo Query Language) maybe? ;)
The text was updated successfully, but these errors were encountered: