cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
10.91k stars 1.09k forks source link

Network/Firewall: sort services in zones in alphabetical order #18825

Open paoloteti opened 1 year ago

paoloteti commented 1 year ago

When displaying zones using sudo firewall-cmd --list-all-zones , services are alphabetically sorted. As example:

public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eno1 ens4f0np0
  sources:
  services: cockpit dhcpv6-client docker-registry docker-swarm ssh

Instead firewall page, lists services in the order their have been added. In the same server I see ssh dhcpv6-client cockpit docker-swarm docker-registry on cockpit.

It would be useful and convenient to rearrange the table in alphabetical order.

shubhit7 commented 1 year ago

@paoloteti IMHO instead of rearranging the table in alphabetical order, we can give user an option to sort the table based on his choice. Also, we can give the default sort as alphabetical one as soon as user lands on the page.

paoloteti commented 1 year ago

@shubhit7 I'm not against adding a button to change the order, but I think for any sys-admin alphabetical order is enougth for an easy eyes check and this was the "issue" I had. I'm not a web developer, so I cannot help on this request.

shubhit7 commented 1 year ago

@paoloteti It will not be exactly an explicit button, instead the Services title in the table will become clickable, which can be used to sort. From UX perspective, this is a better approach For e.g If a user wants to look at service starting with letter x, he doesn't need to scroll till bottom, he can directly sort in reverse order and get the details. You can have a look at the FileSystems table in Storage tab.