New Input Box on Rules Page?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

New Input Box on Rules Page?

#1 Post by ThomasB » 17 Dec 2019, 20:22

I noticed a new feature on the latest Mega PR (mega-20191208). It's a Input entry box at the bottom of the Rules Editor page. See red arrow in the photo below:

esp_mystery.jpg
esp_mystery.jpg (153.47 KiB) Viewed 4182 times

The entry defaults to zero. But when the rule page is submitted it briefly flashes a numerical value that is slightly smaller than the actual length of the rules file.

I checked the source code and see that it allows changing the rules file length. Curious about it, I played around a bit. If I enter a value that is equal (or less than) the known file length the page submission is successful. If I enter a larger value the page reports Error: Data not saved.

I've been scratching my head trying to find the reason for this entry area. No mention of it in the release notes; Perhaps Gijs (@TD-er) added it for his rules debugging? Or is it a cool new unadvertised feature?

- Thomas

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: New Input Box on Rules Page?

#2 Post by grovkillen » 18 Dec 2019, 03:10

It's for Gijs tests. So no new feature, sorry ;)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: New Input Box on Rules Page?

#3 Post by ThomasB » 18 Dec 2019, 03:19

@grovkillen, Thanks for the info on the mystery box.
- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: New Input Box on Rules Page?

#4 Post by TD-er » 18 Dec 2019, 09:47

It should not be visible.

It is part test, part a "hidden" helper (supposed to be hidden), to have an extra forms parameter to help detect what rules size was submitted.
The problem is that sometimes the rules get truncated, due to a bug in the WebServer library code.
So I added a little JavaScript to give the length of the submitted rules before sending out the submit.
So if you see it update the field you either have lightning fast visual processing powers, or need a faster computer ;)
It was way easier to add a field in the form than to make the JavaScript append some parameter to the POST.

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests