public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][patch] Partition node related fixes
Date: Wed, 6 Oct 2021 12:24:52 +0530
Message-ID: <CAM9w-_nijDb7aVsamVnroUH9edmXaXi0En2Qtf8LOJD8=F-GUQ@mail.gmail.com> (raw)

Hi Hackers,

Please review the attached patch which fixes:
1. Unable to create trigger for partition table. Fixes #6867.
2. Unable to create index, RLS policy, rules, triggers for partition. Fixes
#6868.

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


Attachments:

  [application/octet-stream] RM6867_6868.patch (3.0K, 3-RM6867_6868.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
index 9c1b20ad9..73f8eda22 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
@@ -18,8 +18,8 @@ export function getColumnSchema(nodeObj, treeNodeInfo, itemNodeData) {
   return new ColumnSchema(
     {
       columnList: ()=>getNodeListByName('column', treeNodeInfo, itemNodeData, {}),
-      collationList: ()=>getNodeAjaxOptions('get_collations', nodeObj, treeNodeInfo, itemNodeData),
-      opClassList: ()=>getNodeAjaxOptions('get_op_class', nodeObj, treeNodeInfo, itemNodeData)
+      collationList: ()=>getNodeAjaxOptions('get_collations', nodeObj, treeNodeInfo, itemNodeData, {jumpAfterNode: 'schema'}),
+      opClassList: ()=>getNodeAjaxOptions('get_op_class', nodeObj, treeNodeInfo, itemNodeData, {jumpAfterNode: 'schema'})
     }, {
       node_info: treeNodeInfo
     }
@@ -481,4 +481,4 @@ export default class IndexSchema extends BaseUISchema {
     }
     return null;
   }
-}
\ No newline at end of file
+}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js
index 2067ce267..6d0a8db8c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js
@@ -178,7 +178,7 @@ define('pgadmin.node.trigger', [
       getSchema: function(treeNodeInfo, itemNodeData) {
         return new TriggerSchema(
           {
-            triggerFunction: ()=>getNodeAjaxOptions('get_triggerfunctions', this, treeNodeInfo, itemNodeData, {cacheLevel: 'trigger_function'}, (data) => {
+            triggerFunction: ()=>getNodeAjaxOptions('get_triggerfunctions', this, treeNodeInfo, itemNodeData, {cacheLevel: 'trigger_function', jumpAfterNode: 'schema'}, (data) => {
               return _.reject(data, function(option) {
                 return option.label == '';
               });
diff --git a/web/pgadmin/browser/static/js/node_view.jsx b/web/pgadmin/browser/static/js/node_view.jsx
index c94928689..df1d8a240 100644
--- a/web/pgadmin/browser/static/js/node_view.jsx
+++ b/web/pgadmin/browser/static/js/node_view.jsx
@@ -70,7 +70,7 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo
 
   /* Called when switched to SQL tab, promise required */
   const getSQLValue = (isNew, changedData)=>{
-    const msqlUrl = generateNodeUrl.call(nodeObj, treeNodeInfo, 'msql', itemNodeData, !isNew, null);
+    const msqlUrl = generateNodeUrl.call(nodeObj, treeNodeInfo, 'msql', itemNodeData, !isNew, nodeObj.url_jump_after_node);
     return new Promise((resolve, reject)=>{
       api({
         url: msqlUrl,


view thread (6+ 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][patch] Partition node related fixes
  In-Reply-To: <CAM9w-_nijDb7aVsamVnroUH9edmXaXi0En2Qtf8LOJD8=F-GUQ@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