Commit Graph

200 Commits

Author SHA1 Message Date
Murtuza Zabuawala
d35433d0b8 Fixed an issue where the query tool unable to load the file which contains the BOM marker. Fixes #3495 2020-04-17 12:40:09 +05:30
Libor M
8254e9f030 Some minor gettext and format fixes. 2020-04-16 12:55:19 +05:30
Libor M
6a9af07f7a Fixed gettext usage:
- fixed gettext usage with .format() only for original text with %s
  - fixed typos
  - fixed translation yes/no buttons in the dialog.
  - improved translating sentences without "connecting" words (eg. see web/pgadmin/dashboard/static/js/dashboard.js,
     word 'cancel' needs to be translated in the Czech language as 'zrušit' but in another sentence as 'zrušení')
  - added gettext for text translations.
2020-04-10 14:52:41 +05:30
Ashesh Vashi
d9f6baac72 Various misc fixes:
- Using the 'gettext' as oppose to '_', which is not defined
- Define missing variables
- Fixed escape character in string with double quote
- Removed some dead code in a test case
- Removed unnecessary self assignment

Includes some fixes for Accessibility improvements
- Use semantic markup to mark emphasized or special text
- Added hidden legend in <fieldset> for better screen reader support
2020-04-08 14:14:25 +05:30
Libor M
94864104e4 Added and fixed gettext usage for better translation coverage. Fixes #5284
1) Fixed usage gettext('') instead of _('') in javascript files.
  2) Fixed usage gettext('') instead of `${gettext('')}` in javascript files,
     because "pybabel extract" not support extracting from this syntax.
2020-03-24 11:14:05 +05:30
Murtuza Zabuawala
c9500a5122 Set proper focus on tab navigation for file manager dialog. Fixes #5107
- Show focus when the Tab key is pressed
 - Pressing the Enter key on C:\ drive does not open it on Windows
2020-02-07 11:13:41 +05:30
Murtuza Zabuawala
989aa462f7 Set proper focus on tab navigation for file manager dialog. Fixes #5107.
Initial patch sent by Ganesh Jaybhay
2020-01-31 11:43:30 +05:30
Simon Wimmesberger
9dccd20bb3 Fix an issue where setting STORAGE_DIR to empty should show all the volumes on Windows in server mode. Fixes #5025. 2020-01-13 13:20:37 +05:30
Aditya Toshniwal
8b99a33e6e 1) Ensure that path file name should not disappear when changing ext from the dropdown in file explorer dialog. Fixes #3812.
2) Fix column resizable issue in the file explorer dialog. Fixes #4827.

Used tablesorter's resizable widget.
2020-01-10 12:53:32 +05:30
Dave Page
01c7636c75 Update copyright notices for 2020. 2020-01-02 14:43:50 +00:00
Aditya Toshniwal
f1a18749f6 1) Allow screen-reader to read relationship attributes for tab, tabpanels and tables under it. Similar changes are done for subnode controls.
2) Add role="img" for font icons.

Fixes #4764
2019-12-17 13:22:36 +05:30
Aditya Toshniwal
8180403f97 1) Added support for custom theme creation and selection. Fixes #4348.
2) Added Dark(Beta) UI Theme option. Fixes #3741.
3) Fix an issue where a black arrow-kind image is displaying at the background of browser tree images. Fixes #4171

Changes include:
  1) New theme option in preferences - Miscellaneous -> Themes. You can select the theme from the dropdown.
     It also has a preview of the theme just below the dropdown. Note that, a page refresh is needed to apply changes.
     On saving, a dialog appears to ask for refresh.
  2) You can create your own theme and submit to hackers. README is updated to help you create a theme. Theme will be available only after the bundle.
  3) Correction of SASS variables at few places and few other CSS corrections.
  4) Added iconfont-webpack-plugin, which will convert all the SVG files(monochrome) used as icons for buttons to font icons.
     This will allow us to change the color of the icon by using CSS color property.
  5) All the .css files will bundle into a separate file now- pgadmin.style.css. This will help reduce the size of
     theme CSS files as CSS in .css files will not change with the change of SASS variables.
2019-11-07 18:51:03 +05:30
Aditya Toshniwal
a7d8b9de8c Ensure that units are respected when sorting by file size in the File dialog. Fixes #4647 2019-11-01 15:00:34 +00:00
Aditya Toshniwal
f16498a8a7 Optimize Webpack to improve overall performance.
Changes include:
1) Remove underscore-string and sprintf-js packages as we were using only %s. Instead, added a function to do the same. Also changed gettext to behave like sprintf directly.
2) backgrid.sizeable.columns was not used anywhere, removed. @babel/polyfill is deprecated, replaced it with core-js.
3) Moved few css to make sure they get minified and bundled.
4) Added Flask-Compress to send static files as compressed gzip. This will reduce network traffic and improve initial load time for pgAdmin.
5) Split few JS files to make code reusable.
6) Lazy load few modules like leaflet, wkx is required only if geometry viewer is opened. snapsvg loaded only when explain plan is executed. This will improve sqleditor initial opening time.

Reviewed By: Khushboo Vashi
Fixes #4701
2019-10-10 12:05:28 +05:30
Aditya Toshniwal
9a69d27009 Fix webpack issue where multiple assets emit to the same file. 2019-09-13 11:08:08 +05:30
Murtuza Zabuawala
08b78fb6a1 Ensure we include the CSRF token when uploading files. Fixes #4350 2019-06-12 13:52:18 +01:00
Khushboo Vashi
6f0eafb223 Fixed CSRF security vulnerability issue. per Alvin Lindstam. Fixes #4217
Initial patch by: Khushboo Vashi
Modified by: Ashesh Vashi and Murtuza Zabuawala
2019-05-28 10:59:51 +05:30
Aditya Toshniwal
036bd66638 Fix file browser path issue which occurs when client is on Windows and server is on Mac/Linux. Fixes #4164 2019-05-03 11:58:06 +05:30
Dave Page
c548eac5ef Append the file suffix to filenames when needed in the File Create dialogue. Fixes #4069 2019-03-14 15:48:21 +00:00
Khushboo Vashi
e4417229aa Update all Python and JS dependencies. Fixes #4019 2019-03-14 15:11:16 +00:00
Akshay Joshi
93234c86b7 Fix alignment of submenu for Internet Explorer. Fixes #3932 2019-02-01 17:55:38 +05:30
Aditya Toshniwal
a9794d8ab4 Ensure that file format combo box value should not retained when hidden files checkbox is toggled. Fixes #3840 2019-01-21 16:22:59 +05:30
Aditya Toshniwal
7ac4e2a9d9 Fixed following issues:
- Process watcher made fixed width with header changes, time details rounded to 2 decimals
 - Query history will show "No query history" if no query fired. Query editor default size increased.
 - Fixed a bug where New folder create button not working when in List mode and No files/folder present.
 - Other minor improvements.
2019-01-16 11:55:08 +05:30
Aditya Toshniwal
d361e604c1 Further style tweaks. 2019-01-07 16:03:54 +05:30
Aditya Toshniwal
e9ba2e036a Further style tweaks. 2019-01-07 14:24:44 +05:30
Aditya Toshniwal
7d765fea04 Further styling fixes. 2019-01-03 14:50:24 +00:00
Murtuza Zabuawala
e23d307c56 Update copyright notices for 2019 2019-01-02 15:54:12 +05:30
Aditya Toshniwal
86ecf9c84e Fixed following:
- Base font size changed from 0.815rem to 0.875rem, for navbar from 0.875rem to 0.925rem.
- Dialog sizes made consistent throughout the application. Now there are 3 size options for width and height each - sm, md, lg. Combination of any of these to be used hereafter
- Alignment fix for controls of Node properties dialogs which includes showing text and label in one line without dialog size change, checkbox alignment, switch control alignment at places and other minor improvements in other dialogs
- Error message design change in dialogs validation
- SQL Editor data grid editor popup design changes which were missed
- Design change for dashboard server activity grid
- Login page language dropdown color fix
- Properties accordion collapse design fix
- Help, Info icon fixed across all dialogs which were not working if clicked exactly on the text
- Added missing icon with buttons at few places
- Shadow behind the dialogs is increased to make it look clearly separated and depth.
- Control Alignment fix in maintenance dialog
- Min height of alertify dialogs set for better UX
- File dialog design fix when no files found
- Grant wizard fixes - Scroll bar visibility on first page, use full space for SQL generated on the last page
- Browser toolbar buttons changed to sync with SQL editor toolbar buttons
- Rounded corners for docker floating dialog (no properties)
- Renaming file in file dialog should show original file name
- SQL data grid text edit popup buttons behaviour was swapped. This is fixed.
- Import/Export dialog changes as per new design.
2019-01-02 15:07:59 +05:30
Ashesh Vashi
5799ac14ba Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2

Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.

- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
  'web' mode
- Improved the look 'n' feel for the key selection in the preferences
  dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes

Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 17:14:55 +05:30
Dave Page
6428ffcdaf Fix a minor CSS issue in the file dialogue's upload panel. 2018-12-04 13:12:02 +00:00
Aditya Toshniwal
091aa62084 Fixed background colour while replacing a file in File Manager dialog. 2018-10-24 17:53:06 +05:30
Aditya Toshniwal
0565f8dd78 Update to use Bootstrap 3 instead of Bootstrap 4. Fixes #3562 2018-10-10 12:43:26 +01:00
Aditya Toshniwal
82c9cca683 Move all CSS into SCSS files for consistency and ease of colour maintenance etc. Fixes #2927 2018-09-04 11:24:51 +01:00
Aditya Toshniwal
3b862bd70b More jQuery 3 updates. 2018-07-10 10:59:53 +01:00
Aditya Toshniwal
41a8333145 Replace deprecated success, error callbacks in $.ajax call with new functions .done and .fail. 2018-07-09 13:54:00 +01:00
Khushboo Vashi
fb1ef9ac0b Properly support backups in Directory format. Fixes #3309 2018-06-29 15:14:37 +01:00
Akshay Joshi
1f5ca1b540 Allow sorting in the file dialogue. Fixes #3273 2018-06-25 14:41:07 +01:00
Dave Page
9821e28da5 Fix file permissions per Devrim 2018-06-19 16:09:49 -04:00
Aditya Toshniwal
9f13865777 Update jQuery to 3.3.1. Fixes #3271
Patch by Aditya, with test enhancements from Anthony and Joao at Pivotal.
2018-05-25 16:26:37 +01:00
Murtuza Zabuawala
be055ce57d Update Python and JS modules. Fixes #3154 2018-04-04 10:47:01 +01:00
Murtuza Zabuawala
9ea118ca57 Ensure the file manager properly escapes file & directory names. Fixes #3196 2018-03-19 10:58:12 +00:00
Murtuza Zabuawala
6f25f4d175 Fix PEP-8 issues in feature_tests, dashboard, about and misc module's python code. Fixes #3082 2018-02-09 12:57:37 +00:00
Ashesh Vashi
c32eb6bd37 Fixed the warnings/errors reported by eslint for all the static
javascripts.
2018-01-12 13:00:14 +05:30
Murtuza Zabuawala
aec86970f2 Add ALT tags to images for accessibility. Fixes #2902 2018-01-08 12:43:36 +00:00
Dave Page
89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Murtuza Zabuawala
eae6f05b7c Allow files to be opened by double clicking on them. Fixes #2810 2017-12-18 09:48:14 +00:00
Murtuza Zabuawala
96a2987ef6 Prevent attempts to select directories as files in the file dialogue. Fixes #2937 2017-12-13 15:35:08 +00:00
Murtuza Zabuawala
22c38e4562 Fix a reference before assignment error in the file dialogue. Fixes #2934 2017-12-06 13:42:05 +09:00
Murtuza Zabuawala
7fab041623 Prevent the user pressing the select button in the file manager when it is supposed to be disabled. Fixes #2923 2017-12-05 13:43:02 +09:00
Harshal Dhumal
9212699936 When selecting an SSL cert or key, update only the expected path in the UI, not all of them. Fixes #2760. Fixes #2867 2017-11-21 15:59:44 +00:00
Murtuza Zabuawala
f855ed88ce Allow selection of SSL certificates and pgpass files in connection properties. Fixes #2649. Fixes #2650 2017-09-28 10:02:33 +01:00
Atul Sharma
788f7f3a69 Bundle fonts with pgAdmin so we have a standard set for all platforms.
Research by Shirley at Pivotal.
2017-09-13 16:01:14 +01:00
Akshay Joshi
e506fa1dbe Improved alertify notification logic. Remove AlertifyWrapper class and extend notification methods in alertify itself. 2017-07-31 18:59:44 +05:30
Surinder Kumar
6d5417709c Moved the javascripts of different modules from 'templates' to 'static' directory.
Moving the javascripts for the following modules:
 - About
 - Browser nodes
 - Dashboard
 - FileManager
 - Vendor/snap.svg
 - Preferences
 - Settings
 - Backup
 - Datagrid
 - Debugger
 - Sqleditor
 - Grant Wizard
 - Import & Export
 - Maintenance
 - Restore and
 - User Management
