Commit Graph

1599 Commits

Author SHA1 Message Date
Nikhil Mohite
7420673a0f Improve code coverage and API test cases for FTS Configuration, FTS Parser, FTS Dictionaries, and FTS Template. Fixes #5329. 2020-07-10 11:40:08 +05:30
Nikhil Mohite
e1168f8de0 Fixed code smell to reduce cognitive complexity. 2020-07-09 18:41:13 +05:30
Pradip Parkale
916182f80f Fixed code smell for variable naming convention. 2020-07-09 18:28:08 +05:30
Murtuza Zabuawala
2db9242f5c Fixed accessibility issue where few dialogs are not rendering properly
when we zoomed in browser window 200% and screen resolution is low.

Fixes #5662
2020-07-09 18:18:37 +05:30
Pradip Parkale
c58fda0a70 Ensure that create RLS Policy menu should not be visible for catalog objects. Fixes #5633 2020-07-09 18:04:32 +05:30
Akshay Joshi
b4c25bdc0a Fixed code smell 'Functions, methods, and lambdas should not have too many parameters' reported by SonarQube. 2020-07-07 19:39:06 +05:30
Pradip Parkale
36a2c073bd Added support for permissive/restricted policy type while creating RLS Policy. Fixes #5622 2020-07-07 17:55:05 +05:30
Nikhil Mohite
aee6bac5ef Fixed cognitive complexity code smell reported by SonarQube. 2020-07-07 15:19:47 +05:30
Khushboo Vashi
58b4c45d0c Added support for LDAP authentication with different DN by setting the dedicated user for the LDAP connection. Fixes #5484 2020-07-06 19:35:55 +05:30
Aditya Toshniwal
45a03dd663 Fixed 'convention' related code smell reported by SonarQube. 2020-07-06 11:48:23 +05:30
Murtuza Zabuawala
cb1cdd1b23 Modified EPAS templates to support schema restriction. 2020-07-03 18:42:17 +05:30
Akshay Joshi
0d92059155 Fixed code smells having rule 'Functions, methods and lambdas should not have too many parameters'. 2020-07-03 18:37:37 +05:30
Yogesh Mahajan
80ab596992 Fixed the SoanrQube code smell 'Variables should not be shadowed'. 2020-07-03 14:33:30 +05:30
Khushboo Vashi
b5f0190799 Fixed the SonarQube Code smells having Rule 'Functions, methods and lambdas should not have too many parameters'. 2020-07-03 14:24:54 +05:30
Aditya Toshniwal
341c3aded6 Fixed dark theme-related CSS and modify the color codes. Fixes #5287
Fixed backgrid row hover issue where on hover background color is set for edit and delete cell only. Fixes #5470
2020-07-03 11:47:40 +05:30
Aditya Toshniwal
dd4dc19add Fixed issue where dialog sizes snapping to the default widths. 2020-07-03 11:26:06 +05:30
Nikhil Mohite
1ab257d512 Fixed Cognitive Complexity code smell reproted by SonarQube. 2020-07-03 11:15:41 +05:30
Aditya Toshniwal
ced296939f Fixed an issue where the user is able to edit properties when some of the collection nodes are selected. Fixes #5629 2020-07-02 16:21:56 +05:30
Yogesh Mahajan
1802f8a3f8 Ensure that the referenced table should be displayed on foreign key constraints. Fixes #5530 2020-07-02 16:21:56 +05:30
Pradip Parkale
8b10315e2a Added hints for 'Using' and 'With check' options of RLS Policy node. 2020-07-02 16:21:56 +05:30
Akshay Joshi
0850db2a9b Fixed database connection issue, regression of SonarQube fixes. 2020-07-01 17:32:22 +05:30
Akshay Joshi
a881e4e3f8 Fix PEP8 2020-07-01 15:33:51 +05:30
Nikhil Mohite
192a446131 Fixed API test cases failing due to updating the server manager instance. 2020-07-01 15:29:59 +05:30
Pradip Parkale
b30c590866 Fixed SonarQube code smell 'Rename function and variable name to match the regular expression'. 2020-07-01 13:50:51 +05:30
Yogesh Mahajan
6dd3ca31be Fixed SonarQube code smell 'Variables should not be shadowed'. 2020-07-01 13:43:00 +05:30
Pradip Parkale
979f806161 1) Added RLS Policy support in Schema Diff. Fixes #5601
2) Fixed 'cant execute empty query' issue when remove the value of
   'USING' or 'WITH CHECK' option of RLS Policy. Fixes #5631
2020-07-01 12:44:28 +05:30
Ashesh Vashi
3102a8d24b Fix the dialog size when zoom level is changed of the browser.
The screen.width & screen.height does not reflect the values of the
height and width respectively when zoom level is changed for the
browser. It is better to review the calculated height and width based
on the window.innerHeight and window.innerWidth and re-evaluate them.
2020-07-01 11:49:43 +05:30
Ashesh Vashi
21d57b1f10 Do not let browser autocomplete the password field while connecting a
database server.

Set the autocomplete attribute of the password field to 'new-password'
to let browser know, we require a new password for the password, and do
not autocomplete it.
2020-07-01 11:26:52 +05:30
Nikhil Mohite
c873218c32 Added support for schema level restriction. Fixes #5583
Allow user to edit the connection properties when the database server
is already connected.
2020-06-30 19:15:23 +05:30
Nikhil Mohite
6713bc068b Fixed SonarQube code smells 'Refactor this function to reduce its Cognitive Complexity'. 2020-06-30 17:06:55 +05:30
Akshay Joshi
46d26cd029 Remove extra brackets from reverse engineering SQL of RLS Policy. Fixes #5621 2020-06-30 16:11:02 +05:30
Zhang Jie
88db5ec4d5 Remove extra brackets from reverse engineering SQL of trigger. 2020-06-30 16:07:55 +05:30
Rahul Shirsat
7add777b21 Add proper indentation to the code while generating functions, procedures, and trigger functions. Fixes #3851 2020-06-29 12:36:28 +05:30
Akshay Joshi
b91f6f0f5c Fixed an issue where the semicolon is misplaced in RLS Policy SQL.
Fixed one regression issue introduced by renaming the method 'gc' to 'gc_timeout'.
2020-06-26 19:24:54 +05:30
Nikhil Mohite
115657a465 Fixed following SonarQube issues:
1) Refactor function to reduce its Cognitive Complexity.
 2) Rename variable to match the regular expression ^[_a-z][a-z0-9_]*$.
2020-06-26 15:03:50 +05:30
Satish V
8e28e0a32b Improve code coverage and API test cases for Domain and Domain Constraints. Fixes #5326 2020-06-26 14:15:09 +05:30
Khushboo Vashi
c7a16a4bd5 Fixed code smells having rule 'Nested blocks of code should not be left empty'. 2020-06-26 13:18:27 +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
Diego Augusto Molina
6a63279396 Ensure that the OWNER should be quoted for foreign tables, procedures, and trigger functions. 2020-06-26 12:28:36 +05:30
Aditya Toshniwal
d3b3d07f2e Fixed SonarQube issues with the tag unused. All the unused variables, assignments, code comments are fixed. 2020-06-25 11:09:43 +05:30
Satish V
a1fd9ea3ce Fixed issue related to extra semicolons and function naming convention reported by SonarQube. 2020-06-24 16:16:12 +05:30
Nikhil Mohite
db9d684524 Fixed 'Rename local variable to match the regular expression' issue reported by SonarQube. 2020-06-24 16:08:14 +05:30
Akshay Joshi
d265ed9729 Fixed an issue while creating RLS Policy with the name having space. Fixes #5620 2020-06-23 14:28:21 +05:30
Murtuza Zabuawala
c064eb0795 Fix an issue where RLS Policy dialog help is not working. 2020-06-23 14:13:08 +05:30
Pradip Parkale
6012f49919 Added policy event 'ALL' in events drop-down list. 2020-06-22 17:09:10 +05:30
Satish V
daad16ea93 Fixed issue related to reducing the if-else statement to single return expression. Reported by SonarQube. 2020-06-22 12:58:48 +05:30
Aditya Toshniwal
6620f9263d Fixed issues reported by SonarQube with tag 'bad-practice'. 2020-06-22 12:18:59 +05:30
Yogesh Mahajan
6d3f13076f Fixed 'Comma operator should not be used' issue reported by SonarQube. 2020-06-18 16:17:55 +05:30
Satish V
905be1d894 Replace if-then-else statement by a single return statement, issue reported by SonarQube. 2020-06-18 15:51:01 +05:30
Aditya Toshniwal
a278e8b1e6 Fixed the master password issue, introduced in the last commit. 2020-06-18 15:38:38 +05:30
Aditya Toshniwal
f0490a54b7 Fixed redundant tagged issue reported by SonarQube. 2020-06-18 11:14:56 +05:30
Akshay Joshi
5ed1e1e5b6 Fixed some sonarqube issues. 2020-06-17 19:30: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
Yogesh Mahajan
7c12ade161 Fixed issue related to shadowing variables reported by SonarQube. 2020-06-17 17:08:23 +05:30
Akshay Joshi
cb268075c2 1) Added option to ignore the whitespaces while comparing objects in schema diff. Fixes #5468
2) Added server group name while selecting servers in schema diff. Fixes #5500
3) Fixed an issue where two identical tables showing different by schema diff tool. Fixes #5584
2020-06-17 16:27:51 +05:30
Satish V
d43518cb3c Fixed following issues reported by SonarQube:
1) Replace this if-then-else statement by a single return statement. (clumsy)
2) 'switch' statements should have at least 3 'case' clauses. (bad practice)
2020-06-16 15:00:51 +05:30
Aditya Toshniwal
3e00fe2b0f Fixed vulnerabilities and few design suspicions where two conditional structures are having the same implementation. Reported by SonarQube 2020-06-16 11:14:57 +05:30
Yogesh Mahajan
2ae5c0ec4f Fixed an issue where select all checkbox only selects the first 50 tables. Fixes #4226 2020-06-16 11:05:10 +05:30
Yogesh Mahajan
697f4aec95 Fixed issue related to shadowing variables reported by SonarQube. 2020-06-16 10:47:40 +05:30
Akshay Joshi
a21e6448ce Fixed RESQL test cases, regression of RLS policy. 2020-06-15 17:10:25 +05:30
Satish V
eb1b17b636 Fix 'expressions evaluated to true/false always' issue reported by SonarQube. 2020-06-15 16:50:07 +05:30
Mishika Singh
38cd3327f3 Ensure that pgadmin should be able to connect to the server which has password more than 1000 characters. Fixes #5592 2020-06-15 16:50:07 +05:30
Khushboo Vashi
8ab358ccec Fix following issues reported by SonarQube:
1) Properties of variables with "null" or "undefined" values should not be accessed
2) Variables should not be self-assigned
3) "in" should not be used with primitive types
2020-06-15 16:50:07 +05:30
Aditya Toshniwal
641f7bbe9d Some clumsy coding related fixes reported by SonarQube. 2020-06-15 16:50:07 +05:30
Pradip Parkale
18277543b6 Added support of Row Security Policies. Fixes #5516 2020-06-15 15:44:59 +05:30
Aditya Toshniwal
8c20f0c0d2 Some clumsy coding related fixes reported by SonarQube. 2020-06-12 15:24:17 +05:30
Satish V
ee1ea47e88 Fixed issue 'expects 4 arguments, but 5 were provided' reported by SonarQube. 2020-06-12 15:15:07 +05:30
Satish V
82c4a4a03e Improve code coverage and API test cases for Collations. Fixes #5325 2020-06-11 11:12:41 +05:30
Dave Page
21efe6f902 Remove blank line at EOF. 2020-06-10 17:03:08 +01:00
Dave Page
5c60dcd501 Remove blank line at EOF. 2020-06-10 17:02:39 +01:00
Dave Page
85e89c869a Cleanup some code smells identified by SonarQube. 2020-06-10 16:42:59 +01:00
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
726ecd79e6 Fixed import statements.
refs #3669
2020-06-03 12:49:05 +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
Yogesh Mahajan
4632a7faba Fixed an issue where pgadmin detects the wrong browser version of the Microsoft Edge. Fixes #5465 2020-05-29 13:07:02 +05:30
Akshay Joshi
9b8902dfb8 Fixed the SQL help issue for EDB Postgres Advanced Server. Fixes #4099 2020-05-22 14:11:58 +05:30
Yogesh Jain
7b1cac6914 Fixed an issue where clicking on Select All button, not selecting all the options in pgAgent job scheduler. Fixes #5496 2020-05-19 13:54:21 +05:30
Yogesh Mahajan
9f445dc052 Improve code coverage and API test cases for Indexes. Fixes #5333 2020-05-18 12:29:33 +05:30
Pradip Parkale
6d6cd19b37 Improve code coverage and API test cases for Triggers and Compound Triggers. Fixes #5335 2020-05-15 12:50:50 +05:30
Khushboo Vashi
a9a1a975a6 Added compatibility for Flask-Security-Too version 3.2 2020-05-13 16:02:38 +05:30
Akshay Joshi
073d90c4a6 Fixed internal server error when clicking on Triggers -> 'Enable All' for partitions. Fixes #5052 2020-05-11 15:18:39 +05:30
Yogesh Mahajan
1294c089a8 Implement Selenium Grid to run multiple tests across different browsers, operating systems, and machines in parallel. Fixes #5255 2020-05-11 12:11:31 +05:30
Aditya Toshniwal
b64896f558 Fixed generated SQL issue for auto vacuum options. Fixes #5398
Fixed some more issues:

 1) pgAdmin allows only true or false values for autovacuum_enabled,
    and there is no way to reset it individually without disabling a custom auto vacuum.
    To fix this, the control is changed from the switch to three state buttons.
 2) Setting any vacuum options to zero made the option disappear from the SQL.
 3) Right-click on a table with vacuum options set and create a new table.
 4) The parameters tab will have the options prefilled.
 5) Changed the UI a bit to remove unnecessary space around. Added "Autovacuum" before enabled.
    The SQL generated was appending a ".0" to decimal vacuum options. Changed to remove the leading ".0".
2020-05-08 14:30:30 +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
Satish V
9338bdcb3a Fixed an issue where the newly added table is not alphabetically added to the tree. Fixes #5434
Fixed an issue when renaming the column not added in the proper order. Fixes #5450
2020-05-08 12:52:03 +05:30
Pradip Parkale
057a2b2312 Improve code coverage and API test cases for the Rules module. Fixes #5334 2020-05-07 16:27:58 +05:30
Akshay Joshi
6ad46e1860 Fixed invalid literal issue when removing the connection limit for the existing role. Fixes #5001 2020-05-07 13:14:45 +05:30
Akshay Joshi
a0940fd145 Typecast the object to 'text' before using it in length() function, so that correct length function gets called. 2020-05-06 17:34:18 +05:30
Ganesh Jaybhay
5fe7813f9f Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog. Fixes #5469 2020-05-04 13:19:13 +05:30
Satish V
d61b8eb1b3 Gracefully informed the user that the database is already connected when they click on 'Connect Database...'. Fixes #3694 2020-05-04 13:08:56 +05:30
Murtuza Zabuawala
0fc2afb829 Add Reverse Engineered and Modified SQL tests for Column and Type. 2020-05-04 12:48:24 +05:30
Khushboo Vashi
5656f756e6 Ensure that the dependencies tab shows correct information for Synonyms. Fixes #5422 2020-05-04 12:23:18 +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
86afec860f Remove Python 2 support from the Python tests.
refs #5443
2020-04-30 12:56:45 +05:30
Khushboo Vashi
88aebb64f9 Fixed failed to fetch utility error when click on refresh(any option) materialized view. Fixes #5447
It's a regression of #5213
2020-04-28 11:00:23 +05:30
Pradip Parkale
18748846ef Fixed the regression where initial changes make the Save button enabled when the table dialog is opened. Fixes #4504 2020-04-27 18:48:44 +05:30
Satish V
b80784f5a1 Fixed an issue where the user should not be able to add columns in the creation order after 50 columns.
Regression of the initial patch.

Fixes #5043
2020-04-27 18:01:09 +05:30
Murtuza Zabuawala
76eb3e9b67 Fixed an issue when the user performs refresh on a large size materialized view. Fixes #5213 2020-04-27 17:30:23 +05:30
Pradip Parkale
ef58d277ca Fixed an issue where like options should be disabled if the relation is not selected while creating a table. Fixes #4504 2020-04-24 18:22:11 +05:30
Aditya Toshniwal
aec64aa582 Fixed following issues for 1257:
1. For synonyms, the property is shown as "Public Synonym".
 2. For system procedure, the flag should be True but it is displaying as False.
 3. For both views and materialized views, the property is "System View".
 4. For FTS templates, the property is showing as "System FTS Parser".

Fixes #1257
2020-04-24 16:35:59 +05:30