public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM4784]: autovacuum and analyze scale factors can't be edited with more than 2 decimals
Date: Tue, 9 Mar 2021 16:22:10 +0530
Message-ID: <CAJ9T6Svc3T93p2GoF9DopmK2gVXheUinc15DA6KsjfG7LLS1Yg@mail.gmail.com> (raw)
In-Reply-To: <CAJ9T6Ssc4HFyZ5-nLFdZ2=7WEoASY71xJdkHaG9hbfyK5iXzvQ@mail.gmail.com>
References: <CAJ9T6Ssc4HFyZ5-nLFdZ2=7WEoASY71xJdkHaG9hbfyK5iXzvQ@mail.gmail.com>

Hi Hackers,

Please ignore my previous email and find the latest attachment. I have
changed the default decimals value from 2 to 5.



On Mon, Mar 8, 2021 at 10:07 PM Pradip Parkale <
[email protected]> wrote:

> Hi Hackers,
>
> Please find attached the patch for RM4784.
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


Attachments:

  [application/x-patch] RM4784_v2.patch (1.5K, 3-RM4784_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
index 03fd7d6e1..740c9fff1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
@@ -120,7 +120,9 @@ define('pgadmin.node.schema', [
     case 'integer':
       return Backgrid.IntegerCell;
     case 'number':
-      return Backgrid.NumberCell;
+      return Backgrid.NumberCell.extend({
+        decimals: this.get('decimals') || Backgrid.NumberFormatter.prototype.defaults.decimals,
+      });
     case 'string':
       return Backgrid.StringCell;
     default:
@@ -210,6 +212,7 @@ define('pgadmin.node.schema', [
         {
           name: 'value', label: gettext('Value'),
           cellHeaderClasses:'width_percent_30',
+          decimals: 5,
           cellFunction: Backform.cellFunction, editable: function(m) {
             return m.handler.get('autovacuum_custom');
           }, headerCell: Backgrid.Extension.CustomHeaderCell,
@@ -284,6 +287,7 @@ define('pgadmin.node.schema', [
           name: 'value', label: gettext('Value'),
           cellHeaderClasses:'width_percent_30',
           headerCell: Backgrid.Extension.CustomHeaderCell,
+          decimals: 5,
           cellFunction: Backform.cellFunction, editable: function(m) {
             return m.handler.get('toast_autovacuum');
           },


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin][RM4784]: autovacuum and analyze scale factors can't be edited with more than 2 decimals
  In-Reply-To: <CAJ9T6Svc3T93p2GoF9DopmK2gVXheUinc15DA6KsjfG7LLS1Yg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox