kafka-ui icon indicating copy to clipboard operation
kafka-ui copied to clipboard

FE: Fix blocked public assets (#1038)

Open Masqueey opened this issue 7 months ago • 3 comments

What changes did you make? Added all remaining assets in the frontend/public folder to the list of objects that can be viewed unauthenticated. Fixes #1038.

Is there anything you'd like reviewers to focus on? I couldn't figure out how to fix the issue with the logout page, but it is so minor that it can also be ignored. If you have suggestions, let me know and I'll include them in the PR.

How Has This Been Tested?

  • [x] No: please help, see below
  • [ ] No need to
  • [ ] Manually (please, describe, if necessary)
  • [ ] Unit checks
  • [ ] Integration checks
  • [ ] Covered by existing automation

Why have you not tested your change? Due to licensing, I can't use docker-desktop but instead use colima. I have tried for the past two hours to get things to work and I can get a build to finish as long as I don't try to build docker images.

I keep getting "Connection refused" when the container tries to connect to localhost. I have ended up on these two seemingly useful comments, but they didn't work for me.

  • https://github.com/abiosoft/colima/discussions/361
  • https://github.com/abiosoft/colima/discussions/565#discussioncomment-7409567

I don't understand Colima or Docker well enough to figure out how to enable the localhost connection. If someone has a way to help me get the environment set up, I'll happily give it a shot and test my own PR.

Otherwise, if you are able to test my PR, please let me know whether it resolved the linked issue. 🙏

Checklist (put an "x" next to all the items, otherwise the build will fail)

  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • [x] My changes generate no new warnings (e.g. Sonar is happy)
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged

A picture of a cute animal (not mandatory but encouraged) image

Masqueey avatar Apr 24 '25 14:04 Masqueey

@Masqueey, thanks for fixing that! I'll also take a look into why these images aren't in the assets directory as they should be.

germanosin avatar Apr 24 '25 17:04 germanosin

@Masqueey, thanks for fixing that! I'll also take a look into why these images aren't in the assets directory as they should be.

@germanosin, while at it, could you please also look at how to run the app with Idea's run configuration with static files built? It's been broken since migrating to gradle.

Haarolean avatar Apr 25 '25 04:04 Haarolean

As German mentioned, these static files should be in assets directory altogether, rather than whitelisting different paths. I'll convert this to a draft while it's being investigated.

Haarolean avatar Apr 25 '25 04:04 Haarolean

@Masqueey, thanks for fixing that! I'll also take a look into why these images aren't in the assets directory as they should be.

@germanosin, while at it, could you please also look at how to run the app with Idea's run configuration with static files built? It's been broken since migrating to gradle.

this one fixed. I'll check statics path soon

germanosin avatar May 29 '25 11:05 germanosin

@Masqueey i fixed this issue in the another PR https://github.com/kafbat/kafka-ui/pull/1109. I think we could close this one

germanosin avatar May 30 '25 09:05 germanosin

Agreed!

Fixed by https://github.com/kafbat/kafka-ui/pull/1109.

Masqueey avatar May 30 '25 12:05 Masqueey