Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajPnm-0000sZ-So for pgadmin-hackers@arkaria.postgresql.org; Fri, 25 Mar 2016 11:21:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ajPnl-0006Sk-F0 for pgadmin-hackers@arkaria.postgresql.org; Fri, 25 Mar 2016 11:21:13 +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 1ajPnW-0006E6-Kj for pgadmin-hackers@postgresql.org; Fri, 25 Mar 2016 11:20:58 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ajPnS-0007g3-LA for pgadmin-hackers@postgresql.org; Fri, 25 Mar 2016 11:20:58 +0000 Received: by mail-pf0-x22b.google.com with SMTP id u190so81194200pfb.3 for ; Fri, 25 Mar 2016 04:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=xenvyWbE1dPQ+0haffyBAF8XpLI+OHQ5TZ26wiwZF8c=; b=b/krBFnJ7FmXxGGvU7qbGlvzxm0Lu6G1mupo+M/MZF2lpCZt2rFFay8/vUC/YMNadM gAwruHWheJQQcL2RDGFa+J+1hw/GRx2HnrqVM83jz+S91ELx5W7NM8vCZv61/IcWnkRA VCly/29nmnPFTpsBnypOlBQCoCrBSUEJCrnM7iLcQwkMD2SqMLq0ht52gAHkAB/v/e/R KoOFLewD2N02BOFn2S1zlpbXh/sb0XyTnAoNkJVu0lZgoBezdoR57f7BRcCtm4HOEunK 8ciyyzDIldfhY4zcl4I9M1nBtQIXHgef5ZOvvd+hIEQDaQmBjANjq2A/lM9VlCjUeKxD NRgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=xenvyWbE1dPQ+0haffyBAF8XpLI+OHQ5TZ26wiwZF8c=; b=XdQ9OtN5X4/5lBTMlaRWzKaahuF7gTF4//zepI/2n7GEHmh35apauXsGOeqfez6fDw DCRDAXUzFbx3F88rJdC822X7rxtG1HuhUe+5cEKYJ3g9dcPMykMnl6ArPE7SGin3DbDP Bgbw3RCIFTIAQVoA3TYpGeg/kydgjE9Q+J04sHoz4eI+LsHYxcweSOud+wJZLoQS/2to WOaOA23IA8PoYjtqhwGHUWNsTdrtpCWNKbUP3scaw4qPZNKbPB1hQYbHe7nHZUqQu3d+ QqT27nJ7duQjz8WUOl1O/HIcYhCj3AKbdNp1bcj2gk5TSRQj78hBHXL73sV5Q5PUNl+4 na2A== X-Gm-Message-State: AD7BkJKCofEKPNbLH0sxjG/U7M2zOrP0qQNJ9um2bVUAwthnSla0S30xhDtG/GRctXBurhQc X-Received: by 10.98.80.70 with SMTP id e67mr20538756pfb.136.1458904852256; Fri, 25 Mar 2016 04:20:52 -0700 (PDT) Received: from [172.24.35.232] ([59.162.78.200]) by smtp.gmail.com with ESMTPSA id q20sm15890415pfi.63.2016.03.25.04.20.50 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Mar 2016 04:20:51 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_15558DAA-C991-442F-832C-5EB228E16607" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Control for displaying "auto vacuum" fields into grid From: Murtuza Zabuawala In-Reply-To: Date: Fri, 25 Mar 2016 16:50:47 +0530 Cc: Dave Page , pgadmin-hackers Message-Id: References: To: Surinder Kumar X-Mailer: Apple Mail (2.2104) 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 --Apple-Mail=_15558DAA-C991-442F-832C-5EB228E16607 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 = wrote: >=20 > Hi, >=20 >=20 > 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. >=20 > It's hard to review this without being able to test. Do you have a > simple test case? >=20 > I have submitted patch for materialized view which is using this = control. so you can test it in materialized view. >=20 > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake >=20 > EnterpriseDB UK: http://www.enterprisedb.com = > The Enterprise PostgreSQL Company >=20 --Apple-Mail=_15558DAA-C991-442F-832C-5EB228E16607 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
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 <dpage@pgadmin.org> wrote:
On Fri, = Mar 18, 2016 at 10:37 AM, Surinder Kumar
<surinder.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:
>
> {
>   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


= --Apple-Mail=_15558DAA-C991-442F-832C-5EB228E16607--