Hi,

PFA updated patch for the same.

Thanks Surinder for pointing that out, I assumed that we had a typo in that
file.



--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

[image: https://community.postgresrocks.net/]
<https://community.postgresrocks.net/>

On Tue, Aug 8, 2017 at 12:18 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi Murtuza,
>
> As type server-group is renamed to server_group, I can see there are
> other occurrences of string server-group which needs to be replaced when
> I perform search in pgAdmin4.
>
> Can you please take care of those occurrences?
>
> Thanks,
> Surinder
>
> On Tue, Aug 8, 2017 at 12:02 PM, Murtuza Zabuawala [murtuza.zabuawala@
> enterprisedb.com](mailto:murtuza.zabuaw...@enterprisedb.com)
> <http://mailto:%5bmurtuza.zabuaw...@enterprisedb.com%5D(mailto:murtuza.zabuaw...@enterprisedb.com)>
> wrote:
>
> Hi,
>>
>> PFA minor patch to fix the issue where add new server functionality
>> through Quick link on Dashboard is broken.
>> RM#2634
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> [image: https://community.postgresrocks.net/]
>> <https://community.postgresrocks.net/>
>>
> ‚Äč
>
diff --git a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js 
b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js
index 44703f1..d7f3f40 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js
+++ b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js
@@ -556,8 +556,7 @@ define('pgadmin.node.role', [
           return null;
         }
       })
-    }),
-    sg = pgBrowser.Nodes['server-group'];
+    })
   }
 
   return pgBrowser.Nodes['role'];
diff --git a/web/pgadmin/browser/templates/browser/js/utils.js 
b/web/pgadmin/browser/templates/browser/js/utils.js
index 2e59512..a3723ec 100644
--- a/web/pgadmin/browser/templates/browser/js/utils.js
+++ b/web/pgadmin/browser/templates/browser/js/utils.js
@@ -9,7 +9,7 @@ define('pgadmin.browser.utils',
 
   // Define list of nodes on which Query tool option doesn't appears
   var unsupported_nodes = pgAdmin.unsupported_nodes = [
-     'server-group', 'server', 'coll-tablespace', 'tablespace',
+     'server_group', 'server', 'coll-tablespace', 'tablespace',
      'coll-role', 'role', 'coll-resource_group', 'resource_group',
      'coll-database'
   ];
@@ -85,4 +85,4 @@ define('pgadmin.browser.utils',
     }
   };
   return pgBrowser;
-});
\ No newline at end of file
+});
diff --git a/web/pgadmin/dashboard/static/js/dashboard.js 
b/web/pgadmin/dashboard/static/js/dashboard.js
index 86ebe38..22b7675 100644
--- a/web/pgadmin/dashboard/static/js/dashboard.js
+++ b/web/pgadmin/dashboard/static/js/dashboard.js
@@ -357,11 +357,13 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, 
Backgrid, Flotr,
         // Handler function to support the "Add Server" link
         add_new_server: function() {
             if (pgBrowser && pgBrowser.tree) {
-                var i = pgBrowser.tree.first(null, false),
-                    serverModule = r('pgadmin.node.server'),
-                    itemData = pgBrowser.tree.itemData(i);
+                var i = pgBrowser.tree.selected().length != 0 ?
+                          pgBrowser.tree.selected() :
+                          pgBrowser.tree.first(null, false),
+                     serverModule = r('pgadmin.node.server'),
+                     itemData = pgBrowser.tree.itemData(i);
 
-                while (itemData && itemData._type != "server-group") {
+                while (itemData && itemData._type != "server_group") {
                     i = pgBrowser.tree.next(i);
                     itemData = pgBrowser.tree.itemData(i);
                 }
diff --git a/web/pgadmin/static/js/check_node_visibility.js 
b/web/pgadmin/static/js/check_node_visibility.js
index 18b6655..5a627ec 100644
--- a/web/pgadmin/static/js/check_node_visibility.js
+++ b/web/pgadmin/static/js/check_node_visibility.js
@@ -24,7 +24,7 @@ define(['jquery', 'underscore', 'underscore.string'],
 
       // Exclude non-applicable nodes
       var nodes_not_supported = [
-        "server-group", "server", "catalog_object_column"
+        "server_group", "server", "catalog_object_column"
       ];
       if(_.indexOf(nodes_not_supported, node_type) >= 0) {
         return true;

Reply via email to