[pgadmin-hackers] pgAdmin 4 commit: Fix various issues with pgAgent job steps and schedul

2017-06-08 Thread Dave Page
Fix various issues with pgAgent job steps and schedules:

1) Error on clicking SQL panel when Schedule OR Step node is selected in 
browser. Fixes #1888

2) Error while dropping Schedule OR Step node. Fixes #1889

3) Newly created Schedule/Step node was not displaying in browser. Fixes #1890

Branch
--
master

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

Modified Files
--
.../server_groups/servers/pgagent/__init__.py  |   2 +-
.../servers/pgagent/schedules/__init__.py  | 192 +++--
.../servers/pgagent/steps/__init__.py  | 110 +---
.../steps/templates/pga_jobstep/js/pga_jobstep.js  |   2 +-
4 files changed, 227 insertions(+), 79 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4] To fix issues in pgAgent's modules

2017-06-08 Thread Dave Page
Thanks, applied.

On Wed, Jun 7, 2017 at 12:54 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> Please find attached patch to fix the issues in pgAgent's Schedule and Step
> module.
>
> 1) Error on clicking SQL panel when Schedule OR Step node is selected in
> browser.
> RM#1888
>
> 2) Error while dropping Schedule OR Step node.
> RM#1889
>
> 3) Newly created Schedule/Step node was not displaying in browser.
> RM#1890
>
> Other misc changes are for PEP-8.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> 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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix an intermittent error seen during result polling.

2017-06-08 Thread Dave Page
Fix an intermittent error seen during result polling. Fixes #2470

Branch
--
master

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

Modified Files
--
web/pgadmin/utils/driver/psycopg2/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


Re: [pgadmin-hackers] [pgAdmin4] To fix the error "ValueError: too many values to unpack" while polling

2017-06-08 Thread Dave Page
Thanks, applied.

On Wed, Jun 7, 2017 at 1:26 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch to fix the issue in query tool result polling causing
> exception,
> ValueError: too many values to unpack
> RM#2470
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> 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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Retain column sizing in the query tool results grid w

2017-06-08 Thread Dave Page
Retain column sizing in the query tool results grid when the same query is 
re-run multiple times in a row. Fixes #1971

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2fddf750e6a664a2d82756bf896bdacad1e10b2a
Author: Surinder Kumar 

Modified Files
--
web/pgadmin/static/js/sqleditor_utils.js   |  58 ++
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 120 -
web/regression/javascript/sqleditor_utils_spec.js  |  27 +
3 files changed, 129 insertions(+), 76 deletions(-)


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


Re: [pgadmin-hackers] Re: [pgAdmin4][Patch][Feature #1971]: Remember column sizes between executions of the same query in the query tool

2017-06-08 Thread Dave Page
Nice! Thanks, patch applied.

On Wed, Jun 7, 2017 at 4:03 PM, Surinder Kumar
 wrote:
> PFA patch after rebase
>
> On Wed, Jun 7, 2017 at 6:26 PM, Surinder Kumar
>  wrote:
>>
>> Hi
>>
>> Please find rebased patch.
>>
>> On Wed, Jun 7, 2017 at 6:15 PM, Dave Page  wrote:
>>>
>>> Hi,
>>>
>>> Could you rebase this please?
>>>
>>> Thanks.
>>>
>>> On Tue, Jun 6, 2017 at 9:22 AM, Surinder Kumar
>>>  wrote:
>>> > Hi All,
>>> >
>>> > Please find updated patch which includes Jasmine test cases for
>>> > functions
>>> > getHash and calculateColumnWidth
>>> >
>>> > Thanks,
>>> > Surinder
>>> >
>>> > On Mon, Jun 5, 2017 at 11:38 PM, Shruti B Iyer 
>>> > wrote:
>>> >>
>>> >> Hi Surinder!
>>> >>
>>> >> We reviewed this patch. The changes look good and we especially like
>>> >> that
>>> >> you have extracted out the new utility functions and the
>>> >> epicRandomString
>>> >> function too.
>>> >>
>>> >> This patch will likely affect the Query Results patch that is
>>> >> currently
>>> >> under review. In order to assist either us or yourself when making a
>>> >> merge
>>> >> between these patches, it would help to have jasmine unit testing for
>>> >> the
>>> >> two new functions, getHash and calculate_column_width.
>>> >>
>>> >> Also, we suggest that you rename calculate_column_width to
>>> >> calculateColumnWidth for consistency with javascript code style.
>>> >>
>>> >> Thanks,
>>> >> Shruti and Matt
>>> >>
>>> >> On Mon, Jun 5, 2017 at 9:16 AM Surinder Kumar
>>> >>  wrote:
>>> >>>
>>> >>> Staged changes are missed in previous patch, so please ignore.
>>> >>> Please find attached updated patch.
>>> >>>
>>> >>> On Mon, Jun 5, 2017 at 4:29 PM, Surinder Kumar
>>> >>>  wrote:
>>> 
>>>  Hi
>>> 
>>>  This patch contains two fixes:
>>> 
>>>  1) In Query/tool or Edit grid, the width of table column header is
>>>  fixed
>>>  depending on the column type(int, boolean, char etc.) due to which
>>>  the
>>>  column name or type appears cut from right and doesn't looks good
>>>  from user
>>>  point of view. The main concern was to display as much as the
>>>  content of
>>>  column should be displayed.
>>> 
>>>  Now the width of column is decided using the text length of column
>>>  name
>>>  or column type so that the column takes exact width it required and
>>>  it don't
>>>  appears cut.
>>> 
>>>  2) Remember column size after re-running a query.
>>> 
>>>  The approach is to extract table name from the query executed and
>>>  use it
>>>  to store its columns width.
>>>  Whenever the column(s) width of a table is adjusted, the
>>>  corresponding
>>>  values are updated into the object and used every time the same
>>>  query is
>>>  executed.
>>> 
>>>  If a query is executed for e.g:
>>> 
>>>  SELECT generate_series(1, 1000) as id, generate_series(1, 1000) as
>>>  name,
>>>  generate_series(1, 1000) as age
>>> 
>>>  it
>>>  displays 3 columns
>>>  but don't have any table name. In that case,
>>>   i use a hash generator function which returns unique hash for a
>>>  query
>>>  written in query editor and adjusted column(s) width are stored
>>>  against that
>>>  hash in object.
>>> 
>>>  Is there any way to get temporary table name(avoiding unique hash)
>>>  for
>>>  such queries ?
>>> 
>>>  Also, Moved utilities functions into pgadmin/static/utils.js
>>> 
>>>  Please find attached patch and review.
>>> 
>>>  Thanks,
>>>  Surinder Kumar
>>> >>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Sent via pgadmin-hackers mailing list
>>> >>> (pgadmin-hackers@postgresql.org)
>>> >>> To make changes to your subscription:
>>> >>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> > 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
>>
>>
>



-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Load module's JS files only when required

2017-06-08 Thread Dave Page
Hi

On Wed, Jun 7, 2017 at 7:10 PM, Joao Pedro De Almeida Pereira
 wrote:
> Hello Dave,
> By the description on the email, it looks like the process is very similar
> to the Grunt process that we were talking about, but without the patch, it
> is a bit hard to get more specifics.
> Can you forward the patch so we can take a look at it.
>
> We believe that every effort done to eliminate templated Javascript and CSS
> files is well worth it, and should be followed.

Odd - the patch was sent to you as well. Oh well, here it is.

> On Tue, Jun 6, 2017 at 9:39 AM, Dave Page  wrote:
>>
>> Hi
>>
>> On Mon, Jun 5, 2017 at 10:22 AM, Surinder Kumar
>>  wrote:
>> > Hi Dave,
>> >
>> > Please find attached patch for minifying CSS files and optimize images
>> > using
>> > Webpack.
>> >
>> > Steps to run:
>> >
>> > 1) After applying patch, go to web directory and run npm install on
>> > terminal
>> > to install packages which are used to parse/minify CSS files.
>> >
>> > 2) Run npm run build which creates dist folder inside
>> > web/pgadmin/static/
>> > directory to store processed images, fonts and css files.
>> >
>> > 3. Set DEBUG = False in config_local.py and then run python pgAdmin.py
>> > to
>> > start server.
>> > I kept generated main.css and overrides.css conditional in base.html to
>> > load
>> > them only when debug mode is False
>> >
>> >
>> > After running "npm run build", following files/directories are
>> > generated:
>> >
>> > 1) main.css -  about 20 vendor CSS files are packed into this file and
>> > more
>> > importantly the paths to images are preserved.
>> >
>> > 2) overrides.css - it contains bootstrap.overrides.css and pgadmin.css,
>> > they
>> > has to be packed separately and loaded after all CSS files are loaded
>> > because the purpose of these files is to override the vendor or modules
>> > css.
>> >
>> > 3) img - it contains the images used in CSS files. The name of image
>> > files
>> > can also be hashed names for caching purpose which we can use.
>> >
>> > 4) fonts - it contains the fonts used in fontawesome.css and other css
>> > files.
>> >
>> > This is a simple patch to demonstrate how CSS files will be minified
>> > with
>> > Webpack.
>>
>> I think this is a good, simple method. It handles debug v.s release,
>> and of course, any plugin modules can include their own images/CSS
>> without even having to worry about webpacking if installed later.
>>
>> > For now it minifies only vendor CSS files, I will add modules static
>> > files
>> > in the list later on.
>>
>> I think we need to do that to get a better idea of the benefits. We
>> also need to get some of the JS code in there as well (Ashesh should
>> be able to help with that - he told me he's de-templatised a lot of
>> that now).
>>
>> > Any thoughts on minifying template CSS files which are built dynamically
>> > and
>> > loaded with dependency on other modules?
>>
>> Let's look at why they are templates. Is that required, or could they
>> be made static?
>>
>> > Also, I looked into Flask-webpack which generates bundled assets using
>> > Webpack(webpack.config.js) and provide additionally global template tags
>> > to
>> > use in Jinja templates.
>> >
>> > But it might not work with latest version of Webpack as this repo is not
>> > updated since last 2 years. I need to check with latest version and I
>> > will
>> > update on this.
>>
>> Given how straightforward this seems to be, I'm not sure it's needed.
>>
>> Joao, any comments?
>>
>> Nice work - thanks!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: 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


bundle_css_using_webpack.patch
Description: Binary data

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


[pgadmin-hackers] Build failed in Jenkins: pgadmin4-master-python36 #144

2017-06-08 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Fix various issues with pgAgent job steps and schedules:

[Dave Page] Fix an intermittent error seen during result polling. Fixes #2470

[Dave Page] Retain column sizing in the query tool results grid when the same 
query

--
[...truncated 254.49 KB...]
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_get.SchemaGetTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_put.SchemaPutTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_add.TypesAddTestCase)
Add type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_delete.TypesDeleteTestCase)
Delete type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_get.TypesGetTestCase)
Get type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_put.TypesUpdateTestCase)
Update type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_check_recovery.TestCheckRecovery)
Test for check recovery ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependencies_sql.TestDependenciesSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependent

[pgadmin-hackers] pgAdmin 4 commit: Improvements to the Query Results grid:

2017-06-08 Thread Dave Page
Improvements to the Query Results grid:

- Improve the UI
- Allow copy/paste from sets of rows, columns or arbitrary blocks of cells

Patch by Matt, Shruti, Joao and Sarah @ Pivotal

Fixes #2476

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=01bfa88309940bdfe62d537a4be031dd8cbc2303
Author: Sarah McAlear 

Modified Files
--
.../tables/tests/test_column_properties_sql.py |   2 +-
.../connect_to_server_feature_test.py  |   2 +-
.../copy_selected_query_results_feature_test.py| 105 +++-
.../feature_tests/table_ddl_feature_test.py|   2 +-
web/pgadmin/feature_tests/view_data_dml_queries.py |   2 -
.../xss_checks_panels_and_query_tool_test.py   |   2 +-
.../xss_checks_pgadmin_debugger_test.py|   2 +-
web/pgadmin/static/img/select-all-icon.png | Bin 0 -> 132 bytes
.../static/js/selection/active_cell_capture.js | 191 +++
web/pgadmin/static/js/selection/column_selector.js | 109 ++--
web/pgadmin/static/js/selection/copy_data.js   |  15 +-
web/pgadmin/static/js/selection/grid_selector.js   |  59 +--
.../js/selection/range_boundary_navigator.js   |   7 +-
.../static/js/selection/range_selection_helper.js  | 112 -
web/pgadmin/static/js/selection/row_selector.js|  90 ++--
web/pgadmin/static/js/selection/set_staged_rows.js |  23 +-
.../static/js/selection/xcell_selection_model.js   | 228 +
web/pgadmin/static/js/slickgrid/cell_selector.js   |  18 +
.../handle_query_output_keyboard_event.js  |  21 +
.../js/slickgrid/pgslick.cellrangedecorator.js |  73 +++
.../js/slickgrid/pgslick.cellrangeselector.js  | 119 +
web/pgadmin/static/vendor/slickgrid/README |   9 -
web/pgadmin/static/vendor/slickgrid/README.md  |   9 +
.../slickgrid/controls/slick.columnpicker.js   |   9 +-
.../static/vendor/slickgrid/images/CheckboxN.png   | Bin 0 -> 257 bytes
.../static/vendor/slickgrid/images/CheckboxY.png   | Bin 0 -> 361 bytes
.../vendor/slickgrid/plugins/slick.autotooltips.js |  10 +-
.../slickgrid/plugins/slick.cellcopymanager.js |   6 +-
.../plugins/slick.cellexternalcopymanager.js   | 449 +
.../slickgrid/plugins/slick.cellrangeselector.js   |   9 +-
.../slickgrid/plugins/slick.cellselectionmodel.js  |  46 +-
.../slickgrid/plugins/slick.headerbuttons.js   |   6 +-
.../vendor/slickgrid/plugins/slick.headermenu.js   |   8 +-
.../slickgrid/plugins/slick.rowselectionmodel.js   |  10 +-
.../vendor/slickgrid/slick-default-theme.css   |  22 +-
web/pgadmin/static/vendor/slickgrid/slick.core.js  |  15 +-
.../static/vendor/slickgrid/slick.dataview.js  |  40 +-
.../static/vendor/slickgrid/slick.editors.js   |  67 +--
.../static/vendor/slickgrid/slick.formatters.js|  12 +-
web/pgadmin/static/vendor/slickgrid/slick.grid.css |  43 +-
web/pgadmin/static/vendor/slickgrid/slick.grid.js  | 554 ++---
.../slickgrid/slick.groupitemmetadataprovider.js   | 158 ++
.../vendor/slickgrid/slick.remotemodel-yahoo.js| 206 
.../static/vendor/slickgrid/slick.remotemodel.js   | 169 +++
.../tools/sqleditor/static/css/sqleditor.css   |  60 ++-
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 107 ++--
.../utils/tests/test_versioned_template_loader.py  |  25 +-
web/regression/feature_utils/pgadmin_page.py   |  25 +
.../selection/active_cell_capture_spec.js  | 342 +
.../javascript/selection/column_selector_spec.js   | 346 ++---
.../javascript/selection/copy_data_spec.js |  44 +-
.../javascript/selection/grid_selector_spec.js |  49 +-
.../selection/range_boundary_navigator_spec.js |  19 +-
.../selection/range_selection_helper_spec.js   |  93 
.../javascript/selection/row_selector_spec.js  | 235 +++--
.../javascript/selection/set_staged_rows_spec.js   | 184 +++
.../selection/xcell_selection_model_spec.js| 513 +++
.../javascript/slickgrid/cell_selector_spec.js |  77 +++
.../handle_query_output_keyboard_event_spec.js | 143 ++
web/regression/javascript/test-main.js |  17 +-
web/regression/python_test_utils/test_utils.py |   8 +-
web/regression/requirements.txt|   2 +-
62 files changed, 4506 insertions(+), 822 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-06-08 Thread Dave Page
Hi!

