Commit Graph

175 Commits

Author SHA1 Message Date
Nikhil Mohite
c7ae5024d5 Added random function name generation logic for the debugger test cases. 2020-12-09 13:36:52 +05:30
Nikhil Mohite
9450065850 1. Resolved the issues related to the database connection.
2. Updated the create "pldbgapi" extension for the debugger.

refs #5343
2020-12-07 15:44:56 +05:30
Nikhil Mohite
794bd50ed1 Improve code coverage and API test cases for Debugger. Fixes #5343 2020-12-03 10:31:24 +05:30
Nikhil Mohite
abd0748a77 Ensure that dirty indicator (*) should not be visible when renaming the tabs. Fixes #5991 2020-12-01 11:28:10 +05:30
Nikhil Mohite
17ce84dd0a Fixed an issue where dynamic tab title has not applied the first time for debugger panel. Fixes #5978 2020-11-19 10:25:20 +05:30
Nikhil Mohite
ebf5e871e0 Fixed an issue where the debugger's custom tab title not applied when opened in the new browser tab. Fixes #5974 2020-11-12 17:59:13 +05:30
Nikhil Mohite
a026f339c3 Fixed cognitive complexity reported by SonarQube. 2020-11-12 17:20:58 +05:30
Nikhil Mohite
2793747d3c 1) Added support for dynamic tab size. Fixes #4231
2) Fixed an issue where a long file name is not visible on the process watcher dialog. Fixes #5950
2020-11-04 17:45:28 +05:30
Khushboo Vashi
14a5d05b80 Ensure that non-superuser should be able to debug the function. Fixes #5760 2020-10-30 15:03:18 +05:30
Nikhil Mohite
b5f9fffadd Fixed the following issues:
RM-4232:
1. If the user adds a percentage (other than for placeholders) then it is stripped off.
2. Backslash is getting removed in the connection string if we provide the backslash(\) in placeholders or the database name contains it.
3. If the user added only spaces( )in placeholders it is not getting reset to default values.

RM-4230:
1. Rename panel option is not working in the debugger.
2. Added Rename panel for schema diff.

Fixes #4232 #4230
2020-10-27 11:03:00 +05:30
Nikhil Mohite
c86a3d64fc Added support to rename query tool and debugger tabs. Fixes #4230
Fixed an issue where non-closeable tabs are getting closed. Fixes #5923
2020-10-23 17:16:31 +05:30
Nikhil Mohite
275d13d40f Following issues have been resolved for the new connection feature:
1. Show servers with server groups in the dropdown.
  2. Highlighted current selected connection in the new connection dropdown.
  3. Notify the user before changing the connection.

refs #3794
2020-10-21 17:14:59 +05:30
Nikhil Mohite
18cad32bd4 Added tab title placeholder for Query Tool, View/Edit Data, and Debugger. Fixes #4232 2020-10-20 15:41:54 +05:30
Pradip Parkale
8e132eab08 Fixed some accessibility issues. Fixes #5732 2020-09-15 13:03:18 +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
Yogesh Mahajan
3984544bdb Fixed code smell 'String literals should not be duplicated'. 2020-08-28 18:17:27 +05:30
Pradip Parkale
7f947f146c Fixed cognitive complexity issues reported by SonarQube. 2020-08-25 12:28:55 +05:30
Akshay Joshi
fbbbc36221 Fixed code smell 'Define a constant instead of duplicating this literal' reported by SonarQube. 2020-08-20 20:26:51 +05:30
Akshay Joshi
103b08c9c5 Define constants for preferences label to fix SonarQube issues. 2020-08-20 17:58:37 +05:30
Aditya Toshniwal
7dd313f5fc Fixed an issue where debugger doesn't work if the search path is set other than 'public'. Fixes #4123 2020-08-12 14:24:40 +05:30
Aditya Toshniwal
536593bf8a Fixed following SonarQube issues:
- Remove this assignment to the local variable, the value is never used.
  - Rename local variables to match the regular expression
  - Add logic to this except clause or eliminate it and rethrow the exception automatically.
  - Rename fields to match the regular expression
  - Extract this nested conditional expression into an independent statement.
  - Change this default value to "None" and initialize this parameter inside the function/method.
  - Update this function so that its implementation is not identical to __repr__
  - Refactor this method to not always return the same value
  - Reraise this exception to stop the application as the user expects
  - Add missing parameters _w _PY3. This method overrides simplejson.decoder.JSONDecoder.decode.
  - Remove this redundant continue.
  - Remove this unused function declaration
  - Remove this identity check; it will always be False.
2020-08-03 12:59:51 +05:30
Akshay Joshi
fb0bc65ced Fixed following SonarQube issues:
1) Define a constant instead of duplicating this literal.
  2) Reduce cognitive complexity (Patch by Aditya)
