Project

General

Profile

Actions

Bug #5742

closed

Diag Tables form issues

Added by Phillip Davis over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Diagnostics
Target version:
Start date:
01/07/2016
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3
Affected Architecture:

Description

1) Select a (not bogons) table that has some data in it and press Show.
Press "Clear Data" in the "Table Data" section.
A popup appears: "You may not delete the last row" - this seems to be because the button id is "deleteall" and some special code does special things with "delete" buttons. Changing the name from "deleteall"to "clearall" everywhere gets rid of that popup.
It asks "Are you sure you wish to Clear Table". Press OK. Nothing happens.

2) Select a bogons table and press Show.
Press Download
The page is redrawn showing the sshlockout table and nothing happens (no bogons donwload).

3) There is a useless Save button right at the bottom of the page. Click it and the page is redrawn showing the sshlockout table.

This seems to be because the bottom part (Clear Table or Download button) is a separate section to the top part where the table name is selected. So the table name 'type' is not being submitted along with the press of the Clear Table or Download button. The middle part of the form has un-bootstrapped code.

How should this be redesigned? Maybe put all the buttons up in the top section and then have the table data at the end, without any buttons below?

Actions #1

Updated by Phillip Davis over 8 years ago

I made PR https://github.com/pfsense/pfsense/pull/2368 to change "deleteall" to "clearall" - that seems any easy, good and harmless thing to do for a start.

Actions #2

Updated by Anonymous over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Anonymous
Actions #3

Updated by Anonymous over 8 years ago

  • Status changed from Assigned to Feedback
  • Assignee changed from Anonymous to Phillip Davis

Page has been re-written to:

  1. Combine the two forms into one so that it submits properly
  2. Auto-submit the form on changing table type (gets rid of "Show" button)
  3. Removed bogus "Save" button
  4. Set save message to 'success' style
  5. Cleaned up the form to occupy less space

Phil - Please take a look and let me know what you think. I think we overlapped work this morning so there might be some PRs to close or change :(

Actions #4

Updated by Anonymous over 8 years ago

  • % Done changed from 0 to 100
Actions #5

Updated by Phillip Davis over 8 years ago

Looks good.
After clearing a table, the GUI redisplays the now-gone entries from the table. The $entries array still contains that data. See https://github.com/pfsense/pfsense/pull/2376

Actions #6

Updated by Anonymous over 8 years ago

  • Status changed from Feedback to Resolved
  • Assignee deleted (Phillip Davis)

Merged that. Thanks Phil.

Actions #7

Updated by Phillip Davis over 8 years ago

One last (I hope) one - https://github.com/pfsense/pfsense/pull/2377 - when the last updated date is unknown, then display a different message, rather than saying "Table last updated on " followed by blank space.

Actions #8

Updated by Phillip Davis over 8 years ago

That has been merged. As far as I can see this is all working fine now. Someone else independent had better give it a test also to see what they can break.

Actions

Also available in: Atom PDF