Re: Control for displaying "auto vacuum" fields into grid

From: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
To: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Control for displaying "auto vacuum" fields into grid
Date: 2016-03-25 11:20:47
Message-ID: A7C66DAB-B22B-4637-8E99-16D96CD82F24@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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’s materialized view node centric only.

Regards,
Murtuza

> On 23-Mar-2016, at 9:34 pm, Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com> wrote:
>
> Hi,
>
>
> On Fri, Mar 18, 2016 at 8:58 PM, Dave Page <dpage(at)pgadmin(dot)org <mailto:dpage(at)pgadmin(dot)org>> wrote:
> On Fri, Mar 18, 2016 at 10:37 AM, Surinder Kumar
> <surinder(dot)kumar(at)enterprisedb(dot)com <mailto:surinder(dot)kumar(at)enterprisedb(dot)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 <http://pgsnake.blogspot.com/>
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com <http://www.enterprisedb.com/>
> The Enterprise PostgreSQL Company
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Paresh More 2016-03-25 11:40:20 PATCH: pgAdmin4 windows installer
Previous Message Khushboo Vashi 2016-03-24 15:25:01 Re: pgAdmin4 PATCH: Domain Module