Re: PATCH: To fix expanding server if server inaccessible (pgAdmin4)

From: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: To fix expanding server if server inaccessible (pgAdmin4)
Date: 2016-06-02 14:35:58
Message-ID: CAKKotZQO3hedTh1NqZkgvhQcTKwe-=MpFLEP-WeVTPJc_bBvQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave/Ashesh,

Please find patch for the dashboard issue, Please review it.

I tried with both config options "threaded=True" & "threaded=False", In
both cases this fix working fine.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Thu, Jun 2, 2016 at 7:02 PM, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
wrote:

> I will look into it..
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> <http://www.enterprisedb.com>
>
>
> *http://www.linkedin.com/in/asheshvashi*
> <http://www.linkedin.com/in/asheshvashi>
>
> On Thu, Jun 2, 2016 at 6:23 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>> On Tue, May 31, 2016 at 3:43 PM, Murtuza Zabuawala
>> <murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>> > Hi,
>> >
>> > As advised by Ashesh, I have tried flask 'threaded' options for this
>> issues
>> > & it fixed the issue.
>> >
>> > PFA patches to fix long load delay when expanding server if server is
>> > inaccessible.
>> > (RM#1185).
>>
>> This appears to have broken the dashboards - the graphs now
>> periodically flash up error messages. On the console this coincides
>> with:
>>
>> 2016-06-02 13:50:37,494: ERROR pgadmin: Exception on
>> /dashboard/tps_stats/1 [GET]
>> Traceback (most recent call last):
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1817, in wsgi_app
>> response = self.full_dispatch_request()
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1477, in full_dispatch_request
>> rv = self.handle_user_exception(e)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1381, in handle_user_exception
>> reraise(exc_type, exc_value, tb)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1475, in full_dispatch_request
>> rv = self.dispatch_request()
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1461, in dispatch_request
>> return self.view_functions[rule.endpoint](**req.view_args)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py",
>> line 758, in decorated_view
>> return func(*args, **kwargs)
>> File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
>> line 147, in wrap
>> return f(*args, **kwargs)
>> File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
>> line 258, in tps_stats
>> return get_data(sid, did, 'tps_stats.sql')
>> File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
>> line 220, in get_data
>> "/".join([server_info['template_path'], template]), did=did
>> KeyError: 'template_path'
>>
>> (or a similar error about another member in server_info).
>>
>> I'm guessing this means that data is not being made available to each
>> thread? We need to fix this ASAP so we're ready to release tomorrow.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
>

Attachment Content-Type Size
Fix_dashborad.patch application/octet-stream 2.5 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Sandeep Thakkar 2016-06-02 15:23:21 Re: Patch for pgAdmin4 RPM package
Previous Message Surinder Kumar 2016-06-02 14:02:31 Re: [pgAdmin4][Patch]: RM#1293 - SQL pane is not displaying GRANT queries in Function, Procedure and Trigger node