By default it appears “show cli” would indicate that the screen-width is read from the terminal directly. But this is causing some confusion for folks using various clients who’s window is less wide than their client is telling the confd interface. The problem starts when their viewable area is, say, 76 columns, but their client is telling the terminal is it 200 or greater. That causes their view of the confd cli output to go way off to the right, and then they have to scroll around, and this makes the report less easy for some folks to work with.
I realize the user could “screen-width 76” every time they log in, and remember to do so, and that’s presenting a challenge as well.
Is it possible to set a default value for screen-width so that:
1. the default value is not overrridden by the terminal window dimension.
2. If the user chooses to, they can set the set the screen-width to whatever they want,
just like normal.
The very-wide output comes from image-os-motivator: its got a LOT of columns. And this is apparently the only object having this problem.
Is it possible to use tailf:cli-column-width to cause this to wrap at column 76? And if so, can you suggest how to apply it at this level? (I seem to recall I can’t do it at grouping level, but I can do it where the grouping is used).
tailf:cli-column-width will just set the column width for one leaf (column) at a time. See the tailf_yang_cli_extensions(5) man page.
I’m guessing there is a table rendered for a list that contain a lot of leafs (columns) which is the issue here?
Have you considered suppressing that troublesome auto-rendered table using “tailf:cli-suppress-table” with the list?
That way Name-Value rendering will always be used for the list
I’m a bit daunted by this because of the scale of the number of modifications I will have to make to do this in our code base, made worse because of my newness to confd. I kept looking, and then I saw jdemo.yang in cli/climods:
Comparing the above approaches, the latter is more attractive because of its simplicity, while the former would require a significantly bigger coding and testing effort. I prefer the latter, if it is possible to use for my situation.
The underlying problem appears to be that many nested lists are being conflated up onto the same line, rather than wrapped where desired. It can be fixed by manually setting screen-width, but that impacts all the other reports, and we want it to happen for only a specific container, not all containers/tables.
Can the talif:cli-compact-stats/tailf:cli-width help with this? And if not, is the only alternative to make significant custom formatting like in the former example? I hope there is a simpler way.