Repository: provectus/kafka-ui
Issue: UI is unusable without internet access even for localhost
Labels: type/bug
scope/frontend
status/accepted
status/confirmed

### Issue submitter TODO list

- [X] I've looked up my issue in [FAQ](https://docs.kafka-ui.provectus.io/faq/common-problems)
- [X] I've searched for an already existing issues [here](https://github.com/provectus/kafka-ui/issues)
- [X] I've tried running `master`-labeled docker image and the issue still persists there
- [x] I'm running a supported version of the application which is listed [here](https://github.com/provectus/kafka-ui/blob/master/SECURITY.md)

### Describe the bug (actual behavior)

1. deploy kafka-ui via docker image
2. disconnect Internet
3. enter into web page
4. web page Empty
<img width="1728" alt="Screenshot 2023-05-25 at 9 02 32 AM" src="https://github.com/provectus/kafka-ui/assets/134577692/4dbf4019-91df-46c1-86c3-e69a489d51b7">


### Expected behavior

web page working fine with Internet connection

<img width="1728" alt="Screenshot 2023-05-25 at 9 04 50 AM" src="https://github.com/provectus/kafka-ui/assets/134577692/a5de8d27-006b-4985-a714-1ee91377fb63">


### Your installation details

[docker-compose.yml.txt](https://github.com/provectus/kafka-ui/files/11561295/docker-compose.yml.txt)
garen node server.properties
[server.properties.txt](https://github.com/provectus/kafka-ui/files/11561312/server.properties.txt)
leesin node server.properties
[server.properties.txt](https://github.com/provectus/kafka-ui/files/11561316/server.properties.txt)
zookeeper.properties
[zookeeper.properties.txt](https://github.com/provectus/kafka-ui/files/11562024/zookeeper.properties.txt)


### Steps to reproduce


    1. deploy kafka-ui with docker-compose
    2. disconnect from Internet
    3. try to access the web page


### Screenshots

_No response_

### Logs

_No response_

### Additional context

_No response_

Issue comments:
Hello there uaeink! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀
@Haarolean Can you help to review it?
I inspect on the browser. And I find that it will try to fetch resources(https://api.github.com/repos/provectus/kafka-ui/releases/latest & https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Roboto+Mono:wght@400;500&display=swap)
@uaeink please share the output from `http://localhost:8080/api/info` endpoint
@Haarolean Sure, the image i am using:  "image: provectuslabs/kafka-ui:master"

<img width="710" alt="Screenshot 2023-05-30 at 5 46 07 PM" src="https://github.com/provectus/kafka-ui/assets/134577692/4865cd26-0996-44c0-abde-2973e2cb9894">


This issue has been automatically marked as stale because no requested feedback has been provided. It will be closed if no further activity occurs. Thank you for your contributions.
@uaeink the actual problem's scope is bigger here: you won't see any clusters available without internet access (even if it's localhost, yes). We'll take a look into this.

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/App.tsx b/kafka-ui-react-app/src/components/App.tsx
index 44409c403ab..f1718e31005 100644
--- a/kafka-ui-react-app/src/components/App.tsx
+++ b/kafka-ui-react-app/src/components/App.tsx
@@ -30,6 +30,7 @@ const queryClient = new QueryClient({
   defaultOptions: {
     queries: {
       suspense: true,
+      networkMode: 'offlineFirst',
       onError(error) {
         showServerError(error as Response);
       },


Test patch: