Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f40x9-0006eW-Ln for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Apr 2018 09:13:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f40x5-0006Xr-Pe for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Apr 2018 09:13:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f40x5-0006Xh-5i for pgadmin-hackers@lists.postgresql.org; Thu, 05 Apr 2018 09:13:03 +0000 Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f40wz-00006z-67 for pgadmin-hackers@postgresql.org; Thu, 05 Apr 2018 09:12:59 +0000 Received: by mail-io0-x235.google.com with SMTP id p139so5706914iod.0 for ; Thu, 05 Apr 2018 02:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RfybLp4tS55oHG+6TqdYwFd4UH5yBe2sA77B1HBtFf8=; b=qBY6LBDoMkMBHuvzNKAfHzvkQNPcBDGLkr/vxWoMkv20d14MTMdpxTCq7lA2S5A2vi XQAKh64WJ5Cu2I7nrWfxAPrqVaYpWqYcDNv/FOEDjbyqdCecu2RCqVGGYHUxaP0TZBJ0 iDB7sFBQ4CLH4xUiNLTUNMhldOXnNiUurWTX3mjU3c9RC+sHnKLQhh5xdfTCINY5OJBP 5t9En//BvwZDtQUqTp5WH+Z7Y/EWk8emlbfsNU7bfA0q1308ZuF54Q6aypCmj/kstvHJ Ln/NirBm9wzUgh+cJsxdjJScKC2m1DkPsWuC2K9AzmgjDMeCY+6Ue1LWz7ST1m6Ae8nI rErQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RfybLp4tS55oHG+6TqdYwFd4UH5yBe2sA77B1HBtFf8=; b=aWHNMg9O9yNf0HYt/P9Uf1QfJ/fvMtjSrvcmyBvZ0vCx2A4Q2c7N8ckZbJKQYfSQ9W Wy+q71JLgF1ZlBXyr20D6szG1D77yE2INktN6UGdR/n/0H8G1a2HgyROSTk3nbDDNav/ REMagI7S2tG1fOTHuA16dEkoM0Z79mIKLi95AWvXTsJlHHumruSRi7Sm/YQot3fCTzZH j03RUi9yqw5hIBD9k1rCAguFh/dtnV0pY6msxBnfBr3MWzIH2orCvv5NPHXx2WOUS/Xo 36eXEVwb6i+eaBdzm+5xbzu3OxfBUKxU+GnduOytURuVJ2fei5yZM913+T+vW84srkE/ IZ+w== X-Gm-Message-State: AElRT7Fht6DRH0N0IXsRIN7V/8NKHZBcd5KHNYZgqRWBaZ8gqqUMYqA3 B64FjtsLkzDG/Ds4JZ427RYWxb2Mil0o0UfaUyBKmA== X-Google-Smtp-Source: AIpwx49iEuWbTgl9QXZSFLxcKdNJ5tZv0KxLAj0fNIuNaQasWJPOCpNNuIDaO95E+Vng/TgZU3CjH8jl8z4n3mUY4Zc= X-Received: by 10.107.8.36 with SMTP id 36mr18680844ioi.167.1522919575686; Thu, 05 Apr 2018 02:12:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.9.68 with HTTP; Thu, 5 Apr 2018 02:12:55 -0700 (PDT) In-Reply-To: References: From: Neel Patel Date: Thu, 5 Apr 2018 14:42:55 +0530 Message-ID: Subject: Re: pgAdmin 4 commit: Fix a number of broken connection detection scenarios To: Akshay Joshi Cc: Dave Page , pgadmin-hackers Content-Type: multipart/alternative; boundary="001a113fb88454a58b056916589b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a113fb88454a58b056916589b Content-Type: text/plain; charset="UTF-8" Thanks, RM#3249 created for the same. Regards, Neel Patel On Thu, Apr 5, 2018 at 11:27 AM, Akshay Joshi wrote: > Hi Neel > > This issue is not due to the above fix, if you can see the error it is > showing in dashboard.js line no 454 "err = JSON.parse(xhr.responseText);" > that code is from long time. > I have just added an extra check of the readyState in case of server is > down in the above commit. > Though it is a bug can you please create a new RM for this. > > On Thu, Apr 5, 2018 at 10:52 AM, Neel Patel > wrote: > >> Hi Akshay, >> >> Due to above commit, when user "Drop" any database it gives exception in >> browser console. >> Check attached screenshot. >> >> Thanks, >> Neel Patel >> >> >> >> On Wed, Mar 21, 2018 at 2:08 PM, Dave Page wrote: >> >>> Fix a number of broken connection detection scenarios. >>> >>> Branch >>> ------ >>> master >>> >>> Details >>> ------- >>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif >>> f;h=637f3b9d1a54df8b9a1bfad9e26f27fdea407683 >>> Author: Akshay Joshi >>> >>> Modified Files >>> -------------- >>> web/pgadmin/dashboard/static/js/dashboard.js | 58 >>> ++++++++++++-------- >>> web/pgadmin/static/js/sqleditor/execute_query.js | 62 >>> +++++++++++---------- >>> .../js/sqleditor/is_new_transaction_required.js | 9 ++++ >>> web/pgadmin/tools/sqleditor/__init__.py | 4 +- >>> web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 20 ++++--- >>> .../tools/sqleditor/tests/test_start_query_tool.py | 2 +- >>> .../tools/sqleditor/utils/start_running_query.py | 63 >>> ++++++++++------------ >>> .../utils/tests/test_start_running_query.py | 15 +++++- >>> .../user_management/static/js/user_management.js | 13 ++++- >>> .../utils/driver/psycopg2/server_manager.py | 1 + >>> .../javascript/sqleditor/execute_query_spec.js | 48 >>> ++++++++++++----- >>> .../sqleditor/is_new_transaction_required_spec.js | 14 ++--- >>> 12 files changed, 195 insertions(+), 114 deletions(-) >>> >>> >> > > > -- > *Akshay Joshi* > > *Sr. Software Architect * > > > > *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* > --001a113fb88454a58b056916589b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks,
RM#3249 created for the same.

