-
-
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 clipboard support & feature to copy container id #584
base: master
Are you sure you want to change the base?
Conversation
6e8bbcc
to
5846bd3
Compare
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.
Sorry for late review: I'm going to try and chip away at this stuff over time. Couple comments
@@ -28,6 +34,9 @@ func (m *statusManager) removeStatus(name string) { | |||
} | |||
|
|||
func (m *statusManager) addWaitingStatus(name string) { | |||
m.lock.Lock() | |||
defer m.lock.Unlock() | |||
|
|||
m.removeStatus(name) |
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.
Given that removeStatus tries to obtain the lock that addWaitingStatus already holds, wouldn't that cause a deadlock?
return nil | ||
} | ||
|
||
err = gui.WithStaticWaitingStatus(fmt.Sprintf(gui.Tr.CopyContainerIdStatus, utils.TruncateWithEllipsis(ctr.ID, 10)), time.Second*2) |
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.
This isn't really a waiting status: it's a toast message. We should update the naming to reflect that (and I haven't tested it locally but it's important we don't show a loading spinner on this)
Fix #580