Re: [pgAdmin4][Patch]: Adding connection status in Query tool

2018-01-11 Thread Dave Page
On Thu, Jan 11, 2018 at 7:00 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> On Thu, Jan 11, 2018 at 12:06 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> User can open Query tool in new browser window where we'll not have
>> wcDocker panel.
>>
>
> In that case we can use window onfocus and onblur events
> .
> In sqleditor there are cases where we've written conditional code based on
> whether sqleditor is opened in new window or not.
>

This is a great suggestion (the idea in general). We need to make this
happen - it'll go a long way to minimising our concerns about the amount of
polling.


>
>
> On Thu, Jan 11, 2018 at 12:00 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Murtuza, I think we should only poll if sqleditor/datagrid is visible.
>>> We've *wcDocker.EVENT.VISIBILITY_CHANGED *event when panel visibility
>>> changes.
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Sr. Software Engineer*
>>>
>>> EnterpriseDB India: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Jan 10, 2018 at 1:55 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 PFA updated patch.

 On Tue, Jan 9, 2018 at 7:57 PM, Dave Page  wrote:

> Hi
>
> On Tue, Jan 9, 2018 at 6:33 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find updated patch.
>>
>
> I turned off the status option, but polling is still happening. This
> should definitely stop! :-)
>
 ​Fixed typo in variable.

 Can you also reverse the enable/disable switch and the interval setting
> on the preferences page? I think Enable/Disable should be at the top, and
> be followed by the interval.
> ​
>
  Fixed.
 ​
 But just a heads up we won't be able to put '?' after 'Connection
 status'​  eg: '
 Connection status
 ​?'​
 ​
 ​Then string sorting again puts it after 'Connection status refresh
 rate' ​:)

> ​
>
> Thanks.
>
>
>>
>> On Mon, Jan 8, 2018 at 7:21 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Jan 8, 2018 at 1:24 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 PFA updated patch.

 On Mon, Jan 8, 2018 at 5:11 PM, Dave Page 
 wrote:

> Hi
>
> On Fri, Jan 5, 2018 at 8:49 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA updated patch,
>>
>>
>> On Wed, Jan 3, 2018 at 10:44 PM, Dave Page 
>> wrote:
>>
>>> Hi
>>>
>>> On Thu, Dec 28, 2017 at 9:38 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 PFA updated patch based on new design suggested by Chethana.
 The patch also includes some misc fixes related to object
 validation.
 RM#2475

>>>
>>> This seems much nicer, but I still think there are some tweaks
>>> to make:
>>>
>>> 1) If I open a query tool, and then stop the application server,
>>> the icon is updated to show the broken connection. However, unless I
>>> execute a query in the query tool before the server is shut down, 
>>> the
>>> connection status won't recover when the server is restarted. If I 
>>> do run a
>>> query first (SELECT 1; will do), then the connection status will 
>>> recover.
>>>
>>
>> I have logged​
>> ​
>> https://redmine.postgresql.org/issues/2983
>>
>>
>>> 2) I think the "connected" icon should be in $primary-blue
>>> (#2c76b4). The green is ugly and not overly easy to read. It's also
>>> distracting as it catches the eye, which the default, non-error 
>>> state
>>> should not do.
>>>
>> ​Fixed​
>>
>>
>
> Much better.
>
>
>>
>>
>>> 3) I'm not overly happy with the the status text popover. After
>>> some thought, I think it's because there are no visual clues that 
>>> you
>>> should click on the icon to see it - and Karen seems to be of a 
>>> similar
>>> opinion. Can we put a small marker there, perhaps a triangle on the
>>> bottom-right, like you get on a spreadsheet cell if you add a 
>>> comment/note?
>>> We should also have a hotkey and I guess a tooltip, e.g. 
>>> "Connection status
>>> Ctrl+Alt+S" or similar.
>>>
>> ​Fixed​
>> , added accesskey *'T'* for TX status 

pgAdmin 4 v2.1 released!

2018-01-11 Thread Dave Page
The pgAdmin Development Team are pleased to announce pgAdmin 4 version 2.1.
This release of pgAdmin 4 includes nearly 90 bug fixes and new features.
For more details please see the release notes at
https://www.pgadmin.org/docs/pgadmin4/dev/release_notes_2_1.html.

Notable changes in this release include:

* Support for colouring connections in the treeview and query tool
* Configurable formatting for CSV and clipboard datasets
* Editing of table data for tables with OIDs but no primary keys
* Immediately retrieve default column values when saving new/edited rows in
the query tool

We've also added a new distribution in the form of a Docker Container. See
the Docker Hub repo for more information:
https://hub.docker.com/r/dpage/pgadmin4/

Download your copy of pgAdmin here: https://www.pgadmin.org/download

Regards, Dave

-- 
Dave Page
pgAdmin Development Team


pgAdmin 4 commit: Tag REL-2_1 has been created.

2018-01-11 Thread Dave Page
Tag REL-2_1 has been created.
View: https://git.postgresql.org/gitweb?p=pgadmin4.git;a=tag;h=refs/tags/REL-2_1

Log Message
---
Tag 2.1

pgAdmin 4 commit: Don't listen on port 443 if TLS is not enabled when l

2018-01-11 Thread Dave Page
Don't listen on port 443 if TLS is not enabled when launching the container. 
Fixes #2998

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8b3aecd137bc9d93ab74acfcdff6b07a6d655f91

Modified Files
--
pkg/docker/entry.sh | 10 ++
1 file changed, 10 insertions(+)



[pgadmin4][Patch]: Display Functions node for GreenPlum database

2018-01-11 Thread Joao De Almeida Pereira
Hello Hackers,
We had some requests from GreenPlum users to display the functions node
again.
This patch reintroduces functions as a node underneath the Schemas.


Unfortunately this patch is not final because I could not find the place
where the Data Type is populated from. (See next image)[image: Inline image
1]

Can anyone explain me how these types get populated?



Thanks
Joao
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
index 92edc8b7..a59f6671 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
@@ -71,10 +71,10 @@ class FunctionModule(SchemaChildModule):
 """
 super(FunctionModule, self).__init__(*args, **kwargs)
 
-self.min_ver = 90100
+self.min_ver = None
 self.max_ver = None
 self.server_type = None
-self.min_gpdbver = 10
+self.min_gpdbver = None
 
 def get_nodes(self, gid, sid, did, scid):
 """
@@ -659,7 +659,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):
 condition += " AND nspname NOT LIKE E'pg_toast%' AND nspname 
NOT LIKE E'pg_temp%'"
 
 # Get Types
