CloudCredential Model: Fix CC expiry display #13184
Open
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.
Fix CloudCredential expiry date not being displayed if it's more than a week in the future.
In this case, the behavior was the same as if there wasn't an expiry date at all. This was confusing to users.
Fix it by always displaying the expiry date for CloudCredentials if it's set.
Summary
Fixes #13186
Occurred changes and/or fixed issues
Technical notes summary
This fix changes the model such that if an expiration-timestamp is set,
expireData
will always return an object. It will only returnnull
, if there is no expiration-timestamp set at all, which can be the case for CloudCredential objects for infrastructure providers other than Harvester.Areas or cases that should be tested
Cloud Credential List
Case 1)
Cloud Credentials for non-Harvester infrastructure providers should be correctly displayed without an expiration date, if they don't have an expiration date
Case 2)
Cloud Credentials for Harvester should be correctly displayed with their expiration date clearly visible regardless of when the expiration date is
Case 3)
Cloud Credentials for Harvester should be displayed with a info/highlighting if the expiration date is within the next 7 days
Case 4)
Cloud Credentials for Harvester should be displayed with an warning/highlighting if the expiration date is in the past
Areas which could experience regressions
Cloud Credential List
Screenshot/Video
Checklist