2017-07-27 17:25:08 +05:30
Harshal Dhumal
831c614a60 Store the file dialog view on toggle. 2017-07-26 14:35:43 +01:00
Harshal Dhumal
97cd74a373 Default the file browser view to list, and make it configurable. Fixes #2579 2017-07-26 13:09:52 +01:00
Surinder Kumar
ae3acbdbbc Fix webpacking of loading icon. 2017-07-20 13:38:16 +01:00
Surinder Kumar
4a91bcde30 Webpack all the things! Fixes #2135
This significantly speeds up loading of the application; in an average of 3 tests, v1.6
loaded in 11.5s in the runtime on a Mac, whilst the webpacked version of the code
loaded in 5.53s.
2017-07-18 15:13:17 +01:00
Harshal Dhumal
8bbcf0ab36 Fix handline of large file uploads and properly show any errors that may occur. Fixes #2153 2017-07-17 10:51:26 +01:00
Murtuza Zabuawala
6d3d2cd458 Handle un-mounted drives correctly on Windows. Fixes #1999 2017-07-10 14:04:57 +01:00
Joao Pedro De Almeida Pereira
2a30a86e7d Update alertify alerts to use the styling defined in the styleguide. 2017-06-30 10:21:05 +01:00
Akshay Joshi
794b70daea Fixed issue of opening file manager dialog from Query Tool. 2017-06-13 15:48:12 +05:30
Surinder Kumar
af43ccfc07 Teach dialogues about Escape to cancel, Enter to Save/OK, and F1 for help. Fixes #1535 2017-06-12 16:43:29 +01:00
Ashesh Vashi
ae80976689 Using the client-side translation using the client-side 'gettext'
implementation.

