Skip to content
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 "networks" panel under "volumes" #424

Merged
merged 2 commits into from
Mar 6, 2023
Merged

Add "networks" panel under "volumes" #424

merged 2 commits into from
Mar 6, 2023

Conversation

tony-sol
Copy link
Contributor

@tony-sol tony-sol commented Jan 16, 2023

Just a little improvement with adding "Networks" panel under "Volumes" one

half_mode

normal_mode

@jesseduffield
Copy link
Owner

Thanks for making this! Sorry I've been super busy lately but I'll give this a review when I get the chance

Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for taking so long to review!

This PR is great. All the code looks good: I just have one question

// we're sorting these networks based on whether they have labels defined,
// because those are the ones you typically care about.
// Within that, we also sort them alphabetically
Sort: func(a *commands.Network, b *commands.Network) bool {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we do something similar with another panel, but for networks is it actually true that we care more about labels than names? I suspect not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's exactly like volumes sorting, which fits to networks, i guess.

So, may be should we sort networks by driver at first and then by names?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we just sort by name: I doubt the typical user has many networks configured anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@jesseduffield
Copy link
Owner

Tested locally and it works like a charm.

Looks like you need to regenerate cheatsheets though (using go run scripts/cheatsheet/main.go generate)

@jesseduffield jesseduffield merged commit 966a266 into jesseduffield:master Mar 6, 2023
@jesseduffield
Copy link
Owner

Thanks for making this @tony-sol !

@jessejoe
Copy link

Should we be seeing this in the brew tap? I don't see it currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants