-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add image to conatiner view. #145
Conversation
Codecov Report
@@ Coverage Diff @@
## master #145 +/- ##
==========================================
- Coverage 26.12% 26.06% -0.07%
==========================================
Files 13 13
Lines 1129 1132 +3
==========================================
Hits 295 295
- Misses 821 824 +3
Partials 13 13
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #145 +/- ##
=========================================
- Coverage 26.12% 26.1% -0.03%
=========================================
Files 13 13
Lines 1129 1130 +1
=========================================
Hits 295 295
- Misses 821 822 +1
Partials 13 13
Continue to review full report at Codecov.
|
pkg/commands/container.go
Outdated
@@ -248,7 +248,11 @@ type ContainerCliStat struct { | |||
|
|||
// GetDisplayStrings returns the dispaly string of Container | |||
func (c *Container) GetDisplayStrings(isFocused bool) []string { | |||
return []string{c.GetDisplayStatus(), c.Name, c.GetDisplayCPUPerc()} | |||
image := c.Container.Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can just do image := strings.TrimPrefix(c.Container.Image, "sha256:")
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally don't mind if the image name is long, given we don't yet have any other columns to the right, and the magenta color means it's not too jarring on the eyes. But if you want to shorten it, I would add an ellipsis (...
) after the 14 characters to communicate to the user that there's more of the image name not being shown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think long name is not very good. But I do think that add an ellipsis after the 14 characters is better than before. I'm going to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I do that, it would be inconsistent with those named containers whose name is very long and with the other colums such as container name.
It may not be that bad to remain the whole name since there's no colums to the right now.
Though, I think it could be adjusted in the future when adding toggle-able expanded side panel view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'll adopt your suggestions that remain the whole name after sha256:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jesseduffield all is done. thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, I left a couple comments :)
Update issue: jesseduffield#144 Co-Authored-By: Jesse Duffield <jessedduffield@gmail.com>
Merged! Thanks for making this :) |
Fix: #144