2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-05-09 02:00:11 +00:00
Commit Graph

46 Commits

Author SHA1 Message Date
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
Jarrod Johnson 18713797b9 Fix pane splitting with large numbers of nodes
The tcons logic to select layout each iteration is now replicated,
to avoid too-small panes.
2019-01-15 16:00:39 -05:00
Jarrod Johnson 5e15ae8e30 Update nodeconsole man page for tiling 2018-12-04 10:41:50 -05:00
Jarrod Johnson 5eef76f5d3 Try a more straightforward use of tiling
Rather than retiling for every node, defer tiling until the end.
This dramatically improves the startup time for a moderate number
of systems.
2018-12-03 15:57:08 -05:00
Jarrod Johnson a6333459c4 Add tile option to nodeconsole
This allows nodeconsole to produce the 'tcons' behavior without
xCAT dependency.
2018-12-03 15:53:15 -05:00
Jarrod Johnson 05a6664165 Add a noderun command
This command enables running various commands against the nodes.
While I was at it, fix permissions on some files in git.
2016-10-06 16:30:29 -04:00
Jarrod Johnson 0b7b713f3f Add nodeconsole and nodelist commands
nodeconsole provides a wrapper for confetty offering logical
tab completion for console specifically as well as help
text to explain critical info about using nodeconsole.
nodelist provides functionality analagous to nodels in
xCAT 2.x codebase
2015-10-13 14:12:43 -04:00