2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-06-16 08:30:49 +00:00
Commit Graph

74 Commits

Author SHA1 Message Date
Jarrod Johnson e5c550f200 Avoird warning on nodeconsole -tv exit with newer python 2026-06-08 14:30:51 -04:00
Jarrod Johnson a99f3de910 Implement a headless mode
For automation, this can make more sense.
2026-05-12 14:55:45 -04:00
Jarrod Johnson a537a7ba5c Provide automation facility for nodeconsole
Allow nodeconsole to walk console according to a script
2026-05-12 14:55:28 -04:00
Jarrod Johnson 34f8ad221d Fix shift-enter, and fix SS3 handling in general 2026-05-07 09:28:33 -04:00
Jarrod Johnson 1d5c5028cf Significantly rework '-tv' titlebar behavior 2026-05-05 16:25:23 -04:00
Jarrod Johnson 0abe252c24 Implement power commands in nodeconsole -tv 2026-05-05 09:49:35 -04:00
Jarrod Johnson b165977870 Disable 'help' text for now, can't be seen.
Also plant a seed for potential titlebar content add.
2026-05-04 19:54:07 -04:00
Jarrod Johnson 9d474591f9 Make 'titlebars' more prominent 2026-05-04 19:44:05 -04:00
Jarrod Johnson c54eb2919a Have nodeconsole cleanly exit 2026-05-04 18:35:57 -04:00
Jarrod Johnson dc627342e9 Fix handling of special keys
Particularly handle alt-arrows
2026-05-04 13:57:07 -04:00
Jarrod Johnson f911198907 Implement keyboard input and focus changes
Replace input handling with an async, this
permitts screen updates while doing commands.

Implement 'send break' (sysrq) and focus move.

Indicate not-yet-active focus with titlebar color.
2026-05-04 12:20:46 -04:00
Jarrod Johnson e55cf43f7a Begin work to add ctrl-e commands to video nodeconsole 2026-05-03 22:37:58 -04:00
Jarrod Johnson 966cb9a01d Fix streaming video behavior on resize 2026-05-03 13:49:40 -04:00
Jarrod Johnson 98aac78e55 Fix await of vnc client create 2026-05-02 12:41:58 -04:00
Jarrod Johnson b7f6c158ea Switch to homegrown async vnc implementation
The pip ones didn't support tight.

Further, when switching to streaming, they were a bit hiccupy with performance.
2026-05-02 12:37:52 -04:00
Jarrod Johnson 3116416799 First pass at '-v' support 2026-05-02 09:16:35 -04:00
Jarrod Johnson fcb2c3b4f5 Switch to mostly binary image manipulation
This saves a few round trips through base64 and reduce memory footprint.
2026-05-01 15:38:54 -04:00
Jarrod Johnson 14035fce88 Implement fallback for screen geometry
Ideally, we can do TIOCGWINSZ.

Unfortunately, in some cases this breaks, resort to
escape codes.
2026-03-04 16:04:08 -05:00
Jarrod Johnson bab169269c Fix variable mistake in error handling 2025-08-05 08:39:18 -04:00
Jarrod Johnson 61749c3649 Support older Pillow libraries
Some distributions bundle older pillow, and we have
a way to support them.
2025-06-25 13:47:29 -04:00
Jarrod Johnson 45fa229f9f Reduce columns to fit in X tiling
Check if right side of window will fit instead of
left side.
2025-06-11 14:24:25 -04:00
Jarrod Johnson 169fd976ce Compensate for out of sync resize behavior
During the async vnc behavior, a copy of the geometry variables
are used that are out of sync.

Workaround by forcing a resize again after the async tasks conclude.
2025-06-06 10:56:50 -04:00
Jarrod Johnson 6a90e1cc77 Implement a VNC to screenshot
For Proxmox, since no convenient screenshot mechanism is available,
instead do vnc.
2025-05-30 16:26:34 -04:00
Jarrod Johnson 11939c4d57 Preserve aspect ratio if Pillow available
Since we are controlling the scaling, we can manage
things more precisely and get the aspect ratio right.
2025-05-16 09:44:57 -04:00
Jarrod Johnson 8111a13554 Reuse image preprocessing for iterm and kitty
Both can benefit, and lets iterm handling scale the way
we would like to scale it.
2025-05-15 11:00:44 -04:00
Jarrod Johnson ef46b6cabd Take ownership of image scaling
This fixes the imposed border being mangled, and also allows
Konsole to present decent looking scaling since it no longer
has to scale.
2025-05-15 10:00:03 -04:00
Jarrod Johnson 315d1d9b5e Change to common image from text for errors
This allows easier management of rendering of text.

