From: | Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com> |
---|---|
To: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Control for displaying "auto vacuum" fields into grid |
Date: | 2016-03-18 10:37:36 |
Message-ID: | CAM5-9D9Nwm2SKkaRpWpMy=95RhKO+qm1O9TvhXE8dmCiUFe1Cw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
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.
Thanks
Surinder Kumar
Attachment | Content-Type | Size |
---|---|---|
vacuum_collection_control.patch | application/octet-stream | 3.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Khushboo Vashi | 2016-03-18 10:41:47 | Re: [pgAdmin4][Patch]: Added Support for the Domain Dependencies |
Previous Message | Dave Page | 2016-03-18 10:32:14 | Re: [pgAdmin4][Patch]: Added Support for the Domain Dependencies |