[pgAdmin][RM6325]:Tools > Storage Manager should have file type as "All files" by default

2021-04-07 Thread Pradip Parkale
Hi Hackers,

Please find the attached patch for #6325 - Tools > Storage Manager should
have file type as "All files" by default.


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


RM6325.patch
Description: Binary data


Re: [pgAdmin][Patch] RM 6082 - Able to change connection when a long query is running

2021-04-07 Thread Yogesh Mahajan
Hello,

Sorry for the inconvenience.
Please update the patch.

Thanks,
Yogesh Mahajan
EnterpriseDB


On Tue, Apr 6, 2021 at 4:07 PM Akshay Joshi 
wrote:

> Hi Yogesh
>
> The issue is not fixed yet. I am able to change the connection while the
> transaction is in progress. Please check and resend the patch.
>
> On Tue, Apr 6, 2021 at 1:43 PM Yogesh Mahajan <
> yogesh.maha...@enterprisedb.com> wrote:
>
>> Hello,
>>
>> Please find a patch which diables change of connection from query tool
>> while query tool transaction is in progress.
>>
>>
>> Thanks,
>> Yogesh Mahajan
>> EnterpriseDB
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


RM6082_v2.patch
Description: Binary data


Re: [pgAdmin][RM6325]:Tools > Storage Manager should have file type as "All files" by default

2021-04-07 Thread Akshay Joshi
Hi Pradip

The issue is not fixed as per the expectation. Please fix and resend the
patch.

On Wed, Apr 7, 2021 at 1:17 PM Pradip Parkale <
pradip.park...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the attached patch for #6325 - Tools > Storage Manager should
> have file type as "All files" by default.
>
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM6325]:Tools > Storage Manager should have file type as "All files" by default

2021-04-07 Thread Pradip Parkale
Hi Akshay,

Please find an updated patch. I missed few lines in my previous patch.

On Wed, Apr 7, 2021 at 3:45 PM Akshay Joshi 
wrote:

> Hi Pradip
>
> The issue is not fixed as per the expectation. Please fix and resend the
> patch.
>
> On Wed, Apr 7, 2021 at 1:17 PM Pradip Parkale <
> pradip.park...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Please find the attached patch for #6325 - Tools > Storage Manager should
>> have file type as "All files" by default.
>>
>>
>> --
>> Thanks & Regards,
>> Pradip Parkale
>> Software Engineer | EnterpriseDB Corporation
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
diff --git a/web/pgadmin/misc/file_manager/static/js/utility.js b/web/pgadmin/misc/file_manager/static/js/utility.js
index 67c4be047..2766ee957 100644
--- a/web/pgadmin/misc/file_manager/static/js/utility.js
+++ b/web/pgadmin/misc/file_manager/static/js/utility.js
@@ -52,6 +52,18 @@ define([
 });
   };
 
+  var getFileFormat = function(data) {
+  // Get last selected file format
+return $.ajax({
+  async: false,
+  cache: false,
+  url: url_for('settings.get_file_format_setting'),
+  data : $.extend({}, data),
+  dataType: 'json',
+  contentType: 'application/json; charset=utf-8',
+});
+  };
+
   // Set enable/disable state of list and grid view
   var setViewButtonsFor = function(viewMode) {
 if (viewMode == 'grid') {
@@ -1330,18 +1342,22 @@ define([
 if (types_len > 0) {
   var i = 0,
 t,
-selected = false,
 have_all_types = false;
 
   let fileFormats = '';
+  let response = getFileFormat(config.options.allowed_file_types);
+  let lastSelectedFormat =  response.responseJSON.info;
+
   while (i < types_len) {
 t = allowed_types[i];
-if (!selected && (types_len == 1 || t != '*')) {
-  fileFormats += '' + t + '';
-  selected = true;
+if ((types_len == 1 || t != '*')) {
+  if(t === lastSelectedFormat)
+fileFormats += '' + t + '';
+  else
+fileFormats += '' + t + '';
   have_all_types = (have_all_types || (t == '*'));
-} else {
-  fileFormats += '' +
+} else if ((lastSelectedFormat === '*')) {
+  fileFormats += '' +
 (t == '*' ? gettext('All Files') : t) + '';
   have_all_types = (have_all_types || (t == '*'));
 }
@@ -1370,6 +1386,13 @@ define([
 curr_path = $('.currentpath').val(),
 user_input_file = null,
 input_path = $('.storage_dialog #uploader .input-path').val();
+  config.options.selectedFormat = selected_val;
+  $.ajax({
+url: url_for('settings.save_file_format_setting'),
+type: 'POST',
+contentType: 'application/json',
+data: JSON.stringify(config.options),
+  });
   if (curr_path.endsWith('/')) {
 user_input_file = input_path.substring(curr_path.lastIndexOf('/')+1);
   } else {
@@ -1928,10 +1951,15 @@ define([
 getDetailView: function(path) {
   if (path.lastIndexOf('/') == path.length - 1 || path.lastIndexOf('\\') == path.length - 1) {
 var allowed_types = this.config.options.allowed_file_types;
-var set_type = allowed_types[0];
-if (allowed_types[0] == '*') {
-  set_type = allowed_types[1];
-}
+
+let set_type;
+
+let response = getFileFormat(this.config.options.allowed_file_types);
+let lastSelectedFormat =  response.responseJSON.info;
+if (_.isUndefined(lastSelectedFormat))
+  set_type = allowed_types[0];
+else
+  set_type = lastSelectedFormat;
 getFolderInfo(path, set_type);
   }
 },
diff --git a/web/pgadmin/settings/__init__.py b/web/pgadmin/settings/__init__.py
index c49feea41..9723f9af9 100644
--- a/web/pgadmin/settings/__init__.py
+++ b/web/pgadmin/settings/__init__.py
@@ -57,7 +57,9 @@ class SettingsModule(PgAdminModule):
 return [
 'settings.store', 'settings.store_bulk', 'settings.reset_layout',
 'settings.save_tree_state', 'settings.get_tree_state',
-'settings.reset_tree_state'
+'settings.reset_tree_state',
+'settings.save_file_format_setting',
+'settings.get_file_format_setting'
 ]
 
 
@@ -218,3 +220,66 @@ def get_browser_tree_state():
 return Response(response=data,
 status=200,
 mimetype="application/json")
+
+
+def _get_dialog_type(file_type):
+"""
+This function return dialog type
+:param file_type:
+:return: dialog type.
+"""
+if

pgAdmin 4 commit: Fixed an issue where users are unable to see data of

2021-04-07 Thread Akshay Joshi
Fixed an issue where users are unable to see data of the partition table usingĀ 
the View/Edit data option. Fixes #6375.

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_2.rst  | 1 +
web/pgadmin/tools/datagrid/static/js/show_data.js | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)



[pgAdmin]:SonarQube fixes.

2021-04-07 Thread Pradip Parkale
Hi Hackers,

Please find the attached patch for few SonaQube Fixes.

I have fixed the issues in the below files.

   1. foreign_key.js
   2. exclusion_constraint.js
   3. function.js


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


SonarQube.patch
Description: Binary data


Re: [pgAdmin][RM6325]:Tools > Storage Manager should have file type as "All files" by default

2021-04-07 Thread Akshay Joshi
Hi Pradip

I am getting the error with Python 3.9. It is working fine with Python 3.8.
Please fix the issue on Python 3.9 and resend the patch again

On Wed, Apr 7, 2021 at 4:44 PM Pradip Parkale <
pradip.park...@enterprisedb.com> wrote:

> Hi Akshay,
>
> Please find an updated patch. I missed few lines in my previous patch.
>
> On Wed, Apr 7, 2021 at 3:45 PM Akshay Joshi 
> wrote:
>
>> Hi Pradip
>>
>> The issue is not fixed as per the expectation. Please fix and resend the
>> patch.
>>
>> On Wed, Apr 7, 2021 at 1:17 PM Pradip Parkale <
>> pradip.park...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Please find the attached patch for #6325 - Tools > Storage Manager
>>> should have file type as "All files" by default.
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Pradip Parkale
>>> Software Engineer | EnterpriseDB Corporation
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM6325]:Tools > Storage Manager should have file type as "All files" by default

2021-04-07 Thread Pradip Parkale
Hi Akshay,

Please find the attached patch. I have added the check to handle the
exception for Python 3.9.


On Wed, Apr 7, 2021 at 5:43 PM Akshay Joshi 
wrote:

> Hi Pradip
>
> I am getting the error with Python 3.9. It is working fine with Python
> 3.8. Please fix the issue on Python 3.9 and resend the patch again
>
> On Wed, Apr 7, 2021 at 4:44 PM Pradip Parkale <
> pradip.park...@enterprisedb.com> wrote:
>
>> Hi Akshay,
>>
>> Please find an updated patch. I missed few lines in my previous patch.
>>
>> On Wed, Apr 7, 2021 at 3:45 PM Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Pradip
>>>
>>> The issue is not fixed as per the expectation. Please fix and resend the
>>> patch.
>>>
>>> On Wed, Apr 7, 2021 at 1:17 PM Pradip Parkale <
>>> pradip.park...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 Please find the attached patch for #6325 - Tools > Storage Manager
 should have file type as "All files" by default.


 --
 Thanks & Regards,
 Pradip Parkale
 Software Engineer | EnterpriseDB Corporation

>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>> *pgAdmin Hacker | Principal Software Architect*
>>> *EDB Postgres *
>>>
>>> *Mobile: +91 976-788-8246*
>>>
>>
>>
>> --
>> Thanks & Regards,
>> Pradip Parkale
>> Software Engineer | EnterpriseDB Corporation
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


RM6325_v3.patch
Description: Binary data


[pgAdmin4][Patch] - RM 6158 - Logging into PostgreSQL servers with Kerberos Authentication

2021-04-07 Thread Khushboo Vashi
Hi,

Please find the attached patch for RM 6158: Support Kerberos Authentication
- Phase 2.
This patch includes the support for logging into PostgreSQL servers with
Kerberos authentication.

Thanks,
Khushboo


RM_6158.patch
Description: Binary data


pgAdmin 4 commit: Ensure that the file format for the storage manager s

2021-04-07 Thread Akshay Joshi
Ensure that the file format for the storage manager should be 'All files' and 
for other dialogs, it should remember the last selected format. Fixes #6325

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=3a797b1efa418bdfba77118e88ffa75dcc67dc97
Author: Pradip Parkale 

Modified Files
--
docs/en_US/release_notes_5_2.rst   |  1 +
web/pgadmin/misc/file_manager/static/js/utility.js | 48 
web/pgadmin/settings/__init__.py   | 67 +-
3 files changed, 105 insertions(+), 11 deletions(-)



pgAdmin 4 commit: Fixed some SonarQube issues.

2021-04-07 Thread Akshay Joshi
Fixed some SonarQube issues.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=ffdd58ffb489976e06a8b83a6452dda2213f5bf9
Author: Pradip Parkale 

Modified Files
--
.../schemas/functions/static/js/function.js|  2 -
.../static/js/exclusion_constraint.js  | 76 --
.../foreign_key/static/js/foreign_key.js   | 11 +++-
3 files changed, 35 insertions(+), 54 deletions(-)



Re: [pgAdmin][RM6325]:Tools > Storage Manager should have file type as "All files" by default

2021-04-07 Thread Akshay Joshi
Thanks, patch applied.

On Wed, Apr 7, 2021 at 7:19 PM Pradip Parkale <
pradip.park...@enterprisedb.com> wrote:

> Hi Akshay,
>
> Please find the attached patch. I have added the check to handle the
> exception for Python 3.9.
>
>
> On Wed, Apr 7, 2021 at 5:43 PM Akshay Joshi 
> wrote:
>
>> Hi Pradip
>>
>> I am getting the error with Python 3.9. It is working fine with Python
>> 3.8. Please fix the issue on Python 3.9 and resend the patch again
>>
>> On Wed, Apr 7, 2021 at 4:44 PM Pradip Parkale <
>> pradip.park...@enterprisedb.com> wrote:
>>
>>> Hi Akshay,
>>>
>>> Please find an updated patch. I missed few lines in my previous patch.
>>>
>>> On Wed, Apr 7, 2021 at 3:45 PM Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Pradip

 The issue is not fixed as per the expectation. Please fix and resend
 the patch.

 On Wed, Apr 7, 2021 at 1:17 PM Pradip Parkale <
 pradip.park...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the attached patch for #6325 - Tools > Storage Manager
> should have file type as "All files" by default.
>
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


 --
 *Thanks & Regards*
 *Akshay Joshi*
 *pgAdmin Hacker | Principal Software Architect*
 *EDB Postgres *

 *Mobile: +91 976-788-8246*

>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Pradip Parkale
>>> Software Engineer | EnterpriseDB Corporation
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin]:SonarQube fixes.

2021-04-07 Thread Akshay Joshi
Thanks, patch applied.

On Wed, Apr 7, 2021 at 4:54 PM Pradip Parkale <
pradip.park...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the attached patch for few SonaQube Fixes.
>
> I have fixed the issues in the below files.
>
>1. foreign_key.js
>2. exclusion_constraint.js
>3. function.js
>
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*