Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajQK2-00023m-Ny for pgadmin-hackers@arkaria.postgresql.org; Fri, 25 Mar 2016 11:54:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ajQK1-00015c-PU for pgadmin-hackers@arkaria.postgresql.org; Fri, 25 Mar 2016 11:54:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ajQEw-0000zA-58 for pgadmin-hackers@postgresql.org; Fri, 25 Mar 2016 11:49:18 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ajQEs-0008GL-Ks for pgadmin-hackers@postgresql.org; Fri, 25 Mar 2016 11:49:17 +0000 Received: by mail-wm0-x22b.google.com with SMTP id l68so20449816wml.1 for ; Fri, 25 Mar 2016 04:49:14 -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=9YodVVsF4CQkeRIajINASGm6j1OKRE7FR/vRh2y+el0=; b=Oidu9LNaURp8bLH9cemZ1NxWQc9VBw2XZ4kfLihXPSVikQPu4g+CcpXyUAs+N5C/Zg J4YMb4mx84me9NTRf+PVM2tcIuLs8AHK16xuKz/nVjaQ4XZbXDh3Y9kWpEZ1mjZDA6s3 svTuYIVOWkwLuVYhaccGNhLsac5SCPRBvtXsy8OrBYU1HRRBqD61V2zL6eqRI0EB1slA jv0td/uQosTZNs8i1WrQaFnjz4xIUArovuumLrjBWrWun2Dx3SCnaIGUuZECa1O+A/oI a0Zy7M7B5khiOxLckoLcnUc+SEUQxPemcVR8SICZs3ziwKp7ctsUyNh+cqLUCksUZWCM Sx+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9YodVVsF4CQkeRIajINASGm6j1OKRE7FR/vRh2y+el0=; b=cLYL5OVnhjOUKhjMpFOjIgFaSpsICKvfWIhaC/tn4oV3thxvJXVfTJcPm8Jk7tu/6A VaOw7j+iWtAOmh02c5wJE7Ed09CL4q+O2oU2QKps9IJtm3FzJXUWfbzkreFbPd14JGFu B7qu/trbiM5vfBL6UfCuOzTv13osdJX2cFbmFfMhwU+TBy9lDJCp2DwbWnGddx3rDzea 6Y+5HZZtrqIahTlgBBIjfxQi7xCNOsFLW+QP2eSZ/MkNewdJe+oBOquxtRyfZIV9MT5d yiVop4Pkn6J11xjx0NVn1o71A/4m3Y3D5lH2nq8ceR2APXw/G7DvWrfEC0l3oRyMRCbA D4ng== X-Gm-Message-State: AD7BkJL3A4vNOyB92qdxv+F+qAG5NhuP+B5ZBQJWJEdz6wUc5QtQv2wAR4/bKwt/I6I/4T/kRMZQLizefRsFkVLv X-Received: by 10.194.78.83 with SMTP id z19mr14462962wjw.5.1458906552572; Fri, 25 Mar 2016 04:49:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.55.74 with HTTP; Fri, 25 Mar 2016 04:48:28 -0700 (PDT) In-Reply-To: References: From: Surinder Kumar Date: Fri, 25 Mar 2016 17:18:28 +0530 Message-ID: Subject: Re: Control for displaying "auto vacuum" fields into grid To: Murtuza Zabuawala Cc: Dave Page , pgadmin-hackers Content-Type: multipart/alternative; boundary=047d7bf0c29ad3b662052ede26ee X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --047d7bf0c29ad3b662052ede26ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ok, I will do. On Fri, Mar 25, 2016 at 4:50 PM, Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hi Surinder, > > Can you please move all genereic logic & sql at schema level so that we > can use it in table node as well? > Currently it=E2=80=99s materialized view node centric only. > > > Regards, > Murtuza > > > On 23-Mar-2016, at 9:34 pm, Surinder Kumar < > surinder.kumar@enterprisedb.com> wrote: > > Hi, > > > On Fri, Mar 18, 2016 at 8:58 PM, Dave Page wrote: > >> On Fri, Mar 18, 2016 at 10:37 AM, Surinder Kumar >> wrote: >> > Hi, >> > >> > PFA control for displaying auto vacuum fields into grid. This control = is >> > common for >> > Materialized View Node and Table Node. >> > >> > Usage: >> > >> > { >> > id: 'vacuum_table', label: '{{ _("Vacuum Table") }}', >> > model: VacuumTableModel, editable: false, type: 'collection', >> > canEdit: true, group: '{{ _("Table") }}', >> > mode: ['edit', 'create'], url: 'get_vacuum_defaults', >> > control: Backform.VacuumCollectionControl.extend({ >> > grid_columns :[ >> > { >> > name: 'label', label: '{{ _("Label") }}', >> > cell: 'string', editable: false >> > }, >> > { >> > name: 'value', label: '{{ _("Value") }}', >> > cellFunction: cellFunction, editable: function(m) { >> > if(m.handler.has('autovacuum_enabled')) { >> > return m.handler.get('autovacuum_enabled'); >> > } >> > return !m.handler.isNew(); >> > } >> > }, >> > { >> > name: 'setting', label: '{{ _("Default value") }}', >> > cellFunction: cellFunction, editable: false >> > } >> > ] >> > }), >> > >> > >> > When using this control, provide following parameters in schema: >> > 1. model >> > 2. url - to fetch default values for auto vacuum fields. >> > 3. grid columns - Name of the columns to display in the grid. >> > >> > >> > Please review the patch. >> >> It's hard to review this without being able to test. Do you have a >> simple test case? >> > > I have submitted patch for materialized view which is using this control. > so you can test it in materialized view. > >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > > --047d7bf0c29ad3b662052ede26ee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ok, I will do.

On Fri, Mar 25, 2016 at 4:50 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
=
Hi = Surinder,

Can you please move all genereic logic &= amp; sql at schema level so that we can use it in table node as well?
=
Currently it=E2=80=99s materialized view node centric only.
=

Regards,
Murtuza


On 23-Mar-= 2016, at 9:34 pm, Surinder Kumar <surinder.kumar@enterprisedb.com> wrot= e:

Hi,


On Fri, Mar 18, 2016 at 8:58 PM, Da= ve Page <dpage@pgadmin.org> wrote:
On Fri, Mar 18, 2016 at 10:37 AM, Surinder Kumar
<su= rinder.kumar@enterprisedb.com> wrote:
> Hi,
>
> PFA control for displaying auto vacuum fields into grid. This control = is
> common for
> Materialized View Node and Table Node.
>
> Usage:
>
> {
>=C2=A0 =C2=A0id: 'vacuum_table', label: '{{ _("Vacuum = Table") }}',
>=C2=A0 =C2=A0model: VacuumTableModel, editable: false, type: 'colle= ction',
>=C2=A0 =C2=A0canEdit: true, group: '{{ _("Table") }}'= ,
>=C2=A0 =C2=A0mode: ['edit', 'create'], url: 'get_va= cuum_defaults',
>=C2=A0 =C2=A0control: Backform.VacuumCollectionControl.extend({
>=C2=A0 =C2=A0 =C2=A0grid_columns :[
>=C2=A0 =C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0name: 'label', label: '{{= _("Label") }}',
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cell: 'string', editable: fal= se
>=C2=A0 =C2=A0 =C2=A0 =C2=A0},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0name: 'value', label: '{{= _("Value") }}',
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cellFunction: cellFunction, editable:= function(m) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(m.handler.has('autovacu= um_enabled')) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return m.handler.get(&#= 39;autovacuum_enabled');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return !m.handler.isNew();
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0name: 'setting', label: '= {{ _("Default value") }}',
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cellFunction: cellFunction, editable:= false
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0]
>=C2=A0 =C2=A0}),
>
>
> When using this control, provide following parameters in schema:
> 1. model
> 2. url - to fetch default values for auto vacuum fields.
> 3. grid columns - Name of the columns to display in the grid.
>
>
> Please review the patch.

It's hard to review this without being able to test. Do you= have a
simple test case?

I have submitted patc= h for materialized view which is using this control. so you can test it in = materialized view.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--047d7bf0c29ad3b662052ede26ee--