2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-04-13 12:21:30 +00:00
Commit Graph

56 Commits

Author SHA1 Message Date
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
Tinashe
2e283f3442 nodeconsole: missing imports time and socket 2023-01-30 14:13:44 -05:00
Tinashe
2cc134adeb nodeconsole: allow for passthrough args 2023-01-27 09:30:46 -05:00
Tinashe
23ea53ab55 console geometry 100x31 2023-01-24 11:18:21 -05:00
Tinashe
b965f9b758 nodeconsole windowed and tiled functionality 2023-01-20 16:41:56 -05:00
Andrew Wray
9742a5d81b Merge branch 'master' of https://github.com/lenovo/confluent 2022-11-01 13:30:18 -04:00
Andrew Wray
e20e978e04 Add xterm as default terminal for nodeconsole -w 2022-11-01 13:25:20 -04:00
Andrew Wray
8a3105cd51 Update nodeconsole -w to work in arbitrary terminal programs. 2022-11-01 11:29:41 -04:00
andywray
a25443c81d Update help, check for null env variable 2022-10-15 21:29:56 -04:00
andywray
2c58320f32 Update nodeconsole -w to work with arbitrary terminal types 2022-10-15 21:03:35 -04:00
erderial
8827e7efe8 Changed the Popen to skip the communication
Changed the Popen to skip the communication
added escape method
2022-10-14 18:03:51 +03:00
erderial
dc62fc3f51 changed subprocess .run to Popen
changed subprocess .run to Popen to open separate subprocesses for simultaneous run of console windows.
2022-10-12 22:35:05 +03:00
Jarrod Johnson
28f4571c8e Go for xCAT-neutral terminology 2022-09-29 16:09:46 -04:00
erderial
e180ec0bc8 removed null from the flow 2022-09-29 20:15:55 +03:00
erderial
e09c594ffb Adding wcons functionality for nodeconsole
Adding wcons functionality for nodeconsole for xterm first.
2022-09-29 18:58:06 +03:00
Jarrod Johnson
4b988e0633 Integrate logreader into nodeconsole as a feature 2022-04-08 12:29:45 -04:00
Jarrod Johnson
3429173c27 nodeconsole changes to specifically target tmux
tmux needs more direction to avoid ambiguous results.
2020-03-27 10:57:14 -04:00
Jarrod Johnson
44d6bde3ff Make /usr/bin/env python point to python2
Same as before, more RHEL8 compatibility changes
2019-09-23 11:04:52 -04:00
Jarrod Johnson
09cb6963f0 Add attempt to present status data
tcons made this attempt, also implement this on a best
effort basis.
2019-01-29 16:02:54 -05:00