-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Improve IP configuration UI #22320
Improve IP configuration UI #22320
Conversation
If we have multiple addresses, should be use multiple fields (one per address)? Otherwise we will have something like : Address Netmask |
The thing is that addresses are still combined in the API so they can in theory have different masks. I also don't think multiple addresses are a common enough case to bother but I could be wrong. |
The problem is that it adds a lot of complexity in the code for an uncommon use-case. Should we create two method to transform the address format so at least the code is simpler so at least we don't need to For example : const formatAddress = (host: string, netmask: string) => string;
const parseAddress = (fullAddress: string) => { host: string, netmask: string }; |
That's exactly how I started but it turned out these just replace |
And I always need/have the address OR the mask and didn't want to convert both every time. |
Yeah I agree for IPv4 supporting a single IP address if fine, at least for the UI. We could support this through CLI if needs to be. For IPv6 this is more common, but since we use the netmask format for IPv6 that is not a problem there. In IPv6, setting a static IP is rather uncommon in general, so most people should be able to leave the setting in automatic for IPv6. I like that new view! 🤩 As for netmask, what you can do is suggest a netmask. Even though we are in a classless world these days, the classes still remain a common default. So essentially, if an IPv4 of Class A is typed, suggest 255.0.0.0, etc. (see https://en.wikipedia.org/wiki/Classful_network#Classful_addressing_definition). Most people probably type a Class C address. |
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.
Nice ! I like it 🙂 I only submitted small review comments about code style.
Hm, does this commit means that we have a separate mask field for IPv6 with lots of ff? I don't think that is a good idea. Noone is doing IPv6 masks that way, it is just waay to much to write. If we don't want the implicit /, simply use a separate field for the prefix in numeric, that is what all OSes do (e.g. see Windows XP). When it comes to network config dialog, doing what others do is really the right way to go, since that is what folks recognize and understand. |
Proposed change
Split netmask from IP address only on the frontend for presentation.
The netmask on the IP address is confusing for users.
The goal is to make a separate netmask field (
255.255.255.0
format).Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: