public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin][patch] Exclusion constraint and vacuum related fixes
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin][patch] Exclusion constraint and vacuum related fixes
@ 2021-10-05 07:47 Aditya Toshniwal <[email protected]>
  2021-10-05 09:11 ` Re: [pgAdmin][patch] Exclusion constraint and vacuum related fixes Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Aditya Toshniwal @ 2021-10-05 07:47 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Please review the attached patch which fixes:
1. Operators dropdown disabled. Fixes #6771.
2. Vacuum options value is not considered for M-SQL when creating. Fixes
#6781.

-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] RM6771_6781.patch (2.5K, 3-RM6771_6781.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/static/js/exclusion_constraint.ui.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/static/js/exclusion_constraint.ui.js
index 3362cd785..bf80244d5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/static/js/exclusion_constraint.ui.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/static/js/exclusion_constraint.ui.js
@@ -169,7 +169,9 @@ class ExclusionColumnSchema extends BaseUISchema {
     },{
       id: 'operator', label: gettext('Operator'), type: 'select',
       width: 95,
-      editable: obj.isEditable,
+      editable: function() {
+        return obj.isNewExCons;
+      },
       cell: (state)=>{
         return {
           cell: 'select',
diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx
index e5e82b8d7..0f3073e9e 100644
--- a/web/pgadmin/static/js/SchemaView/index.jsx
+++ b/web/pgadmin/static/js/SchemaView/index.jsx
@@ -114,7 +114,7 @@ const diffArrayOptions = {
   compareFunction: objectComparator,
 };
 
-function getChangedData(topSchema, viewHelperProps, sessData, stringify=false) {
+function getChangedData(topSchema, viewHelperProps, sessData, stringify=false, includeSkipChange=true) {
   let changedData = {};
   let isEdit = viewHelperProps.mode === 'edit';
 
@@ -147,8 +147,9 @@ function getChangedData(topSchema, viewHelperProps, sessData, stringify=false) {
       let {modeSupported} = getFieldMetaData(field, schema, {}, viewHelperProps, true);
 
       /* If skipChange is true, then field will not be considered for changed data,
+      This is helpful when Save or Reset should not be enabled on this field change alone.
       No change in other behaviour */
-      if(!modeSupported || field.skipChange) {
+      if(!modeSupported || (field.skipChange && !includeSkipChange)) {
         return;
       }
       if(typeof(field.type) == 'string' && field.type.startsWith('nested-')) {
@@ -477,7 +478,7 @@ function SchemaDialogView({
     if(!isNotValid) setFormErr({});
 
     /* check if anything changed */
-    let changedData = getChangedData(schema, viewHelperProps, sessData);
+    let changedData = getChangedData(schema, viewHelperProps, sessData, false, false);
     let isDataChanged = Object.keys(changedData).length > 0;
     setDirty(isDataChanged);
 


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin][patch] Exclusion constraint and vacuum related fixes
  2021-10-05 07:47 [pgAdmin][patch] Exclusion constraint and vacuum related fixes Aditya Toshniwal <[email protected]>
@ 2021-10-05 09:11 ` Akshay Joshi <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2021-10-05 09:11 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Thanks, the patch applied.

On Tue, Oct 5, 2021 at 1:18 PM Aditya Toshniwal <
[email protected]> wrote:

> Hi Hackers,
>
> Please review the attached patch which fixes:
> 1. Operators dropdown disabled. Fixes #6771.
> 2. Vacuum options value is not considered for M-SQL when creating. Fixes
> #6781.
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Software Architect | *edbpostgres.com*
> <http://edbpostgres.com;
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-10-05 09:11 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 07:47 [pgAdmin][patch] Exclusion constraint and vacuum related fixes Aditya Toshniwal <[email protected]>
2021-10-05 09:11 ` Akshay Joshi <[email protected]>

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