Thanks, patch applied... but I have one issue and one question:

- There are changes to SlickGrid, the addition of a function to scroll
a column into view. Is this submitted upstream and accepted?

- One of the regression tests now fails because it's trying to access
an element that's out of the clickable area. If I widen then browser
for testing it passes so I believe it's just the test that needs
fixing. Can you take a look at that ASAP please?

ERROR: runTest 
(pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
Validate Insert, Update operations in View data with given test data
--
Traceback (most recent call last):
  File 
"/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
line 100, in runTest
self._add_row()
  File 
"/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
line 255, in _add_row
self._update_cell(cell_xpath, config_data[str(idx)])
  File 
"/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
line 182, in _update_cell
save_btn_xpath
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py",
line 77, in click
self._execute(Command.CLICK_ELEMENT)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py",
line 491, in _execute
return self._parent.execute(command, params)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 238, in execute
self.error_handler.check_response(response)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py",
line 193, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: unknown error: Element is not clickable
at point (726, 397)
  (Session info: chrome=58.0.3029.110)
  (Driver info: chromedriver=2.29.461585
(0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.3
x86_64)

Thanks - this is a very nice improvement!


On Wed, Jun 7, 2017 at 9:47 PM, Sarah McAlear  wrote:
> Hello,
>
> Here is a new set of patches with the bug fixed. Good catch, Surinder!
>
> Thanks,
> Joao & Sarah
>
>
>
> On Tue, Jun 6, 2017 at 12:24 AM, Surinder Kumar
>  wrote:
>>
>> Hi
>>
>> On Tue, Jun 6, 2017 at 12:13 AM, Shruti B Iyer  wrote:
>>>
>>> Hi Surinder,
>>>
>>> On Mon, Jun 5, 2017 at 2:09 PM Robert Eckhardt 
>>> wrote:

 On Mon, Jun 5, 2017 at 9:09 AM, Surinder Kumar
  wrote:
>
> Hi Matthew,
>
> Couple of review comments:
> 1) Clicking on a new added row(after save) results in console error -
> screenshot attached.


>>>
>>> We tried to follow the steps you provided to replicate the bug but
>>> couldn't replicate the error.  Can you provide further instructions to help
>>> us replicate the bug? Perhaps share a screen video if that makes sense.
>>> Is this occurring on the Edit Table view?
>>
>> Sorry for wrong steps.
>> No need to add a new row, just double clicking on row selection column of
>> last row will throw that error.
>>>
>>>
>>> Thanks,
>>> Shruti and Matt
>>
>>
>



-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Jenkins build is back to normal : pgadmin4-master-python36 #145

2017-06-08 Thread pgAdmin 4 Jenkins
See 




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


Re: [pgadmin-hackers] Fix for RM2421 [pgAdmin4][patch]

2017-06-08 Thread Harshal Dhumal
Please find attached rebased patch.

-- 
*Harshal Dhumal*
*Sr. Software Engineer*

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

On Wed, Jun 7, 2017 at 6:59 PM, Dave Page  wrote:

> Can you rebase this please? I think Ashesh broke it :-p
>
> On Tue, Jun 6, 2017 at 7:42 AM, Harshal Dhumal
>  wrote:
> > Hi,
> >
> > On Mon, Jun 5, 2017 at 9:25 PM, Dave Page  wrote:
> >>
> >> Hi
> >>
> >> With this patch applied, it uses the field names instead of the labels
> >> in error messages - e.g.
> >>
> >> 'dirty_rate_limit' must be numeric
> >>
> >> instead of:
> >>
> >> 'Dirty Rate Limit (KB)' must be numeric.
> >
> > Fixed. Please find attached updated patch.
> >
> >>
> >>
> >> Thanks.
> >>
> >> On Tue, May 30, 2017 at 8:28 AM, Harshal Dhumal
> >>  wrote:
> >> > Hi,
> >> >
> >> > Please find updated patch.
> >> >
> >> > --
> >> > Harshal Dhumal
> >> > Sr. Software Engineer
> >> >
> >> > EnterpriseDB India: http://www.enterprisedb.com
> >> > The Enterprise PostgreSQL Company
> >> >
> >> > On Tue, May 30, 2017 at 12:30 PM, Harshal Dhumal
> >> >  wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> Please ignore this patch as I forgot to include few changes. I'll
> send
> >> >> updated one.
> >> >>
> >> >> --
> >> >> Harshal Dhumal
> >> >> Sr. Software Engineer
> >> >>
> >> >> EnterpriseDB India: http://www.enterprisedb.com
> >> >> The Enterprise PostgreSQL Company
> >> >>
> >> >> On Mon, May 29, 2017 at 3:18 PM, Harshal Dhumal
> >> >>  wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> Here is updated patch for RM2421.
> >> >>>
> >> >>> Now I have moved all Numeric control level validations to datamodel.
> >> >>> As
> >> >>> existing implementation was causing
> >> >>> issues with error messages in create/edit dialog when schema
> contains
> >> >>> two
> >> >>> or more Numeric controls.
> >> >>>
> >> >>> This is generic issue and not related to resource group. Also I have
> >> >>> updated all other nodes which uses Numeric controls
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Harshal Dhumal
> >> >>> Sr. Software Engineer
> >> >>>
> >> >>> EnterpriseDB India: http://www.enterprisedb.com
> >> >>> The Enterprise PostgreSQL Company
> >> >>>
> >> >>> On Fri, May 19, 2017 at 12:22 PM, Harshal Dhumal
> >> >>>  wrote:
> >> 
> >>  Hi,
> >> 
> >>  On Thu, May 18, 2017 at 7:57 PM, Joao Pedro De Almeida Pereira
> >>   wrote:
> >> >
> >> > Hello Harshal,
> >> >
> >> > We review the patch and have some questions:
> >> > 1) Is there any particular reason to initialize variables and
> >> > functions
> >> > in the same place? We believe that it would be more readable there
> >> > were no
> >> > chaining of variable creation, specially if those variables are
> >> > functions.
> >> > Check line:
> >> 
> >>  That function is only going to be used in checkNumeric function (in
> >>  case
> >>  of Number control) and checkInt function (in case of Integer
> control)
> >>  so
> >>  declared them locally.
> >>  Anyway I'm going to refactor both the controls as Number and
> Integer
> >>  shares some common properties.
> >> 
> >> > +++ b/web/pgadmin/static/js/backform.pgadmin.js
> >> > @@ -1528,7 +1528,18 @@
> >> >max_value = field.max,
> >> >isValid = true,
> >> >intPattern = new RegExp("^-?[0-9]*$"),
> >> > -  isMatched = intPattern.test(value);
> >> > +  isMatched = intPattern.test(value),
> >> > +  trigger_invalid_event = function(msg) {
> >> >
> >> > 2) The functions added in both places look very similar, can they
> be
> >> > merged and extracted? We are talking about the
> trigger_invalid_event
> >> > function.
> >> 
> >>  Yes they can be merged. As of now both NumericControl and
> >>  IntegerControl
> >>  are derived from InputControl. Ideally
> >>  only NumericControl should be derived from InputControl and
> >>  IntegerControl should be derive from NumericControl.
> >> 
> >> 
> >> >
> >> > 3) The following change is very similar to the
> >> > trigger_invalid_event,
> >> > was there a reason not to use it?
> >> 
> >>  Below code triggers "model valid" event; opposite to "model
> invalid"
> >>  event (trigger_invalid_event)
> >> >
> >> > +++ b/web/pgadmin/static/js/backform.pgadmin.js
> >> > @@ -1573,25 +1584,23 @@
> >> >  this.model.errorModel.unset(name);
> >> >  this.model.set(name, value);
> >> >  this.listenTo(this.model, "change:" + name, this.render);
> >> > -if (this.model.collection || this.model.handler) {
> >> > -  (this.model.collection || this.model.handler).trigger(
> >> > - 'pgadmin-session:model:valid', this.model,
> >> > (this.model.collection || this.model.handler)
> >> > -);
> >> > +// Check if other fields of sa

Re: [pgadmin-hackers] Re: Server side cursor limitations for on demand loading of data in query tool [RM2137] [pgAdmin4]

2017-06-08 Thread Harshal Dhumal
Ignore this patch.
Rebase and migration of feature tests and jasmine tests required.

-- 
*Harshal Dhumal*
*Sr. Software Engineer*

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

On Thu, Jun 8, 2017 at 3:56 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
> Please find attached updated patch for feature RM2137.
>
> Changes in this patch:
> 1. Patch rebased.
>
> 2. Updated existing feature tests which requires changes due to this
> feature.
>  affected feature test cases:
>  i. PGDataypeFeatureTest
>  ii. CheckForXssFeatureTest
>
> 3. Updated existing jasmine test cases which requires changes due to this
> feature.
>  affected jasmine test cases:
>  i. copy data
>  ii. range_boundary_navigator
>  iii. row_selector
>  iv. set_stages_rows
>
> 4. New feature tests added
> i. on demand result set on scrolling.
> ii. on demand result set on grid select all.
> iii. on demand result set on column select all.
> iv. explain query
> v. explain query with verbose
> vi. explain query with costs
> vii. explain analyze query
> viii. explain analyze query with buffers
> ix. explain analyze query with timing
> x. auto commit disabled.
> xi. auto commit enabled.
> xii. auto rollback enabled.
> xiii. cancel query.
>
>
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Tue, May 16, 2017 at 8:14 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, May 15, 2017 at 7:40 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> On Sat, May 13, 2017 at 12:35 AM, Joao Pedro De Almeida Pereira <
>>> jdealmeidapere...@pivotal.io> wrote:
>>>
 We were only able to apply the patch on 1f903ba2 (were seeing patch
 does not apply due to sqleditor.js conflicts)
 The javascript tests passed, but we were unable to copy rows or columns
 or cells when running the application. Could you run feature tests?

>>> There are three modes sqleditor can be launched
>>> 1. Query tool  (Tools menus -> Query Tool)
>>> 2. Datagrid.  (Right click on any table/view  -> View Data -> View
>>> All/First 100/Last 100/Filtered rows)
>>> 3. Scripts (Right click on any table/view ->
>>> INSERT/CREATE/UPDATE/DELETE/SELECT)
>>>
>>> Paste functionality is only enabled in Datagrid and table has Primary
>>> key otherwise it's disabled. In your case row might have been copied but
>>> you were unable paste because you might be trying to paste the rows in
>>> Query tool. Please try again in Datagrid with table having Primary key.
>>>
>>>

 Now that more functionality is being added to sqleditor.js, this may be
 a good time to extract the functionality to separate files. This will
 increase readability, and encourage separation of concerns. It will also
 make changes easier to test in isolation.

>>> Ok. Let me check if I can separate out ant functionalities.
>>>
>>>
 It's probably a good idea to test the changes made to the python as
 well as javascript code. In this case, the new behavior of poll() in
 sqleditor __init__ should be tested.

>>>
>>> At this point we don't have any python unit tests that can test
>>> sqleditor backend (python code).
>>> @Dave should I include python unit test cases in this patch?
>>>
>>
>> We do have some feature tests that hit the query tool - Murtuza wrote
>> some anti-XSS validation tests for example, and Khushboo has been working
>> on some datatype rendering tests.
>>
>> As a general rule, I prefer we focus more on feature tests now than the
>> API tests - they cover the whole app end-to-end of course. The
>> disadvantages are:
>>
>> - The treeview isn't reliable enough for me to enable those tests on the
>> CI server yet.
>>
>> - They can take a long time to run, so we need to test multiple things at
>> once wherever possible. That means minimising browser reloads, or new
>> instances of tools like the Query Tool - or even the number of queries
>> executed through the query tool as part of a test.
>>
>> That said, yes, if there are specific things that are not covered by
>> Murtuza and Khushboo's work, we should test them. For example, loading all
>> rows when the user selects all, running/rendering EXPLAIN, auto-commit vs.
>> auto-rollback (and combinations thereof).
>>
>> The standard moving forwards should be to include feature tests for new
>> functionality and Jasmine tests for algorithmic JS code.
>>
>> I also agree with Joao on the modularisation of JS code. Testable and
>> reusable code should be in "library" files, and we should work to minimise
>> the amount of JS templates - for the most part, that means moving to the
>> client-side translation mechanism which Tira worked on, and I've done some
>> early migration work.
>>
>> Thanks.
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> Ent

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

2017-06-08 Thread Dave Page
Hi George

On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
 wrote:
> Hi Dave,
>
> I split the linting out into an intermediate commit, and rebased on top of
> master.

Unfortunately, it still doesn't apply:

error: patch failed: web/regression/javascript/test-main.js:1
error: removal patch leaves file contents
error: web/regression/javascript/test-main.js: patch does not apply
Checking patch web/regression/requirements.txt...
Checking patch web/webpack.config.js...
Checking patch web/webpack.test.config.js...
Checking patch web/yarn.lock...
error: web/yarn.lock: already exists in working directory
Applied patch .gitignore cleanly.
Applied patch Make.bat cleanly.
Applied patch README cleanly.
Applied patch pkg/mac/build.sh cleanly.
Applied patch pkg/pip/build.sh cleanly.
Applied patch pkg/src/build.sh cleanly.
Applied patch web/.eslintrc.js cleanly.
Applied patch web/karma.conf.js cleanly.
Applied patch web/package.json cleanly.
Applied patch web/pgAdmin4.py cleanly.
Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
Applied patch web/pgadmin/tools/javascript/javascript_bundler.py cleanly.
Applied patch web/pgadmin/tools/javascript/tests/__init__.py cleanly.
Applied patch web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
cleanly.
Applied patch web/regression/README cleanly.
Applied patch web/regression/javascript/jasmine_capture_warnings_beforeall.js
cleanly.
Applied patch web/regression/requirements.txt cleanly.
Applied patch web/webpack.config.js cleanly.
Applied patch web/webpack.test.config.js cleanly.

The second (lint update) patch is even worse, with significant number
change that just don't want to apply.

Clearly yarn.lock needs to be removed from there repo.

Once I can apply a version of this, how should I be running the linter
and the unit tests?

-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-06-08 Thread Sarah McAlear
On Thu, Jun 8, 2017 at 8:34 AM, Dave Page  wrote:

> Hi!
>
> Thanks, patch applied... but I have one issue and one question:
>
> - There are changes to SlickGrid, the addition of a function to scroll
> a column into view. Is this submitted upstream and accepted?
>

We have submitted the changes we made to the patch to Slick grid and they
were accepted yesterday. We can get this in today or first thing tomorrow.


>
> - One of the regression tests now fails because it's trying to access
> an element that's out of the clickable area. If I widen then browser
> for testing it passes so I believe it's just the test that needs
> fixing. Can you take a look at that ASAP please?
>

We haven't seen this test fail but we can absolutely look into it. Our
Chrome browser is always the same size. We can try fiddling with that to
see if we can get it to fail.



>
> ERROR: runTest (pgadmin.feature_tests.view_data_dml_queries.
> CheckForViewDataTest)
> Validate Insert, Update operations in View data with given test data
> --
> Traceback (most recent call last):
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/
> view_data_dml_queries.py",
> line 100, in runTest
> self._add_row()
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/
> view_data_dml_queries.py",
> line 255, in _add_row
> self._update_cell(cell_xpath, config_data[str(idx)])
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/
> view_data_dml_queries.py",
> line 182, in _update_cell
> save_btn_xpath
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webelement.py",
> line 77, in click
> self._execute(Command.CLICK_ELEMENT)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webelement.py",
> line 491, in _execute
> return self._parent.execute(command, params)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py",
> line 238, in execute
> self.error_handler.check_response(response)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/errorhandler.py",
> line 193, in check_response
> raise exception_class(message, screen, stacktrace)
> WebDriverException: Message: unknown error: Element is not clickable
> at point (726, 397)
>   (Session info: chrome=58.0.3029.110)
>   (Driver info: chromedriver=2.29.461585
> (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.3
> x86_64)
>
> Thanks - this is a very nice improvement!
>
>
> On Wed, Jun 7, 2017 at 9:47 PM, Sarah McAlear  wrote:
> > Hello,
> >
> > Here is a new set of patches with the bug fixed. Good catch, Surinder!
> >
> > Thanks,
> > Joao & Sarah
> >
> >
> >
> > On Tue, Jun 6, 2017 at 12:24 AM, Surinder Kumar
> >  wrote:
> >>
> >> Hi
> >>
> >> On Tue, Jun 6, 2017 at 12:13 AM, Shruti B Iyer 
> wrote:
> >>>
> >>> Hi Surinder,
> >>>
> >>> On Mon, Jun 5, 2017 at 2:09 PM Robert Eckhardt 
> >>> wrote:
> 
>  On Mon, Jun 5, 2017 at 9:09 AM, Surinder Kumar
>   wrote:
> >
> > Hi Matthew,
> >
> > Couple of review comments:
> > 1) Clicking on a new added row(after save) results in console error -
> > screenshot attached.
> 
> 
> >>>
> >>> We tried to follow the steps you provided to replicate the bug but
> >>> couldn't replicate the error.  Can you provide further instructions to
> help
> >>> us replicate the bug? Perhaps share a screen video if that makes sense.
> >>> Is this occurring on the Edit Table view?
> >>
> >> Sorry for wrong steps.
> >> No need to add a new row, just double clicking on row selection column
> of
> >> last row will throw that error.
> >>>
> >>>
> >>> Thanks,
> >>> Shruti and Matt
> >>
> >>
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Consolidating gray colors in the application

2017-06-08 Thread Shirley Wang
Hi Murtuza,

This was before we had checkboxes removed and added column and row
highlighting. Try looking at this now with the query results grid updates
and let me know what you think.


On Thu, Jun 8, 2017 at 1:19 AM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hello,
>
> I think we could have use some different grey colour shade for SlickGrid
> headers from wcDocker panel, It does not look bad but as a end user I'm not
> able to differentiate between them now, please refer screenshot attached.
>
> Is this expected with new design style?
>
> [image: Inline image 1]
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jun 7, 2017 at 9:01 PM, Dave Page  wrote:
>
>> Thanks, applied.
>>
>> On Wed, Jun 7, 2017 at 3:48 PM, Surinder Kumar
>>  wrote:
>> > Hi
>> >
>> > I have used classes 'bg-gray-2 border-gray-3' for styling header and
>> footer
>> > of properties panel which are also used in other places.
>> >
>> > Please find attached patch.
>> >
>> >
>> > On Wed, Jun 7, 2017 at 6:59 PM, Robert Eckhardt 
>> > wrote:
>> >>
>> >> Thank you.
>> >>
>> >> -- Rob
>> >>
>> >> On Wed, Jun 7, 2017 at 9:28 AM, Surinder Kumar
>> >>  wrote:
>> >>>
>> >>> Sure I will send.
>> >>>
>> >>> On Wed, Jun 7, 2017 at 6:54 PM, Dave Page  wrote:
>> 
>>  On Wed, Jun 7, 2017 at 2:22 PM, Surinder Kumar
>>   wrote:
>>  > Hi
>>  >
>>  > With the latest pull, I found:
>>  > The header color of Properties panel disappears and background
>> color
>>  > of
>>  > footer area in Edit Properties panel is changed.
>> 
>>  Oh, I missed that :-(. Can you come up with a quick fix using the new
>>  classes?
>> 
>>  --
>>  Dave Page
>>  Blog: http://pgsnake.blogspot.com
>>  Twitter: @pgsnake
>> 
>>  EnterpriseDB UK: 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
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


[pgadmin-hackers] [pgAdmin4][Patch]: UI improvements in data-grid/query tool

2017-06-08 Thread Surinder Kumar
Hi,

*Changes:*

1) Display only border-top for data-grid header instead of border on whole
data-grid.

2) Remove dotted border from cell right for consistency.

