Skip to content
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

fix(ESSNTL-5537): Update RBAC for staleness page + tab conditional #2063

Merged
merged 5 commits into from
Oct 24, 2023

Conversation

adonispuente
Copy link
Contributor

This updates the page to use the new RBAC checks from the mocks : https://miro.com/app/board/uXjVMzdWSVk=/
and also renders the tabs conditionally based on if the user has edge systems or not.
It also updates the tool tip with correct admin permission text

@adonispuente adonispuente requested a review from gkarat October 17, 2023 20:09
@adonispuente adonispuente requested a review from a team as a code owner October 17, 2023 20:09
@adonispuente adonispuente changed the title fix(Staleness): Update RBAC for staleness page + tab conditional #2062 fix(Staleness): Update RBAC for staleness page + tab conditional Oct 17, 2023
@codecov-commenter
Copy link

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/components/InventoryHostStaleness/constants.js 86.00% <100.00%> (+1.06%) ⬆️
src/api/api.js 76.81% <80.00%> (+0.11%) ⬆️
src/routes/InventoryHostStaleness.js 0.00% <0.00%> (ø)
...onents/InventoryHostStaleness/HostStalenessCard.js 61.17% <60.00%> (+17.58%) ⬆️

📢 Thoughts on this report? Let us know!.

@adonispuente
Copy link
Contributor Author

/retest

@adonispuente
Copy link
Contributor Author

/retest

@gkarat gkarat added the enhancement New feature or request label Oct 24, 2023
Copy link
Contributor

@gkarat gkarat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! tested locally with insights-qa and tried to trace if all of the network requests is sent correctly on the first load and also when updating the staleness values (PATCH, GET, etc.).

Can we also have this PR refer to some of the Jira tickets? Also, make sure the commits that will get into master follow commit conventions (otherwise, the commitlint will be swearing at us).

There are ongoing issues with Travis CI at the moment. But running npm run verify:local on my machine for this PR was successful, so we can assume our tests pass.

GENERAL_HOST_STALENESS_READ_PERMISSION,
GENERAL_HOSTS_READ_PERMISSIONS,
];
const REQUIRED_PERMISSIONS = [GENERAL_HOST_STALENESS_READ_PERMISSION];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see "inventory:hosts:read (for all hosts)" as one of the required permissions to render the read-only version of the staleness card. Does it mean that we have to update mocks so that it's up to date with these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the far right of the mocks youre looking at, are the updated mocks.

There is an additional change in the future regarding these permissions (checking the same thing but deleting certain permissions from RBAC and updating this, but that will be on the last PR for M1 after the backend and RBAC PRs are merged).

@adonispuente adonispuente changed the title fix(Staleness): Update RBAC for staleness page + tab conditional fix(ESSNTL-5537): Update RBAC for staleness page + tab conditional Oct 24, 2023
@adonispuente adonispuente merged commit 0996171 into RedHatInsights:master Oct 24, 2023
1 check passed
@gkarat
Copy link
Contributor

gkarat commented Oct 24, 2023

🎉 This PR is included in version 1.54.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

acosferreira pushed a commit to acosferreira/insights-inventory-frontend that referenced this pull request Oct 24, 2023
…edHatInsights#2063)

* fix(ESSNTL-5537): Update RBAC for staleness page + tab conditional RedHatInsights#2062

* fix(ESSNTL-5537): fix test

---------

Co-authored-by: Georgii Karataev <[email protected]>

feat(THEEDGE-3581): view group detail tabs when group has edge devices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants