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.
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
- Status changed from New to Assigned
- Assignee set to Anonymous
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?
- 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
- 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.
- % Done changed from 0 to 100
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?
- 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.
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.
- Status changed from Feedback to Closed
Also available in: Atom
PDF