Re: [pgAdmin4][RM#3404] Graphical explain plan do not display text under the node
Hi On Wed, Jun 6, 2018 at 6:04 PM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi, > > PFA minor patch to fix the regression issue introduced with RM#3271 commit > due to which label is not displaying under the graphical explain node, I've > attached the screenshot in RM for your reference. > I see the labels, but the popups are not displaying on mouseover/hover like they used to. Can you look into that please? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: [pgAdmin4][Patch]: RM 3362 - Fix the functions for PG v11, and add support procedure for PG v11
Hi, Please ignore my previous patch, find the attached updated one. Thanks, Khushboo On Wed, Jun 6, 2018 at 12:12 PM, Khushboo Vashi < khushboo.va...@enterprisedb.com> wrote: > Hi, > > Please find the attached patch to fix #3362 - Fix the functions for PG > v11, and add support procedure for PG v11. > > Thanks, > Khushboo > > diff --git a/docs/en_US/procedure_dialog.rst b/docs/en_US/procedure_dialog.rst index da5f34f..82c2227 100644 --- a/docs/en_US/procedure_dialog.rst +++ b/docs/en_US/procedure_dialog.rst @@ -4,7 +4,7 @@ The Procedure Dialog -Use the *Procedure* dialog to create a procedure; procedures are supported by EDB Postgres Advanced Server. The *Procedure* dialog allows you to implement options of the CREATE PROCEDURE command; for more information about the CREATE PROCEDURE SQL command, please see the Database Compatibility for Oracle Developer's, available at: +Use the *Procedure* dialog to create a procedure; procedures are supported by PostgreSQL v11 and EDB Postgres Advanced Server. The *Procedure* dialog allows you to implement options of the CREATE PROCEDURE command; for more information about the CREATE PROCEDURE SQL command, please see the Database Compatibility for Oracle Developer's, available at: http://www.enterprisedb.com 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 d8e7a68..7fecade 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 @@ -1592,10 +1592,11 @@ class ProcedureModule(SchemaChildModule): """ super(ProcedureModule, self).__init__(*args, **kwargs) -self.min_ver = 90100 +self.min_ver = 11 self.max_ver = None +self.min_ppasver = 90100 self.min_gpdbver = 10 -self.server_type = ['ppas'] +self.server_type = ['pg', 'ppas'] def get_nodes(self, gid, sid, did, scid): """ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/procedure.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/procedure.js index 041b509..1e02c99 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/procedure.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/procedure.js @@ -71,11 +71,7 @@ define('pgadmin.node.procedure', [ if ('catalog' in node_hierarchy) return false; -// Procedures supported only in PPAS -return ( - 'server' in node_hierarchy && -node_hierarchy['server'].server_type == 'ppas' -); +return true; }, model: Function.model.extend({ defaults: _.extend({}, @@ -103,20 +99,24 @@ define('pgadmin.node.procedure', [ return true; } switch(this.name){ - case 'provolatility': + case 'provolatile': case 'proisstrict': - case 'prosecdef': case 'procost': case 'proleakproof': case 'variables': -return this.node_info.server.version < 90500; +return (this.node_info.server.version < 90500 || this.node_info.server.type != 'ppas'); + case 'prosecdef': +return (this.node_info.server.version < 90500); case 'prorows': var server = this.node_info.server; return !(server.version >= 90500 && m.get('proretset') == true); case 'funcowner': - case 'lanname': case 'proargs': return true; + case 'proparallel': +return (this.node_info.server.version < 90600 || this.node_info.server.type != 'ppas'); + case 'lanname': +return this.node_info.server.version < 11; default: return false; } diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/11_plus/coll_stats.sql new file mode 100644 index 000..cc4f734 --- /dev/null +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/11_plus/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.prorettyp
Re: [pgAdmin4][RM#3289] Can't query SQL_ASCII database.
Hi On Wed, Jun 6, 2018 at 2:02 PM, Aditya Toshniwal wrote: > Hi Hackers, > > PFA updated patch as the previous one was not working as expected. I have > tried to make it similar to that of pgAdmin3 and you do not need to change > client_encoding as it is set now based on server encoding. It works fine > with "view data" also. > - In connection.py, at ~409, shouldn't we set the client_encoding to SQL_ASCII? Otherwise it could be overridden with something unexpected if the client has PGCLIENTENCODING set for example. - With or without that change, I get the following test failure on macOS with Python 2.7.10: == ERROR: runTest (pgadmin.tools.sqleditor.tests.test_encoding_charset.TestEncodingCharset) With Encoding SQL_ASCII -- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/tests/test_encoding_charset.py", line 86, in runTest response = self.tester.get(url) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", line 830, in get return self.open(*args, **kw) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/testing.py", line 127, in open follow_redirects=follow_redirects) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", line 803, in open response = self.run_wsgi_app(environ, buffered=buffered) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", line 716, in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", line 923, in run_wsgi_app app_rv = app(environ, start_response) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py", line 792, in decorated_view return func(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line 576, in poll 'oids': oids File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/ajax.py", line 61, in make_json_response separators=(',', ':')), File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/__init__.py", line 399, in dumps **kw).encode(obj) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/encoder.py", line 291, in encode chunks = self.iterencode(o, _one_shot=True) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/encoder.py", line 373, in iterencode return _iterencode(o, 0) UnicodeDecodeError: 'utf8' codec can't decode byte 0xad in position 0: invalid start byte -- Ran 317 tests in 30.692s FAILED (errors=1, skipped=21) > The only problem is, I cannot find equivalent codec for wxConvLibc in > python. The closest one I could find is raw_unicode_escape. So, in a > SQL_ASCII database, non ASCII characters may differ in pgAdmin4 and > pgAdmin3, but it will display results. > Yeah, I think that's fine. For the small number of people with SQL_ASCII databases, seeing escaped characters is better than nothing. > > > Dave, > You need to add "E" before the string to be inserted, otherwise \x will be > considered as a plain string. > INSERT INTO sql_ascii (data) VALUES (E'[Invalid UTF-8] Blob: > \xf4\xa5\xa3\xa5'); > Yeah, sorry - I copied the wrong version of the query :-( > > > Kindly review. > > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB Software Solutions | Pune > "Don't Complain about Heat, P
Re: [pgAdmin4][RM#3289] Can't query SQL_ASCII database.
Hi Dave, On Thu, Jun 7, 2018 at 4:07 PM, Dave Page wrote: > Hi > > On Wed, Jun 6, 2018 at 2:02 PM, Aditya Toshniwal < > aditya.toshni...@enterprisedb.com> wrote: > >> Hi Hackers, >> >> PFA updated patch as the previous one was not working as expected. I have >> tried to make it similar to that of pgAdmin3 and you do not need to change >> client_encoding as it is set now based on server encoding. It works fine >> with "view data" also. >> > > - In connection.py, at ~409, shouldn't we set the client_encoding to > SQL_ASCII? Otherwise it could be overridden with something unexpected if > the client has PGCLIENTENCODING set for example. > Yeah I agree, it would be better to add. Will add the change. > > - With or without that change, I get the following test failure on macOS > with Python 2.7.10: > It works fine on my machine with Python 2.7 and macOS. Could you please let me know the Postgres DB version also. Will test on few more machines. > > == > ERROR: runTest (pgadmin.tools.sqleditor.tests.test_encoding_charset. > TestEncodingCharset) > With Encoding SQL_ASCII > -- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/ > tests/test_encoding_charset.py", line 86, in runTest > response = self.tester.get(url) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", > line 830, in get > return self.open(*args, **kw) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/testing.py", > line 127, in open > follow_redirects=follow_redirects) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", > line 803, in open > response = self.run_wsgi_app(environ, buffered=buffered) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", > line 716, in run_wsgi_app > rv = run_wsgi_app(self.application, environ, buffered=buffered) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", > line 923, in run_wsgi_app > app_rv = app(environ, start_response) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1997, in __call__ > return self.wsgi_app(environ, start_response) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1985, in wsgi_app > response = self.handle_exception(e) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1540, in handle_exception > reraise(exc_type, exc_value, tb) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1982, in wsgi_app > response = self.full_dispatch_request() > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1614, in full_dispatch_request > rv = self.handle_user_exception(e) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1517, in handle_user_exception > reraise(exc_type, exc_value, tb) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1612, in full_dispatch_request > rv = self.dispatch_request() > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1598, in dispatch_request > return self.view_functions[rule.endpoint](**req.view_args) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py", > line 792, in decorated_view > return func(*args, **kwargs) > File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", > line 576, in poll > 'oids': oids > File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/ajax.py", line 61, in > make_json_response > separators=(',', ':')), > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/simplejson/__init__.py", line 399, in dumps > **kw).encode(obj) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/simplejson/encoder.py", line 291, in encode > chunks = self.iterencode(o, _one_shot=True) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/simplejson/encoder.py", line 373, in iterencode > return _iterencode(o, 0) > UnicodeDecodeError: 'utf8' codec can't decode byte 0xad in position 0: > invalid start byte > > -- > Ran 317 tests in 30.692s > > FAILED (errors=1, skipped=21) > > > >> The only problem is, I cannot find equivalent codec for wxConvLibc in >> python. The closest one I could find is raw_unicode_escape. So, in a >> SQL_ASCII database, non ASCII characters may differ in pgAdmin4 and >> pgAdmin3, but it will display results. >> > > Yeah, I think that's
Re: [pgAdmin4][RM#3289] Can't query SQL_ASCII database.
Hi On Thu, Jun 7, 2018 at 12:05 PM, Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Dave, > > > On Thu, Jun 7, 2018 at 4:07 PM, Dave Page wrote: > >> Hi >> >> On Wed, Jun 6, 2018 at 2:02 PM, Aditya Toshniwal < >> aditya.toshni...@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> PFA updated patch as the previous one was not working as expected. I >>> have tried to make it similar to that of pgAdmin3 and you do not need to >>> change client_encoding as it is set now based on server encoding. It works >>> fine with "view data" also. >>> >> >> - In connection.py, at ~409, shouldn't we set the client_encoding to >> SQL_ASCII? Otherwise it could be overridden with something unexpected if >> the client has PGCLIENTENCODING set for example. >> > Yeah I agree, it would be better to add. Will add the change. > >> >> - With or without that change, I get the following test failure on macOS >> with Python 2.7.10: >> > It works fine on my machine with Python 2.7 and macOS. Could you please > let me know the Postgres DB version also. > PostgreSQL 9.4.10 on x86_64-apple-darwin, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00), 64-bit > Will test on few more machines. > >> >> == >> ERROR: runTest (pgadmin.tools.sqleditor.tests >> .test_encoding_charset.TestEncodingCharset) >> With Encoding SQL_ASCII >> -- >> Traceback (most recent call last): >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/tests/test_encoding_charset.py", >> line 86, in runTest >> response = self.tester.get(url) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", >> line 830, in get >> return self.open(*args, **kw) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/testing.py", >> line 127, in open >> follow_redirects=follow_redirects) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", >> line 803, in open >> response = self.run_wsgi_app(environ, buffered=buffered) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", >> line 716, in run_wsgi_app >> rv = run_wsgi_app(self.application, environ, buffered=buffered) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/test.py", >> line 923, in run_wsgi_app >> app_rv = app(environ, start_response) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1997, in __call__ >> return self.wsgi_app(environ, start_response) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1985, in wsgi_app >> response = self.handle_exception(e) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1540, in handle_exception >> reraise(exc_type, exc_value, tb) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1982, in wsgi_app >> response = self.full_dispatch_request() >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1614, in full_dispatch_request >> rv = self.handle_user_exception(e) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1517, in handle_user_exception >> reraise(exc_type, exc_value, tb) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1612, in full_dispatch_request >> rv = self.dispatch_request() >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", >> line 1598, in dispatch_request >> return self.view_functions[rule.endpoint](**req.view_args) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py", >> line 792, in decorated_view >> return func(*args, **kwargs) >> File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", >> line 576, in poll >> 'oids': oids >> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/ajax.py", line 61, >> in make_json_response >> separators=(',', ':')), >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/__init__.py", >> line 399, in dumps >> **kw).encode(obj) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/encoder.py", >> line 291, in encode >> chunks = self.iterencode(o, _one_shot=True) >> File >> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/simplejson/encoder.py", >> line 373, in iterencode >> return _iterencode(o, 0) >> UnicodeDecodeError: 'utf8' codec can't decode byte 0xad in position 0: >> invalid start byte >> >>
Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree
Hi Aditya Sure. I did not find moving > web/pgadmin/tools/datagrid/static/js/datagrid.js. Please correct me if I am > missing anything. Generally speaking, I agree with moving/deleting files if it makes sense. But in regards to web/pgadmin/tools/datagrid/static/js/datagrid.js, it looks like this is still being used in web/pgadmin/tools/sqleditor/static/js/sqleditor.js with Datagrid.create_transaction Sincerely, Victoria On Thu, Jun 7, 2018 at 12:35 AM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Victoria, > > On Wed, Jun 6, 2018 at 8:55 PM, Victoria Henry wrote: > >> Hi Aditya, >> >> 1) Why don't we start using webpack alias's instead of using absolute >>> path. For eg, >>> import {RestoreDialogWrapper} from >>> '../../../pgadmin/static/js/restore/restore_dialog_wrapper'; >>> can be used as import {RestoreDialogWrapper} from >>> 'pgadmin_static/js/restore/restore_dialog_wrapper'; >>> by adding pgadmin_static alias to webpack config. >> >> >> Great point. In some areas of the code, we began making this change. >> There is already an alias in webpack shims for ` >> ../../../pgadmin/static/js` called `sources`. You can find an example >> of this in import statements for `supported_database_node.js` >> >> 2) Few of the js are left behind, the ones which are used in python >>> __init__.py. Can't we move them too ? It would be nicer to not to leave >>> behind a single js. >> >> I'm not sure what you mean. Could you point to an example of a single js >> file? >> > > Sure. I did not find moving > web/pgadmin/tools/datagrid/static/js/datagrid.js. Please correct me if I am > missing anything. > >> >> Sincerely, >> >> Victoria >> >> On Wed, Jun 6, 2018 at 7:07 AM Aditya Toshniwal < >> aditya.toshni...@enterprisedb.com> wrote: >> >>> Hi Anthony/Victoria/Joao, >>> >>> I know I am very late to review on patch 004. The idea of moving js >>> files from tools to static folder looks good, but I have a few suggestions: >>> >>> 1) Why don't we start using webpack alias's instead of using absolute >>> path. For eg, >>> import {RestoreDialogWrapper} from >>> '../../../pgadmin/static/js/restore/restore_dialog_wrapper'; >>> can be used as import {RestoreDialogWrapper} from >>> 'pgadmin_static/js/restore/restore_dialog_wrapper'; >>> by adding pgadmin_static alias to webpack config. >>> >>> 2) Few of the js are left behind, the ones which are used in python >>> __init__.py. Can't we move them too ? It would be nicer to not to leave >>> behind a single js. >>> >>> Kindly let me know your views on this. >>> >>> >>> Thanks and Regards, >>> Aditya Toshniwal >>> Software Engineer | EnterpriseDB Software Solutions | Pune >>> "Don't Complain about Heat, Plant a tree" >>> >>> On Sat, Jun 2, 2018 at 12:47 AM, Victoria Henry >>> wrote: >>> Hey Ashesh, LGTM! The some of the CI tests failed but it looks like a flake. But you can go ahead and merge this. Sincerely, Victoria On Fri, Jun 1, 2018 at 2:36 PM Ashesh Vashi < ashesh.va...@enterprisedb.com> wrote: > On Fri, Jun 1, 2018 at 10:09 PM, Victoria Henry > wrote: > >> Hi Ashesh, >> >> We just attempted to apply your patch over master but it did not >> work. We don't want to introduce any bugs or break any functionality. >> Please update the patch to make sure it is synced up with the master >> branch. >> > Please find the updated patch. > >> >> Sincerely, >> >> Victoria >> >> On Fri, Jun 1, 2018 at 11:18 AM Anthony Emengo >> wrote: >> >>> Hey Ashesh, >>> >>> Thanks for the explanation. It was great and it really helped! >>> >>> C >>> pgadmin/browser/server_groups/servers/databases/schemas/static/js/child.js >>> C >>> pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema_child_tree_node.js >>> >>> It makes sense to remove duplication by extracting these attributes >>> out and setting the canDrop and canCreate functions here. But is it >>> possible to combine these two files into one since they are related so >>> we >>> don’t need to import schema_child_tree_node? >>> >> That was the original plan, but 'pgadmin/browser/static/js//node.js' > script has too many dependecies, which are not easily portable. > And - that may lead to change the scope of the patch. > > Hence - I decided to use the separate file to make sure we have enough > test coverage (which is more imprortant than changing the scope). > >> M pgadmin/static/js/tree/tree.js >>> >>> The creation of the ancestorNode function feels like a >>> pre-optimization. That function is not used any where outside of the >>> tree.js file, so it’s more confusing to have it defined. >>> >> It is being used in the latest changes. :-) > > >> On a lighter note, could we avoid the !! syntax when possible? For >>> example, in
[patch] Minor shutdown message grammar fix
Hi, dev team, I'm surfacing to offer this minor patch to update the shutdown messaging in the tray menu and various dialogs to use the two-word "shut down" when the message context is a verb rather than the one-word noun usage "shutdown". For context, see: * https://blogs.msdn.microsoft.com/oldnewthing/20060912-03/?p=29773/ * https://crowwriter.com/2017/11/27/two-or-one-words-spelling-rules/ Apologies for being the grammar nitpicker, but it's my forte. :-) Best, Anthony shut_down_message.patch Description: Binary data