RedHatInsights / insights-chrome

Chroming for Insights apps
MIT License
26 stars 131 forks source link

Add ip address whitelist UI to manage satellites page for itless #2836

Closed florkbr closed 1 month ago

florkbr commented 5 months ago

Depends on: https://github.com/RedHatInsights/chrome-service-backend/pull/668

Utilizes mbop changes here: https://github.com/RedHatInsights/mbop/pull/105

Adds a simple UI to the manage satellites page to add/remove IP address(es) WRT to our itless environments.

~Marking as draft until I manually try the API requests in this PR via postman on pre-prod env.~ EDIT: verified API requests after deploying

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 14.58333% with 82 lines in your changes are missing coverage. Please review.

Project coverage is 62.47%. Comparing base (3194dee) to head (c040274). Report is 13 commits behind head on master.

:exclamation: Current head c040274 differs from pull request most recent head ca648e6. Consider uploading reports for the commit ca648e6 to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836/graphs/tree.svg?width=650&height=150&src=pr&token=GuRwyW1uUf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights)](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) ```diff @@ Coverage Diff @@ ## master #2836 +/- ## ========================================== - Coverage 63.54% 62.47% -1.07% ========================================== Files 199 202 +3 Lines 4301 4397 +96 Branches 777 783 +6 ========================================== + Hits 2733 2747 +14 - Misses 1559 1641 +82 Partials 9 9 ``` | [Files](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) | Coverage Δ | | |---|---|---| | [src/auth/setCookie.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Fauth%2FsetCookie.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL2F1dGgvc2V0Q29va2llLnRz) | `100.00% <100.00%> (ø)` | | | [src/components/Header/UserToggle.tsx](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Fcomponents%2FHeader%2FUserToggle.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL2NvbXBvbmVudHMvSGVhZGVyL1VzZXJUb2dnbGUudHN4) | `93.93% <ø> (ø)` | | | [src/state/atoms/releaseAtom.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Fstate%2Fatoms%2FreleaseAtom.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL3N0YXRlL2F0b21zL3JlbGVhc2VBdG9tLnRz) | `100.00% <100.00%> (ø)` | | | [src/state/atoms/utils.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Fstate%2Fatoms%2Futils.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL3N0YXRlL2F0b21zL3V0aWxzLnRz) | `100.00% <100.00%> (ø)` | | | [src/state/chromeStore.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Fstate%2FchromeStore.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL3N0YXRlL2Nocm9tZVN0b3JlLnRz) | `100.00% <100.00%> (ø)` | | | [src/components/Header/Tools.tsx](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Fcomponents%2FHeader%2FTools.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL2NvbXBvbmVudHMvSGVhZGVyL1Rvb2xzLnRzeA==) | `63.76% <0.00%> (-0.94%)` | :arrow_down: | | [src/layouts/SatelliteToken.tsx](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Flayouts%2FSatelliteToken.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL2xheW91dHMvU2F0ZWxsaXRlVG9rZW4udHN4) | `5.88% <0.00%> (-0.37%)` | :arrow_down: | | [src/utils/debugFunctions.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Futils%2FdebugFunctions.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL3V0aWxzL2RlYnVnRnVuY3Rpb25zLnRz) | `12.00% <0.00%> (-0.50%)` | :arrow_down: | | [src/components/Satellite/IPWhitelistTable.tsx](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2836?src=pr&el=tree&filepath=src%2Fcomponents%2FSatellite%2FIPWhitelistTable.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL2NvbXBvbmVudHMvU2F0ZWxsaXRlL0lQV2hpdGVsaXN0VGFibGUudHN4) | `1.25% <1.25%> (ø)` | |
Hyperkid123 commented 5 months ago

@florkbr do we want this to be baked into chrome? Can this be its own module?

florkbr commented 5 months ago

@Hyperkid123 I don't think it necessarily needs to be baked into chrome - I just started from where the UI lived today.

Do you have any suggestions or thoughts on where the new module could/should be placed?

Hyperkid123 commented 5 months ago

@florkbr a new module :) Like the widget UI.

florkbr commented 1 month ago

When deploying this in our itless env I'm seeing the same pod crash loop as noted in: https://github.com/RedHatInsights/insights-chrome/pull/2922

Hyperkid123 commented 1 month ago

/retest

florkbr commented 1 month ago

@Hyperkid123 I removed the changes to frontend.yml for now. Let me know if you think this needs anything else! I'll likely still need to follow up with some styling tweaks on the IP whitelist UI itself - but the major flows seems to be working for me.

florkbr commented 1 month ago

The PR build pipeline is still failing due to the CrashLoopBackOff issue mentioned earlier. I've started a thread in our dev-prod channel and will continue investigating on https://github.com/RedHatInsights/insights-chrome/pull/2922