Commit Graph

62 Commits

Author SHA1 Message Date
Aditya Toshniwal
d056a94f0c popen() function strips the quotes from the arguments, so backup fails
for the schema name that needs quoting.

Code is changed to add escapers.

Fixes #4590
2019-10-10 17:58:32 +05:30
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
Khushboo Vashi
e4417229aa Update all Python and JS dependencies. Fixes #4019 2019-03-14 15:11:16 +00:00
Murtuza Zabuawala
d9fc9fdc4d Ensure object names in external process dialogues are properly escaped. Fixes #3872 2019-01-24 16:34:18 +00:00
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
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
Akshay Joshi
6ddab02769 1) Fixed process watcher status message when user has stopped the process.
2) Saved the process state in sqlite database.
2018-10-25 17:03:34 +05:30
Akshay Joshi
6bc6bc7f60 Ensure that Utilities(Backup/Restore/Maintenence/Import-Export) should not be started
if binary path is wrong and also added 'Stop Process' button to cancel the process.
2018-10-22 12:35:53 +05:30
Usman Muzaffar
3f16a0c52c Log process exceptions using ASCII mode to avoid issues with string concatenation. 2018-10-11 13:13:08 +01:00
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
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
ba8829b64f Further Python 2.6 fixes. 2018-06-15 15:03:53 +01:00
Khushboo Vashi
ab54a6d39a Fix external utilities to run with Python 2.6. 2018-06-15 12:38:31 +01:00
Murtuza Zabuawala
be055ce57d Update Python and JS modules. Fixes #3154 2018-04-04 10:47:01 +01:00
Murtuza Zabuawala
c312b03f6f Pass the service name to external processes. Fixes #3195 2018-03-19 11:01:04 +00:00
Khushboo Vashi
63ba3402e8 Ensure SSL options are pushed down to external tools like pg_dump. Fixes #3122 2018-03-15 07:35:47 -04:00
Dave Page
3c686d3fbe PEP-8 fixes 2018-03-13 17:30:07 -04:00
Khushboo Vashi
802269910c Fix unicode handling in the external process tools and show the complete command in the process viewer. Fixes #2963. Fixes #3157. 2018-03-13 16:45:20 -04:00
Khushboo Vashi
a4124c2496 PEP8 fixes. 2018-03-02 09:37:11 +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
Dave Page
89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Harshal Dhumal
7db7da5b0e Display process output as it happens. Fixes #2811 2017-11-27 13:00:47 +00:00
Alexander Lakhin
8f070f6095 Fix utility output capture encoding. Fixes #2854 2017-11-09 08:51:56 -05: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
Ashesh Vashi
845025db8f Some cosmetic changes.
- Loading 'pgadmin' as 'sources/pgadmin', as found under the 'sources'
  reference directory to be consistent with other files.
- Removed the 'pgadmin' reference from the base.html template.
- Renamed 'pgadmin.slickgrid.editors.js', and
  'pgadmin.slickgrid.formatters.js' as 'editors.js', and 'formatters.js'
  respectively, as they're already in the 'pgadmin/static/js/slickgrid'
  directory.
- Removed the duplicate entry of 'translations' from the webpack.shim.js
2017-08-09 16:52:12 +05:30
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
Ashesh Vashi
1a7c9d5ca1 Using client-side 'url_for' implementation in the module - bgprocess
(background-processes).
2017-06-13 09:18:48 +05:30
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
1cb2a62fa8 Ensure object names are properly escaped for external process management. Fixes #2405 2017-05-15 13:01:12 +01:00
Jonas Thelemann
65f21a8cd7 Replace all occurrences of "can not" with "cannot". 2017-04-05 13:38:14 +01:00
Ashesh Vashi
7767c085c3 Resolved an issue finding the python interpreter on *nix systems, and
Windows 2008 R2 (32 bit), while running the pgAdmin 4 as runtime for
the PostgreSQL one click installers.

- Found a typo in runtime code, we were appending the path using ';' on
  *nix systems too. We should have used ':', and that did not allow the
  os.environ['PATH'] to identify the correct path of the python
  interpreter under the 'venv' directory.

- On Windows 2008, it was not honouring the environment variables, set
  under the Qt application (e.g. pgAdmin4.exe runtime), in the python
  application. (e.g. pgAdmin4.py). We will need to assume that - the
  python interpreter resides under the 'venv' directory outside the
  'bin' directory.

- Also, on windows 2008, it was setting PYTHONHOME environment variable
  to the full path of the pgAdmin4.exe, we need to reset it to 'venv'
  directory, if we find the python interpreter under it.

Thanks Murtuza Zabuawala for tips, and help.
2017-03-10 21:19:06 +05:30
Murtuza Zabuawala
bc63652811 Fix the issue where Import/Export was failing in linux runtime. Fixes #2166
Issue:
Changes done by Ashesh in pgAdmin4.py file for setting up PYTHONHOME variable to sys.prefix was applicable only for windows only.

Additionally I have also added exception handling for file provided by user for Backup/Restore/Import/Export.
2017-03-09 09:54:55 +00:00
Jonas Thelemann
c34f5fd2d4 Use "could not" consistently, instead of "couldn't" which was used in some places. 2017-03-07 10:29:54 +00:00
Ashesh Vashi
f2fc1ceba8 Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).

We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.

TODO
* Add better support for non-ascii characters in the database name on
  windows with Python 3
* Improve the messages created after the background processes by
  different modules (such as Backup, Restore, Import/Export, etc.),
  which does not show short-paths, and xml representable characters for
  non-ascii characters, when found in the database objects, and the file
  PATH.

Fixes #2174, #1797, #2166, #1940

Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 15:31:03 +05:30
Murtuza Zabuawala
a914ea088c Python 2.6 compatibility fixes. 2017-02-08 16:28:04 +00:00
Ashesh Vashi
b7c5039416 Fix process execution. Fixes #1679. Fixes #2144.
Re-engineer the background process executor, to avoid using sqlite as some builds of
components it relies on do not support working in forked children.
2017-02-04 15:26:57 +01:00
Dave Page
f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Dave Page
29743ad3c4 Allow selection of process output and commands. 2016-11-18 12:05:19 +00:00
Murtuza Zabuawala
e6d018c44f Ensure we handle external processes that fail to start. Fixes #1679 2016-10-21 15:35:06 +01:00
Dave Page
790b28fb61 Flask-Babel 0.11+ compatibility. Fixes #1496 2016-07-25 17:23:10 +01:00
Dave Page
60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Dave Page
78d329fc47 Don't blink the elapsed time - it's distracting. 2016-06-24 14:01:23 +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
Ashesh Vashi
a35288e25d Save the runtime status information in the application object for using
it other places.

globals() does not return consistent value across the application
context.

Thanks Neel Patel for reporting the issue.
2016-06-21 15:13:04 +05:30
Ashesh Vashi
bfe1b773b3 Do not rely on config.SERVER_MODE for determining (if it is running from
runtime, or time), instead check the environment variable PGADMIN_PORT
to do that as per Dave.
2016-06-20 22:00:16 +05:30