OctoBot icon indicating copy to clipboard operation
OctoBot copied to clipboard

How to Make Changes in Frontend Code/Layout OctoBot

Open mkamranmazhar opened this issue 1 year ago • 11 comments

Hello,

I've successfully running OctoBot with Docker on my server.

I'm looking to make some changes to its frontend layout. However, I'm encountering difficulty understanding where the frontend files are located.

someone please guide me on how to locate the frontend files within the source code?

Thank you.

mkamranmazhar avatar Apr 05 '24 20:04 mkamranmazhar

Hi @mkamranmazhar,

You can find the source code of the OctoBot web interface here https://github.com/Drakkar-Software/OctoBot-Tentacles/tree/master/Services/Interfaces/web_interface.

These files are automatically installed at first startup as modules named "tentacles"

Herklos avatar Apr 05 '24 20:04 Herklos

These files are automatically installed at first startup as modules named "tentacles"

Thank you @Herklos

These files will also be automatically installed if I run this via Docker, right?

mkamranmazhar avatar Apr 05 '24 20:04 mkamranmazhar

Right, you can find them at /octobot/tentacles inside your docker container

Herklos avatar Apr 05 '24 20:04 Herklos

@Herklos,

Please check image files are not available in this folder.

octobot-docker

Thank you.

mkamranmazhar avatar Apr 05 '24 20:04 mkamranmazhar

@Herklos,

Please check image files are not available in this folder.

octobot-docker Thank you.

They are installed at first startup

Herklos avatar Apr 05 '24 20:04 Herklos

They are installed at first startup

I've already done first startup, please check image & files are still not available in this location /octobot/tentacles.

both images attached.

octobot-first-run octobot-docker

Thank you.

mkamranmazhar avatar Apr 06 '24 21:04 mkamranmazhar

The second screenshot contains the files available in the OctoBot docker image. It doesn't represent the files on your computer/server. A docker image once started can create new files and directories.

Herklos avatar Apr 06 '24 22:04 Herklos

@Herklos,

Indeed, you're correct. Once the Docker image is started, files are automatically generated within the Docker container. However, I'm curious about the location of the frontend code files within the Docker container. Obviously, frontend code files are also generated, which is why the frontend is displayed when I start it in the browser.

Thank you.

mkamranmazhar avatar Apr 07 '24 03:04 mkamranmazhar

They are packaged from https://github.com/Drakkar-Software/OctoBot-Tentacles/tree/master/Services/Interfaces/web_interface and then downloaded from our servers when a bot starts.

Herklos avatar Apr 07 '24 08:04 Herklos

Thank you for update, @Herklos

They are packaged before being downloaded from your servers to our server?

And if so, does this mean I need to build the Docker image myself if I want to make changes to the source code?

mkamranmazhar avatar Apr 07 '24 10:04 mkamranmazhar

No you can just mount a volume on /tentacles (like https://github.com/Drakkar-Software/OctoBot/blob/master/Dockerfile#L66) and modify the web interface source files

Herklos avatar Apr 16 '24 12:04 Herklos