3) Add border-bottom for header-row so that on scroll to bottom header rows
are differentiated from cells.

Also, due to these changes, the vertical scrollbar which appears at
data-grid right side seems to fixed.

PFA patch and review.


Thanks,
Surinder


data_grid_ui_changes.patch
Description: Binary data

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


[pgadmin-hackers] pgAdmin 4 commit: Set focus on the first enabled field when a dialogue

2017-06-08 Thread Dave Page
Set focus on the first enabled field when a dialogue is opened. Fixes #1533

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c9b717ed68797740a6ea8d3480627fe21777a8a8
Author: Surinder Kumar 

Modified Files
--
web/pgadmin/browser/templates/browser/js/node.js | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][Patch][Feature_1533]: Set focus on first field when new dialog window is presented

2017-06-08 Thread Dave Page
Thanks, patch applied.

On Thu, Jun 8, 2017 at 5:34 AM, Surinder Kumar
 wrote:
> Hi
>
> PFA patch and review.
>
> Thanks
> Surinder
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> 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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch][Feature_1535]: Pressing ESC from within a dialog box should act like "Cancel" button

2017-06-08 Thread Dave Page
Hi

On Thu, Jun 8, 2017 at 5:38 AM, Surinder Kumar
 wrote:
> Hi
>
> The attribute key for Ok, Save buttons should be mapped to 13(Enter),
> for Help - 112(F1) and
> for Cancel - 27(Esc)
> The above changes are made into all dialog related template files.
>
> PFA patch and review.