-status, types = self.get_types(self.conn, condition)
+status, types = self.get_types(self.conn, condition, False, scid)
 
 if not status:
 return internal_server_error(errormsg=types)
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/acl.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/acl.sql
new file mode 100644
index ..1162ee67
--- /dev/null
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/acl.sql
@@ -0,0 +1,38 @@
+SELECT
+COALESCE(gt.rolname, 'PUBLIC') AS grantee,
+g.rolname AS grantor, array_agg(privilege_type) AS privileges,
+array_agg(is_grantable) AS grantable
+FROM
+(SELECT
+(d).grantee AS grantee,
+(d).grantor AS grantor,
+(d).is_grantable AS is_grantable,
+CASE (d).privilege_type
+WHEN 'EXECUTE' THEN 'X'
+ELSE 'UNKNOWN' END AS privilege_type
+FROM
+(SELECT
+u_grantor.oid AS grantor,
+grantee.oid AS grantee,
+pr.type AS privilege_type,
+aclcontains(c.proacl, makeaclitem(grantee.oid, u_grantor.oid, 
pr.type, true)) AS is_grantable
+FROM pg_proc c, pg_namespace nc, pg_authid u_grantor, (
+SELECT pg_authid.oid, pg_authid.rolname
+FROM pg_authid
+UNION ALL
+SELECT 0::oid AS oid, 'PUBLIC') grantee(oid, rolname),
+(SELECT 'EXECUTE') pr(type)
+WHERE c.pronamespace = nc.oid
+AND (
+  c.proacl is NULL
+  OR aclcontains(c.proacl, makeaclitem(grantee.oid, u_grantor.oid, 
pr.type, false))
+)
+AND (pg_has_role(u_grantor.oid, 'USAGE'::text)
+  OR pg_has_role(grantee.oid, 'USAGE'::text)
+  OR grantee.rolname = 'PUBLIC'::name)
+AND c.oid = {{ fnid }}::OID
+) d
+) d
+LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
+LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
+GROUP BY g.rolname, gt.rolname;
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/coll_stats.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/coll_stats.sql
new file mode 100644
index ..86a0d7be
--- /dev/null
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/coll_stats.sql
@@ -0,0 +1,20 @@
+SELECT
+funcname AS {{ conn|qtIdent(_('Name')) }},
+calls AS {{ conn|qtIdent(_('Number of calls')) }},
+total_time AS {{ conn|qtIdent(_('Total time')) }},
+self_time AS {{ conn|qtIdent(_('Self time')) }}
+FROM
+pg_stat_user_functions
+WHERE
+schemaname = {{schema_name|qtLiteral}}
+AND funcid IN (
+SELECT p.oid
+FROM
+pg_proc p
+JOIN
+pg_type typ ON typ.oid=p.prorettype
+WHERE
+p.proisagg = FALSE
+AND typname NOT IN ('trigger', 'event_trigger')
+)
+ORDER BY funcname;
\ No newline at end of file
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/create.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/gpdb/sql/default/create.sql
new file mode 10064

pgAdmin 4 commit: Ensure images in the docs have alt tags for screen re

2018-01-11 Thread Dave Page
Ensure images in the docs have alt tags for screen readers. Fixes #2903

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=b78b97d89b458773da92fc2989250063449aac31
Author: Murtuza Zabuawala 

Modified Files
--
docs/en_US/add_restore_point_dialog.rst|  1 +
docs/en_US/backup_dialog.rst   | 55 -
docs/en_US/backup_globals_dialog.rst   |  9 ++--
docs/en_US/backup_server_dialog.rst|  9 ++--
docs/en_US/browser.rst |  5 +-
docs/en_US/cast_dialog.rst |  9 ++--
docs/en_US/change_password_dialog.rst  |  3 +-
docs/en_US/change_user_password.rst|  1 +
docs/en_US/check_dialog.rst| 19 ---
docs/en_US/collation_dialog.rst| 25 +-
docs/en_US/column_dialog.rst   | 29 ++-
docs/en_US/connect_error.rst   | 14 --
docs/en_US/connect_to_server.rst   |  3 +-
docs/en_US/database_dialog.rst | 31 +++-
docs/en_US/debugger.rst| 22 ++---
docs/en_US/domain_constraint_dialog.rst| 19 ---
docs/en_US/domain_dialog.rst   | 21 +---
docs/en_US/editgrid.rst| 22 +
docs/en_US/event_trigger_dialog.rst| 24 +
docs/en_US/exclusion_constraint_dialog.rst | 28 ++-
docs/en_US/extension_dialog.rst| 19 ---
docs/en_US/foreign_data_wrapper_dialog.rst | 21 +---
docs/en_US/foreign_key_dialog.rst  | 27 +-
docs/en_US/foreign_server_dialog.rst   | 19 ---
docs/en_US/foreign_table_dialog.rst| 27 ++
docs/en_US/fts_configuration_dialog.rst| 20 +---
docs/en_US/fts_dictionary_dialog.rst   | 24 +
docs/en_US/fts_parser_dialog.rst   | 13 +++--
docs/en_US/fts_template_dialog.rst | 15 +++---
docs/en_US/function_dialog.rst | 41 +---
docs/en_US/grant_wizard.rst| 19 ---
docs/en_US/import_export_data.rst  | 27 +-
docs/en_US/index_dialog.rst| 23 +
docs/en_US/language_dialog.rst | 22 +
docs/en_US/maintenance_dialog.rst  |  9 ++--
docs/en_US/materialized_view_dialog.rst| 22 ++---
docs/en_US/move_objects.rst| 14 +++---
docs/en_US/package_dialog.rst  | 14 --
docs/en_US/pgadmin_login.rst   |  6 ++-
docs/en_US/pgadmin_menu_bar.rst| 32 ++--
docs/en_US/pgadmin_tabbed_browser.rst  | 29 +++
docs/en_US/pgadmin_tree_control.rst| 17 ---
docs/en_US/pgadmin_user.rst| 18 ---
docs/en_US/pgagent_jobs.rst| 60 +--
docs/en_US/preferences.rst | 34 +
docs/en_US/primary_key_dialog.rst  | 11 +++--
docs/en_US/procedure_dialog.rst| 41 +---
docs/en_US/query_tool.rst  | 40 +--
docs/en_US/resource_group_dialog.rst   | 14 +++---
docs/en_US/restore_dialog.rst  | 47 +++---
docs/en_US/role_dialog.rst | 31 +++-
docs/en_US/rule_dialog.rst | 23 +
docs/en_US/schema_dialog.rst   | 24 +
docs/en_US/sequence_dialog.rst | 30 +++-
docs/en_US/server_dialog.rst   |  4 ++
docs/en_US/server_group_dialog.rst |  5 +-
docs/en_US/synonym_dialog.rst  |  6 ++-
docs/en_US/table_dialog.rst| 79 ++
docs/en_US/tablespace_dialog.rst   | 29 ++-
docs/en_US/trigger_dialog.rst  | 23 +
docs/en_US/trigger_function_dialog.rst | 42 +---
docs/en_US/type_dialog.rst | 62 +--
docs/en_US/unique_constraint_dialog.rst| 15 +++---
docs/en_US/user_mapping_dialog.rst | 19 ---
docs/en_US/view_dialog.rst | 30 +++-
65 files changed, 898 insertions(+), 598 deletions(-)



Re: [pgAdmin4][Patch#2903] To add ALT tags for images in pgAdmin4 help files

2018-01-11 Thread Dave Page
Thanks, patch applied.

On Wed, Jan 10, 2018 at 7:15 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to add ALT tags in all the online help file images for
> accessibility.
> RM#2903
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>


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

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


[pgAdmin4][Patch] Statistics button not working for GreenPlum

2018-01-11 Thread Joao De Almeida Pereira
Hello Hackers,
Find attached a patch that enables the retrieval of statistics for
databases and servers on GreenPlum databases.


Thanks
Joao
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
index 5cc5d670..68ff711b 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
@@ -10,16 +10,9 @@ SELECT
 tup_inserted AS {{ conn|qtIdent(_('Tuples inserted')) }},
 tup_updated AS {{ conn|qtIdent(_('Tuples updated')) }},
 tup_deleted AS {{ conn|qtIdent(_('Tuples deleted')) }},
-stats_reset AS {{ conn|qtIdent(_('Last statistics reset')) }},
-slave.confl_tablespace AS {{ conn|qtIdent(_('Tablespace conflicts')) }},
-slave.confl_lock AS {{ conn|qtIdent(_('Lock conflicts')) }},
-slave.confl_snapshot AS {{ conn|qtIdent(_('Snapshot conflicts')) }},
-slave.confl_bufferpin AS {{ conn|qtIdent(_('Bufferpin conflicts')) }},
-slave.confl_deadlock AS {{ conn|qtIdent(_('Deadlock conflicts')) }},
 pg_database_size(db.datid) AS {{ conn|qtIdent(_('Size')) }}
 FROM
 pg_stat_database db
-LEFT JOIN pg_stat_database_conflicts slave ON db.datid=slave.datid
 WHERE {% if did %}
 db.datid = {{ did|qtLiteral }}::OID{% else %}
 db.datid > {{ last_system_oid|qtLiteral }}::OID
diff --git 
a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
 
b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
index 62552190..f72e1ba8 100644
--- 
a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
@@ -4,8 +4,6 @@ SELECT
 datname AS {{ conn|qtIdent(_('Database')) }},
 backend_start AS {{ conn|qtIdent(_('Backend start')) }},
 CASE
-WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
-client_hostname || ':' || client_port
 WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
 client_addr::text || ':' || client_port
 WHEN client_port = -1 THEN
@@ -26,11 +24,9 @@ UNION
 SELECT
 procpid AS "PID",
 usename AS {{ conn|qtIdent(_('User')) }},
-datname AS {{ conn|qtIdent(_('Database')) }},
+'' AS {{ conn|qtIdent(_('Database')) }},
 backend_start AS {{ conn|qtIdent(_('Backend start')) }},
 CASE
-WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
-client_hostname || ':' || client_port
 WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
 client_addr::text || ':' || client_port
 WHEN client_port = -1 THEN
@@ -38,7 +34,7 @@ SELECT
 ELSE
 'localhost:' || client_port
 END AS {{ conn|qtIdent(_('Client')) }},
-{{ _('Streaming Replication') }}|qtLiteral AS {{ 
conn|qtIdent(_('Application')) }},
+{{ _('Streaming Replication')|qtLiteral }} AS {{ 
conn|qtIdent(_('Application')) }},
 null AS {{ conn|qtIdent(_('Waiting?')) }},
 state || ' [sync (state: ' || COALESCE(sync_state, '') || ', priority: ' 
|| sync_priority::text || ')] (' || sent_location || ' sent, ' || 
write_location || ' written, ' || flush_location || ' flushed, ' || 
replay_location || ' applied)' AS {{ conn|qtIdent(_('Query')) }},
 null AS {{ conn|qtIdent(_('Query start')) }},


Re: [pgadmin4][Patch]: Display Functions node for GreenPlum database

2018-01-11 Thread Murtuza Zabuawala
Hi Joao,

We have written common function 'def get_types(...)' in a class called
'DataTypeReader' to fetch datatypes in a file '../pgadmin4/web/pgadmin/
browser/server_groups/servers/databases/schemas/utils.py' and we have
inherited from DataTypeReader in Function module's 'FunctionView' class to
use it check line no. 120

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


On Thu, Jan 11, 2018 at 9:31 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hello Hackers,
> We had some requests from GreenPlum users to display the functions node
> again.
> This patch reintroduces functions as a node underneath the Schemas.
>
>
> Unfortunately this patch is not final because I could not find the place
> where the Data Type is populated from. (See next image)[image: Inline
> image 1]
>
> Can anyone explain me how these types get populated?
>
>
>
> Thanks
> Joao
>


pgAdmin 4 commit: Fixed the warnings/errors reported by eslint for all

2018-01-11 Thread Ashesh Vashi
Fixed the warnings/errors reported by eslint for all the static
javascripts.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c32eb6bd37157fd5abc4d6a4ceeb6c7c954ba377

Modified Files
--
web/pgadmin/about/static/js/about.js   |   17 +-
.../servers/databases/casts/static/js/cast.js  |  366 +--
.../event_triggers/static/js/event_trigger.js  |   74 +-
.../databases/extensions/static/js/extension.js|   82 +-
.../foreign_servers/static/js/foreign_server.js|  106 +-
.../user_mapping/static/js/user_mapping.js |   97 +-
.../static/js/foreign_data_wrapper.js  |  141 +-
.../databases/languages/static/js/language.js  |   85 +-
.../columns/static/js/catalog_object_column.js |   98 +-
.../catalog_objects/static/js/catalog_object.js|   28 +-
.../schemas/collations/static/js/collation.js  |  107 +-
.../static/js/domain_constraints.js|   54 +-
.../databases/schemas/domains/static/js/domain.js  |  122 +-
.../foreign_tables/static/js/foreign_table.js  |  462 ++--
.../static/js/fts_configuration.js |  416 ++-
.../fts_dictionaries/static/js/fts_dictionary.js   |  123 +-
.../schemas/fts_parser/static/js/fts_parser.js |   76 +-
.../fts_templates/static/js/fts_template.js|   58 +-
.../schemas/functions/static/js/function.js|  219 +-
.../schemas/functions/static/js/procedure.js   |  108 +-
.../functions/static/js/trigger_function.js|  165 +-
.../schemas/packages/edbfuncs/static/js/edbfunc.js |   49 +-
.../schemas/packages/edbfuncs/static/js/edbproc.js |   22 +-
.../schemas/packages/edbvars/static/js/edbvar.js   |   30 +-
.../schemas/packages/static/js/package.js  |   68 +-
.../schemas/sequences/static/js/sequence.js|  104 +-
.../servers/databases/schemas/static/js/catalog.js |   38 +-
.../servers/databases/schemas/static/js/schema.js  |  344 ++-
.../schemas/synonyms/static/js/synonym.js  |  153 +-
.../schemas/tables/column/static/js/column.js  |  477 ++--
.../check_constraint/static/js/check_constraint.js |   92 +-
.../static/js/exclusion_constraint.js  | 1115 
.../foreign_key/static/js/foreign_key.js   | 1259 -
.../index_constraint/static/js/primary_key.js  |  289 +-
.../static/js/unique_constraint.js |  289 +-
.../tables/constraints/static/js/constraints.js|   35 +-
.../schemas/tables/indexes/static/js/index.js  |  527 ++--
.../tables/partitions/static/js/partition.js   |  707 +++--
.../schemas/tables/rules/static/js/rule.js |   60 +-
.../schemas/tables/static/js/partition.utils.js|  328 +--
.../databases/schemas/tables/static/js/table.js|  972 ---
.../schemas/tables/triggers/static/js/trigger.js   |  495 ++--
.../databases/schemas/types/static/js/type.js  |  811 +++---
.../databases/schemas/views/static/js/mview.js |  105 +-
.../databases/schemas/views/static/js/view.js  |   70 +-
.../servers/databases/static/js/database.js|  268 +-
.../pgagent/schedules/static/js/pga_schedule.js|  184 +-
.../servers/pgagent/static/js/pga_job.js   |   82 +-
.../servers/pgagent/steps/static/js/pga_jobstep.js |  126 +-
.../resource_groups/static/js/resource_group.js|   45 +-
.../server_groups/servers/roles/static/js/role.js  |  398 ++-
.../server_groups/servers/static/js/privilege.js   |  532 ++--
.../server_groups/servers/static/js/server.js  |  694 +++--
.../server_groups/servers/static/js/variable.js|  785 +++---
.../servers/tablespaces/static/js/tablespace.js|  308 +--
.../server_groups/static/js/server_group.js|   37 +-
web/pgadmin/browser/static/js/browser.js   | 2191 ---
web/pgadmin/browser/static/js/collection.js|  254 +-
web/pgadmin/browser/static/js/datamodel.js | 2183 +++
web/pgadmin/browser/static/js/error.js |8 +-
web/pgadmin/browser/static/js/frame.js |   50 +-
web/pgadmin/browser/static/js/menu.js  |  280 +-
web/pgadmin/browser/static/js/node.js  |  912 ---
web/pgadmin/browser/static/js/node.ui.js   |  425 +--
web/pgadmin/browser/static/js/panel.js |  321 +--
web/pgadmin/browser/static/js/wizard.js|  310 +--
web/pgadmin/dashboard/static/js/dashboard.js   | 2405 -
web/pgadmin/misc/bgprocess/static/js/bgprocess.js  |  246 +-
web/pgadmin/misc/depends/static/js/depends.js  |  198 +-
.../misc/file_manager/static/js/file_manager.js| 1330 +-
web/pgadmin/misc/file_manager/static/js/utility.js | 2781 ++--
web/pgadmin/misc/sql/static/js/sql.js  |   67 +-
web/pgadmin/misc/static/explain/js/explain.js  | 1284 +
.../misc/statistics/static/js/statistics.js|  272 +-
web/pgadmin/preferences/static/js/preferences.js   |  783 +++---
web/pgadmin/settings/static/js/setting

Re: ESLINT: On pgAdmin static javascripts

2018-01-11 Thread Ashesh Vashi
On Thu, Jan 11, 2018 at 11:16 AM, Ashesh Vashi <
ashesh.va...@enterprisedb.com> wrote:

> Hi Murtuza,
>
> On Tue, Jan 9, 2018 at 4:08 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> All patches looks good to me except one issue as shown in screenshot
>> which I observed while opening Preferences dialog subsequently.
>>
> I was able to reproduce the issue on 'master' branch without these patches
> too.
> I have fixed the same issue on 'WEBPACK_DEVEL2' branch.
>
> Dependent libraries are using different versions of jQuery, and hence
> loading two differct jQuery in the webpack.
> And, that's causing the issue.
>
> We can take of the issue in a separate patch.
>
Committed these patches.

Fahar,

You may want to be on top of this as this commit has touched all the
modules.

-- Thanks, Ashesh

>
> -- Thanks, Ashesh
>
>>
>> --
>> ​ Murtuza​
>>
>> On Tue, Jan 9, 2018 at 1:19 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Tue, Jan 9, 2018 at 12:28 AM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 Please try rest of the patches...
 They are independent of each other.

 -- Thanks, Ashesh

 On Jan 8, 2018 23:45, "Murtuza Zabuawala" <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> ​Hi Ashesh,
>
> I'm not able to apply patch :(
>
> murtuza@debian:~/projects/pgadmin4$ git apply ~/Desktop/*.patch
> error: patch failed: web/pgadmin/misc/file_manager/
> static/js/utility.js:10
> error: web/pgadmin/misc/file_manager/static/js/utility.js: patch does
> not apply
>
>  murtuza@debain:~/projects/pgadmin4$ git status | grep '\.rej' | wc -l
>   55
>
 Please find the updated patch for "Browser-specific javascript files",
>>> which was having diff for 'web/pgadmin/misc/file_manager/
>>> static/js/utility.js'.
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> Ashesh Vashi
>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>> 
>>>
>>>
>>> *http://www.linkedin.com/in/asheshvashi*
>>> 
>>>

> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> On Mon, Jan 8, 2018 at 9:11 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>>
>> On Mon, Jan 8, 2018 at 8:52 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Mon, Jan 8, 2018 at 3:18 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 On Mon, Jan 8, 2018 at 8:31 PM, Dave Page 
 wrote:

> Hi
>
> I think these are impossibly big to properly review by hand,
> especially where much of them are whitespace changes.
>
 I ran both jasmine test framework, and feature tests.
 Both are running fine.

>
> I think the best option is to check the regression tests all pass,
> do some manual testing yourself, and then commit.
>
 Done some manual testing.
 It would be helpful, If somebody can help with some more testing,
 which I may have missed.

>>>
>>> Please ask one of the team (other than me) :-)
>>>
>> :-)
>>
>> -- Thanks, Ashesh
>>
>>>
>>>

 -- Thanks, Ashesh


>
> On Mon, Jan 8, 2018 at 1:55 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> Hi Dave/Team,
>>
>> I found many problems while 'eslint' utility on all the static
>> javascript files of pgAdmin 4.
>> i.e. /web/node_module/.bin/eslint 
>>
>> I had fixed all errors reported by eslint for those files.
>>
>> I have created six patches for ease of maintenance, as
>> possibilities of conflicting with other patches.
>> * Browser nodes javascript files
>> * Browser specific javascript files
>> * pgAdmin common javascript files
>> * SQLEditor/DataGrid javascript files
>> * Tools javascript files
>> * Miscellaneous modules javascript files
>>
>> All patches are independent of each other.
>>
>> Please review it, and share your opinion.
>>
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


>>>
>>>
>>>