Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agwK5-0004FV-2m for pgadmin-hackers@arkaria.postgresql.org; Fri, 18 Mar 2016 15:28:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agwK4-0002e9-Lw for pgadmin-hackers@arkaria.postgresql.org; Fri, 18 Mar 2016 15:28:20 +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 1agwK4-0002d9-4R for pgadmin-hackers@postgresql.org; Fri, 18 Mar 2016 15:28:20 +0000 Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1agwK0-0005Eg-Ly for pgadmin-hackers@postgresql.org; Fri, 18 Mar 2016 15:28:19 +0000 Received: by mail-io0-x236.google.com with SMTP id v123so31127591ioe.0 for ; Fri, 18 Mar 2016 08:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=ChpqaNOFdRFei3Wr+SarbwCyJcUtSde+hCeUYM8WVXk=; b=GX5j/ZYnyZw9N+Pcusr0l3PJE2K3pYF1jaBAY/zM4zdkhXn+U9V6eP551zH7UKjGTn e/inB9ImNCtcXWC8sID3D69BtuHpubtNvSM03TeSZmnDNt1pgHh8khzgmZQmY6KwWM93 2PXLP1Xaw3OzKwQh7vvTsN1znWUQppPiWV1vuDEkuGip1Oflxlcp22H0KEDlLE69YTPW p5xk4Aan4fMojdUM9t7bIIslB917GBLHqqBFeHqblig9iDI0DvTX5Bx/UQZQwViDs/tq /c9hL2IBmWAMs3R16Mi5e2+xqfyAvcxGqltJhMv/mRz18T1oXpgYzOQ/xI7ZyDQwpAEz QMsg== 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:date :message-id:subject:from:to:cc; bh=ChpqaNOFdRFei3Wr+SarbwCyJcUtSde+hCeUYM8WVXk=; b=Fr5Il2u62zJS5Wp0uPWqesjCi7jzcdmaREKhYBnGb+Cyv8g8lkFyI2p0Fbrk0ktxad Gdz7l8IQiGvF362qwcUPr56t8MRe9JAQ69uEM3csJ2a9sWMt22MBR9Pjhn6ZqtTJ9HZO L7P8n2wWzuyAqOrS2iFMD93ic0X0/iu0Z9lyriDmSQZlwJk5R4wbHkkFXmgFB+chNyhM l52LEf/o/0gT0YGYDCdJePyJhWWb/7bfH//t1K8sr1e+obWx6umJLfHoiryiuBF8AZBx hk0tIrx+ZJOxHsLHfdkbcygKPecx0HIZ7vs9oJdYMk589eQwJP3SxOnWoxfuHAVQjO9c riJg== X-Gm-Message-State: AD7BkJJFD6XDdUuRoXrdv+Oerj1IdbHMmXsBOaeoCDPZbLJ9kaIkDxPAgZbC4xgngAeBBGKHKGOYKuTE5dqzWw== MIME-Version: 1.0 X-Received: by 10.107.43.2 with SMTP id r2mr16562529ior.156.1458314894333; Fri, 18 Mar 2016 08:28:14 -0700 (PDT) Received: by 10.64.213.73 with HTTP; Fri, 18 Mar 2016 08:28:14 -0700 (PDT) In-Reply-To: References: Date: Fri, 18 Mar 2016 15:28:14 +0000 Message-ID: Subject: Re: Control for displaying "auto vacuum" fields into grid From: Dave Page To: Surinder Kumar Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 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 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 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers