The Details struct was split into two, LayerDetails and ImageDetails,
Each of the three views (Layer, LayerDetails, ImageDetails) takes up
a third of the available height of the screen, and they are all now
selectable and scrollable.
Instead of printing out multiple lines for some steps in Layer section,
now its only printing one line while other informations can be found in
Layer details. This change also provides fix for index out of bounds
error when user scrolls through steps in Layer section and there exists
at least one step with multi-line commands.
Instead of printing out multiple lines for some steps in Layer section,
now its only printing one line while other informations can be found in
Layer details. This change also provides fix for index out of bounds
error when user scrolls through steps in Layer section and there exists
at least one step with multi-line commands.
With [a fix][1] in [podman v3.4.3][2], these commands now work as
expected in macOS. Potentially, it might make sense to version check
podman to ensure that the minimum version is met, but I'm not sure
that's needed because it's unlikely that people have an older version
installed _and_ wish to use this tool.
I'm unsure whether the commands work on Windows so I left the
unsupported version there compiling with the negation of the supported
flags.
[1]: https://github.com/containers/podman/issues/12402
[2]: 4ba71f955a/RELEASE_NOTES.md (bugfixes-2)
* Add image name to details view
When frequently opening multiple images perhaps concurrently on multiple
terminals, it would be convenient to have the image name displayed.
This commit adds the image name to the Image Details view.
Image name is trickled down as an additional string argument
design alternatives discarded:
pass in analysis struct - is not related to analysis
pass new struct with image attributes - premature abstraction
* Fix CI lint errors
Co-authored-by: Aviv Shavit <aviv.shavit@aquasec.com>
Fixes the following staticcheck error:
```
##[error]runtime/ui/view/layer.go:304:17: S1039: unnecessary use of fmt.Sprintf (gosimple)
headerStr += fmt.Sprintf("\nLayer")
^
```