Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on December 09, 2020, 05:26:41 PM
-
franji,
Do you think it would be possible to work up an example file to help me get going with the UserPages feature? I'm but a lowly simpleton and haven't done much web programming. This for me was one feature I was very interested in but don't really know how to get started. Maybe something that showed the status of X0 and Y0?
-
The full plan is to have an instruction that generates pages for the user. We were not able to get that done, but decided to leave the user page access in for any who might be sufficiently skilled as to make use of it.
The pages are probably still too complex to your liking, but you can see what goes into the pages the PLC is generating by viewing the page source. From your browser, right click on the page. Depending on browser, the menu item will be different, but it should be pretty clear which one you want. On anything derived from Chrome (including Brave) it's View Page Source. Inspect opens the developer tools that let you really dig in.
Hopefully in the next release we'll have that instruction.
-
Sea Monkey has a nice simple low level composer and easy to use. My wife can even use it.
-
The pages are probably still too complex to your liking, but you can see what goes into the pages the PLC is generating by viewing the page source. From your browser, right click on the page. Depending on browser, the menu item will be different, but it should be pretty clear which one you want. On anything derived from Chrome (including Brave) it's View Page Source. Inspect opens the developer tools that let you really dig in.
That doesn't really show the "magic", as most of that seems to be preformed server side, so it doesn't show how it's pulling the data into these tables. Just the HTML tables, along with a script that does the refresh interval.
-
The pages are probably still too complex to your liking, but you can see what goes into the pages the PLC is generating by viewing the page source. From your browser, right click on the page. Depending on browser, the menu item will be different, but it should be pretty clear which one you want. On anything derived from Chrome (including Brave) it's View Page Source. Inspect opens the developer tools that let you really dig in.
That doesn't really show the "magic", as most of that seems to be preformed server side, so it doesn't show how it's pulling the data into these tables. Just the HTML tables, along with a script that does the refresh interval.
It's all there. Data comes in via the JavaScript code at the bottom of the page. In many cases it uses the REST API. In few there is some server side magic, but not for things you care about.
-
The pages are probably still too complex to your liking, but you can see what goes into the pages the PLC is generating by viewing the page source. From your browser, right click on the page. Depending on browser, the menu item will be different, but it should be pretty clear which one you want. On anything derived from Chrome (including Brave) it's View Page Source. Inspect opens the developer tools that let you really dig in.
That doesn't really show the "magic", as most of that seems to be preformed server side, so it doesn't show how it's pulling the data into these tables. Just the HTML tables, along with a script that does the refresh interval.
It's all there. Data comes in via the JavaScript code at the bottom of the page. In many cases it uses the REST API. In few there is some server side magic, but not for things you care about.
Doh, wouldn't you know it, it's all there. I first glanced at the SysLog page, and found it underwhelming. But, it does show a fetch("/data/sess"). The other pages have much more to look at.
-
Doh, wouldn't you know it, it's all there. I first glanced at the SysLog page, and found it underwhelming. But, it does show a fetch("/data/sess"). The other pages have much more to look at.
SysLog data isn't in image register memory, so it needs magic. There are one or two other areas where, for efficiency, the server preps the data, but most things use the same API available to you.
Still not easy for amateurs, but doable with effort. The instruction coming later will be the easy button.