Commit Graph

45 Commits (9dd957a2aa8f9f5286ae909621bad59944194b37)

Author SHA1 Message Date
Akshay Joshi 9dd957a2aa Added support to import/export server groups and servers from GUI. Fixes #4803 2022-01-04 12:27:17 +05:30
Akshay Joshi d644b4f94e 1) Replace Flask-BabelEx with Flask-Babel. Fixes #6088
2) Upgrade Flask to version 2. Fixes #7010
2021-11-24 17:22:57 +05:30
Aditya Toshniwal fbc6c30b62 Set PSQLRC and PSQL_HISTORY env vars to apt. user storage path in the server mode. Fixes #6691 2021-08-23 16:19:01 +05:30
Akshay Joshi 16d2a3096a 1) Fixed an issue where the binary path is not correctly parsed for version 9.6. Fixes #6534
2) Added the default binary path in the container. 
3) Fixed the typo in the documentation.
2021-06-15 19:49:46 +05:30
Akshay Joshi c2ed799113 If the binary path contains '' then show as it is on GUI if the path contains valid utilities. 2021-06-14 19:23:26 +05:30
Akshay Joshi 2fdde6218a Fixed binary path issue on Windows platform. refs #5370 2021-06-14 15:01:49 +05:30
Akshay Joshi c86a2b643a 1) Binary path set to the default location in which we install the binaries.
2) Validate path not working if there is a space in the binary path.
3) Handle the case when the path contains '$DIR'. 

refs #5370
2021-06-10 22:49:05 +05:30
Akshay Joshi 5a086a9173 Fixed API test cases failed due to wrong handling of default binary path. 2021-06-08 13:24:17 +05:30
Akshay Joshi 07eb541806 1) Added logic to set the appropriate default binary path if DEFAULT_BINARY_PATH is
set in the config and the user not updated the preferences.
2) Remove 'gpdb' from DEFAULT_BINARY_PATH.
3) Fixed API test cases. 

refs #5370
2021-06-07 20:36:34 +05:30
Pradip Parkale 8ae8fea6d2 Ensure that Backup and Restore should work on shared servers as some cases were failing due to initial changes.
Fixes #6385
2021-04-22 17:29:04 +05:30
Akshay Joshi b372f08a59 Update copyright notices for 2021 2021-01-04 15:34:45 +05:30
Cyril Jouve 5a253f9053 Change the following to replace Python 2 code with Python 3:
1) Replace the deprecated unit test method.
2) Wraps filter usage in a list call.
3) Converts the old metaclass syntax to new.
4) Use range instead of xrange method.
5) Change Unicode to str.
6) Several other transformations.
7) Fixed change password test cases.
8) Use simplejson instead of plain JSON.
2020-08-31 16:45:31 +05:30
Aditya Toshniwal 505a3ac960 1) Fixed cognitive complexity issues reported by SonarQube.
2) Fixed code smell 'Add a nested comment explaining why this method is
   empty, or complete the implementation'.
2020-07-24 11:46:30 +05:30
Aditya Toshniwal 357a9179b1 Fixed convention related issues reported by SonarQube. 2020-07-09 18:55:33 +05:30
Akshay Joshi ad80217593 Remove Python2 references from the source code.
refs #5443

