Control for displaying "auto vacuum" fields into grid
Control for displaying "auto vacuum" fields into grid
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
Re: Control for displaying "auto vacuum" fields into grid
От:
Dave Page <dpage@pgadmin.org>
Дата:
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?
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: Control for displaying "auto vacuum" fields into grid
От:
Surinder Kumar <surinder.kumar@enterprisedb.com>
Дата:
Hi,
On Fri, Mar 18, 2016 at 8:58 PM, Dave Page <dpage@pgadmin.org> wrote:
It's hard to review this without being able to test. Do you have aOn 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.
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
Re: Control for displaying "auto vacuum" fields into grid
От:
Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>
Дата:
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.kumar@enterprisedb.com> wrote:Hi,On Fri, Mar 18, 2016 at 8:58 PM, Dave Page <dpage@pgadmin.org> wrote:It's hard to review this without being able to test. Do you have aOn 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.
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
Re: Control for displaying "auto vacuum" fields into grid
От:
Surinder Kumar <surinder.kumar@enterprisedb.com>
Дата:
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’s materialized view node centric only.Regards,MurtuzaOn 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:It's hard to review this without being able to test. Do you have aOn 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.
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
Re: Control for displaying "auto vacuum" fields into grid
Hi,
Please find updated patch, I have moved everything at schema level and tweak some code as well, so that we can use it in Table/View node.
Regards,
Murtuza
--
Regards,
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’s materialized view node centric only.Regards,MurtuzaOn 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:It's hard to review this without being able to test. Do you have aOn 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.
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
Re: Control for displaying "auto vacuum" fields into grid
Hi,
Rebase patch and sent again.
Regrds,
Murtuza
--
Regards,
On Thu, Apr 7, 2016 at 4:07 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,Please find updated patch, I have moved everything at schema level and tweak some code as well, so that we can use it in Table/View node.Regards,Murtuza--Regards,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’s materialized view node centric only.Regards,MurtuzaOn 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:It's hard to review this without being able to test. Do you have aOn 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.
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
Re: Control for displaying "auto vacuum" fields into grid
Hi,
I have made few minor changes in this patch to make it to work with Materialized View.
PFA patch with following changes:
1. Fixed typo issue for url parameter.
2. Check for 'hastoasttable' attribute in Disabled property of field "toast_autovaccum" in VacuumSettingsSchema.
3. Use Simplejson library instead of json.
On Thu, Apr 7, 2016 at 4:19 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,Rebase patch and sent again.Regrds,Murtuza--Regards,On Thu, Apr 7, 2016 at 4:07 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi,Please find updated patch, I have moved everything at schema level and tweak some code as well, so that we can use it in Table/View node.Regards,Murtuza--Regards,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’s materialized view node centric only.Regards,MurtuzaOn 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:It's hard to review this without being able to test. Do you have aOn 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.
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