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

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: [pgAdmin][RM5000] Logout the inactive session
Date: 2020-01-31 06:15:25
Message-ID: CANxoLDef6V8wC_faGAvDjHmwSD15y5xkTC8iz+AEDRpbmeii4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, patch applied.

On Tue, Jan 28, 2020 at 3:14 PM Aditya Toshniwal <
aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:

> Hi Hackers,
>
> The current code works fine if a new tab is opened from the main window.
> But it does not handle the case where a new tab is opened from the opened
> tab.
> Attached is the patch to fix the issue.
>
> On Wed, Jan 15, 2020 at 6:12 PM Akshay Joshi <
> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>
>> Thanks, patch applied.
>>
>> On Wed, Jan 15, 2020 at 3:18 PM Aditya Toshniwal <
>> aditya(dot)toshniwal(at)enterprisedb(dot)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(dot)joshi(at)enterprisedb(dot)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 <dpage(at)pgadmin(dot)org> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> On Mon, Jan 13, 2020 at 7:04 PM Aditya Toshniwal <
>>>>> aditya(dot)toshniwal(at)enterprisedb(dot)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 <USER_INACTIVITY_TIMEOUT> 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*
>>
>
>
> --
> 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*

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2020-01-31 06:56:20 Re: [pgAdmin][Accessibility][RM4601] Tab navigation for panel buttons.
Previous Message Akshay Joshi 2020-01-31 06:15:10 Re: [pgAdmin4][RM#5107] Add tab navigation for tabs under explain panel in query tool