2020-07-27 16:31:03 +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
9d0f3ce90b Fixed code smell 'potential hiding of variables declared in an outer scope'. 2020-07-16 19:53:39 +05:30
Yogesh Mahajan
2cefa9afca Fixed code smell 'Variables should not be shadowed'. 2020-07-09 18:44:58 +05:30
Aditya Toshniwal
45a03dd663 Fixed 'convention' related code smell reported by SonarQube. 2020-07-06 11:48:23 +05:30
Yogesh Mahajan
707ff450b5 Fixed following SonarQube issues:
1. Boolean checks should not be inverted.
2. The comma operator should not be used.
3. Arguments to built-in functions should match documented types.
4. Redundant pairs of parentheses should be removed.
5. A conditionally executed single line should be denoted by indentation, 
6. A while loop should be used instead of a 'for' loop.
2020-06-26 13:12:07 +05:30
Akshay Joshi
15c621b1d8 Fixed following SonarQube issues:
1) TypeError can be thrown as <variable_name> might be null or undefined here.
2) Unexpected duplicate "white-space".
3) Unexpected missing generic font family.
4) Unexpected shorthand "padding" after "padding-left".
2020-06-24 15:57:01 +05:30
Akshay Joshi
bc24e3643f More code cleanup for SonarQube. 2020-06-18 16:20:34 +01:00
Aditya Toshniwal
f0490a54b7 Fixed redundant tagged issue reported by SonarQube. 2020-06-18 11:14:56 +05:30
Aditya Toshniwal
df05efd7d9 Fixed vulnerabilities and few design suspicions where two conditional structures are having the same implementation. 2020-06-17 17:15:09 +05:30
Aditya Toshniwal
641f7bbe9d Some clumsy coding related fixes reported by SonarQube. 2020-06-15 16:50:07 +05:30
Aditya Toshniwal
eb971a0320 Update Codemirror version to the latest which allows us to set screen reader labels on Codemirror editor.
refs #5197
2020-06-08 12:26:12 +05:30
Satish V
d22e276586 Ensure that proper error should be displayed for the deleted node. Fixes #3669 2020-06-03 11:26:26 +05:30
Ashesh Vashi
e73e2d2502 Fixed the errors, and warnings reported by pylama.
TODO::
- Don't use unicode in Python 3 for removing the support of Python 2 (
  psycopg2 driver - __init__.py, server_manager.py).
- Merge the lastest pgcli (version: 3.0.0) for SQL autocompletion.
2020-05-08 14:13:38 +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
Aditya Toshniwal
4db0a6524d Fix an issue where debugger not showing all arguments anymore after hitting SQL error while debugging. Fixes #5101
Added a "Clear All" button to the argument dialog which will clear all the saved arguments values from SQLite DB.
2020-02-28 15:27:01 +05:30
Akshay Joshi
02f9de5bdb Improve wordings. 2020-01-28 18:36:42 +05:30
Nagesh Dhope
f167d77b61 Allow screen-reader to read label & description of non-textable elements. Fixes #4762.
Allow screen-reader to identify the alert errors. Fixes #4763

  Added role alertdialog for confirm and alert dialog.
  Added role status for all status bars/banners.
  Added role alert for error bars.
  Added aria-labelledby for charts on each dashboard.
  Added tabindex for each chart so that it is navigable using tab key.
2020-01-28 11:32:11 +05:30
Aditya Toshniwal
8c3bba65e5 Logout the pgAdmin session when no user activity of mouse move, click or keypress. Fixes #5000.
Introduced two config params:
1. USER_INACTIVITY_TIMEOUT - Interval in seconds for the timeout. Default is 0-Zero which means disabled.
2. OVERRIDE_USER_INACTIVITY_TIMEOUT - If set to true, tools like query tool or debugger will override USER_INACTIVITY_TIMEOUT
   and will not allow the application to timeout if a query is running for a long time.
2020-01-15 18:07:46 +05:30
Dave Page
01c7636c75 Update copyright notices for 2020. 2020-01-02 14:43:50 +00:00
Nagesh Dhope
8c4dff057f Added aria-label attribute wherever missing for accessibility. 2020-01-01 10:37:17 +05:30
Aditya Toshniwal
9bda583d5b Added aria-label to the buttons in the debugger. 2019-12-11 14:52:15 +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
Aditya Toshniwal
73dc130908 Fix issue where pgAdmin does not load completely if loaded in an iframe. Fixes #4756 2019-09-23 12:55:02 +05:30
Aditya Toshniwal
1c2ba72f02 Add editor options for plain text mode and to disable block folding to
workaround rendering speed issues in CodeMirror with very large scripts.
Fixes #4631.

Re-arrange editor options in the Preferences dialogue to tidy things up.
2019-09-04 15:46:08 +01:00
Aditya Toshniwal
3dadb8989b Fix a debugger error when using Python 2.7. Fixes #4419
Also fixes a minor bug where a reload warning was unnecessarily given when closing the debugger.
2019-08-23 09:43:51 +01:00
Aditya Toshniwal
ce7679c4bd Added missing __init__.py file in debugger utils which is required for Python 2.7 2019-06-19 13:31:48 +05:30