Project

General

Profile

Feature #9911

Show confirmation box before disconnecting PPPoE

Added by Tim Harman 5 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
11/18/2019
Due date:
% Done:

100%

Estimated time:

Description

The Status->Interfaces page (status_interfaces.php) is very useful for showing Interface details.
On systems that utilise PPPoE, a Disconnect box is shown next to the PPPoE up status.

This button, if accidentally pressed, disconnects the PPPoE session instantly. No confirmation is shown.

To my mind, the Status page is just that, showing the status of things. It shouldn't be a section that can act on the state of the system. Therefore I think this button should at least show a "Disconnect PPPoE?" or similar dialog box, before performing the action, in the same way as clicking the Trash Can on the states page (diag_dump_states.php) gives you a "Are you sure you wish to delete this state?" message.

We discovered this today when someone was working on a remote site and, not even intentionally, clicked the button while they were going up to close the browser tab. The result was the site was offline until we were able to get someone there and click the button again to connect it.

Associated revisions

Revision b8b0c2a3 (diff)
Added by Jim Pingle 5 months ago

Change interface disconnect/release button to 'danger'. Fixes #9911

While here, add the interface name to the button text.

Net effect is a confirmation box to ensure the user wants to take that
action, which could be disruptive.

Revision 4193cc18 (diff)
Added by Jim Pingle 5 months ago

Change interface disconnect/release button to 'danger'. Fixes #9911

While here, add the interface name to the button text.

Net effect is a confirmation box to ensure the user wants to take that
action, which could be disruptive.

(cherry picked from commit cca21e50e2f97afe09709249975b3adf331fcf9f)

History

#1 Updated by Jim Pingle 5 months ago

  • Category set to Web Interface
  • Assignee set to Jim Pingle
  • Target version set to 2.5.0

This should be as easy as changing the button from a warning class to a danger class, which automatically gets a JS confirmation popup when used on a button. I'll have a look at it.

#2 Updated by Jim Pingle 5 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by Tim Harman 5 months ago

Unsure if it's appropriate to say "Thanks" in the bugtracker, but thanks!! Especially for such a prompt patch. Appreciate it.

#4 Updated by Jim Pingle 5 months ago

You're welcome! Did you have a chance to test the patch? You should be able to apply commit 4193cc185ef55e2260dae4ff21528f74ad50cde0 against RELENG_2_4_4 using the System Patches package: https://docs.netgate.com/pfsense/en/latest/development/system-patches.html

If you try it and it works, leave feedback here so we can close the issue out.

#5 Updated by Tim Harman 5 months ago

Hi Jim.
I've applied the patch and I'm happy to confirm that yes, it works perfectly!
I like the fact it's now RED and clearly shows it's going to disconnect the WAN interface.
Clicking on it brings up a javascript confirmation box, and does not disconnect it straight away.

I haven't clicked "OK" to confirm it actually disconnects, but I can confirm that "Cancel" doesn't!

Thanks again for the prompt fix.

#6 Updated by Ronald Schellberg 5 months ago

I can confirm this patch works. Nice red button and it requests confirmation of the selection to disconnect.

#7 Updated by Jim Pingle 5 months ago

  • Status changed from Feedback to Resolved

Great, thanks for testing!

#8 Updated by Jim Pingle 4 months ago

  • Target version changed from 2.5.0 to 2.4.5

#9 Updated by Jim Pingle 4 months ago

  • Status changed from Resolved to Feedback

Needs checked and/or tested again on 2.4.5 snapshots

#10 Updated by Jim Pingle 4 months ago

  • Status changed from Feedback to Resolved

Looks good on 2.4.5.a.20191217.0637

Buttons are red and trigger the JS confirmation dialog. Canceling the dialog results in no action being taken by the firewall.

Also available in: Atom PDF