Re: Windows testing required: Updated runtime

2017-07-06 Thread Melvin Davidson
Dave,
The good and the ugly.
The good.I download and installed the patch from 
https://developer.pgadmin.org/~dpage/pgadmin4-1.5-x86.exe
I restarted Windows and it now starts in 15 secs, down from 20 secs.
The ugly.The version is not usable. The screen/menu is incomprehensible.
System Details:Windows 10 HomeProcessor: Intel Pentium CPU G3220 3.0GhzGPU: AMD 
Radeon HD 6450
Memory: 8.00 GB *(3.47 GB usable)32-bit O/SDual monitors


Melvin Davidson 
I reserve the right to fantasize.  Whether or not you 
 wish to share my fantasy is entirely up to you. 
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day 
www.folkalley.com




On Thursday, July 6, 2017, 10:59:42 AM EDT, Dave Page  wrote:

All,
I've put an interim build of pgAdmin 4 at 
https://developer.pgadmin.org/~dpage/pgadmin4-1.5-x86.exe for Windows users. 
This build uses a work in progress patch to replace the slow Qt components with 
ActiveQt + the Microsoft web browser control to significantly improve 
performance.
The version also includes close to 100 other bug fixes and changes, most 
noticeably performance improvements in the Query Tool that make it 
significantly faster than pgAdmin 3 with large result sets, and the ability to 
open the Query Tool and Debugger in new tabs that can be dragged onto different 
windows and therefore displays.
If you have the ability, please give it a test and let me know how it performs. 
There are some known issues that we're working on:
- The Query Tool History view isn't rendered correctly.
- Closing a tab is now detected when there's a dirty query tool window in it, 
but closing the window containing the tab is not.

- Inactive tabs have no visual definition between them. 
- When dragging a tab, the mouse icon changes to one with a stop sign in it.

- If you close the last tab in a child window, it doesn't close the window.

- Popout alerts don't display correctly.
Thanks!
-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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


[pgadmin-hackers][patch] delete icon width in security labels form

2017-07-06 Thread Joao De Almeida Pereira
Hello Hackers,

We found a discrepancy with the width of inserted columns in some backform
tables. It is at least present in Create Table -> Security [tab] ->
clicking [+] for new rows under each of Privileges and Security Labels. In
this case, the cell containing the delete icon is spaced differently.

After briefly investigating, it looks like width_percent_xx classes on too
many columns is to blame. We've attached a patch that resolves the
immediate issue by removing width_percent_50 from the last column of two
schemas. It feels like columns are overconstrained since by themselves
width percentages sum to 100%, but there is behavior that inserts
additional columns beyond those specified in the schema. For instance, the
unshifts in Backform.UniqueColCollectionControl.showGridControl in
backform.pgadmin.js

Let us know what you think of this removal of last-column constraint as an
approach.

Thanks,
Joao and George
commit 1ae2469b91f49e111f9ef401c1b33ee737f09eb5
Author: George Gelashvili and Joao Pereira 

Date:   Thu Jul 6 11:10:18 2017 -0400

fix discrepancy with width of delete columns inserted into security labels 
backforms

diff --git 
a/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js 
b/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js
index 8d8cca75..1c0917d1 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js
@@ -31,7 +31,6 @@ define('pgadmin.node.role', [
 },{
   id: 'label', label: gettext('Security Label'),
   type: 'text', disabled: false,
-  cellHeaderClasses:'width_percent_50'
 }],
 validate: function() {
   var err = {},
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js 
b/web/pgadmin/browser/server_groups/servers/static/js/server.js
index 34560583..811dc27f 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js
@@ -23,7 +23,6 @@ define('pgadmin.node.server', [
   },{
 id: 'label', label: gettext('Security Label'),
 type: 'text', editable: true,
-cellHeaderClasses:'width_percent_50'
   }],
   validate: function() {
 var err = {},


[pgadmin-hackers][pgAdmin4][Patch] Make karma test results output to browser

2017-07-06 Thread Sarah McAlear
Hi Hackers!

Attached is a minor patch that enables pretty html output of our karma test
results. While running yarn test:karma, visit localhost:9876/debug.html to
see test output.

Thanks,
Matt and Sarah
diff --git a/web/karma.conf.js b/web/karma.conf.js
index 39697ca7..e9b0e062 100644
--- a/web/karma.conf.js
+++ b/web/karma.conf.js
@@ -5,6 +5,7 @@ const webpackConfig = require('./webpack.test.config.js');
 module.exports = function (config) {
   config.set({
 frameworks: ['jasmine'],
+reporters: ['progress', 'kjhtml'],
 plugins: [
   'karma-webpack',
   'karma-phantomjs-launcher',
diff --git a/web/package.json b/web/package.json
index 0082d95e..41852e0b 100644
--- a/web/package.json
+++ b/web/package.json
@@ -16,7 +16,7 @@
 "karma-babel-preprocessor": "^6.0.1",
 "karma-browserify": "~5.1.1",
 "karma-jasmine": "~1.1.0",
-"karma-jasmine-html-reporter": "~0.2.2",
+"karma-jasmine-html-reporter": "^0.2.2",
 "karma-phantomjs-launcher": "~1.0.2",
 "karma-requirejs": "~1.1.0",
 "karma-sourcemap-loader": "~0.3.7",
diff --git a/web/yarn.lock b/web/yarn.lock
index 9f091992..b5363de6 100644
--- a/web/yarn.lock
+++ b/web/yarn.lock
@@ -1439,16 +1439,16 @@ crypto-browserify@^3.0.0, crypto-browserify@^3.11.0:
 public-encrypt "^4.0.0"
 randombytes "^2.0.0"
 
+css-color-names@0.0.4:
+  version "0.0.4"
+  resolved 
"https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0;
+
 css-in-js-utils@^1.0.3:
   version "1.0.3"
   resolved 
"https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-1.0.3.tgz#9ac7e02f763cf85d94017666565ed68a5b5f3215;
   dependencies:
 hyphenate-style-name "^1.0.2"
 
-css-color-names@0.0.4:
-  version "0.0.4"
-  resolved 
"https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0;
-
 css-loader@^0.28.4:
   version "0.28.4"
   resolved 
"https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.4.tgz#6cf3579192ce355e8b38d5f42dd7a1f2ec898d0f;
@@ -3061,7 +3061,7 @@ karma-browserify@~5.1.1:
 minimatch "^3.0.0"
 os-shim "^0.1.3"
 
-karma-jasmine-html-reporter@~0.2.2:
+karma-jasmine-html-reporter@^0.2.2:
   version "0.2.2"
   resolved 
"https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz#48a8e5ef18807617ee2b5e33c1194c35b439524c;
   dependencies:


Fix clear history option [pgAdmin4][RM2535]

2017-07-06 Thread Harshal Dhumal
Hi,

Please find attached patch to fix clear history functionality in query tool.

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

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/static/js/history/history_collection.js b/web/pgadmin/static/js/history/history_collection.js
index f7b6acd..22a86f7 100644
--- a/web/pgadmin/static/js/history/history_collection.js
+++ b/web/pgadmin/static/js/history/history_collection.js
@@ -25,10 +25,14 @@ export default class HistoryCollection {
 
   reset() {
 this.historyList = [];
-this.onChangeHandler(this.historyList);
+this.onResetHandler(this.historyList);
   }
 
   onChange(onChangeHandler) {
 this.onChangeHandler = onChangeHandler;
   }
+
+  onReset(onResetHandler) {
+this.onResetHandler = onResetHandler;
+  }
 }
\ No newline at end of file
diff --git a/web/pgadmin/static/jsx/history/query_history.jsx b/web/pgadmin/static/jsx/history/query_history.jsx
index 0d9222d..270dbf1 100644
--- a/web/pgadmin/static/jsx/history/query_history.jsx
+++ b/web/pgadmin/static/jsx/history/query_history.jsx
@@ -36,6 +36,10 @@ export default class QueryHistory extends React.Component {
 this.props.historyCollection.onChange((historyList) => {
   this.resetCurrentHistoryDetail(historyList);
 });
+
+this.props.historyCollection.onReset((historyList) => {
+  this.clearCurrentHistoryDetail(historyList);
+});
   }
 
   componentDidMount() {
@@ -58,6 +62,14 @@ export default class QueryHistory extends React.Component {
 this.setCurrentHistoryDetail(0, historyList);
   }
 
+  clearCurrentHistoryDetail(historyList) {
+this.setState({
+  history: historyList,
+  currentHistoryDetail: undefined,
+  selectedEntry: 0,
+});
+  }
+
   retrieveOrderedHistory() {
 return _.chain(this.state.history)
   .sortBy(historyEntry => historyEntry.start_time)
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 0584df5..8a797ab 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -1325,8 +1325,7 @@ define([
 alertify.confirm(gettext("Clear history"),
   gettext("Are you sure you wish to clear the history?"),
   function() {
-// Remove any existing grid first
-if (self.history_grid) {
+if (self.history_collection) {
   self.history_collection.reset();
 }
   },
diff --git a/web/regression/javascript/history/history_collection_spec.js b/web/regression/javascript/history/history_collection_spec.js
index 9c10b90..b952c92 100644
--- a/web/regression/javascript/history/history_collection_spec.js
+++ b/web/regression/javascript/history/history_collection_spec.js
@@ -10,13 +10,15 @@
 import HistoryCollection from '../../../pgadmin/static/js/history/history_collection';
 
 describe('historyCollection', function () {
-  let historyCollection, historyModel, onChangeSpy;
+  let historyCollection, historyModel, onChangeSpy, onResetSpy;
   beforeEach(() => {
 historyModel = [{some: 'thing', someOther: ['array element']}];
 historyCollection = new HistoryCollection(historyModel);
 onChangeSpy = jasmine.createSpy('onChangeHandler');
+onResetSpy = jasmine.createSpy('onResetHandler');
 
 historyCollection.onChange(onChangeSpy);
+historyCollection.onReset(onResetSpy);
   });
 
   describe('length', function () {
@@ -61,8 +63,8 @@ describe('historyCollection', function () {
   expect(historyCollection.length()).toBe(0);
 });
 
-it('calls the onChange function', function () {
-  expect(onChangeSpy).toHaveBeenCalledWith([]);
+it('calls the onReset function', function () {
+  expect(onResetSpy).toHaveBeenCalledWith([]);
 });
   });
 


Re: [pgAdmin4][Patch] To fix the issue in Function, Procedure & Trigger Function modules

2017-07-06 Thread Dave Page
Maybe, but it's pretty clearly broken, so whilst you're fixing the template
for that value, it would make sense to fix the UI too :-)

On Thu, Jul 6, 2017 at 1:42 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> This behaviour is from beginning I think and it is inherited from pgAdmin3.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jul 6, 2017 at 5:58 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Jul 6, 2017 at 12:04 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch to fix the issue in Function, Procedure & Trigger Function
>>> modules where user was not able to update object if user changes the code
>>> definition.
>>> RM#2537
>>>
>>
>> This still doesn't seem quite right - the Rows field seems to be always
>> greyed out, so I cannot set it to test at all.
>>
>> --
>> 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


Build failed in Jenkins: pgadmin4-master-python26 #339

2017-07-06 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Add some useful make targets for bundling and linting.

[Dave Page] Remove unused minimisation code

[Dave Page] UI tweaks for the query history.

[Dave Page] In subnodes without dropdowns, the rows had smaller height, making 
them

[Dave Page] Ensure the save password option is enabled when creating a server. 
Fixes

--
[...truncated 292.65 KB...]
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_dependents_sql.TestDependentsSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_role_dependencies_sql.TestRoleDependenciesSql)
Test Role Dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
Default Server Node url ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
Check Server Group Node ... ok
runTest 
(pgadmin.utils.javascript.tests.test_javascript_bundler.JavascriptBundlerTestCase)
scenario name: JavascriptBundlerTestCase ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a template when called ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.1 template when it is present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.2 template when request for a higher version ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render default version when version 9.0 was requested and only 9.1 and 9.2 are 
present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Raise error when version is smaller than available templates ... ok
runTest 
(regression.python_test_utils.sql_template_test_base.SQLTemplateTestBase)
parent test class ... ok

--
Ran 163 tests in 21.724s

OK


Re: [pgAdmin4][Patch] To fix the issue in Function, Procedure & Trigger Function modules

2017-07-06 Thread Murtuza Zabuawala
Hi Dave,

This behaviour is from beginning I think and it is inherited from pgAdmin3.

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

On Thu, Jul 6, 2017 at 5:58 PM, Dave Page  wrote:

> Hi
>
> On Thu, Jul 6, 2017 at 12:04 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch to fix the issue in Function, Procedure & Trigger Function
>> modules where user was not able to update object if user changes the code
>> definition.
>> RM#2537
>>
>
> This still doesn't seem quite right - the Rows field seems to be always
> greyed out, so I cannot set it to test at all.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Build failed in Jenkins: pgadmin4-master-python35 #219

2017-07-06 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Add some useful make targets for bundling and linting.

[Dave Page] Remove unused minimisation code

[Dave Page] UI tweaks for the query history.

[Dave Page] In subnodes without dropdowns, the rows had smaller height, making 
them

[Dave Page] Ensure the save password option is enabled when creating a server. 
Fixes

--
[...truncated 288.91 KB...]
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_dependents_sql.TestDependentsSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_role_dependencies_sql.TestRoleDependenciesSql)
Test Role Dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
Default Server Node url ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
Check Server Group Node ... ok
runTest 
(pgadmin.utils.javascript.tests.test_javascript_bundler.JavascriptBundlerTestCase)
scenario name: JavascriptBundlerTestCase ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a template when called ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.1 template when it is present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.2 template when request for a higher version ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render default version when version 9.0 was requested and only 9.1 and 9.2 are 
present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Raise error when version is smaller than available templates ... ok
runTest 
(regression.python_test_utils.sql_template_test_base.SQLTemplateTestBase)
parent test class ... ok

==
FAIL: runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.foreign_tables.tests.test_foreign_table_get.ForeignTableGetTestCase)
Check foreign table Node
--
Traceback (most recent call last):
  File 
"
 line 81, in runTest
self.assertEquals(response.status_code, 200)
AssertionError: 404 != 200

--
Ran 163 tests in 

Re: [pgAdmin4][Patch] Fix the issue in save password checkbox in "Create - Server" dialog.

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

On Thu, Jul 6, 2017 at 1:03 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix the issue, where user is not able to save the
> password even if config.py has option "ALLOW_SAVE_PASSWORD = True".
> RM#2540
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



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

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


pgAdmin 4 commit: Ensure the save password option is enabled when creat

2017-07-06 Thread Dave Page
Ensure the save password option is enabled when creating a server. Fixes #2540

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/static/js/server.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Re: [pgAdmin4][Patch] To fix the issue in Function, Procedure & Trigger Function modules

2017-07-06 Thread Dave Page
Hi

On Thu, Jul 6, 2017 at 12:04 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue in Function, Procedure & Trigger Function
> modules where user was not able to update object if user changes the code
> definition.
> RM#2537
>

This still doesn't seem quite right - the Rows field seems to be always
greyed out, so I cannot set it to test at all.

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

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


Re: make subnode rows the same height for rows without dropdowns

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

On Wed, Jul 5, 2017 at 8:34 PM, George Gelashvili 
wrote:

> Hello Hackers,
>
> We found that in subnodes without dropdowns, the rows had smaller height,
> making them appear unintentionally different than those with dropdowns. An
> example place in the app is Create Table ->
> Security tab -> add a row for each of Privileges and Security labels.
>
> Attached is a fix.
>
> Thanks,
> Shirley and Shruti and George
>



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

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


pgAdmin 4 commit: In subnodes without dropdowns, the rows had smaller h

2017-07-06 Thread Dave Page
In subnodes without dropdowns, the rows had smaller height, making them appear 
unintentionally different than those with dropdowns. Make them the same.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e5bedf088e880de8949d68f0b0564fff62f3d5a7
Author: George Gelashvili 

Modified Files
--
web/pgadmin/static/css/bootstrap.overrides.css | 1 +
1 file changed, 1 insertion(+)



pgAdmin 4 commit: UI tweaks for the query history.

2017-07-06 Thread Dave Page
UI tweaks for the query history.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e2cbaaef7124b41be91bf34d704f0d3f61cf7b0c
Author: Matthew Kleiman 

Modified Files
--
.../jsx/history/detail/history_detail_message.jsx  |  35 +-
.../jsx/history/detail/history_detail_metadata.jsx |  20 +--
.../history/entry/query_history_error_entry.jsx|  20 ---
.../history/entry/query_history_selected_entry.jsx |  21 
.../entry/query_history_selected_error_entry.jsx   |  22 
.../history/entry/query_history_vanilla_entry.jsx  |  47 ---
web/pgadmin/static/jsx/history/query_history.jsx   |   7 +-
.../static/jsx/history/query_history_detail.jsx|  42 +--
.../static/jsx/history/query_history_entry.jsx |  32 +++--
web/pgadmin/static/jsx/styles/header_label.js  |  14 ---
.../static/jsx/styles/history_entry_styles.js  |  57 -
web/pgadmin/static/jsx/styles/non_selectable.js|  18 ---
web/pgadmin/static/scss/_colorsgrey.scss   | 126 +++
web/pgadmin/static/scss/_othercolors.scss  |   4 +
web/pgadmin/static/scss/_primaryblue.scss  |  49 
web/pgadmin/static/scss/_utils.scss|   9 ++
web/pgadmin/static/scss/pgadmin.scss   |   6 +
web/pgadmin/static/scss/sqleditor/_history.scss| 139 +
.../tools/sqleditor/static/css/sqleditor.css   |   1 +
.../javascript/history/query_history_spec.jsx  |  11 +-
20 files changed, 380 insertions(+), 300 deletions(-)



pgAdmin 4 commit: Remove unused minimisation code

2017-07-06 Thread Dave Page
Remove unused minimisation code

Branch
--
master

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

Modified Files
--
Makefile  |  3 ---
web/tools/minimise.py | 65 ---
2 files changed, 68 deletions(-)



Re: Tree view icon samples

2017-07-06 Thread Dave Page
Hi

On Thu, Jul 6, 2017 at 12:30 PM, Anthony DeBarros 
wrote:

>
>
> Hi,
>
> Looking forward to this and the other design updates coming! Regarding the
> PNG examples, I was wondering whether that is meant to show all the new
> icons being developed or no? When I expand the tree view in pgAdmin v1.4 I
> see quite a few not shown here, including Extensions, Foreign Data
> Wrappers, etc.
>

Chethana started working from the original icon set which we conveniently
had the original files for, back from pgAdmin III v1.,
which is why some of the newer icons were missing. He has since added them
to the set I saw earlier today.


>
> Also, as a bonus question, I wonder whether there’s a way to make Views
> and Materialized Views closer to each other in the tree? I know because of
> alphabetization they’re separated but logically they deserve to be near
> each other, I feel.
>

Hmm, that's not an unreasonable thought, though having some collections be
magically ordered differently may cause people to have difficulty finding
things if they're not expecting it.


>
> Thanks for all your work on this project!
>

You're welcome.


>
> Anthony
>
> On July 3, 2017 at 10:40:50 AM, Dave Page (dp...@pgadmin.org) wrote:
>
> Hi
>
> On Mon, Jul 3, 2017 at 10:25 AM, Chethana Kumar <
> chethana.ku...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I have updated the icons "Conversions, Function and Function Trigger" as
>> per you suggestions.
>>
>
> Nice.
>
>
>>
>> I feel the curved shapes won't look clear in 16px measurement which is
>> happening with 'Conversions' icons'.
>>
>> We might have to rework on 'Conversions', what do you say ?
>>
>
> Hmm, we could use a square and triangle if it works better.
>
>
>>
>>
>> Regards,
>> Chethana kumar
>>
>>
>>


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

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


[pgAdmin4][Patch] To fix the issue in Function, Procedure & Trigger Function modules

2017-07-06 Thread Murtuza Zabuawala
Hi,

PFA patch to fix the issue in Function, Procedure & Trigger Function
modules where user was not able to update object if user changes the code
definition.
RM#2537

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.2_plus/update.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.2_plus/update.sql
index 6f6ba19..9e69a1a 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.2_plus/update.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.2_plus/update.sql
@@ -29,7 +29,7 @@ CREATE OR REPLACE FUNCTION {{ 
conn|qtIdent(o_data.pronamespace, name) }}({% if d
 
 {% if data.procost %}COST {{data.procost}}{% elif o_data.procost %}COST 
{{o_data.procost}}{% endif %}{% if data.prorows %}
 
-ROWS {{data.prorows}}{% elif o_data.prorows %}ROWS {{o_data.prorows}}{% 
endif -%}{% if data.merged_variables %}{% for v in data.merged_variables %}
+ROWS {{data.prorows}}{% elif o_data.prorows and o_data.prorows != '0' %}   
 ROWS {{o_data.prorows}}{% endif -%}{% if data.merged_variables %}{% for v in 
data.merged_variables %}
 
 SET {{ conn|qtIdent(v.name) }}={{ v.value|qtLiteral }}{% endfor -%}
 {% endif %}
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.5_plus/update.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.5_plus/update.sql
index 402c641..be24303 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.5_plus/update.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.5_plus/update.sql
@@ -30,7 +30,7 @@ CREATE OR REPLACE FUNCTION {{ 
conn|qtIdent(o_data.pronamespace, name) }}({% if d
 
 {% if data.procost %}COST {{data.procost}}{% elif o_data.procost %}COST 
{{o_data.procost}}{% endif %}{% if data.prorows %}
 
-ROWS {{data.prorows}}{% elif o_data.prorows %}ROWS {{o_data.prorows}} 
{%endif -%}{% if data.merged_variables %}{% for v in data.merged_variables %}
+ROWS {{data.prorows}}{% elif o_data.prorows and o_data.prorows != '0' %}   
 ROWS {{o_data.prorows}} {%endif -%}{% if data.merged_variables %}{% for v in 
data.merged_variables %}
 
 SET {{ conn|qtIdent(v.name) }}={{ v.value|qtLiteral }}{% endfor -%}
 {% endif %}
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/create.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/create.sql
index 0e2495d..e3e9c18 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/create.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/create.sql
@@ -17,6 +17,7 @@ CREATE{% if query_type is defined %}{{' OR REPLACE'}}{% endif 
%} FUNCTION {{ con
 
 LANGUAGE {{ data.lanname|qtLiteral }}
 {% if data.procost %}
+
 COST {{data.procost}}
 {% endif %}
 {% if data.provolatile %}{% if data.provolatile == 'i' %}IMMUTABLE{% elif 
data.provolatile == 's' %}STABLE{% else %}VOLATILE{% endif %} {% endif %}{% if 
data.proleakproof %}LEAKPROOF {% endif %}
@@ -26,7 +27,9 @@ CREATE{% if query_type is defined %}{{' OR REPLACE'}}{% endif 
%} FUNCTION {{ con
 {% if data.proparallel and (data.proparallel == 'r' or data.proparallel == 
's') %}
 {% if data.proparallel == 'r' %}PARALLEL RESTRICTED{% elif data.proparallel == 
's' %}PARALLEL SAFE{% endif %}{% endif -%}
 {% if data.prorows %}
+
 ROWS {{data.prorows}}{% endif -%}{% if data.variables %}{% for v in 
data.variables %}
+
 SET {{ conn|qtIdent(v.name) }}={{ v.value|qtLiteral }}{% endfor %}
 {% endif %}
 
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/update.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/update.sql
index 1f8f2f9..5c520bc 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/update.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.6_plus/update.sql
@@ -32,7 +32,7 @@ CREATE OR REPLACE FUNCTION {{ 
conn|qtIdent(o_data.pronamespace, name) }}({% if d
 
 {% if data.procost %}COST {{data.procost}}{% elif o_data.procost %}COST 
{{o_data.procost}}{% endif %}{% if data.prorows %}
 
-ROWS {{data.prorows}}{% elif o_data.prorows %}ROWS {{o_data.prorows}} 
{%endif -%}{% if data.merged_variables %}{% for v in