Add Tiers improvements for Bucket Lifecycle management #3380
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.
There are places where we only need to list the Tiers' names including: Add Lifecycle Rule, Bulk add LifecycleRule and EditLifeCycleRule for Buckets. However we were using the
listTiers
API which does two extra requests including; getting tier stats and verification (verifies endpoint can perform needed requests).Since we only need the names I've added a new api which does only that.
There were also some issues in the tests for tiersList which I also addressed here.
This makes the requests much faster to give a better user experience.
Changes:
admin/tiers/names
getTiersName
getTiers
(were were not checking the result from the response)getTiers
Test Steps:
With an authenticated users and TIERS configured do a
GET
on:Response comes as:
Test Steps with UI:
For Bulk Lifecycle:
Select Multiple buckets
IconSet Lifecycle
buttonFor Add Bucket Lifecycle:
For Add Bucket Lifecycle:
Screenshots of it working:
Edit:
![Screenshot 2024-06-12 at 12 19 27 PM](https://private-user-images.githubusercontent.com/11819101/339105489-154c8486-1f98-42e3-b1b4-eb8a0edb8710.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNjI2OTEsIm5iZiI6MTcyNDI2MjM5MSwicGF0aCI6Ii8xMTgxOTEwMS8zMzkxMDU0ODktMTU0Yzg0ODYtMWY5OC00MmUzLWIxYjQtZWI4YTBlZGI4NzEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDE3NDYzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzODQyNzY4ZjljOTE1Y2Q0NDEzNDE0NGQxYjc3NmEzMzEyOWM3NGMzYTUwZGZhYjk4NmRkNzk0MzMzZDkzMTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.x4oXdmBbkEcP25AIpZENtzvR351leMquzt7Q3ANMi7M)
![Screenshot 2024-06-12 at 12 19 12 PM](https://private-user-images.githubusercontent.com/11819101/339105499-10a9e606-70c0-4c08-a7a6-681b8229d5ad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNjI2OTEsIm5iZiI6MTcyNDI2MjM5MSwicGF0aCI6Ii8xMTgxOTEwMS8zMzkxMDU0OTktMTBhOWU2MDYtNzBjMC00YzA4LWE3YTYtNjgxYjgyMjlkNWFkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDE3NDYzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyMWRlYWViNDE0YjA4YWE4YWFkMDkyNGFkNWUxYTk2YzU0NWYyZDBkZGY2OWZiNWRkMWE3Y2UwNGYwMGVmMzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.H9djUqLuLnscktwfVySa99aDuSmL33zRjc1ZV-oz7DA)
![Screenshot 2024-06-12 at 12 19 51 PM](https://private-user-images.githubusercontent.com/11819101/339105476-e9dd6d6a-9528-4534-be51-9f1160f0b8e6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNjI2OTEsIm5iZiI6MTcyNDI2MjM5MSwicGF0aCI6Ii8xMTgxOTEwMS8zMzkxMDU0NzYtZTlkZDZkNmEtOTUyOC00NTM0LWJlNTEtOWYxMTYwZjBiOGU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDE3NDYzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM0ODNkMzQ3ZTcwMzYzOWFjZGZlZDkzNzc4YzkxMmNmMjUxNTViNzNlY2MzNTZlNjJkYmFkNjA0YTY1ZGFkNDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.AAI7LywIZXaF3t875eCCCmjAz4ry2tt3qXB0N1YWwa0)
Add:
Bulk: