Re: RE-SQL tests patch for packages node

2019-07-11 Thread Akshay Joshi
Hi Navnath

I have tested the patch and it is not working for EPAS 9.4, 9.5 and 9.6.
Attached is the modified patch which fix the issue.
Please work on child node (functions, procedure and variables) of Packages
on top of modified patch.

On Wed, Jul 10, 2019 at 8:25 PM navnath gadakh <
navnath.gad...@enterprisedb.com> wrote:

> Hi Dave,
>
> I have attached the patch for RE-SQL test cases for *Packages* node.
>
> Thanks!
>
> --
> *Regards,*
> *Navnath Gadakh*
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


Packages_v2.patch
Description: Binary data


Re: [pgAdmin4][patch] Keyboard accessibility for sub-node control

2019-07-11 Thread Ganesh Jaybhay
Hi Dave,

Ticket number 3919 refers to keyboard accessibility issues for sub-node
control and back grid but this patch covers only sub-node control. Should I
create new one?
I have added the screenshot having newly added shortcut and updated
keyboard shortcut rst file. Also moved the code changes from backgrid.js to
backgrid.pgadmin.js.

Please find the attached updated patch.

Regards,
Ganesh Jaybhay

On Tue, Jul 9, 2019 at 9:28 PM Dave Page  wrote:

> Hi,
>
> What's the ticket number for this? That's a fair amount of code for a
> one-line description. There are also no doc changes describing how to
> navigate the sub-node control that I can see.
>
> Also; instead of changing the repo used for backgrid, can we not
> un-vendorise it?
>
> On Mon, Jul 8, 2019 at 4:49 PM Ganesh Jaybhay <
> ganesh.jayb...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch for keyboard accessibility of sub-node control. It
>> also covers sub-node dialog forward/backward tab navigation with shortcuts.
>>
>> Kindly review.
>>
>> Regards,
>> Ganesh Jaybhay
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/docs/en_US/images/preferences_browser_keyboard_shortcuts.png b/docs/en_US/images/preferences_browser_keyboard_shortcuts.png
old mode 100755
new mode 100644
index a4088a8..b0044b9
Binary files a/docs/en_US/images/preferences_browser_keyboard_shortcuts.png and b/docs/en_US/images/preferences_browser_keyboard_shortcuts.png differ
diff --git a/docs/en_US/keyboard_shortcuts.rst b/docs/en_US/keyboard_shortcuts.rst
index 360efb3..6f3727d 100644
--- a/docs/en_US/keyboard_shortcuts.rst
+++ b/docs/en_US/keyboard_shortcuts.rst
@@ -63,6 +63,8 @@ Use the shortcuts below to navigate the tabsets on dialogs:
++---+
| Control+Shift+]| Dialog tab forward|
++---+
+   | Control+Shift+A| Add row in Grid   |
+   ++---+
 
 SQL Editors
 ***
diff --git a/web/pgadmin/browser/register_browser_preferences.py b/web/pgadmin/browser/register_browser_preferences.py
index 009f1c1..bb5da06 100644
--- a/web/pgadmin/browser/register_browser_preferences.py
+++ b/web/pgadmin/browser/register_browser_preferences.py
@@ -387,3 +387,18 @@ def register_browser_preferences(self):
 category_label=gettext('Keyboard shortcuts'),
 fields=fields
 )
+
+self.preference.register(
+'keyboard_shortcuts',
+'add_grid_row',
+gettext('Add grid row'),
+'keyboardshortcut',
+{
+'alt': False,
+'shift': True,
+'control': True,
+'key': {'key_code': 65, 'char': 'a'}
+},
+category_label=gettext('Keyboard shortcuts'),
+fields=fields
+)
diff --git a/web/pgadmin/browser/static/js/keyboard.js b/web/pgadmin/browser/static/js/keyboard.js
index 9ad59b6..b50d025 100644
--- a/web/pgadmin/browser/static/js/keyboard.js
+++ b/web/pgadmin/browser/static/js/keyboard.js
@@ -41,6 +41,7 @@ _.extend(pgBrowser.keyboardNavigation, {
 'direct_debugging': commonUtils.parseShortcutValue(pgBrowser.get_preference('browser', 'direct_debugging').value),
 'drop_multiple_objects': commonUtils.parseShortcutValue(pgBrowser.get_preference('browser', 'grid_menu_drop_multiple').value),
 'drop_cascade_multiple_objects': commonUtils.parseShortcutValue(pgBrowser.get_preference('browser', 'grid_menu_drop_cascade_multiple').value),
+'add_grid_row': commonUtils.parseShortcutValue(pgBrowser.get_preference('browser', 'add_grid_row').value),
 
   };
   this.shortcutMethods = {
@@ -61,6 +62,7 @@ _.extend(pgBrowser.keyboardNavigation, {
 'bindDirectDebugging': {'shortcuts': this.keyboardShortcut.direct_debugging}, // Sub menu - Direct Debugging
 'bindDropMultipleObjects': {'shortcuts': this.keyboardShortcut.drop_multiple_objects}, // Grid Menu Drop Multiple
 'bindDropCascadeMultipleObjects': {'shortcuts': this.keyboardShortcut.drop_cascade_multiple_objects}, // Grid Menu Drop Cascade Multiple
+'bindAddGridRow': {'shortcuts': this.keyboardShortcut.add_grid_row}, // Subnode Grid Add Row
   };
   this.bindShortcuts();
 }
@@ -330,6 +332,12 @@ _.extend(pgBrowser.keyboardNavigation, {
   $('button.delete_multiple_cascade').click();
 }
   },
+  bindAddGridRow: function() {
+let subNode = $(document.activeElement).closest('.object.subnode');
+if($(subNode).length) {
+  $(subNode).find('.add').click();
+}
+  },
   isPropertyPanelVisible: function() {
 let isPanelVisible = false;
 _.each(pgAdmin.Browse

Updated patch for RM #4453

2019-07-11 Thread Nagesh Dhope
Hi,
PFA, updated patch for RM #4453

Thanks,
Nagesh


extension_resql_tests_v5.patch
Description: Binary data


Re: RE-SQL test patch for extension node

2019-07-11 Thread Nagesh Dhope
Please ignore this patch. Sending updated on new thread

On Thu, Jul 11, 2019 at 11:40 AM Nagesh Dhope 
wrote:

> Fixed failing extension resql test cases on PG 9.4 and PG 9.5.
> PFA updated patch.
>
> On Tue, Jul 9, 2019 at 5:53 PM Dave Page  wrote:
>
>> Thanks, applied!
>>
>> On Tue, Jul 9, 2019 at 1:09 PM Nagesh Dhope <
>> nagesh.dh...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Tue, Jul 9, 2019 at 4:54 PM Dave Page  wrote:
>>>
 Hi

 I have a sneaking suspicion that the work Akshay and Khushboo have been
 doing might have broken this :-(

>>>
>>> Yup, earlier we were able to create a  schema if not exists while
>>> running *alter *test cases. As this capability is remove alter test
>>> case for extension was failing.
>>> I have fixed the test case, PFA updated patch.
>>>
>>>
 Create Extension with all options..OK
  ... 2019-07-09 12:22:55,268: ERROR flask.app: Failed to execute query
 (execute_dict) for the server #5- DB:test_db_d08e5 (Query-id: 1400245):
 Error Message:ERROR:  schema "test_extension_schema" does not exist

 Alter Extension version..FAIL
 Traceback (most recent call last):
   File
 "/Users/dpage/git/pgadmin4/web/regression/re_sql/tests/test_resql.py", line
 230, in execute_test_case
 self.assertEquals(response.status_code, 200)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py",
 line 1338, in deprecated_func
 return original_func(*args, **kwargs)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py",
 line 839, in assertEqual
 assertion_func(first, second, msg=msg)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py",
 line 832, in _baseAssertEqual
 raise self.failureException(msg)
 AssertionError: 500 != 200


 On Tue, Jul 9, 2019 at 6:16 AM Nagesh Dhope <
 nagesh.dh...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find updated patch with *sslinfo.*
>
> On Mon, Jul 8, 2019 at 2:03 PM Dave Page  wrote:
>
>> Hi
>>
>> On Fri, Jul 5, 2019 at 5:16 PM Nagesh Dhope <
>> nagesh.dh...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>> Please review attached patch for RE-SQL test cases for *extension*
>>> node.
>>>
>>
>> Unfortunately this fails on PostgreSQL 12 as the deprecated
>> timetravel contrib module has finally been removed.
>>
>> Perhaps use sslinfo? That seems less likely to go away anytime soon.
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>

 --
 Dave Page
 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake

 EnterpriseDB UK: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>


pgAdmin 4 commit: Fixed resql test cases for Extensions specific to dat

2019-07-11 Thread Akshay Joshi
Fixed resql test cases for Extensions specific to database servers.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e6c067025cfe6ecff786efe3b671c8c7dd840c17
Author: Nagesh Dhope 

Modified Files
--
.../tests/9.4_plus/alter_extension_schema.sql  |  7 +++
.../tests/9.4_plus/alter_extension_version.sql |  7 +++
.../9.4_plus/create_extension_with_all_options.sql |  7 +++
.../create_extension_with_default_schema.sql   |  7 +++
.../databases/extensions/tests/9.4_plus/tests.json | 59 ++
.../tests/9.5_plus/alter_extension_schema.sql  |  7 +++
.../9.5_plus/create_extension_with_all_options.sql |  7 +++
.../databases/extensions/tests/9.5_plus/tests.json | 32 
.../alter_extension_schema.sql |  0
.../alter_extension_version.sql|  0
.../create_extension_with_all_options.sql  |  0
.../create_extension_with_default_schema.sql   |  0
.../tests/{default => 9.6_plus}/tests.json |  4 +-
13 files changed, 135 insertions(+), 2 deletions(-)



Re: Updated patch for RM #4453

2019-07-11 Thread Akshay Joshi
Thanks patch applied. But we still need to modify the logic to check
extension with exact version is available on database servers.

On Thu, Jul 11, 2019 at 12:58 PM Nagesh Dhope 
wrote:

> Hi,
> PFA, updated patch for RM #4453
>
> Thanks,
> Nagesh
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Add Reverse Engineered SQL tests for Languages. Fixes

2019-07-11 Thread Dave Page
Add Reverse Engineered SQL tests for Languages. Fixes #4452

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=cdf655f7db23335132e432bdda46e8b2dfb0303d
Author: Akshay Joshi 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |  1 +
.../servers/databases/languages/__init__.py|  7 ++
.../templates/languages/sql/9.3_plus/acl.sql   |  1 +
.../templates/languages/sql/9.3_plus/sqlpane.sql   |  8 +-
.../templates/languages/sql/default/acl.sql|  1 +
.../templates/languages/sql/default/sqlpane.sql|  8 +-
.../tests/pg/9.4_plus/alter_comment_privileges.sql | 18 +
.../tests/pg/9.4_plus/alter_trusted_lan_name.sql   | 11 +++
.../tests/pg/9.4_plus/create_trusted_language.sql  | 11 +++
.../pg/9.4_plus/create_untrusted_language.sql  | 11 +++
.../languages/tests/pg/9.4_plus/test.json  | 86 ++
.../ppas/9.4_plus/alter_comment_privileges.sql | 18 +
.../tests/ppas/9.4_plus/alter_trusted_lan_name.sql | 11 +++
.../ppas/9.4_plus/create_trusted_language.sql  | 11 +++
.../ppas/9.4_plus/create_untrusted_language.sql| 11 +++
.../languages/tests/ppas/9.4_plus/test.json| 85 +
16 files changed, 291 insertions(+), 8 deletions(-)



Re: [pgAdmin4][Patch]: RM 4452 Add RE-SQL tests for Languages

2019-07-11 Thread Dave Page
Thanks, applied.

On Wed, Jul 10, 2019 at 11:28 AM Akshay Joshi 
wrote:

> Hi Hackers,
>
> Attached is the patch to fix RM #4452 "Add RE-SQL tests for Languages".
>
> Please review it.
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Add Reverse Engineered SQL tests for Packages. Fixes

2019-07-11 Thread Dave Page
Add Reverse Engineered SQL tests for Packages. Fixes #4456

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=28585110dd6acb95ab3bbc9aafbb57cdef3b17a9
Author: Navnath Gadakh 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |  1 +
.../10_plus/alter_package_headers_and_comment.sql  | 12 ++
.../10_plus/create_package_with_all_options.sql| 17 +
.../schemas/packages/tests/ppas/10_plus/test.json  | 43 +
.../9.2_plus/alter_package_headers_and_comment.sql | 12 ++
.../9.2_plus/create_package_with_all_options.sql   | 17 +
.../schemas/packages/tests/ppas/9.2_plus/test.json | 44 ++
7 files changed, 146 insertions(+)



Re: RE-SQL tests patch for packages node

2019-07-11 Thread Dave Page
Thanks, applied.

On Thu, Jul 11, 2019 at 8:07 AM Akshay Joshi 
wrote:

> Hi Navnath
>
> I have tested the patch and it is not working for EPAS 9.4, 9.5 and 9.6.
> Attached is the modified patch which fix the issue.
> Please work on child node (functions, procedure and variables) of Packages
> on top of modified patch.
>
> On Wed, Jul 10, 2019 at 8:25 PM navnath gadakh <
> navnath.gad...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I have attached the patch for RE-SQL test cases for *Packages* node.
>>
>> Thanks!
>>
>> --
>> *Regards,*
>> *Navnath Gadakh*
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


pgAdmin 4 commit: Allow keyboard navigation of all controls on subnode

2019-07-11 Thread Dave Page
Allow keyboard navigation of all controls on subnode grids. Partially fixes 
#3919

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4cbc1f2f59192f6461cfeea96aec2d3ee5df5f06
Author: Ganesh Jaybhay 

Modified Files
--
docs/en_US/keyboard_shortcuts.rst  |  23 +++
docs/en_US/release_notes_4_11.rst  |   1 +
.../browser/register_browser_preferences.py|  15 ++
web/pgadmin/browser/static/js/keyboard.js  |   8 +
web/pgadmin/static/js/backform.pgadmin.js  |  19 +-
web/pgadmin/static/js/backgrid.pgadmin.js  | 226 +++--
web/pgadmin/static/js/dialog_tab_navigator.js  |  23 ++-
web/pgadmin/static/scss/_backgrid.overrides.scss   |   4 +
web/pgadmin/static/scss/_pgadmin.style.scss|   9 +-
9 files changed, 296 insertions(+), 32 deletions(-)



Re: [pgAdmin4][patch] Keyboard accessibility for sub-node control

2019-07-11 Thread Dave Page
Thanks - patch applied with some doc tweaks.

No need for a new ticket!

On Thu, Jul 11, 2019 at 7:00 AM Ganesh Jaybhay <
ganesh.jayb...@enterprisedb.com> wrote:

> Hi Dave,
>
> Ticket number 3919 refers to keyboard accessibility issues for sub-node
> control and back grid but this patch covers only sub-node control. Should I
> create new one?
> I have added the screenshot having newly added shortcut and updated
> keyboard shortcut rst file. Also moved the code changes from backgrid.js to
> backgrid.pgadmin.js.
>
> Please find the attached updated patch.
>
> Regards,
> Ganesh Jaybhay
>
> On Tue, Jul 9, 2019 at 9:28 PM Dave Page  wrote:
>
>> Hi,
>>
>> What's the ticket number for this? That's a fair amount of code for a
>> one-line description. There are also no doc changes describing how to
>> navigate the sub-node control that I can see.
>>
>> Also; instead of changing the repo used for backgrid, can we not
>> un-vendorise it?
>>
>> On Mon, Jul 8, 2019 at 4:49 PM Ganesh Jaybhay <
>> ganesh.jayb...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch for keyboard accessibility of sub-node control. It
>>> also covers sub-node dialog forward/backward tab navigation with shortcuts.
>>>
>>> Kindly review.
>>>
>>> Regards,
>>> Ganesh Jaybhay
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4][patch] Keyboard accessibility for sub-node control

2019-07-11 Thread Dave Page
Hi Ganesh,

It looks like this has broken the Jasmine tests (which I admit I forgot to
run before committing). Can you fix ASAP please?

Thanks.

On Thu, Jul 11, 2019 at 10:14 AM Dave Page  wrote:

> Thanks - patch applied with some doc tweaks.
>
> No need for a new ticket!
>
> On Thu, Jul 11, 2019 at 7:00 AM Ganesh Jaybhay <
> ganesh.jayb...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Ticket number 3919 refers to keyboard accessibility issues for sub-node
>> control and back grid but this patch covers only sub-node control. Should I
>> create new one?
>> I have added the screenshot having newly added shortcut and updated
>> keyboard shortcut rst file. Also moved the code changes from backgrid.js to
>> backgrid.pgadmin.js.
>>
>> Please find the attached updated patch.
>>
>> Regards,
>> Ganesh Jaybhay
>>
>> On Tue, Jul 9, 2019 at 9:28 PM Dave Page  wrote:
>>
>>> Hi,
>>>
>>> What's the ticket number for this? That's a fair amount of code for a
>>> one-line description. There are also no doc changes describing how to
>>> navigate the sub-node control that I can see.
>>>
>>> Also; instead of changing the repo used for backgrid, can we not
>>> un-vendorise it?
>>>
>>> On Mon, Jul 8, 2019 at 4:49 PM Ganesh Jaybhay <
>>> ganesh.jayb...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 Attached is the patch for keyboard accessibility of sub-node control.
 It also covers sub-node dialog forward/backward tab navigation with
 shortcuts.

 Kindly review.

 Regards,
 Ganesh Jaybhay

>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


patch for RE-SQL test cases for FTS Dictionaries.

2019-07-11 Thread Nagesh Dhope
Hi Hackers,

PFA, patch for RE-SQL test cases for FTS Dictionaries.

-- 
Thanks,
Nagesh


fts_dictionaries_resql_v1.patch
Description: Binary data


pgAdmin 4 commit: Add Reverse Engineered SQL tests for FTS Dictionaries

2019-07-11 Thread Dave Page
Add Reverse Engineered SQL tests for FTS Dictionaries. Fixes #4460

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=379b92729a280623e3b2c186d7395694502898f2
Author: Nagesh Dhope 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |  1 +
.../alter_fts_dictionary_delete_options.sql| 10 
.../tests/default/alter_fts_dictionary_options.sql | 11 
.../tests/default/create_fts_dictionary.sql|  7 +++
.../fts_dictionaries/tests/default/tests.json  | 62 ++
5 files changed, 91 insertions(+)



Re: patch for RE-SQL test cases for FTS Dictionaries.

2019-07-11 Thread Dave Page
Thanks, commited.

On Thu, Jul 11, 2019 at 1:18 PM Nagesh Dhope 
wrote:

> Hi Hackers,
>
> PFA, patch for RE-SQL test cases for FTS Dictionaries.
>
> --
> Thanks,
> Nagesh
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Make the RE-SQL test output a little more consistent

2019-07-11 Thread Dave Page
Make the RE-SQL test output a little more consistent with other tests.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1df26cb731e2f9b42d2e83def3e25f0cab0cd607

Modified Files
--
web/regression/re_sql/tests/test_resql.py | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)



Re: [GSoC] Finalized First Patch

2019-07-11 Thread Yosry Muhammad
Hi Khushboo,
Please find an updated patch attached with the mentioned import line
removed.

On Thu, Jul 11, 2019 at 6:45 AM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> On Wed, Jul 10, 2019 at 3:11 PM Yosry Muhammad  wrote:
>
>> Hi,
>>
>> On Wed, Jul 10, 2019, 9:14 AM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Some points I missed:
>>> 1.  I assumed that in this patch modification in case of OIDs= True
>>> (without primary key) has not considered as that is not working.
>>>
>>
>> This is not implemented yet. I will work on that in a following patch
>> soon enough.
>>
>> Okay.
>
>> 2. As we are already showing the changed Data prompt on closing the Query
>>> Tool, do we really need the Uncommitted Transaction prompt?
>>>
>>
>> This is needed when auto-commit is off. Saving changes in the data grid
>> is performed as part of the ongoing transaction (or a new one if none is
>> ongoing). After saving the data changes the user should still commit the
>> current transaction for the changes to be commited to the database. This
>> feature is also useful in general when auto-commit is off as users may
>> forget to commit ongoing transactions.
>>
>> One thing I have noticed, when I add a new row and delete it immediately
> without saving it and try to close the query tool, the uncommitted prompt
> is coming.
> In my opinion, it should not come, what do you think?
>
> We should disable the prompt if auto-commit and auto-rollback both are
> enabled.
>

The uncommited prompt does not keep track of what the user has done so far,
it only checks for the current transaction status. If a current transaction
is ongoing, the prompt comes up. If you added a new row then deleted it
without saving, the transaction status is not affected, you must have done
a previous operation and had auto-commit turned off (probably the select
statement).
if auto-commit & auto-rollback are both enabled then there won't be any
ongoing transaction at any point, thus, the prompt will never come up.

Looking forward for any feedback !
Thanks !

-- 
*Yosry Muhammad Yosry*

Computer Engineering student,
The Faculty of Engineering,
Cairo University (2021).
Class representative of CMP 2021.
https://www.linkedin.com/in/yosrym93/


[pgAdmin4][Patch]: RM 4389 "string indices must be integers" error displayed if select Privileges for Columns

2019-07-11 Thread Akshay Joshi
Hi Hackers,

Attached is the patch to fix RM 4389 "string indices must be integers"
error displayed if select Privileges for Columns. Added API test case for
the scenario.

Please review it.

-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


RM_4389.patch
Description: Binary data


Re: [pgAdmin4][patch] Keyboard accessibility for sub-node control

2019-07-11 Thread Ganesh Jaybhay
Hi Dave,

Please find the attached patch for jasmine tests fix. Patch also includes
fixes for edit/delete cell focus on IE by Murtuza.

Regards,

Ganesh Jaybhay

On Thu, Jul 11, 2019 at 3:49 PM Dave Page  wrote:

> Hi Ganesh,
>
> It looks like this has broken the Jasmine tests (which I admit I forgot to
> run before committing). Can you fix ASAP please?
>
> Thanks.
>
> On Thu, Jul 11, 2019 at 10:14 AM Dave Page  wrote:
>
>> Thanks - patch applied with some doc tweaks.
>>
>> No need for a new ticket!
>>
>> On Thu, Jul 11, 2019 at 7:00 AM Ganesh Jaybhay <
>> ganesh.jayb...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Ticket number 3919 refers to keyboard accessibility issues for sub-node
>>> control and back grid but this patch covers only sub-node control. Should I
>>> create new one?
>>> I have added the screenshot having newly added shortcut and updated
>>> keyboard shortcut rst file. Also moved the code changes from backgrid.js to
>>> backgrid.pgadmin.js.
>>>
>>> Please find the attached updated patch.
>>>
>>> Regards,
>>> Ganesh Jaybhay
>>>
>>> On Tue, Jul 9, 2019 at 9:28 PM Dave Page  wrote:
>>>
 Hi,

 What's the ticket number for this? That's a fair amount of code for a
 one-line description. There are also no doc changes describing how to
 navigate the sub-node control that I can see.

 Also; instead of changing the repo used for backgrid, can we not
 un-vendorise it?

 On Mon, Jul 8, 2019 at 4:49 PM Ganesh Jaybhay <
 ganesh.jayb...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch for keyboard accessibility of sub-node control.
> It also covers sub-node dialog forward/backward tab navigation with
> shortcuts.
>
> Kindly review.
>
> Regards,
> Ganesh Jaybhay
>


 --
 Dave Page
 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake

 EnterpriseDB UK: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js
index 0d968aa..8275138 100644
--- a/web/pgadmin/static/js/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid.pgadmin.js
@@ -206,6 +206,11 @@ define([
 if(cell && cell.$el.hasClass('edit-cell') &&
   !cell.$el.hasClass('privileges') || cell.$el.hasClass('delete-cell')) {
   model.trigger('backgrid:next', m, n, false);
+  if(cell.$el.hasClass('delete-cell')) {
+setTimeout(function(){
+  $(cell.$el).trigger('focus');
+}, 50);
+  }
   break;
 } else if (renderable && editable) {
   cell.enterEditMode();
diff --git a/web/pgadmin/static/scss/_pgadmin.style.scss b/web/pgadmin/static/scss/_pgadmin.style.scss
index 8f1e248..082e82c 100644
--- a/web/pgadmin/static/scss/_pgadmin.style.scss
+++ b/web/pgadmin/static/scss/_pgadmin.style.scss
@@ -741,6 +741,17 @@ table tr td {
   }
 }
 
+/* Specific to IE11 where we want to highlight the focus on grid buttons */
+@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
+  table tr td {
+td.edit-cell:focus,
+td.delete-cell:focus,
+td.string-cell:focus {
+  border: 2px solid $input-focus-border-color !important;;
+}
+  }
+}
+
 .privilege_label{
   font-size: 10px!important;
 }
diff --git a/web/regression/javascript/dialog_tab_navigator_spec.js b/web/regression/javascript/dialog_tab_navigator_spec.js
index 8e86fc8..60e4bdd 100644
--- a/web/regression/javascript/dialog_tab_navigator_spec.js
+++ b/web/regression/javascript/dialog_tab_navigator_spec.js
@@ -11,7 +11,7 @@ import $ from 'jquery';
 import 'bootstrap';
 
 describe('dialogTabNavigator', function () {
-  let dialog, tabNavigator, backward_shortcut, forward_shortcut;
+  let dialog, tabNavigator, backward_shortcut, forward_shortcut, fakeEvent;
 
   beforeEach(() => {
 dialog = $(''+
@@ -68,6 +68,9 @@ describe('dialogTabNavigator', function () {
 
 tabNavigator = new dialogTabNavigator.dialogTabNavigator(
   dialog, backward_shortcut, forward_shortcut);
+
+fakeEvent = { stopPropagation: () => true };
+
   });
 
   describe('navigate', function () {
@@ -79,7 +82,7 @@ describe('dialogTabNavigator', function () {
 });
 
 it('navigate backward', function () {
-  tabNavigator.onKeyboardEvent({}, 'shift+ctrl+[');
+  tabNavigator.onKeyboardEvent(fakeEvent, 'shift+ctrl+[');
 
   expect(tabNavigator.navigateBackward).toHaveBeenCalled();
 
@@ -88,7 +91,7 @@ describe('dialogTabNavigator', function () {
 });
 
 it('