This is the first step towards 'Avoid creating the javascript modules
using Jinja templates'.
2017-06-07 15:53:05 +05:30
Murtuza Zabuawala
13f4432bbd Support loading files with Unicode BOMs. Fixes #2369 2017-05-09 12:06:49 +01:00
Murtuza Zabuawala
928c0d3de8 startsWith() function of java script is not supported in IE, instead use startsWith() function of underscore string. Fixes #2347 2017-04-25 12:00:15 +05:30
Jonas Thelemann
b8566a0127 Un-split some strings for translateability. And so begins the battle between gettext and pep8... 2017-04-05 15:05:11 +01:00
Murtuza Zabuawala
6d6a3753ee Fix the path to the busy indicator for the treeview which changed when the aciTree module was moved. 2017-03-06 10:36:07 +00:00
Sarah McAlear
a0a31e55ae Move 3rd party client code into vendor/ directories for ease of maintenance. 2017-02-24 17:01:21 +00:00
Murtuza Zabuawala
9ad1316990 Various encoding fixes. Fixes #2160 2017-02-16 11:00:40 +00:00
Neel Patel
c17e201a92 Handle saved directories that no longer exist gracefully. Fixes #2110 2017-02-03 15:19:21 +01:00
Harshal Dhumal
4ef26a528b Allow direct navigation (i.e. typing of paths) in the file manager. Fixes #1911 2017-02-03 10:51:36 +01:00
Neel Patel
8d71e888b4 Remember the last used directory in the file manager. Fixes #1910 2017-01-08 15:27:59 +05:30
Dave Page
f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Ashesh Vashi
dbff4f7977 Minor Python 3/encoding fix in the file manager. 2016-12-12 09:49:00 +00:00
Surinder Kumar
a64824a851 Fix various encoding issues with multibyte paths and filenames.
Fixes #1986. Fixes #1940.
2016-12-05 13:10:56 +09:00
Surinder Kumar
1e66119ef5 Ensure the File Manager honours the file type while traversing the directories. Fixes #1858
When a File Manager is closed by clicking cancel button. Its dom element not destroyed.. So on traversing into directories, when it tries to get currently selected file type, it looks into the dom element but it gets dom of previous dialogs not of currently dialog.

Now whenever an instance of File Manager is closed. its dom elements are also destroyed.
2016-10-21 14:26:12 +01:00
Surinder Kumar
d806a9ce9e Fix the file manager when used under Python 3. Fixes #1872
Issues fixed:

1) In Python 3, parameter "cmp" is removed from sorted method. So File Manager won't open.
As we are sorting data on JS side using Natural sort, so on server side sorting is not required.

2) Improvement in Exception handling.
2016-10-21 12:43:02 +01:00
Surinder Kumar
df09f02e80 List files/folders alphabetically, and don't excessively truncate their names. Fixes #1792 2016-10-18 11:39:12 +01:00
Surinder Kumar
3963272523 Don't show Upload File icon unless it is in capabilities list [Storage Manager]. Fixes #1739
Issue:
When clicked on upload icon while saving a file prompt user to leave page. It is because the icon is a button and its type is set to submit which makes it to prompt, instead it should be 'button'

Storage Manager's menu items depends on capabilities list set by the module using it. If capabilities doesn't have 'upload' in it, It won't work. Upload button is bound to click event only when it is in capabilities.

