public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rahul Shirsat <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin] RM5073 Save button is enabled in properties of Procedure by-default for SQL language
Date: Thu, 25 Feb 2021 18:13:23 +0530
Message-ID: <CAKtn9dNvcBFY64XkSbpAHc-hWwYq7_Z5mtqWhGPN8mUcp8Nh0w@mail.gmail.com> (raw)

Hi Hackers,

Please find the attached patch which resolves the issue of save button
getting enabled for procedure, additionally for functions as well.

There is no support for Estimated cost in Procedure for PG, which is also
taken care of in this fix.

-- 
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.


Attachments:

  [application/octet-stream] RM5073.patch (1.7K, 3-RM5073.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js
index 6bda73d4e..2420fcf2f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js
@@ -179,7 +179,7 @@ define('pgadmin.node.function', [
           proiswindow: undefined, /* Window Function ? */
           proparallel: undefined, /* Parallel mode */
           procost: undefined, /* Estimated execution Cost */
-          prorows: undefined, /* Estimated number of rows */
+          prorows: 0, /* Estimated number of rows */
           proleakproof: undefined,
           prosupportfunc: undefined, /* Support function */
           arguments: [],
@@ -306,7 +306,7 @@ define('pgadmin.node.function', [
           select2: {allowClear: false},
         },{
           id: 'procost', label: gettext('Estimated cost'), group: gettext('Options'),
-          cell:'string', type: 'text', readonly: 'isReadonly', deps: ['lanname'],
+          cell:'string', type: 'text', readonly: 'isReadonly', deps: ['lanname'], disabled: 'isDisabled',
         },{
           id: 'prorows', label: gettext('Estimated rows'), type: 'text',
           deps: ['proretset'], visible: 'isVisible', readonly: 'isReadonly',
@@ -462,9 +462,6 @@ define('pgadmin.node.function', [
             if(m.get('proretset') == true) {
               return false;
             }
-            setTimeout(function() {
-              m.set('prorows', 0);
-            }, 10);
             return true;
           default:
             return false;


view thread (2+ 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] RM5073 Save button is enabled in properties of Procedure by-default for SQL language
  In-Reply-To: <CAKtn9dNvcBFY64XkSbpAHc-hWwYq7_Z5mtqWhGPN8mUcp8Nh0w@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