Re: pgAdmin 4 commit: Resolved an issue related to no proper valid/invalid

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgAdmin 4 commit: Resolved an issue related to no proper valid/invalid
Date: 2016-03-15 15:55:19
Message-ID: CAG7mmoz9mMBdxSuG3m7_yKFwmObKapKBKu5Jsw2T=Z0kfQW8yw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Mar 15, 2016 at 8:32 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> It looks like this has broken the schema properties dialog. On opening
> it, I now get:
>
> Uncaught TypeError: Cannot read property 'server' of
>
> undefinedpgNode.PrivilegeRoleModel.pgNode.Model.extend.schema.cell.Backgrid.Extension.NodeListByNameCell.extend.omit_selected_roles
> @
> privilege.js:144Backgrid.Extension.NodeAjaxOptionsCell.Backgrid.Extension.Select2Cell.extend.render
> @ node.ui.js:404Backgrid.Row.Backbone.View.extend.render @
> backgrid.js:1954Backgrid.Body.Backbone.View.extend.render @
> backgrid.js:2459Backgrid.Grid.Backbone.View.extend.render @
>
> backgrid.js:2860Backform.UniqueColCollectionControl.Backform.Control.extend.showGridControl
> @
> backform.pgadmin.js:986Backform.UniqueColCollectionControl.Backform.Control.extend.render
> @ backform.pgadmin.js:923(anonymous function) @
> backform.pgadmin.js:547_.each._.forEach @
> underscore.js:153Collection.(anonymous function) @
> backbone.js:966(anonymous function) @
> backform.pgadmin.js:540_.each._.forEach @
> underscore.js:153Backform.Dialog.Backform.Form.extend.render @
> backform.pgadmin.js:530(anonymous function) @ node.js:201fire @
> jquery-1.11.2.js:3143self.fireWith @ jquery-1.11.2.js:3255done @
> jquery-1.11.2.js:9309callback @ jquery-1.11.2.js:9713
>
Thanks for reporting.
It could have happened to all the nodes having privilege control, with
existing privileges in an object.

I was relying on the individual model to fetch the tree hierarchy
information, which was not available in case when we have existing
privileges information in earlier implementation.
Instead now, we rely on the top level model to fetch that information.

--

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 Tue, Mar 15, 2016 at 1:38 PM, Ashesh Vashi
> <ashesh(dot)vashi(at)enterprisedb(dot)com> wrote:
> > Resolved an issue related to no proper valid/invalid event was
> > generated for the privilege control. Also, made changes in the
> > PrivilegeRoleModel, to allow to select a grantee only once for the
> > current user (as grantor), and omit them from other cell objects.
> >
> > Valid/Invalid event was not properly triggered, whenever the child
> > attribute is a collection/model within a model (nested mode/collection
> > within model). This patch tried to take care of all such scenarios in
> > general.
> >
> > Branch
> > ------
> > master
> >
> > Details
> > -------
> >
> http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4adea4dc2596fb495c4df8129745b87c35b062a6
> >
> > Modified Files
> > --------------
> > .../server_groups/servers/static/js/privilege.js | 187
> ++++++++++++++---
> > .../servers/templates/servers/servers.js | 9 +-
> > web/pgadmin/browser/static/js/datamodel.js | 233
> ++++++++++-----------
> > 3 files changed, 283 insertions(+), 146 deletions(-)
> >
> >
> > --
> > 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
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2016-03-15 16:01:46 Re: depends.js and sql.js
Previous Message Dave Page 2016-03-15 15:52:13 depends.js and sql.js