Solution:
As upload button is being added only when it is in capabilities, so upload button html is removed from html file. It will not shown on UI untill it is in capabilities list.
2016-10-07 12:31:38 +01:00
Surinder Kumar
3dace5ff22 Fix file navigator to properly show drives in Windows. Fixes #1665 2016-09-05 17:07:07 +01:00
Dave Page
6701bb191d String fix. 2016-08-17 15:10:33 +01:00
Surinder Kumar
a43f053a10 Fix file upload in File Manager in pgAdmin4 Runtime. Fixes #1397 2016-08-04 16:34:30 +01:00
Dave Page
60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Surinder Kumar
1a129cf30e File management dialogue enhancements:
- Double click on file/folder icon or name will navigate to the folder/file.
- Selected file/folder can be renamed by Rename button only. Double click rename is removed.
- Filename text box will not hide on smaller screen. Setting minimum width of File Browser fixed it.
- Path at top will only show directory name, not the file name and it is greyed out
2016-07-15 10:50:25 +01:00
Dave Page
7d0fe669ca Code tidy. 2016-06-21 14:21:06 +01:00
Dave Page
3026b470e9 Optimise Python imports. 2016-06-21 14:12:14 +01:00
Dave Page
05e7ee5a05 Second attempt at fixing the file handling code. Tested on Mac and Windows in both desktop and server modes. 2016-06-17 22:05:49 +01:00
Dave Page
2c62d1a4b7 Revert "Make the file manager work a little more sanely with regard to paths."
This breaks things even more on Windows :-(

This reverts commit 35243b9869.
2016-06-17 18:19:51 +01:00
Dave Page
35243b9869 Make the file manager work a little more sanely with regard to paths. 2016-06-17 17:12:04 +01:00
Dave Page
1172e31019 File dialogue layout tweaks. 2016-06-17 17:11:30 +01:00
Dave Page
fd6c43b393 String improvements. 2016-06-17 14:21:14 +01:00
Surinder Kumar
9e8e3fc787 Fix file selection on Windows. Fixes #1319
1) Unable to select sql file through query tool on windows OS. In file_manager.js, we are stripping initial slash '/' from the path obtained, but we should not strip if it is full path like 'c:/path/to/dir/filename.ext'

2) Handle directory path if STORAGE_DIR is None. Proper checks are added.
2016-06-10 17:06:22 +01:00
Murtuza Zabuawala
af84ba5a4f Fixed all the review comments from Dave.
* Moved the Columns, and Constraint to its repective tabs.
* Ensure all the labels only have a capital letter on the first word
  (except for keywords or acronyms).
* Resolve the typo in string - 'System table'.
* Error messages on fields should not be shown unless the field loses
  focus and has an error.
* "General" section should have a limited subset of information.
* Variables grids should not be on the Security tab.
* Fixes the field labels that imply a question.
* Privileges controls on the Properties lists should be in a "Security"
  group.

Apart from review comments improved few other areas too:
* Used in-place DepsCell functionality for columns in both index, and
  type node.
* Improved the error handling in constraint nodes.
* Added create, alert SQL Help for nodes associated with the table node.
2016-05-24 23:29:55 +05:30
Surinder Kumar
3120ce1909 Fixes few issues with File Manager.
- Rename file/folder not working in list view.
- Selection folder only should not allow to select file.
- Ui changes in table list to match with the pgadmin color styles.
- Custom STORAGE_DIR path don't list files/folders when opened in window
  system.
- Code cleanup, formatting & did proper commenting.
- In file selection mode, the value typed in text box not setting into
  backbone model.
- Removed create file code, it should be handled on module using it.
- Written a common function to make ajax request, instead of writing
  individual functions for same task.
2016-05-21 15:02:05 +05:30
Ashesh Vashi
d1e3237e2e Fixed misc issues 2016-05-16 19:51:15 +05:30
Ashesh Vashi
28af92d386 Resolved a bug about listing file type listing, 'All Files' were listed
twice in some cases.
2016-05-16 02:43:38 +05:30
Surinder Kumar
1aeab98a2b Load, and save the files in the Query Editor.
Also, the changes done by Ashesh to resolved few issue with the file
manager in 'Select' mode.
2016-05-14 15:29:08 +05:30
Surinder Kumar
5348f6e96a Improvised the file manager functionalities as per comments given:
* Do not show the drives on windows, if STORAGE_DIR is set.
* Do not show non-applicable buttons, whenever no files/directory
  present in the storage directory.
* Showing dimmer under the warning messages for replace/delete.
* Select file type other than 'All Files' in create/replace mode.

Tweaked a bit by Ashesh.
2016-05-14 00:42:41 +05:30
Ashesh Vashi
9cdd1f8098 Added support for the server side file manager, which will be useful in
selection, creation, upload/download files/directories resides on the
server side.

This will be useful for file selection/creation for different server
side utilites like pg_dump, pg_dumpall, pg_restore.
2016-05-13 00:04:32 +05:30