public inbox for [email protected]  
help / color / mirror / Atom feed
patch for issue RM1418 and RM1434 [pgadmin4]
2+ messages / 2 participants
[nested] [flat]

* patch for issue RM1418 and RM1434 [pgadmin4]
@ 2016-07-05 11:39 Harshal Dhumal <[email protected]>
  2016-07-05 11:59 ` Re: patch for issue RM1418 and RM1434 [pgadmin4] Dave Page <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Harshal Dhumal @ 2016-07-05 11:39 UTC (permalink / raw)
  To: pgadmin-hackers

Hi,

PFA patch for Issue RM1418 and RM1434

Issues fixed: 1. Select2 control fixed for multi-select mode.
2. Index constrains (primary and unique key) fixed column listing issue.
3. Table node "inherited from" (Select2 control) was not showing table name
with public schema

-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [text/x-patch] RM1418_RM1434.patch (4.3K, 3-RM1418_RM1434.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js
index 1e45cad..73a563b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js
@@ -227,6 +227,20 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
                 }
               }
             ),
+            keyPathAccessor: function(obj, path) {
+              var res = obj;
+              if(_.isArray(res)) {
+                return _.map(res, function(o) { return o['column']
+                });
+              }
+              path = path.split('.');
+              for (var i = 0; i < path.length; i++) {
+                if (_.isNull(res)) return null;
+                if (_.isEmpty(path[i])) continue;
+                if (!_.isUndefined(res[path[i]])) res = res[path[i]];
+              }
+              return _.isObject(res) && !_.isArray(res) ? null : res;
+            },
             initialize: function() {
             // Here we will decide if we need to call URL
             // Or fetch the data from parent columns collection
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/properties.sql
index 99727c9..2f53a2e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/properties.sql
@@ -8,7 +8,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
 	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
-	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE E'pg\_%' AND nspname <> 'public') THEN
+	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE E'pg\_%') THEN
             quote_ident(nspname)||'.'||quote_ident(c.relname)
             ELSE quote_ident(c.relname) END AS inherited_tables
     FROM pg_inherits i
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.5_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.5_plus/properties.sql
index 99727c9..2f53a2e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.5_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.5_plus/properties.sql
@@ -8,7 +8,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
 	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
-	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE E'pg\_%' AND nspname <> 'public') THEN
+	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE E'pg\_%') THEN
             quote_ident(nspname)||'.'||quote_ident(c.relname)
             ELSE quote_ident(c.relname) END AS inherited_tables
     FROM pg_inherits i
diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js
index 1370698..973b60b 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -1790,7 +1790,11 @@
       return encodeURIComponent(rawData);
     },
     toRaw: function(formattedData, model) {
-      return decodeURIComponent(formattedData);
+      if (_.isArray(formattedData)) {
+        return _.map(formattedData, decodeURIComponent);
+      } else {
+        return decodeURIComponent(formattedData);
+      }
     }
   });
 


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

* Re: patch for issue RM1418 and RM1434 [pgadmin4]
  2016-07-05 11:39 patch for issue RM1418 and RM1434 [pgadmin4] Harshal Dhumal <[email protected]>
@ 2016-07-05 11:59 ` Dave Page <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2016-07-05 11:59 UTC (permalink / raw)
  To: Harshal Dhumal <[email protected]>; +Cc: pgadmin-hackers

Thanks, applied.

On Tue, Jul 5, 2016 at 12:39 PM, Harshal Dhumal
<[email protected]> wrote:
> Hi,
>
> PFA patch for Issue RM1418 and RM1434
>
> Issues fixed: 1. Select2 control fixed for multi-select mode.
> 2. Index constrains (primary and unique key) fixed column listing issue.
> 3. Table node "inherited from" (Select2 control) was not showing table name
> with public schema
>
> --
> Harshal Dhumal
> Software Engineer
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




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


end of thread, other threads:[~2016-07-05 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05 11:39 patch for issue RM1418 and RM1434 [pgadmin4] Harshal Dhumal <[email protected]>
2016-07-05 11:59 ` Dave Page <[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