Looks good. Just a couple of thoughts:

- You've missed the object property dialogues. This really needs to be
consistent across all dialogues :-)

- The behaviour with Enter is a bit odd, because priority will be
given the the focussed control to handle it. That's what we want if
it's a text area for example, but on the other hand, if you open the
Preference dialogue, then the Help button gets focus first, so Enter
there will end up opening the docs. I suspect in most cases the
behaviour you've got is fine, so I'm not inclined to change it.  Hmm, I see similar behaviour in some other apps. Let's leave
it as you've done it :-)

Please add support for the properties dialogues, then I think we're good to go.

Thanks!

-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix the handling of double precision[] type. Fixes #

2017-06-08 Thread Dave Page
Fix the handling of  double precision[] type. Fixes #1928

Branch
--
master

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

Modified Files
--
web/pgadmin/utils/driver/psycopg2/__init__.py | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Fix handling of double precision[] type

2017-06-08 Thread Dave Page
Thanks, applied.

Can you update the data types feature test to cover this case please?

Thanks.

On Thu, Jun 8, 2017 at 6:51 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fix the handling of  double precision[] type.
> RM#1928
>
> Steps to re-produce: Below given query fails to render result in Query tool,
> SELECT ARRAY[1, 'nan', 3]::float[];
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> 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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix integer/numeric validation on various dialogues.

2017-06-08 Thread Dave Page
Fix integer/numeric validation on various dialogues. Fixes #2421

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=aa400cbc12f34f219322a2b62f9f51e21d031f0e
Author: Harshal Dhumal 

Modified Files
--
.../templates/foreign_tables/js/foreign_tables.js  | 104 
.../sequences/templates/sequence/js/sequence.js|  87 --
.../resource_groups/js/resource_groups.js  |  61 +++
.../servers/roles/templates/role/js/role.js|   2 +-
.../servers/templates/servers/servers.js   |   3 +
web/pgadmin/browser/static/js/datamodel.js | 158 +++--
web/pgadmin/static/js/backform.pgadmin.js  | 187 +
7 files changed, 323 insertions(+), 279 deletions(-)


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


Re: [pgadmin-hackers] Fix for RM2421 [pgAdmin4][patch]

2017-06-08 Thread Dave Page
Thanks, applied.

