Re: [pgAdmin][Patch] - Feature #6395 - Feature request: Log Rotation

2021-05-25 Thread Akshay Joshi
Hi Yogesh

Following are the review comments:

   - LOG_ROTATION_MAX_LOGS should be renamed to LOG_ROTATION_MAX_LOG_FILES
   - Rollover file name should have '.log' extension at the end instead of "
   pgadmin4.log.2021-05-25_12-17-43"
   - Add comments in the 'enhanced_log_rotation.py' file.
   -  'enhanced_log_rotation.py' file line no 23 should be "max_bytes =
   max_bytes * 1024 * 1024" instead of "max_bytes = max_bytes * 100"


On Tue, May 25, 2021 at 10:54 AM Yogesh Mahajan <
yogesh.maha...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch which rotates the pgadmin log file with
> context to the parameters specified in the config file.
>
> # Log rotation setting
> LOG_ROTATION_SIZE = 10  # In MBs
> LOG_ROTATION_AGE = 1440  # In minutes
> LOG_ROTATION_MAX_LOGS = 90  # Maximum number of backups to retain
>
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>


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

*Mobile: +91 976-788-8246*


Re: [pgAdmin][Patch] - Feature #6395 - Feature request: Log Rotation

2021-05-25 Thread Yogesh Mahajan
Hello,

Please find the attached file incorporated with the above comments except
the 2nd one.

Thanks,
Yogesh Mahajan
EnterpriseDB


On Tue, May 25, 2021 at 1:09 PM Akshay Joshi 
wrote:

> Hi Yogesh
>
> Following are the review comments:
>
>- LOG_ROTATION_MAX_LOGS should be renamed to LOG_ROTATION_MAX_LOG_FILES
>- Rollover file name should have '.log' extension at the end instead
>of "pgadmin4.log.2021-05-25_12-17-43"
>- Add comments in the 'enhanced_log_rotation.py' file.
>-  'enhanced_log_rotation.py' file line no 23 should be "max_bytes =
>max_bytes * 1024 * 1024" instead of "max_bytes = max_bytes * 100"
>
>
> On Tue, May 25, 2021 at 10:54 AM Yogesh Mahajan <
> yogesh.maha...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch which rotates the pgadmin log file with
>> context to the parameters specified in the config file.
>>
>> # Log rotation setting
>> LOG_ROTATION_SIZE = 10  # In MBs
>> LOG_ROTATION_AGE = 1440  # In minutes
>> LOG_ROTATION_MAX_LOGS = 90  # Maximum number of backups to retain
>>
>>
>> Thanks,
>> Yogesh Mahajan
>> EnterpriseDB
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


RM6395_v2.patch
Description: Binary data


pgAdmin 4 commit: Added support to rotate the pgadmin log file on the b

2021-05-25 Thread Akshay Joshi
Added support to rotate the pgadmin log file on the basis of Size and Age. 
Fixes #6395

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=faa49687be2e0a82bc2e4e232b8ea821ed3624b9
Author: Yogesh Mahajan 

Modified Files
--
docs/en_US/release_notes_5_4.rst   |  1 +
web/config.py  |  7 
web/pgadmin/__init__.py|  8 +++-
web/pgadmin/utils/enhanced_log_rotation.py | 59 ++
4 files changed, 74 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Added support to launch PSQL for the connected databa

2021-05-25 Thread Akshay Joshi
Added support to launch PSQL for the connected database server. Fixes #2341

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=3ddf941cd772164c96767bd547346574bce3ed6a
Author: Nikhil Mohite 

