# Index.html.gz source

**URL:** <https://forums.maslowcnc.com/t/index-html-gz-source/21187>\
**Category:** Software\
**Tags:** github\
**Created:** [May 23, 2024, 6:28pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187 "2024-05-23T18:28:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![iliaden](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@iliaden](https://forums.maslowcnc.com/u/iliaden)\
**Post date:** [May 23, 2024, 6:28pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/1 "2024-05-23T18:28:46Z")

</div>

So I finally started looking at the source code of the webUI with the goal of implementing some of the quality of life features ( adding a bounding box / printing the max X and Y dimensions of the gcode, adding a command to jog the router to the extremeties to validate that the work piece is positioned correctly, etc.

> <https://github.com/BarbourSmith/FluidNC/issues/120>
>
> When cutting something it would be nice to have a preview which shows how big th…e thing that we are cutting is going to end up being. 
> 
> Let's add a bounding box preview which shows the current size of the part to be cut in X and Y making it easy to measure and see if it will fit.
> 
> Inspired by this forums thread: https://forums.maslowcnc.com/t/quality-of-life-improvements-requests/21128

> <https://github.com/BarbourSmith/FluidNC/issues/96>
>
> It would be good to have a "move around bounding box operation" when you set up …a job to check that you are good before running the job.

However, I found the monstrosity called `index.html` : [FluidNC/FluidNC/index.html at Maslow-Main · BarbourSmith/FluidNC · GitHub](https://github.com/BarbourSmith/FluidNC/blob/Maslow-Main/FluidNC/index.html)

As a software engineer, I fully understand feature creep. However, this feels completely unsupportable in the current state.

Is the main concern the total size it takes?  
if so, I would recommend to split out the javascript to proper .js files (so each is nicely formatted and maintainable), and when creating index.html.gz, you can first run it through a javascript  
minifier, and then just take the output and append to index.html before compressing it.

Are there any other considerations I should keep in mind before I attempt to set this up? Or would this work?

---

<div class="post-metadata">

**Author:** ![ronlawrence3](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/ronlawrence3/32/7886_2.png) [@ronlawrence3](https://forums.maslowcnc.com/u/ronlawrence3)\
**Post date:** [May 23, 2024, 6:38pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/2 "2024-05-23T18:38:21Z")

</div>

So that index.html in the fluidnc project is actually a “fallback” ui. The one you want is in [GitHub - BarbourSmith/ESP3D-WEBUI: A Web UI for ESP8266 or ESP32 based boards connected to 3D printers / CNC](https://github.com/BarbourSmith/ESP3D-WEBUI) which has a build process that produces an index.html.gz to use for uploading.

Also, yea, its a constrained environment and also not what I’m used to (plain html/js only, simple bootstrap styles, a bunch more constraints). Feel free to reach out for pointers.

- to build it, `gulp package -en` - output in dist
- to run it without uploading, get python installed (probably a couple pip installs I forget) then run `python fluidnc-web-sim.py maslow.local` and point a browser to localhost:8080 (or whichever port it reports.

no hot-reload or any modern convenience for front end development 🙂  
, just repeat above to test changes.

---

<div class="post-metadata">

**Author:** ![ronlawrence3](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/ronlawrence3/32/7886_2.png) [@ronlawrence3](https://forums.maslowcnc.com/u/ronlawrence3)\
**Post date:** [May 23, 2024, 6:41pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/3 "2024-05-23T18:41:05Z")

</div>

> [@iliaden](#):
>
> if so, I would recommend to split out the javascript to proper .js files (so each is nicely formatted and maintainable), and when creating index.html.gz, you can first run it through a javascript  
> minifier, and then just take the output and append to index.html before compressing it.

This relates to how this environment ESP32 web server behaves with multiple file accesses like browsers like to do. best to (for now) keep it as one index.html.gz and have that be served from the firmware. I am sure more should be possible, but the ESP envornment (server) is NOT robust like we are all used to with proper web servers.

And… the above project does have things broken out a bit better.

---

<div class="post-metadata">

**Author:** ![iliaden](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@iliaden](https://forums.maslowcnc.com/u/iliaden)\
**Post date:** [May 23, 2024, 6:42pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/4 "2024-05-23T18:42:06Z")

</div>

thanks for the pointer!  
Good to know there’s a separate repo where I can actually orient myself and be able to improve it!

---

<div class="post-metadata">

**Author:** ![ronlawrence3](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/ronlawrence3/32/7886_2.png) [@ronlawrence3](https://forums.maslowcnc.com/u/ronlawrence3)\
**Post date:** [May 23, 2024, 6:43pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/5 "2024-05-23T18:43:18Z")

</div>

Yep no worries! @md8n and I have another thread talking about improvements to this. I think we can work toward them, but also I know upstream there is a rewrite going on that I have not dived into yet.

---

<div class="post-metadata">

**Author:** ![iliaden](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@iliaden](https://forums.maslowcnc.com/u/iliaden)\
**Post date:** [May 23, 2024, 6:47pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/6 "2024-05-23T18:47:03Z")

</div>

I’m guessing it’s this thread: [Making `index.html.gz` smaller - #7 by ronlawrence3](https://forums.maslowcnc.com/t/making-index-html-gz-smaller/21147/7)

Also, sorry for the beginner question here: I see that [GitHub - BarbourSmith/ESP3D-WEBUI: A Web UI for ESP8266 or ESP32 based boards connected to 3D printers / CNC](https://github.com/BarbourSmith/ESP3D-WEBUI) is 3+ years old.

1. is there some branch I should select for the most up-to-date maslow?
2. I saw that some of the icons were updated recently, meaning I would expect a repo that was touched in the last 2 weeks…

nvm: found [GitHub - BarbourSmith/ESP3D-WEBUI at Maslow-Main](https://github.com/BarbourSmith/ESP3D-WEBUI/tree/Maslow-Main)

question: are you planning on merging it back to master at some point?

---

<div class="post-metadata">

**Author:** ![ronlawrence3](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/ronlawrence3/32/7886_2.png) [@ronlawrence3](https://forums.maslowcnc.com/u/ronlawrence3)\
**Post date:** [May 23, 2024, 6:53pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/7 "2024-05-23T18:53:10Z")

</div>

> [@iliaden](#):
>
> question: are you planning on merging it back to master at some point?

I was annoyed with that too and will someday just change the default branch on my fork of Bar’s fork 🙂

I don’t imagine we will send any of the maslow stuff up to upstream though, so I’d think we don’t need to care about the other branches? (i.e. feature branch-\>Maslow-Main works?) I then PR to @bar against his Maslow-main

---

<div class="post-metadata">

**Author:** ![bar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bar/32/10_2.png) [@bar](https://forums.maslowcnc.com/u/bar)\
**Post date:** [May 23, 2024, 6:57pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/8 "2024-05-23T18:57:52Z")

</div>

I had dreams of giving back to FluidNC but I don’t know how realistic that is, that’s why we have our own main branch

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [May 23, 2024, 7:43pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/9 "2024-05-23T19:43:40Z")

</div>

Ron Lawrence wrote:

> I don’t imagine we will send any of the maslow stuff up to upstream though, so  
> I’d think we don’t need to care about the other branches? (i.e. feature  
> branch-\>Maslow-Main works?) I then PR to @bar against his Maslow-main

We should, it will make it much easier to maintain in the long run.

It will require us to change some things to meet their standards and decouple  
the hardware support from being maslow specific, but those are good changes  
anyway.

but we need to get people cutting first 🙂

David Lang

---

<div class="post-metadata">

**Author:** ![ronlawrence3](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/ronlawrence3/32/7886_2.png) [@ronlawrence3](https://forums.maslowcnc.com/u/ronlawrence3)\
**Post date:** [May 23, 2024, 8:20pm UTC](https://forums.maslowcnc.com/t/index-html-gz-source/21187/10 "2024-05-23T20:20:04Z")

</div>

> [@dlang](#):
>
> but we need to get people cutting first 🙂

Could not agree more on that! 🙂
