Fix: batch-actions check terminable workflows length #2148
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.
Description & motivation 💭
When multiple "terminated" workflows are selected, the batch-actions banner should disable the "Terminate" button, but it doesn't.
Screenshots (if applicable) 📸
Before fix:
![image](https://private-user-images.githubusercontent.com/1353218/338100522-dce307eb-3b5e-43ab-be11-f3544d4761d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjIwMjksIm5iZiI6MTczOTQyMTcyOSwicGF0aCI6Ii8xMzUzMjE4LzMzODEwMDUyMi1kY2UzMDdlYi0zYjVlLTQzYWItYmUxMS1mMzU0NGQ0NzYxZDAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDQ0MjA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2QxNjJlMzE3MTEyODUwZWY5NTE1NjYxNmYwMWUxODcwODFlODNmMzU3MjM4ZGRjZTc0YTY2ZWQ1YmY1NzIzNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.qbsxBQcfBUZqydIzDdyfjd8uWtcR-mcpZRU4RiXqmus)
After fix:
![image](https://private-user-images.githubusercontent.com/1353218/338101212-126753ad-dead-4f43-a958-1848a33e9b3a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjIwMjksIm5iZiI6MTczOTQyMTcyOSwicGF0aCI6Ii8xMzUzMjE4LzMzODEwMTIxMi0xMjY3NTNhZC1kZWFkLTRmNDMtYTk1OC0xODQ4YTMzZTliM2EucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDQ0MjA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjcwNTlhYmYyMjNhZTcyZjYzYjczNWM5MjQ0NWQ5NDJiMDI5MWE1YzJjODBjMzI3YTk5ZTdmMDBkZTA0OTJiMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.lLszuM4wkXEdtjG4Qr6HXSI9YUHIwPqCCqwIA-OylPw)
Also verified that it works correctly if there are mix of workflows selected.
![image](https://private-user-images.githubusercontent.com/1353218/338102679-51b8bcd5-cebd-4c4b-b91d-2d7b6283c991.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjIwMjksIm5iZiI6MTczOTQyMTcyOSwicGF0aCI6Ii8xMzUzMjE4LzMzODEwMjY3OS01MWI4YmNkNS1jZWJkLTRjNGItYjkxZC0yZDdiNjI4M2M5OTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDQ0MjA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWVlMTJjMTY0MzRhMDA3OTVlMWE5ODc3ZTE3ZjMxNDAwNDAzZDM1NzI4YmRkNWNiYWZjYzM0NGQyYTU2ZTg2ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.zQexfPT3qHbNUxxgNlmRZz9XtPqnWhivyyUQNCABc9s)
Please ignore the missing "Reset" action in the screenshots above. I'm running against an older version of Temporal server.
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?
No