Modified Files
--
docs/en_US/developer_tools.rst |   1 +
docs/en_US/images/psql_tool.png| Bin 0 -> 114999 bytes
docs/en_US/images/tool_menu.png| Bin 98642 -> 102416 bytes
docs/en_US/images/toolbar.png  | Bin 42931 -> 42948 bytes
docs/en_US/menu_bar.rst|   2 +
docs/en_US/psql_tool.rst   |  19 +
docs/en_US/release_notes_5_4.rst   |   1 +
docs/en_US/toolbar.rst |   4 +-
requirements.txt   |   3 +-
web/config.py  |  19 +-
web/package.json   |   7 +-
web/pgAdmin4.py|  23 +-
web/pgadmin/__init__.py|   7 +
.../browser/register_browser_preferences.py|  24 +-
.../browser/server_groups/servers/__init__.py  |   8 +
.../servers/databases/static/js/database.js|   3 +
.../server_groups/servers/static/js/server.js  |  11 +-
web/pgadmin/browser/static/js/collection.js|  15 +
web/pgadmin/browser/static/js/node.js  |  19 +
web/pgadmin/browser/static/js/toolbar.js   |  23 +-
web/pgadmin/browser/static/scss/_browser.scss  |   6 +
web/pgadmin/browser/templates/browser/js/utils.js  |   4 +
web/pgadmin/browser/utils.py   |   3 +-
web/pgadmin/static/bundle/browser.js   |   1 +
web/pgadmin/static/css/style.css   |   2 +
web/pgadmin/static/scss/pgadmin.scss   |   5 +
.../static/scss/resources/_default.variables.scss  |   7 +
.../scss/resources/dark/_theme.variables.scss  |   7 +
.../resources/high_contrast/_theme.variables.scss  |   7 +
.../datagrid/static/js/datagrid_panel_title.js |   4 +
web/pgadmin/tools/psql/__init__.py | 686 +
web/pgadmin/tools/psql/static/js/index.js  |  23 +
web/pgadmin/tools/psql/static/js/psql_module.js| 429 +
.../tools/psql/templates/editor_template.html  |  58 ++
web/pgadmin/tools/psql/tests/__init__.py   |   0
web/pgadmin/tools/psql/tests/psql_test_data.json   | 184 ++
web/pgadmin/tools/psql/tests/test_backend_task.py  |  87 +++
web/pgadmin/tools/psql/tests/test_panel.py |  36 ++
web/pgadmin/tools/psql/tests/test_psql_disabled.py |  34 +
web/pgadmin/tools/psql/tests/test_psql_input.py| 148 +
.../tools/psql/tests/test_resize_terminal.py   |  58 ++
.../tools/psql/tests/test_socket_connect.py|  35 ++
.../tools/psql/tests/test_socket_disconnect.py |  52 ++
web/pgadmin/tools/psql/tests/test_start_process.py |  57 ++
.../tools/psql/tests/test_start_process_fail.py|  48 ++
web/pgadmin/tools/psql/tests/utils.py  |   6 +
.../tools/sqleditor/static/scss/_sqleditor.scss|  17 +
web/pgadmin/utils/csrf.py  |   1 +
web/pgadmin/utils/preferences.py   |   7 +-
web/webpack.config.js  |   4 +-
web/webpack.shim.js|  11 +
web/webpack.test.config.js |   1 +
web/yarn.lock  |  77 ++-
53 files changed, 2267 insertions(+), 27 deletions(-)



Re: [pgAdmin][Patch] - Feature #6395 - Feature request: Log Rotation

2021-05-25 Thread Akshay Joshi
Thanks, patch applied.

On Tue, May 25, 2021 at 4:59 PM Yogesh Mahajan <
yogesh.maha...@enterprisedb.com> wrote:

> Hello,
>
> Please find the attached file incorporated with the above comments except
> the 2nd one.
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>
>
> On Tue, May 25, 2021 at 1:09 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Yogesh
>>
>> Following are the review comments:
>>
>>- LOG_ROTATION_MAX_LOGS should be renamed to
>>LOG_ROTATION_MAX_LOG_FILES
>>- Rollover file name should have '.log' extension at the end instead
>>of "pgadmin4.log.2021-05-25_12-17-43"
>>- Add comments in the 'enhanced_log_rotation.py' file.
>>-  'enhanced_log_rotation.py' file line no 23 should be "max_bytes =
>>max_bytes * 1024 * 1024" instead of "max_bytes = max_bytes * 100"
>>
>>
>> On Tue, May 25, 2021 at 10:54 AM Yogesh Mahajan <
>> yogesh.maha...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch which rotates the pgadmin log file with
>>> context to the parameters specified in the config file.
>>>
>>> # Log rotation setting
>>> LOG_ROTATION_SIZE = 10  # In MBs
>>> LOG_ROTATION_AGE = 1440  # In minutes
>>> LOG_ROTATION_MAX_LOGS = 90  # Maximum number of backups to retain
>>>
>>>
>>> Thanks,
>>> Yogesh Mahajan
>>> EnterpriseDB
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>

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

*Mobile: +91 976-788-8246*


Re: Language

2021-05-25 Thread Akshay Joshi
Hi Marcelo

Please check this "
https://www.pgadmin.org/docs/pgadmin4/development/translations.html"; and
send the translation files on pgadmin-hack...@postgresql.org

On Thu, May 20, 2021 at 7:35 PM Marcelo Garcia 
wrote:

> would like to add support for a new language:
> pt_BR = Brazil
>


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

*Mobile: +91 976-788-8246*