Skip to content

Conversation

@libkurisu
Copy link
Contributor

@libkurisu libkurisu commented Jul 5, 2025

Fixes #21393

as I mentioned there I do feel like there could be some more work to make this a bit better. like breaking the additional ports into a collapsible list that you could delete them one by one? (as well as being able to delete them all at once). but I feel this is good enough for now. :P

quick.mp4

@libkurisu libkurisu changed the title adddelete option for additional ports add delete option for additional ports Jul 5, 2025
@martinpitt
Copy link
Member

Hello @libkurisu ! Indeed this is a bit annoying right now. I figure if you have multiple additional ports, it's not much of an use case to delete all of them. I think it would be cleaner to represent each extra port in its own table line. I.e. like a service, but with "Additional port" as service name. Then removing them would also be exactly parallel to services.

Are you interested in working on that?

@martinpitt martinpitt marked this pull request as draft July 11, 2025 08:57
@libkurisu
Copy link
Contributor Author

libkurisu commented Jul 11, 2025

I'd be happy to continue working on this, sounds simple enough as well.

@libkurisu
Copy link
Contributor Author

Now that i've thought about it for a bit I have to ask if it would be good enough to simply list each additional tcp/udp port in it's own row in the public zone, or if it would be preferable for them to have their own separate list on the firewalls page.

@martinpitt
Copy link
Member

@libkurisu Ports and services are structurally very similar. Additional ports are also specific to a zone, so they should have the same format/representation as services. So it's not specific to the "public" zone, and IMHO they also shouldn't have their own table.

@libkurisu
Copy link
Contributor Author

Thanks, I just wanted some additional input before I got started working on it.

@libkurisu
Copy link
Contributor Author

Hello! This is complete but I have not marked as ready for review because I am unsure how to resolve the protection checks.

untitled.mp4

@martinpitt
Copy link
Member

@libkurisu Thanks! This looks good at first sight (perhaps some minor cleanups). Don't worry about the "protection checks" for now -- this is probably just your branch being behind origin/main too much.

The main piece of work now is to adjust the tests, in particular TestFirewall.testFirewallPage and TestFirewall.testAddServices. Do you want to look into this? Then please follow https://github.com/cockpit-project/cockpit/blob/main/HACKING.md#setting-up-development-container and https://github.com/cockpit-project/cockpit/blob/main/test/README.md and of course ask here if you have trouble. If you don't feel like that, I'm also happy to help you with this and drive this to completion.

Cheers!

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.

delete global custom ports

2 participants