Regards,
Neel Patel

On Thu, Apr 5, 2018 at 11:27 AM, Akshay Jo= shi <akshay.joshi@enterprisedb.com> wrote:
Hi Neel=C2=A0

<= div>This issue is not due to the above fix, if you can see the error it is = showing in dashboard.js line= no 454 "err =3D JSON.p= arse(xhr.responseText);" that code is from long tim= e.=C2=A0
I have just added an extra check of the readyState in case of server is down in the = above commit.=C2=A0
Though it is a bug can you please create a ne= w RM for this.=C2=A0 =C2=A0

On Thu, Apr 5, 2018 at 10:52 A= M, Neel Patel <neel.patel@enterprisedb.com> wrote:=
Hi Akshay,

Due to above commit, when user "Drop" any database it give= s exception in browser console.=C2=A0
Check attached screenshot.<= /div>

Thanks,
Neel Patel

<= div>

On Wed, Mar 21, 2018 at 2:08 PM, Dave Page <dpage@pgadmin.org&= gt; wrote:
Fix a number of broken = connection detection scenarios.

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=3Dpgadmin4.git;a=3Dcom= mitdiff;h=3D637f3b9d1a54df8b9a1bfad9e26f27fdea407683
Author: Akshay Joshi <akshay.joshi@enterprisedb.com>

Modified Files
--------------
web/pgadmin/dashboard/static/js/dashboard.js=C2=A0 =C2=A0 =C2=A0 =C2= =A0| 58 ++++++++++++--------
web/pgadmin/static/js/sqleditor/execute_query.js=C2=A0 =C2=A0| 62 ++++= +++++++----------
.../js/sqleditor/is_new_transaction_required.js=C2=A0 =C2=A0 |=C2=A0 9= ++++
web/pgadmin/tools/sqleditor/__init__.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 4 +-
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 20 ++++---
.../tools/sqleditor/tests/test_start_query_tool.py |=C2=A0 2 +-
.../tools/sqleditor/utils/start_running_query.py=C2=A0 =C2=A0| 63 ++++= ++++++------------
.../utils/tests/test_start_running_query.py=C2=A0 =C2=A0 =C2=A0 =C2=A0= | 15 +++++-
.../user_management/static/js/user_management.js=C2=A0 =C2=A0| 13 ++++= -
.../utils/driver/psycopg2/server_manager.py=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 1 +
.../javascript/sqleditor/execute_query_spec.js=C2=A0 =C2=A0 =C2=A0| 48= ++++++++++++-----
.../sqleditor/is_new_transaction_required_spec.js=C2=A0 | 14 ++---
12 files changed, 195 insertions(+), 114 deletions(-)





<= /div>--
Akshay Joshi
Sr. Software Architect

=
Phone: +91 20-30= 58-9517
Mobile: +91 976-788-8246

--001a113fb88454a58b056916589b--