Initial patch: Neel Patel
2020-04-30 17:22:48 +05:30
Dave Page 01c7636c75 Update copyright notices for 2020. 2020-01-02 14:43:50 +00:00
Dave Page 3f4d5a687b Rename horribly named function. 2019-07-12 13:00:23 +01:00
Aditya Toshniwal dfa892d2a2 1. Added Master Password to increase the security of saved passwords. Fixes #4184
2. In server(web) mode, update all the saved server credentials when user password is changed. Fixes #3377
2019-05-28 12:00:18 +05:30
Akshay Joshi 22d458b01e Close connections gracefully when the user logs out of pgAdmin. Fixes #3942 2019-02-06 13:17:52 +00:00
Murtuza Zabuawala e23d307c56 Update copyright notices for 2019 2019-01-02 15:54:12 +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
Akshay Joshi 1fc82d328c Fix backup in directory format on Windows. 2018-07-17 13:04:28 +01:00
Murtuza Zabuawala be055ce57d Update Python and JS modules. Fixes #3154 2018-04-04 10:47:01 +01:00
Khushboo Vashi a4124c2496 PEP8 fixes. 2018-03-02 09:37:11 +00:00
Murtuza Zabuawala a9de043fef Add keyboard shortcuts for the Query Tool. Fixes #2900 2018-02-27 14:32:03 +00:00
Murtuza Zabuawala c3ddb7df38 PEP8 fixes for the utils module. Fixes #3076 2018-01-31 13:58:55 +00:00
Dave Page 89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Murtuza Zabuawala 4246a3b22f Ensure password changes are successful if authenticating using a pgpass file. Fixes #2720 2017-12-13 13:28:07 +00:00
Akshay Joshi c2fb0394bf Added support of Declarative Partitioning (Range, List) for PostgreSQL 10.
This allows the user to create partitioned table and it's partitions.

  - Edit partitions, Create/Listing of constraints, rules, triggers under partitions. (Implemented by Harshal)
  - Updating browser tree node when create/attach/detach partitions from table dialog.(Implemented by Ashesh)
2017-07-07 11:55:55 +05:30
Ashesh Vashi fd3ddbeafb Implementation of the client side 'url_for(...)' function.
Created a url_for function module to be used by different javascript
modules to use the same functionality of flask at client side.

A python module can expose the list of endpoints, used by its
javascripts, by overriding the 'get_exposed_url_endpoints(self)'
function.

In this patch, we have modified all the browser modules to use this
function. It will allow us to move the majority of the javascript
modules of browser nodes from templates directory to the static
directory.

TODO::
- Move these javascripts modules to the static directory.
- Use this function in all the applicable javascript modules.
  e.g. tools, miscellaneous modules
2017-06-12 12:01:25 +05:30
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
Dave Page f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00: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 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
Ashesh Vashi 9cae686c65 Allow the modules to define the i18n messages, and other messages
required by its javascript module.

This will allow us to load the javascript modules as a static file, and
not as a Jinja2 template. This will increase the load time, as it will
decrease number of templates to be processed during loading those
javascripts.
2016-05-10 16:07:48 +05:30
Dave Page 5ea822f33e Preferences dialogue. Patch by Ashesh and Khushboo Vashi. 2016-03-07 11:48:53 +00:00
Harshal Dhumal b77c5a6c54 Python 2.6 support fixes. 2016-01-27 15:59:54 +01:00
Dave Page 694506453b Copyright updates for 2016. 2016-01-18 14:48:14 +00:00
Ashesh Vashi aa150030eb Introduced a mechanism to load required javascripts at runtime
(lazy loading) using the require.js. This allows us to load the
javascript required for any node, only when it was loaded in the browser
tree. Also, introduced the mechanism to show/edit/create of any node in
a tab panel (wcDocker.Panel).
2015-06-30 11:21:57 +05:30
Ronan Dunklau b626eec0fd Inherited the test, about & help module from PgAdminModule class to load
them automatically by PgAdmin.
2015-06-29 13:26:43 +05:30
Ronan Dunklau eb6580b43a Introduced a PgAdmin class inherited from the Flask, which looks for
submodules inherited from the PgAdminModule instead of regular
Blueprint. This allows us to load the module automatically from the
under the pgadmin directory, and will work to extend the pgAdmin
extension module.

PgAdminModule is inherited from the Blueprint, and bring several
methods:
-  get_own_stylesheets, which returns the stylesheets used by the module
   (excluding its submodules stylesheets)
- get_own_javascripts
- menu_items, which returns a dictionray mapping the old hook names
  (context_items etc) to a list of MenuItem instances

For more specialized modules (as for now, any module that should be part
of the browser tree construction), one can define an abstract base class
defining additional methods.

For example, the BrowserPluginModule abstract base class defines the
following methods:
- jssnippets
- csssnipeets
- node_type
- get_nodes
2015-06-29 12:28:41 +05:30
Dave Page df5054f253 No need for content here now. 2015-01-21 11:18:02 +00:00
Dave Page 2c1688e6f4 Use Flask blueprints for modularisation, per Khushboo Vashi. 2015-01-19 16:38:47 +00:00
Dave Page b9bf6d9aa3 Restructure to enable use of modules for different components of pgAdmin. 2014-12-18 17:49:09 +00:00