On Thu, Jun 8, 2017 at 1:59 PM, Harshal Dhumal
 wrote:
> Please find attached rebased patch.
>
> --
> Harshal Dhumal
> Sr. Software Engineer
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jun 7, 2017 at 6:59 PM, Dave Page  wrote:
>>
>> Can you rebase this please? I think Ashesh broke it :-p
>>
>> On Tue, Jun 6, 2017 at 7:42 AM, Harshal Dhumal
>>  wrote:
>> > Hi,
>> >
>> > On Mon, Jun 5, 2017 at 9:25 PM, Dave Page  wrote:
>> >>
>> >> Hi
>> >>
>> >> With this patch applied, it uses the field names instead of the labels
>> >> in error messages - e.g.
>> >>
>> >> 'dirty_rate_limit' must be numeric
>> >>
>> >> instead of:
>> >>
>> >> 'Dirty Rate Limit (KB)' must be numeric.
>> >
>> > Fixed. Please find attached updated patch.
>> >
>> >>
>> >>
>> >> Thanks.
>> >>
>> >> On Tue, May 30, 2017 at 8:28 AM, Harshal Dhumal
>> >>  wrote:
>> >> > Hi,
>> >> >
>> >> > Please find updated patch.
>> >> >
>> >> > --
>> >> > Harshal Dhumal
>> >> > Sr. Software Engineer
>> >> >
>> >> > EnterpriseDB India: http://www.enterprisedb.com
>> >> > The Enterprise PostgreSQL Company
>> >> >
>> >> > On Tue, May 30, 2017 at 12:30 PM, Harshal Dhumal
>> >> >  wrote:
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> Please ignore this patch as I forgot to include few changes. I'll
>> >> >> send
>> >> >> updated one.
>> >> >>
>> >> >> --
>> >> >> Harshal Dhumal
>> >> >> Sr. Software Engineer
>> >> >>
>> >> >> EnterpriseDB India: http://www.enterprisedb.com
>> >> >> The Enterprise PostgreSQL Company
>> >> >>
>> >> >> On Mon, May 29, 2017 at 3:18 PM, Harshal Dhumal
>> >> >>  wrote:
>> >> >>>
>> >> >>> Hi,
>> >> >>>
>> >> >>> Here is updated patch for RM2421.
>> >> >>>
>> >> >>> Now I have moved all Numeric control level validations to
>> >> >>> datamodel.
>> >> >>> As
>> >> >>> existing implementation was causing
>> >> >>> issues with error messages in create/edit dialog when schema
>> >> >>> contains
>> >> >>> two
>> >> >>> or more Numeric controls.
>> >> >>>
>> >> >>> This is generic issue and not related to resource group. Also I
>> >> >>> have
>> >> >>> updated all other nodes which uses Numeric controls
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> Harshal Dhumal
>> >> >>> Sr. Software Engineer
>> >> >>>
>> >> >>> EnterpriseDB India: http://www.enterprisedb.com
>> >> >>> The Enterprise PostgreSQL Company
>> >> >>>
>> >> >>> On Fri, May 19, 2017 at 12:22 PM, Harshal Dhumal
>> >> >>>  wrote:
>> >> 
>> >>  Hi,
>> >> 
>> >>  On Thu, May 18, 2017 at 7:57 PM, Joao Pedro De Almeida Pereira
>> >>   wrote:
>> >> >
>> >> > Hello Harshal,
>> >> >
>> >> > We review the patch and have some questions:
>> >> > 1) Is there any particular reason to initialize variables and
>> >> > functions
>> >> > in the same place? We believe that it would be more readable
>> >> > there
>> >> > were no
>> >> > chaining of variable creation, specially if those variables are
>> >> > functions.
>> >> > Check line:
>> >> 
>> >>  That function is only going to be used in checkNumeric function
>> >>  (in
>> >>  case
>> >>  of Number control) and checkInt function (in case of Integer
>> >>  control)
>> >>  so
>> >>  declared them locally.
>> >>  Anyway I'm going to refactor both the controls as Number and
>> >>  Integer
>> >>  shares some common properties.
>> >> 
>> >> > +++ b/web/pgadmin/static/js/backform.pgadmin.js
>> >> > @@ -1528,7 +1528,18 @@
>> >> >max_value = field.max,
>> >> >isValid = true,
>> >> >intPattern = new RegExp("^-?[0-9]*$"),
>> >> > -  isMatched = intPattern.test(value);
>> >> > +  isMatched = intPattern.test(value),
>> >> > +  trigger_invalid_event = function(msg) {
>> >> >
>> >> > 2) The functions added in both places look very similar, can they
>> >> > be
>> >> > merged and extracted? We are talking about the
>> >> > trigger_invalid_event
>> >> > function.
>> >> 
>> >>  Yes they can be merged. As of now both NumericControl and
>> >>  IntegerControl
>> >>  are derived from InputControl. Ideally
>> >>  only NumericControl should be derived from InputControl and
>> >>  IntegerControl should be derive from NumericControl.
>> >> 
>> >> 
>> >> >
>> >> > 3) The following change is very similar to the
>> >> > trigger_invalid_event,
>> >> > was there a reason not to use it?
>> >> 
>> >>  Below code triggers "model valid" event; opposite to "model
>> >>  invalid"
>> >>  event (trigger_invalid_event)
>> >> >
>> >> > +++ b/web/pgadmin/static/js/backform.pgadmin.js
>> >> > @@ -1573,25 +1584,23 @@
>> >> >  this.model.errorModel.unset(name);
>> >> >  this.model.set(name, value);
>> >> >  this.listenTo(this.model, "change:" + name,
>> >> > this.render);
>> >> >

[pgadmin-hackers] [pgAdmin4][Patch][RM_2450] : Internal Server Error displayed if click on statistic tab for PG 10 server

2017-06-08 Thread Atul Sharma
Hi,

The issue is fixed now. Added a new "stats.sql" file with updated columns
for the version 10.0_plus

PFA RM patch.

Regards,
Atul


RM_2450.patch
Description: Binary data

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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: UI improvements in data-grid/query tool

2017-06-08 Thread Sarah McAlear
Hi Surinder!

We reviewed the patch and the changes look great. Could you change the
grays to match the style guide?

Silver, #222, and #aaa aren't listed in pgadmin.style.css.

Thanks so much!
Shirley & Sarah

On Thu, Jun 8, 2017 at 9:34 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> *Changes:*
>
> 1) Display only border-top for data-grid header instead of border on whole
> data-grid.
>
> 2) Remove dotted border from cell right for consistency.
>
> 3) Add border-bottom for header-row so that on scroll to bottom header
> rows are differentiated from cells.
>
> Also, due to these changes, the vertical scrollbar which appears at
> data-grid right side seems to fixed.
>
> PFA patch and review.
>
>
> Thanks,
> Surinder
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-06-08 Thread Dave Page
Hi

On Thu, Jun 8, 2017 at 2:18 PM, Sarah McAlear  wrote:
> On Thu, Jun 8, 2017 at 8:34 AM, Dave Page  wrote:
>> - There are changes to SlickGrid, the addition of a function to scroll
>> a column into view. Is this submitted upstream and accepted?
>
> We have submitted the changes we made to the patch to Slick grid and they
> were accepted yesterday. We can get this in today or first thing tomorrow.

Great.

>>
>> - One of the regression tests now fails because it's trying to access
>> an element that's out of the clickable area. If I widen then browser
>> for testing it passes so I believe it's just the test that needs
>> fixing. Can you take a look at that ASAP please?
>
> We haven't seen this test fail but we can absolutely look into it. Our
> Chrome browser is always the same size. We can try fiddling with that to see
> if we can get it to fail.

Thanks. When I run the tests my browser opens in some default size
that's always consistent, but doesn't match my normal Chrome sessions,
or the 1024x1024 default set in app_starter.py.

Anyway - I found another issue. If I select one or more columns or
rows, or an arbitrary selection of cells, copy/paste seems to work
fine. However, if I click the Select All arrow, for a small resultset
(e.g. SELECT * FROM pg_database with 18 rows) it works fine, but if I
do the same with the contents of pg_class, which has 1342 rows on this
DB, it seems to fail to populate the clipboard and ends up pasting
whatever was copied previously instead. If I use the Copy button, even
on a fast machine it seems to pause for a second or so before failing
to put the data on the clipboard.

Can you take a look at that too please?

Thanks.

-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: UI improvements in data-grid/query tool

2017-06-08 Thread Dave Page
Exactly what my review was going to say :-)

On Thu, Jun 8, 2017 at 3:07 PM, Sarah McAlear  wrote:
> Hi Surinder!
>
> We reviewed the patch and the changes look great. Could you change the grays
> to match the style guide?
>
> Silver, #222, and #aaa aren't listed in pgadmin.style.css.
>
> Thanks so much!
> Shirley & Sarah
>
> On Thu, Jun 8, 2017 at 9:34 AM, Surinder Kumar
>  wrote:
>>
>> Hi,
>>
>> Changes:
>>
>> 1) Display only border-top for data-grid header instead of border on whole
>> data-grid.
>>
>> 2) Remove dotted border from cell right for consistency.
>>
>> 3) Add border-bottom for header-row so that on scroll to bottom header
>> rows are differentiated from cells.
>>
>> Also, due to these changes, the vertical scrollbar which appears at
>> data-grid right side seems to fixed.
>>
>> PFA patch and review.
>>
>>
>> Thanks,
>> Surinder
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> 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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2450] : Internal Server Error displayed if click on statistic tab for PG 10 server

2017-06-08 Thread Dave Page
Hi Atul,

On Thu, Jun 8, 2017 at 3:03 PM, Atul Sharma
 wrote:
> Hi,
>
> The issue is fixed now. Added a new "stats.sql" file with updated columns
> for the version 10.0_plus
>
> PFA RM patch.

As PostgreSQL has moved to a 2 digit version number system instead of
3, I think the directory name should be 10_plus shouldn't it? Will
that work with the template search code? If not, can you please fix
that as well?

Thanks!

-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Style guide live website - looking for feedback

2017-06-08 Thread Shirley Wang
>
>
> Looks good. A couple of thoughts:
>
> - Please use "pgAdmin 4" consistently :-)
>
> Just to clarify - is there always a space between pgAdmin and 4? or is it
pgAdmin4?


> - The neutral message panel has a border that is quite visible, whilst
> the others have much more subtle borders. Seems like something to fix.
>

It is an interesting contrast. I think it should be changed too.

>
> - I think we need some notes on when the different font sizes should be
> used.
>
> Ok. I can start documenting where these fonts are used now, and then we
can think about if that's how we actually want to use them.


> - You've obviously created classes for these styles (e.g. text-14).
> Let's make sure they are all actually defined in the stylesheets for
> the app before we add the style guide :-)
>
> Will do.


> Thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] Style guide live website - looking for feedback

2017-06-08 Thread Dave Page
On Thu, Jun 8, 2017 at 3:41 PM, Shirley Wang  wrote:
>>
>> Looks good. A couple of thoughts:
>>
>> - Please use "pgAdmin 4" consistently :-)
>>
> Just to clarify - is there always a space between pgAdmin and 4? or is it
> pgAdmin4?

In natural language text, it's always with a space. The number should
be a numeric (not Roman numerals), and only the A should be
capitalised.

In code etc. the space and capitalisation can be dropped if needed.

>> - The neutral message panel has a border that is quite visible, whilst
>> the others have much more subtle borders. Seems like something to fix.
>
>
> It is an interesting contrast. I think it should be changed too.
>>
>>
>> - I think we need some notes on when the different font sizes should be
>> used.
>>
> Ok. I can start documenting where these fonts are used now, and then we can
> think about if that's how we actually want to use them.
>
>>
>> - You've obviously created classes for these styles (e.g. text-14).
>> Let's make sure they are all actually defined in the stylesheets for
>> the app before we add the style guide :-)
>>
> Will do.

Thanks!

-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: UI improvements in data-grid/query tool

2017-06-08 Thread Surinder Kumar
Hi

I
​have ​
replaced Silver, #222, and #aaa colors
​​
with relevant
​​
colors
​​
defined in pgadmin.styles.css
Also, the header rows
​left &
 right
​border
 color is changed to #888 to match with bottom
​ border​
​(#888)​
, now the header can easily be distinguished from the grid rows border
styling.

​Please review and let me know ​if any changes.


On Thu, Jun 8, 2017 at 7:51 PM, Dave Page  wrote:

> Exactly what my review was going to say :-)
>
> On Thu, Jun 8, 2017 at 3:07 PM, Sarah McAlear  wrote:
> > Hi Surinder!
> >
> > We reviewed the patch and the changes look great. Could you change the
> grays
> > to match the style guide?
> >
> > Silver, #222, and #aaa aren't listed in pgadmin.style.css.
> >
> > Thanks so much!
> > Shirley & Sarah
> >
> > On Thu, Jun 8, 2017 at 9:34 AM, Surinder Kumar
> >  wrote:
> >>
> >> Hi,
> >>
> >> Changes:
> >>
> >> 1) Display only border-top for data-grid header instead of border on
> whole
> >> data-grid.
> >>
> >> 2) Remove dotted border from cell right for consistency.
> >>
> >> 3) Add border-bottom for header-row so that on scroll to bottom header
> >> rows are differentiated from cells.
> >>
> >> Also, due to these changes, the vertical scrollbar which appears at
> >> data-grid right side seems to fixed.
> >>
> >> PFA patch and review.
> >>
> >>
> >> Thanks,
> >> Surinder
> >>
> >>
> >> --
> >> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> >> 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
>


data_grid_ui_changes_v1.patch
Description: Binary data

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


[pgadmin-hackers] pgAdmin 4 commit: A little leanup of the styling of the edit grid

2017-06-08 Thread Dave Page
A little leanup of the styling of the edit grid

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=73c6f1ca3bb28fe33ac9d5eac8154a46f331fc58
Author: Surinder Kumar 

Modified Files
--
web/pgadmin/tools/sqleditor/static/css/sqleditor.css | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: UI improvements in data-grid/query tool

2017-06-08 Thread Dave Page
Thanks, applied!

On Thu, Jun 8, 2017 at 4:53 PM, Surinder Kumar
 wrote:
> Hi
>
> I
> have
> replaced Silver, #222, and #aaa colors
> with relevant
> colors
> defined in pgadmin.styles.css
> Also, the header rows
> left &
>  right
> border
>  color is changed to #888 to match with bottom
>  border
> (#888)
> , now the header can easily be distinguished from the grid rows border
> styling.
>
> Please review and let me know if any changes.
>
>
> On Thu, Jun 8, 2017 at 7:51 PM, Dave Page  wrote:
>>
>> Exactly what my review was going to say :-)
>>
>> On Thu, Jun 8, 2017 at 3:07 PM, Sarah McAlear  wrote:
>> > Hi Surinder!
>> >
>> > We reviewed the patch and the changes look great. Could you change the
>> > grays
>> > to match the style guide?
>> >
>> > Silver, #222, and #aaa aren't listed in pgadmin.style.css.
>> >
>> > Thanks so much!
>> > Shirley & Sarah
>> >
>> > On Thu, Jun 8, 2017 at 9:34 AM, Surinder Kumar
>> >  wrote:
>> >>
>> >> Hi,
>> >>
>> >> Changes:
>> >>
>> >> 1) Display only border-top for data-grid header instead of border on
>> >> whole
>> >> data-grid.
>> >>
>> >> 2) Remove dotted border from cell right for consistency.
>> >>
>> >> 3) Add border-bottom for header-row so that on scroll to bottom header
>> >> rows are differentiated from cells.
>> >>
>> >> Also, due to these changes, the vertical scrollbar which appears at
>> >> data-grid right side seems to fixed.
>> >>
>> >> PFA patch and review.
>> >>
>> >>
>> >> Thanks,
>> >> Surinder
>> >>
>> >>
>> >> --
>> >> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> >> 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
>
>



-- 
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 (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-06-08 Thread Sarah McAlear
>
> Thanks. When I run the tests my browser opens in some default size
> that's always consistent, but doesn't match my normal Chrome sessions,
> or the 1024x1024 default set in app_starter.py.


This looks like an issue with string edit box placement in the
implementation. We created an issue for this (RM2477).

Anyway - I found another issue. If I select one or more columns or
> rows, or an arbitrary selection of cells, copy/paste seems to work
> fine. However, if I click the Select All arrow, for a small resultset
> (e.g. SELECT * FROM pg_database with 18 rows) it works fine, but if I
> do the same with the contents of pg_class, which has 1342 rows on this
> DB, it seems to fail to populate the clipboard and ends up pasting
> whatever was copied previously instead. If I use the Copy button, even
> on a fast machine it seems to pause for a second or so before failing
> to put the data on the clipboard.


We were able to reproduce this with "SELECT generate_series(1, 5)"
The issue was still present for us when we ran the app at each of 2fddf750
and 495a3cedb
Could we move this discussion to a new thread as it doesn't seem related to
these changes?

Thanks,
George & Sarah




On Thu, Jun 8, 2017 at 10:19 AM, Dave Page  wrote:

> Hi
>
> On Thu, Jun 8, 2017 at 2:18 PM, Sarah McAlear  wrote:
> > On Thu, Jun 8, 2017 at 8:34 AM, Dave Page  wrote:
> >> - There are changes to SlickGrid, the addition of a function to scroll
> >> a column into view. Is this submitted upstream and accepted?
> >
> > We have submitted the changes we made to the patch to Slick grid and they
> > were accepted yesterday. We can get this in today or first thing
> tomorrow.
>
> Great.
>
> >>
> >> - One of the regression tests now fails because it's trying to access
> >> an element that's out of the clickable area. If I widen then browser
> >> for testing it passes so I believe it's just the test that needs
> >> fixing. Can you take a look at that ASAP please?
> >
> > We haven't seen this test fail but we can absolutely look into it. Our
> > Chrome browser is always the same size. We can try fiddling with that to
> see
> > if we can get it to fail.
>
> Thanks. When I run the tests my browser opens in some default size
> that's always consistent, but doesn't match my normal Chrome sessions,
> or the 1024x1024 default set in app_starter.py.
>
> Anyway - I found another issue. If I select one or more columns or
> rows, or an arbitrary selection of cells, copy/paste seems to work
> fine. However, if I click the Select All arrow, for a small resultset
> (e.g. SELECT * FROM pg_database with 18 rows) it works fine, but if I
> do the same with the contents of pg_class, which has 1342 rows on this
> DB, it seems to fail to populate the clipboard and ends up pasting
> whatever was copied previously instead. If I use the Copy button, even
> on a fast machine it seems to pause for a second or so before failing
> to put the data on the clipboard.
>
> Can you take a look at that too please?
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


[pgadmin-hackers][patch] Changing the ACI tree font to Helvetica

2017-06-08 Thread Sarah McAlear
Hi Hackers,

This patch changes the ACI Tree font to the font used in the rest of the
project and increases the size to match, Helvetica.

Thanks,
Shirley & Sarah
diff --git a/web/pgadmin/static/css/aci_tree.overrides.css 
b/web/pgadmin/static/css/aci_tree.overrides.css
new file mode 100644
index ..a73a4d1f
--- /dev/null
+++ b/web/pgadmin/static/css/aci_tree.overrides.css
@@ -0,0 +1,4 @@
+.aciTree .aciTreeText {
+font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+font-size: 12px;
+}
\ No newline at end of file
diff --git a/web/pgadmin/templates/base.html b/web/pgadmin/templates/base.html
index 9cbe2b9d..829c195b 100755
--- a/web/pgadmin/templates/base.html
+++ b/web/pgadmin/templates/base.html
@@ -60,6 +60,7 @@
 {% endfor %}
 
 
+
 
 
 {% block css_link %}{% endblock %}

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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Consolidating gray colors in the application

2017-06-08 Thread Murtuza Zabuawala
Hi Shirley,

The new UI looks awesome :)

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

On Thu, Jun 8, 2017 at 6:58 PM, Shirley Wang  wrote:

> Hi Murtuza,
>
> This was before we had checkboxes removed and added column and row
> highlighting. Try looking at this now with the query results grid updates
> and let me know what you think.
>
>
> On Thu, Jun 8, 2017 at 1:19 AM Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hello,
>>
>> I think we could have use some different grey colour shade for SlickGrid
>> headers from wcDocker panel, It does not look bad but as a end user I'm not
>> able to differentiate between them now, please refer screenshot attached.
>>
>> Is this expected with new design style?
>>
>> [image: Inline image 1]
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jun 7, 2017 at 9:01 PM, Dave Page  wrote:
>>
>>> Thanks, applied.
>>>
>>> On Wed, Jun 7, 2017 at 3:48 PM, Surinder Kumar
>>>  wrote:
>>> > Hi
>>> >
>>> > I have used classes 'bg-gray-2 border-gray-3' for styling header and
>>> footer
>>> > of properties panel which are also used in other places.
>>> >
>>> > Please find attached patch.
>>> >
>>> >
>>> > On Wed, Jun 7, 2017 at 6:59 PM, Robert Eckhardt 
>>> > wrote:
>>> >>
>>> >> Thank you.
>>> >>
>>> >> -- Rob
>>> >>
>>> >> On Wed, Jun 7, 2017 at 9:28 AM, Surinder Kumar
>>> >>  wrote:
>>> >>>
>>> >>> Sure I will send.
>>> >>>
>>> >>> On Wed, Jun 7, 2017 at 6:54 PM, Dave Page  wrote:
>>> 
>>>  On Wed, Jun 7, 2017 at 2:22 PM, Surinder Kumar
>>>   wrote:
>>>  > Hi
>>>  >
>>>  > With the latest pull, I found:
>>>  > The header color of Properties panel disappears and background
>>> color
>>>  > of
>>>  > footer area in Edit Properties panel is changed.
>>> 
>>>  Oh, I missed that :-(. Can you come up with a quick fix using the
>>> new
>>>  classes?
>>> 
>>>  --
>>>  Dave Page
>>>  Blog: http://pgsnake.blogspot.com
>>>  Twitter: @pgsnake
>>> 
>>>  EnterpriseDB UK: 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
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>


Re: [pgadmin-hackers] [pgAdmin4][Patch][Feature_1535]: Pressing ESC from within a dialog box should act like "Cancel" button

2017-06-08 Thread Surinder Kumar
Hi

Please find updated patch.

Thanks,
Surinder

On Thu, Jun 8, 2017 at 7:16 PM, Dave Page  wrote:

> Hi
>
> On Thu, Jun 8, 2017 at 5:38 AM, Surinder Kumar
>  wrote:
> > Hi
> >
> > The attribute key for Ok, Save buttons should be mapped to 13(Enter),
> > for Help - 112(F1) and
> > for Cancel - 27(Esc)
> > The above changes are made into all dialog related template files.
> >
> > PFA patch and review.
>
> Looks good. Just a couple of thoughts:
>
> - You've missed the object property dialogues. This really needs to be
> consistent across all dialogues :-)
>
> - The behaviour with Enter is a bit odd, because priority will be
> given the the focussed control to handle it. That's what we want if
> it's a text area for example, but on the other hand, if you open the
> Preference dialogue, then the Help button gets focus first, so Enter
> there will end up opening the docs. I suspect in most cases the
> behaviour you've got is fine, so I'm not inclined to change it.  a little> Hmm, I see similar behaviour in some other apps. Let's leave
> it as you've done it :-)
>
> Please add support for the properties dialogues, then I think we're good
> to go.
>
​Done.​

>
> Thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Feature_1535_v1.patch
Description: Binary data

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