Re: RM5049 Patch

2020-01-15 Thread Neel Patel
Patch only covers removal of the code and change in "coveragerc.in". I
guess you missed to add the new files in the patch. Can you please verify ?

Thanks,
Neel Patel

On Wed, Jan 15, 2020 at 1:16 PM Yogesh Mahajan <
yogesh.maha...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch for  api tests for cast node.This covers -
> Added new file (cast_test_cases.json) storing inventory, test, expected
> data.
> Also covers test cases for all cast node related api,
> This increase code coverage for cast from 33% to 68%.
>
> Command to run tests -
> --pkg browser.server_groups.servers.databases.casts.tests
>
> Thanks,
> Yogesh Mahajan
> QA - Team
> EnterpriseDB Corporation
>
> Phone: +91-9741705709
>


[pgAdmin][RM5050] Language node code coverage.

2020-01-15 Thread Pradip Parkale
Hi All,

Attached is a patch for language node code coverage.
This increases the code coverage of the language node from 45% to 69%.

Command to run the tests -
- python runtests.py --pkg
browser.server_groups.servers.databases.languages.tests


-- 
Thanks & Regards,
Pradip Parkale
QMG, EnterpriseDB Corporation


RM5050.patch
Description: Binary data


Re: RM5049 Patch

2020-01-15 Thread Yogesh Mahajan
Hi,

Please find updated patch -


Thanks,
Yogesh Mahajan
QA - Team
EnterpriseDB Corporation

Phone: +91-9741705709


On Wed, Jan 15, 2020 at 1:49 PM Neel Patel 
wrote:

> Patch only covers removal of the code and change in "coveragerc.in". I
> guess you missed to add the new files in the patch. Can you please verify ?
>
> Thanks,
> Neel Patel
>
> On Wed, Jan 15, 2020 at 1:16 PM Yogesh Mahajan <
> yogesh.maha...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find attached patch for  api tests for cast node.This covers -
>> Added new file (cast_test_cases.json) storing inventory, test, expected
>> data.
>> Also covers test cases for all cast node related api,
>> This increase code coverage for cast from 33% to 68%.
>>
>> Command to run tests -
>> --pkg browser.server_groups.servers.databases.casts.tests
>>
>> Thanks,
>> Yogesh Mahajan
>> QA - Team
>> EnterpriseDB Corporation
>>
>> Phone: +91-9741705709
>>
>


RM5049_v2.patch
Description: Binary data


Re: [pgAdmin][RM5000] Logout the inactive session

2020-01-15 Thread Akshay Joshi
Hi Aditya

We should not detect the user inactivity when SERVER_MODE = False. I have
tested it with SERVER_MODE = False and it refreshed the complete pgAdmin
page after USER_INACTIVITY_TIMEOUT.
Please fix that and resend the patch.

On Wed, Jan 15, 2020 at 1:27 PM Dave Page  wrote:

> Hi
>
> On Mon, Jan 13, 2020 at 7:04 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch for the feature where inactive session will be
>> logged out. Note that, here inactive session means no user activity of
>> mouse move, click or keypress.
>> I've 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.
>>
>> The patch also speeds up running jasmine test cases. With webpack 4, the
>> default mode is changed to production instead of development unlike
>> previous versions. Mode is set to development explicitly to improve the
>> speed.
>>
>
> Per our discussion in the office, here's the suggested wording for the
> config option descriptions:
>
> +# USER_INACTIVITY_TIMEOUT is interval in Seconds. If the pgAdmin screen
> is left
> +# unattended for  seconds then the user will
> +# be logged out. When set to 0, the timeout will be disabled.
> *# If pgAdmin doesn't detect any activity in the time specified (in
> seconds), the user will
> +# be forcibly logged out from pgAdmin. Set to zero to disable the timeout.
> +USER_INACTIVITY_TIMEOUT = 0
> +
> +# OVERRIDE_USER_INACTIVITY_TIMEOUT when set to True will override
> +# USER_INACTIVITY_TIMEOUT when long running queries in the Query Tool
> +# or Debugger are running. When the queries complete, the inactivity timer
> +# will restart in this case. If set to False, user inactivity may cause
> transactions
> +# or in-process debugging sessions to be aborted.
> +OVERRIDE_USER_INACTIVITY_TIMEOUT = True
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
*Thanks & Regards*
*Akshay Joshi*

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


Re: [pgAdmin][RM5000] Logout the inactive session

2020-01-15 Thread Aditya Toshniwal
Hi Hackers,

Attached is the updated patch to disable user inactivity timeout for
desktop mode along with updated wordings in config file.
Kindly review.

On Wed, Jan 15, 2020 at 2:54 PM Akshay Joshi 
wrote:

> Hi Aditya
>
> We should not detect the user inactivity when SERVER_MODE = False. I have
> tested it with SERVER_MODE = False and it refreshed the complete pgAdmin
> page after USER_INACTIVITY_TIMEOUT.
> Please fix that and resend the patch.
>
> On Wed, Jan 15, 2020 at 1:27 PM Dave Page  wrote:
>
>> Hi
>>
>> On Mon, Jan 13, 2020 at 7:04 PM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch for the feature where inactive session will be
>>> logged out. Note that, here inactive session means no user activity of
>>> mouse move, click or keypress.
>>> I've 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.
>>>
>>> The patch also speeds up running jasmine test cases. With webpack 4, the
>>> default mode is changed to production instead of development unlike
>>> previous versions. Mode is set to development explicitly to improve the
>>> speed.
>>>
>>
>> Per our discussion in the office, here's the suggested wording for the
>> config option descriptions:
>>
>> +# USER_INACTIVITY_TIMEOUT is interval in Seconds. If the pgAdmin screen
>> is left
>> +# unattended for  seconds then the user will
>> +# be logged out. When set to 0, the timeout will be disabled.
>> *# If pgAdmin doesn't detect any activity in the time specified (in
>> seconds), the user will
>> +# be forcibly logged out from pgAdmin. Set to zero to disable the
>> timeout.
>> +USER_INACTIVITY_TIMEOUT = 0
>> +
>> +# OVERRIDE_USER_INACTIVITY_TIMEOUT when set to True will override
>> +# USER_INACTIVITY_TIMEOUT when long running queries in the Query Tool
>> +# or Debugger are running. When the queries complete, the
>> inactivity timer
>> +# will restart in this case. If set to False, user inactivity may cause
>> transactions
>> +# or in-process debugging sessions to be aborted.
>> +OVERRIDE_USER_INACTIVITY_TIMEOUT = True
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM5000_v2.patch
Description: Binary data


pgAdmin 4 commit: Logout the pgAdmin session when no user activity of m

2020-01-15 Thread Akshay Joshi
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.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8c3bba65e5ad52917c876fd6ecdeea47780ef8b0
Author: Aditya Toshniwal 

Modified Files
--
docs/en_US/release_notes_4_18.rst  |   1 +
web/config.py  |  20 +++
web/pgadmin/browser/__init__.py|   9 +-
web/pgadmin/browser/static/js/activity.js  | 114 ++
web/pgadmin/browser/static/js/browser.js   |   7 +-
web/pgadmin/browser/templates/browser/index.html   |   2 +-
web/pgadmin/browser/templates/browser/js/utils.js  |   5 +
web/pgadmin/tools/debugger/static/js/direct.js |   8 +
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |   6 +
web/regression/javascript/browser/activity_spec.js | 174 +
web/webpack.shim.js|   1 +
web/webpack.test.config.js |   2 +
12 files changed, 346 insertions(+), 3 deletions(-)



Re: [pgAdmin][RM5000] Logout the inactive session

2020-01-15 Thread Akshay Joshi
Thanks, patch applied.

On Wed, Jan 15, 2020 at 3:18 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the updated patch to disable user inactivity timeout for
> desktop mode along with updated wordings in config file.
> Kindly review.
>
> On Wed, Jan 15, 2020 at 2:54 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Aditya
>>
>> We should not detect the user inactivity when SERVER_MODE = False. I have
>> tested it with SERVER_MODE = False and it refreshed the complete pgAdmin
>> page after USER_INACTIVITY_TIMEOUT.
>> Please fix that and resend the patch.
>>
>> On Wed, Jan 15, 2020 at 1:27 PM Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Mon, Jan 13, 2020 at 7:04 PM Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 Attached is the patch for the feature where inactive session will be
 logged out. Note that, here inactive session means no user activity of
 mouse move, click or keypress.
 I've 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.

 The patch also speeds up running jasmine test cases. With webpack 4,
 the default mode is changed to production instead of development unlike
 previous versions. Mode is set to development explicitly to improve the
 speed.

>>>
>>> Per our discussion in the office, here's the suggested wording for the
>>> config option descriptions:
>>>
>>> +# USER_INACTIVITY_TIMEOUT is interval in Seconds. If the pgAdmin screen
>>> is left
>>> +# unattended for  seconds then the user will
>>> +# be logged out. When set to 0, the timeout will be disabled.
>>> *# If pgAdmin doesn't detect any activity in the time specified (in
>>> seconds), the user will
>>> +# be forcibly logged out from pgAdmin. Set to zero to disable the
>>> timeout.
>>> +USER_INACTIVITY_TIMEOUT = 0
>>> +
>>> +# OVERRIDE_USER_INACTIVITY_TIMEOUT when set to True will override
>>> +# USER_INACTIVITY_TIMEOUT when long running queries in the Query Tool
>>> +# or Debugger are running. When the queries complete, the
>>> inactivity timer
>>> +# will restart in this case. If set to False, user inactivity may cause
>>> transactions
>>> +# or in-process debugging sessions to be aborted.
>>> +OVERRIDE_USER_INACTIVITY_TIMEOUT = True
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>>
>> *Sr. Software Architect*
>> *EnterpriseDB Software India Private Limited*
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

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


[pgAdmin][RM5096] Replace node-sass with sass for SCSS compilation

2020-01-15 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to replace node-sass with sass for SCSS compilation,
along with changes required in pgAdmin files. It will fix the issues
reported by yarn audit. sass is better maintained library than node-sass.

Kindly review.

-- 
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM5096.patch
Description: Binary data