[pgadmin4] Hide tabs in create table
Hi hackers, We are trying to hide the advanced tab in the Create Table screen, and we were looking into table.js file, but cannot find a way to hide it . Does anyone have an idea on how to do this? Thanks Joao
Re: [pgadmin][patch] [GreenPlum] When user press Explain Plan and Explain analyze plan an error is displayed
Hello, Any Feedback on this Patch? We have other changes that we already developed that depend on this change. Thanks On Tue, Feb 6, 2018 at 9:33 AM Joao De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hello, > Any feedback on this Patch? > > Thanks > Joao > > On Fri, Feb 2, 2018 at 5:50 PM Joao De Almeida Pereira < > jdealmeidapere...@pivotal.io> wrote: > >> Hi Hackers, >> This is quite a big patch in order to solve the problem with the Explain >> Plan. >> >> We sent 2 patches that have the following: >> *- update-javascript-packages.diff * >> Add package: >> is-docker to select a specific setting when running the Chrome tests >> in >> Docker >> >> Upgrade the version of: >> - babel-loader >> - extract-text-webpack-plugin >> - jasmine-core >> - jasmine-enzyme >> - moment >> *- explain-plan-greenplum.diff* >> Extract SQLEditor.execute and SQLEditor._poll into their own files and >> add test around them >> Extract SQLEditor backend functions that start executing query to their >> own files and add tests around it >> Move the Explain SQL from the front-end and now pass the Explain plan >> parameters as a JSON object in the start query call. >> Extract the compile_template_name into a function that can be used by >> the different places that try to select the version of the template and the >> server type >> >> >> Thanks >> Joao >> >
Re: [pgadmin4] Hide tabs in create table
On Thu, Feb 8, 2018 at 4:01 AM, Joao De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hi hackers, > We are trying to hide the advanced tab in the Create Table screen, and we > were looking into table.js file, but cannot find a way to hide it . > > Does anyone have an idea on how to do this? > Please take a look at the code in foreign_data_wrapper.js (line #151), where we've defined 'group' as: > > *{ id: 'security', label: gettext('Security'), type: 'group',},* You can also define 'visible' parameter for this type of schema. i.e. > > *{* > * id: 'advanced', label: gettext('Advanced'), type: 'group', > visible: function() { ... }**},* And, replace "group: gettext('Advanced')" with "group: 'advanced'" in all control schema in table.js. e.g. *--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js* *+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js* *@@ -501,12 +501,22 @@ define('pgadmin.node.table', [* * return tbl_oid;* * },* * }),* *+},{* *+ id: 'advanced', label: gettext('Advanced'), type: 'group',* *+ visible: function(m) {* *+if(!_.isUndefined(m.node_info) && !_.isUndefined(m.node_info.server)* *+ && !_.isUndefined(m.node_info.server.version) &&* *+m.node_info.server.version > 10)* *+ return true;* *+* *+return false;* *+ },* * },{* * id: 'coll_inherits', label: gettext('Inherited from table(s)'),* *- type: 'text', group: gettext('Advanced'), mode: ['properties'],* *+ type: 'text', group: 'advanced', mode: ['properties'],* * },{* * id: 'inherited_tables_cnt', label: gettext('Inherited tables count'),* *- type: 'text', mode: ['properties'], group: gettext('Advanced'),* *+ type: 'text', mode: ['properties'], group: 'advanced',* * disabled: 'inSchema',* * }* The example patch - it has defined the 'advanced' group, and hide advanced group for server_version < 10, and then used it for 'coll_inherits', and 'inherited_tables_cnt'. -- Thanks, Ashesh > > Thanks > Joao >
[pgAdmin4][Patch]: RM #2899: Provide access keys/shortcuts to all commonly used menu options in the main window.
Hi, Please find the attached patch for RM #2899: Provide access keys/shortcuts to all commonly used menu options in the main window. Shortcuts provided in this patch: Alt+Shift+Q Open the query tool Alt+Shift+V View data Alt+Shift+C Open the context menu Alt+Shift+N Create an object Alt+Shift+E Edit the object properties Alt+Shift+D Delete the object Alt+Shift+G Direct debugging Thanks, Khushboo diff --git a/docs/en_US/keyboard_shortcuts.rst b/docs/en_US/keyboard_shortcuts.rst index fe0737c..01edf0e 100644 --- a/docs/en_US/keyboard_shortcuts.rst +++ b/docs/en_US/keyboard_shortcuts.rst @@ -48,7 +48,20 @@ When using main browser window, the following keyboard shortcuts are available: | Alt+Shift+[ | Move tabbed panel backward/forward | | Alt+Shift+] || +---++ - +| Alt+Shift+Q | Open the query tool| ++---++ +| Alt+Shift+V | View data | ++---++ +| Alt+Shift+C | Open the context menu | ++---++ +| Alt+Shift+N | Create an object | ++---++ +| Alt+Shift+E | Edit the object properties | ++---++ +| Alt+Shift+D | Delete the object | ++---++ +| Alt+Shift+G | Direct debugging | ++---++ **SQL Editors** diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py index d3df084..04065f5 100644 --- a/web/pgadmin/browser/__init__.py +++ b/web/pgadmin/browser/__init__.py @@ -324,6 +324,112 @@ class BrowserModule(PgAdminModule): category_label=gettext('Keyboard shortcuts'), fields=fields ) + +self.preference.register( +'keyboard_shortcuts', +'sub_menu_query_tool', +gettext('Open query tool'), +'keyboardshortcut', +{ +'alt': True, +'shift': True, +'control': False, +'key': {'key_code': 81, 'char': 'q'} +}, +category_label=gettext('Keyboard shortcuts'), +fields=fields +) + +self.preference.register( +'keyboard_shortcuts', +'sub_menu_view_data', +gettext('View data'), +'keyboardshortcut', +{ +'alt': True, +'shift': True, +'control': False, +'key': {'key_code': 86, 'char': 'v'} +}, +category_label=gettext('Keyboard shortcuts'), +fields=fields +) + +self.preference.register( +'keyboard_shortcuts', +'sub_menu_create', +gettext('Create object'), +'keyboardshortcut', +{ +'alt': True, +'shift': True, +'control': False, +'key': {'key_code': 78, 'char': 'n'} +}, +category_label=gettext('Keyboard shortcuts'), +fields=fields +) + +self.preference.register( +'keyboard_shortcuts', +'sub_menu_properties', +gettext('Edit object properties'), +'keyboardshortcut', +{ +'alt': True, +'shift': True, +'control': False, +'key': {'key_code': 69, 'char': 'e'} +}, +category_label=gettext('Keyboard shortcuts'), +fields=fields +) + +self.preference.register( +'keyboard_shortcuts', +'sub_menu_delete', +gettext('Delete object'), +'keyboardshortcut', +{ +'alt': True, +'shift': True, +'control': False, +'key': {'key_code': 68, 'char': 'd'} +}, +category_label=gettext('Keyboard shortcuts'), +fields=fields +) + +self.preference.register( +'keyboard_shortcuts', +'context_menu', +gettext('Open context menu'), +
Re: [pgadmin][patch] [GreenPlum] When user press Explain Plan and Explain analyze plan an error is displayed
It’s in my queue, but I’ve been traveling. I hope to get to it later today or tomorrow. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK:http://www.enterprisedb.com The Enterprise PostgreSQL Company > On 7 Feb 2018, at 22:32, Joao De Almeida Pereira > wrote: > > Hello, > Any Feedback on this Patch? > We have other changes that we already developed that depend on this change. > > Thanks > >> On Tue, Feb 6, 2018 at 9:33 AM Joao De Almeida Pereira >> wrote: >> Hello, >> Any feedback on this Patch? >> >> Thanks >> Joao >> >>> On Fri, Feb 2, 2018 at 5:50 PM Joao De Almeida Pereira >>> wrote: >>> Hi Hackers, >>> This is quite a big patch in order to solve the problem with the Explain >>> Plan. >>> >>> We sent 2 patches that have the following: >>> - update-javascript-packages.diff >>> Add package: >>> is-docker to select a specific setting when running the Chrome tests in >>> Docker >>> >>> Upgrade the version of: >>> - babel-loader >>> - extract-text-webpack-plugin >>> - jasmine-core >>> - jasmine-enzyme >>> - moment >>> - explain-plan-greenplum.diff >>> Extract SQLEditor.execute and SQLEditor._poll into their own files and >>> add test around them >>> Extract SQLEditor backend functions that start executing query to their >>> own files and add tests around it >>> Move the Explain SQL from the front-end and now pass the Explain plan >>> parameters as a JSON object in the start query call. >>> Extract the compile_template_name into a function that can be used by the >>> different places that try to select the version of the template and the >>> server type >>> >>> >>> Thanks >>> Joao