Also add a black and white border to make tiling more delineated.
2025-05-13 15:39:40 -04:00
Jarrod Johnson d382bd5182 Provide cleaner recovery for image decode failure
When doing the kitty support with pillow installed,
recover from a condition, creating a stub 'screenshot' to
reflect the error.
2025-05-13 14:23:38 -04:00
Jarrod Johnson fbea510fc1 Have nodeconsole respond to resize
When doing the screenshot tiling with interval,
sanely handle resizing the terminal.
2025-05-01 12:13:27 -04:00
Tinashe 3b46ccb5b1 make nodeconsole kill more consistent 2025-04-25 16:55:25 -04:00
Jarrod Johnson 0c8799f4dd Favor more utilization of bottom screenshot row
When we have the grid size, cut off any extra columns
so long as it doesn't gain a row.
2025-04-23 12:50:44 -04:00
Jarrod Johnson 977d272c56 Fix untiled nodeconsole screenshot 2025-04-23 09:55:45 -04:00
Jarrod Johnson b5540dd395 Hide cursor during screenshot run 2025-04-23 09:48:54 -04:00
Jarrod Johnson af1659dafd Have nodeconsole exit below screenshots 2025-04-23 09:44:10 -04:00
Jarrod Johnson a69113222f Fix positioning errors in tiled console display
It turns out that specifying height and width explicitly
does not guarantee that the image protocols will actually fill
the specified space. Notably iterm will honor aspect ratio
(which is good), but leave the cursor where the image would
naturally leave it (which is difficult with relative positioning).

Previously, relative positioning was used as a workaround
for the fact that save/restore or any absolute positioning may
be fouled by incurring scroll.

To make cursor save/restore work, we determine the total rows and
print newlines enough to incur scroll and then move cursor back up.
This lets us use save/restore to ignore cursor movement by the image.
2025-04-23 09:34:44 -04:00
Jarrod Johnson 05ffc9da10 Constrain aspect ratio
When parceling out the screen real estate, avoid either the height
or the width from getting way out of proportion.

Better to let screen be unused than abuse it to distort the
aspect ratio too much.
2025-04-22 16:01:26 -04:00
Jarrod Johnson bfdd6a56f6 Add iterm tiling support
Also, block sixel attempts, since that is not implemented.
2025-04-22 10:58:25 -04:00
Jarrod Johnson 94af42031e Provide screenshot tiling with interval support
Only for kitty graphics protocol.

Also, attempt to use pillow to convert, if available.  Kitty itself
needs this, Konsole can work either way.

It currently does not preserve aspect ratio, to do that
we pretty much need to do some work with pillow.

If we specify just the height, then ratio is preserved, but it won't
honor the designed bounding box on wide screenshots. Also
Konsole won't even honor just one scaling factor.

So the better thing would be to determine the aspect ratio, which
needs pillow.
2025-04-22 10:35:14 -04:00
Jarrod Johnson 082a20f776 Add mechanism to refresh screenshot in nodeconsole
For a single node, provide a way to cleanly
redraw a screen to keep an eye on it.
2025-04-17 10:34:11 -04:00
Jarrod Johnson 656dea0929 Add error for failure to get screenshot
Usually this is due to the target not having a license key,
in the case of Lenovo equipment.
2025-04-16 15:34:06 -04:00
Jarrod Johnson e46b4ede6d Implement a CONFLUENT_IMAGE_PROTOCOL env variable
This directs CLI with image output to use a preferred protocol.

This is retroactively applied to stats.

Currently we prefer kitty, as it seems to be the most widely supported.

Though some things only support iterm, so that's an option.

And some only support sixel, but the user has to be the one to
figure out adding pysixel dependency.
2025-04-16 12:50:59 -04:00
Jarrod Johnson e5da8c01a9 Do not attempt to print non-existent data. 2025-04-15 15:51:12 -04:00
Jarrod Johnson 6d1da85991 Implement screenshot via nodeconsole -s
This will grab screenshots from Lenovo systems and
output them to the console, using the kitty image protocol.
2025-04-11 17:13:19 -04:00
Jarrod Johnson 4dc54b92d5 Correct nodeconsole syntaxwarning 2024-08-27 11:35:39 -04:00
tkucherera 89af8661da change timestamp log option from -d to -T 2023-06-12 10:51:29 -04:00
Tinashe 190ec2473b dump log to stfout with timestamps 2023-05-31 17:39:53 -04:00
Jarrod Johnson ec54ecc9cd Fix tiling with different gravity
In some environments, the coordinates may be reported in a
different format.  Handle the different context.
2023-04-28 09:20:31 -04:00
Tinashe a35a7e74c3 tmux session resuse 2023-04-27 15:39:32 -04:00
Tinashe 71a263366d wkill like command fix 2023-04-21 10:22:10 -04:00
Tinashe b2c773bb84 nodeconsole <noderange> kill:added functionality for closing open windowed consoles 2023-02-16 15:54:21 -05:00