Skip to content

New HTML to split log and command entry to fix issue #804.#835

Open
agadsby wants to merge 7 commits intoSDL-Hercules-390:developfrom
agadsby:patch-1
Open

New HTML to split log and command entry to fix issue #804.#835
agadsby wants to merge 7 commits intoSDL-Hercules-390:developfrom
agadsby:patch-1

Conversation

@agadsby
Copy link
Copy Markdown
Contributor

@agadsby agadsby commented Apr 27, 2026

Uses JavaScript for separate command entry via cmd.html (new frame in hercules.html) and asynchronous pooling syslog viewer using updated JSON API so only changed lines are pulled on each refresh.

Command line recall and log scrolling is supported

Copy link
Copy Markdown
Member

@Fish-Git Fish-Git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to work!  :(

Well, it WORKS, yes, but it doesn't seem to fix the problem as described in GitHub Issue #804!!

Yes, it can refresh the log display to show the new lines, and yes, it rejects an auto-refresh interval of 0 (zero), but all of the buttons and input fields are all at the bottom of the page/screen!

When the number of lines is set to '0' (zero) (in order to display the complete log) and the autor-efresh interval is set to 1 (the new minimal allowed), the log display refreshs so frequently (so quickly!) that you can't reach the buttons and thier input fields at the botton of the page to set a slower refresh rate or shorter/smaller #of log lines!

It's basically the same bug that GitHub Issue #804 described!

I thought you were going to move the buttons and input fields currently at the bottom of the screen/page to the TOP of the page/screen to fix the described problem! Yes? I seem to recall that you actually did do that at one point in the recent past. Yes?

Or was I halllucinating?

@Fish-Git
Copy link
Copy Markdown
Member

Fish-Git commented Apr 30, 2026

@Fish-Git from your description your browser has cached the old pages.

(DOH!) You're probably right. Let me clear my cache and try again...

It works fine now! (Sorry about that! My bad!)

Two questions however before accepting this Pull Request:

  1. Is there a way in HTTP to request that the browser ignore its cache and do a fresh load/re-load/fetch of the file each time? If not, that's fine. I just thought I'd ask. (Yes, doing so would impact performance, but the impact would be negligible IMO)

  2. I noticed the Hercules command line is still at the bottom of the page. Is there any chance of moving it to the top of the page along with everything else? Or is this not really an issue anymore since it's now in a separate frame, and thus, due to the new design, immune to any high refesh rate?

#2 is the only one I'm really interested in having answered before accepting/merging your PR. #1 is just a curiosity. It would really be nice to have if possible for idiots like me who forget to clear their browser cache.

Thanks!

@agadsby
Copy link
Copy Markdown
Contributor Author

agadsby commented Apr 30, 2026

I'm not aware of a way of fixing the cache issue as it's due to the Hercules HTTP server being very simple (brain dead).

On the command line it's trivial. In html/hercules.html swap the cmd and main "frame" lines around and on

rows="95,*,100" swap the * and 100 around to rebalance the rows.

  • the reason I didn't do it is that the output is at the bottom of the main screen , like a 3270, and it felt odd typing at the top. Try swapping those two lines and see what you think?

It's truly trivial to rework any of the layout now- so let's get it right before you accept the PR

@Fish-Git
Copy link
Copy Markdown
Member

Fish-Git commented Apr 30, 2026

  • the reason I didn't do it is that the output is at the bottom of the main screen , like a 3270, and it felt odd typing at the top.

Interesting. I've always preferred having the command line at the top of my 3270 terminals, so a quick Ctrl+Home, while editing the file, would immediately position my cursor to the beginning of the command line.

Is there maybe a simple boolean [x] checkbox toggle we could introduce to make that setting customizable to user preference?

And while I'm on the subject, I'm now wondering if a user's preferences (or previously used values?) could maybe be preserved/saved somewhere? I'm thinking maybe a new http opts(?) configuration file statement to accompany our existing http port and http root statements? But that sounds like something maybe I should probably look into doing myself, not anything for you to do, so forget I even mentioned it.  :)

Oh! One other minor(?) cosmetic thing I forget to ask you about: I like the ability to set Dark/Light mode, but it seems to only affect (apply to) the log display. Shouldn't it affect the entire screen/page? (VERY LOW priority / optional! If it would take too much effort on your part, then forget it!)

Try swapping those two lines and see what you think?

Will give it a go and get back to you.

Thanks for everything you've done so far, Andy! Our HTTP Server screen is looking much better now! THANK YOU!!

@agadsby
Copy link
Copy Markdown
Contributor Author

agadsby commented May 1, 2026

I can easily build in a top/bottom button in the cmd window to allow a user to switch it over. This would also have persistence just like the current theme, refresh and command history - this is held at the browser so the user retains their settings between sessions on that browser.

Give me a couple of days - don't accept this PR as I'll change some of the files.

Back to the caching. A simple fix to httpserve to add an ETAG and handle the headers required would fix that.

I think it's worth doing, otherwise when we switch the UI people may get confused - let me work on this. I'll do a separate PR for this change.

@Fish-Git
Copy link
Copy Markdown
Member

Fish-Git commented May 2, 2026

I'm not aware of a way of fixing the cache issue as it's due to the Hercules HTTP server being very simple (brain dead).

How much effort would it take (and how much complication would it introduce) to make it not so brain dead? If it would take more effort than it's its worth (or make our server HTTP code more complicated and fragile than its worth) then of course forget it.   (KISS, right?)

On the command line it's trivial. In html/hercules.html swap the cmd and main "frame" lines around and on

rows="95,*,100" swap the * and 100 around to rebalance the rows.

Thanks! I just tried it and I like it! But then that's just me too. Others may like it at the bottom like you. So if you can do the top/bottom button thing, great! Otherwise just leave it as is.

Give me a couple of days - don't accept this PR as I'll change some of the files.

10-4.

let me work on this. I'll do a separate PR for this change.

10-4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants