Project

General

Profile

Actions

Bug #5612

closed

diag_backup.php: Allow more space to display name of config file being restored with Chrome browser

Added by Phillip Davis almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
12/08/2015
Due date:
% Done:

100%

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

Description

Diagnostics->Backup/Restore
The selected config file name for restore is shown to the right of the "Choose File" button. A typical saved config file name is:
config-router01.example.com-20151208133427.xml

For some reason the field is quite short and so you see something like:
config-rout...08133427.xml

Even when the webGUI window is made quite skinny there is plenty of available space.

It would be nice to have this field wider so it can at least show a decent bit of the router name and the date-time string at the end:

config-router01.ex...20151208133427.xml


Files

ElidedConfigName.png (54.5 KB) ElidedConfigName.png Phillip Davis, 12/08/2015 02:08 AM
longfile.jpg (54.2 KB) longfile.jpg Anonymous, 12/10/2015 07:33 AM
Actions #1

Updated by Anonymous almost 9 years ago

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

Updated by Phillip Davis almost 9 years ago

While you are messing with that code, I noticed that the user can click the "Restore Configuration" button before "Choose File" has been done. If that happens, the code goes through the motions of trying to upload a file named "". Of course that fails and there is an error message displayed after a few seconds.
But maybe that sillyness could be short-circuited - disable the "Restore Configuration" and only enable it when "Choose File" has been done?

Actions #3

Updated by Anonymous almost 9 years ago

  • Subject changed from Allow more space to display name of config file being restored to diag_backup.php: Allow more space to display name of config file being restored
Actions #4

Updated by Anonymous almost 9 years ago

  • File longfile.jpg longfile.jpg added
  • Status changed from Assigned to Feedback
  • Assignee changed from Anonymous to Phillip Davis

Perhaps someone got to this before me, but the field seems to accept a very long filename without too much fuss:

I have implemented your suggestion to disable hte button until a file is selected.

Actions #5

Updated by Anonymous almost 9 years ago

  • % Done changed from 0 to 100
Actions #6

Updated by Phillip Davis almost 9 years ago

The Restore Configuration button being disabled is working - good.
The file name thing is different on different browsers:
Firefox - shows the full file name
Chrome - shortened elided file name only

Hmmm - what is going on?
Can you try on Chrome and see what happens?

Actions #7

Updated by Anonymous almost 9 years ago

  • Subject changed from diag_backup.php: Allow more space to display name of config file being restored to diag_backup.php: Allow more space to display name of config file being restored with Chrome browser

I see the issue when using Chrome. Unfortunately, so do a million other people and Googling for "chrome width of file input" is not at all encouraging.

The only "solutions" I see are horrible hacks that hide the file name area by setting its opacity to zero, and then overly a plain text box on top of it. - Yuck.

I will keep a look out for other solutions, but don't see any so far.

Actions #8

Updated by Phillip Davis almost 9 years ago

It's a Chrome "feature". It's not a big deal, so I wouldn't waste time trying to work around it. One day Chrome might fix it?
IMHO this could be closed.

Actions #9

Updated by Anonymous almost 9 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF