[bug] Hide empty usage box when RadiusGroup has no checks #819 #845
+36
−29
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.
Checklist
Reference to Existing Issue
Closes #819 .
Description of Changes
Fixed an issue where an empty box was being displayed in the status page when a user's RadiusGroup had no defined checks. For example, when a user belonged to the
power-users
group which doesn't define any usage checks, an empty box would still appear where usage information should be shown.Changes
Modified
client/components/status/status.js
to properly handle cases when the API returns no checks:userChecks
userChecks
to null and disable radius usage display when no checks existBefore this change, even with no checks, the UI would still show an empty box. Now, when a user's RadiusGroup has no checks defined, no empty box will be displayed, providing a cleaner user interface.
Screenshot
@pandafy kindly review this