Bug 1652207 - When manipulating firewall rules the UI will spin endlessly when a filter is applied but no rule is selected
Summary: When manipulating firewall rules the UI will spin endlessly when a filter is ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 8.0
Assignee: Martin Pitt
QA Contact: Jan Ščotka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-21 16:45 UTC by Sterling Alexander
Modified: 2019-06-11 19:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-23 11:53:19 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Sterling Alexander 2018-11-21 16:45:04 UTC
Description of problem:  Cockpit webUI will spin endlessly when filtering for a rule and clicking "Add Service" but not selecting a filtered service to add.  This will prevent any firewall rule manipulation via cockpit until the service is restarted vai:

systemctl restart cockpit.service

Even attempting to turn the firewall off/on will not reset the spinning UI


Version-Release number of selected component (if applicable): 8.0 (theOcho) beta


How reproducible: 100% of the time, every time


Steps to Reproduce:
1.  Enable cockpit socket
2.  Log in and open http://localhost:9090/network/firewall
3.  Filter for any firewall rule (steam is a good one.)
4.  Click "Add Service" without selecting a service to add
5.  Watch the UI spin


Actual results:  Firewall rule UI is blocked, spinning.  Unable to modify firewall rules via cockpit without restarting cockpit service


Expected results:  The UI would continue to function if the user clicks without selecting a service to enable.

Comment 1 Sterling Alexander 2018-11-21 16:48:12 UTC
As an addendum, this will occur without anything in the rule filter.  Simply clicking "Add Service" with no services selected will lock out the UI.

Comment 2 Martin Pitt 2018-11-22 13:37:54 UTC
The JS console shows an "Oops": TypeError: services.map is not a function

You don't really need to restart cockpit.service, reloading the  browser page is enough.

I'll work on a fix now, thanks for the report!

Comment 3 Martin Pitt 2018-11-22 14:09:07 UTC
Fix: https://github.com/cockpit-project/cockpit/pull/10642


Note You need to log in before you can comment on or make changes to this bug.