Download backup from server

2018-04-27 Thread Klaifer Garcia
Hello everybody.

I'm new on this list, and I would like to propose a new feature.
In server mode, when doing a backup, the file is saved on the server and
the client can not download the generated file.
It would be interesting a download option by the application.


pgAdmin 4 commit: Fix compiler warning.

2018-04-27 Thread Dave Page
Fix compiler warning.

Branch
--
master

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

Modified Files
--
runtime/TrayIcon.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



Re: JS Test error on Windows

2018-04-27 Thread Dave Page
On Fri, Apr 27, 2018 at 10:49 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Not sure if that's the case but possibly security mechanism on Win2016
> somehow interfering with Headless chrome execution.
>

Maybe - I cannot find anything obvious through Google though. I have
already disabled the firewall entirely.


>
>
> On Fri, Apr 27, 2018 at 2:44 PM, Dave Page  wrote:
>
>> Anyone? Khushboo, Murtuza; any ideas?
>>
>> On Wed, Apr 25, 2018 at 4:45 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> Setting up an new build system running Windows 2016 and I'm hitting an
>>> error with the JS tests as below. I have Yarn 1.6.0, Node 8.11.1 and get
>>> the following error running yarn run test:karma-once. The linter and
>>> bundler work fine, FWIW, and I see the same error running either manually
>>> or through Jenkins. jquery.event.drag 2.2 and 2.3.0 are in the slickgrid
>>> lib directory. Chrome is 66.0.3359.117.
>>>
>>> Does anyone have any idea what's going on?
>>>
>>> webpack: Compiled successfully.
>>> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>>>   {
>>> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
>>> module to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10",
>>> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module
>>> to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10"
>>>   }
>>>
>>> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>>>   {
>>> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
>>> module to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10",
>>> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module
>>> to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10"
>>>   }
>>>
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>>
>>> Thanks.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> 

Re: JS Test error on Windows

2018-04-27 Thread Dave Page
On Fri, Apr 27, 2018 at 10:32 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Fri, Apr 27, 2018 at 2:44 PM, Dave Page  wrote:
>
>> Anyone? Khushboo, Murtuza; any ideas?
>>
>> Does this related to Node 8.11.1? Can you use Node < 8 version?
>

Same error with 7.10.1 :-(


> On Wed, Apr 25, 2018 at 4:45 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> Setting up an new build system running Windows 2016 and I'm hitting an
>>> error with the JS tests as below. I have Yarn 1.6.0, Node 8.11.1 and get
>>> the following error running yarn run test:karma-once. The linter and
>>> bundler work fine, FWIW, and I see the same error running either manually
>>> or through Jenkins. jquery.event.drag 2.2 and 2.3.0 are in the slickgrid
>>> lib directory. Chrome is 66.0.3359.117.
>>>
>>> Does anyone have any idea what's going on?
>>>
>>> webpack: Compiled successfully.
>>> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>>>   {
>>> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
>>> module to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10",
>>> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module
>>> to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10"
>>>   }
>>>
>>> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>>>   {
>>> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
>>> module to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10",
>>> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module
>>> to be loaded\nat regression/javascript/selectio
>>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>>> jquery.event.drag module to be loaded\nat Object.
>>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>>> at Object.5 
>>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>>   at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat Object.904
>>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>>> at __webpack_require__ (regression/javascript/selecti
>>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>>> n/column_selector_spec.js:66:10"
>>>   }
>>>
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>>
>>> Thanks.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: 

Re: JS Test error on Windows

2018-04-27 Thread Murtuza Zabuawala
Not sure if that's the case but possibly security mechanism on Win2016
somehow interfering with Headless chrome execution.


On Fri, Apr 27, 2018 at 2:44 PM, Dave Page  wrote:

> Anyone? Khushboo, Murtuza; any ideas?
>
> On Wed, Apr 25, 2018 at 4:45 PM, Dave Page  wrote:
>
>> Hi
>>
>> Setting up an new build system running Windows 2016 and I'm hitting an
>> error with the JS tests as below. I have Yarn 1.6.0, Node 8.11.1 and get
>> the following error running yarn run test:karma-once. The linter and
>> bundler work fine, FWIW, and I see the same error running either manually
>> or through Jenkins. jquery.event.drag 2.2 and 2.3.0 are in the slickgrid
>> lib directory. Chrome is 66.0.3359.117.
>>
>> Does anyone have any idea what's going on?
>>
>> webpack: Compiled successfully.
>> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>>   {
>> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
>> module to be loaded\nat regression/javascript/selectio
>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>> jquery.event.drag module to be loaded\nat Object.
>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>> at Object.5 
>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>   at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat Object.904
>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>> at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>> n/column_selector_spec.js:66:10",
>> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module
>> to be loaded\nat regression/javascript/selectio
>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>> jquery.event.drag module to be loaded\nat Object.
>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>> at Object.5 
>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>   at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat Object.904
>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>> at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>> n/column_selector_spec.js:66:10"
>>   }
>>
>> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>>   {
>> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
>> module to be loaded\nat regression/javascript/selectio
>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>> jquery.event.drag module to be loaded\nat Object.
>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>> at Object.5 
>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>   at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat Object.904
>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>> at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>> n/column_selector_spec.js:66:10",
>> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module
>> to be loaded\nat regression/javascript/selectio
>> n/column_selector_spec.js:13842:3\n\nError: SlickGrid requires
>> jquery.event.drag module to be loaded\nat Object.
>> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>> at Object.5 
>> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>>   at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat Object.904
>> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>> at __webpack_require__ (regression/javascript/selecti
>> on/column_selector_spec.js:20:30)\nat regression/javascript/selectio
>> n/column_selector_spec.js:63:18\nat regression/javascript/selectio
>> n/column_selector_spec.js:66:10"
>>   }
>>
>> error Command failed with exit code 1.
>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>> this command.
>> error Command failed with exit code 1.
>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>> this command.
>>
>> 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
>


Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree

2018-04-27 Thread Ashesh Vashi
I have quite a few comments for the patch.
I will send them soon.

On Fri, Apr 27, 2018, 14:45 Dave Page  wrote:

> How is your work on this going Ashesh? Will you be committing today?
>
> On Wed, Apr 25, 2018 at 8:52 AM, Dave Page  wrote:
>
>> Ashesh; you had agreed to work on this early this week. Please ensure you
>> do so today.
>>
>> Thanks.
>>
>> On Tue, Apr 24, 2018 at 8:13 PM, Joao De Almeida Pereira <
>> jdealmeidapere...@pivotal.io> wrote:
>>
>>> Hi Hackers,
>>>
>>> Can someone review and merge this patch?
>>>
>>> Thanks
>>> Joao
>>>
>>> On Wed, Apr 18, 2018 at 10:23 AM Joao De Almeida Pereira <
>>> jdealmeidapere...@pivotal.io> wrote:
>>>
 Hi Hackers,
 Any other comment about this patch?

 Thanks
 Joao

 On Tue, Apr 10, 2018 at 12:00 PM Joao De Almeida Pereira <
 jdealmeidapere...@pivotal.io> wrote:

> Hello Khushboo
>
> On Mon, Apr 9, 2018 at 1:59 AM Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Joao,
>>
>> I have reviewed your patch and have some suggestions.
>>
>> On Sat, Apr 7, 2018 at 12:43 AM, Joao De Almeida Pereira <
>> jdealmeidapere...@pivotal.io> wrote:
>>
>>> Hello Murtuza/Dave,
>>> Yes now the extracted functions are spread into different files. The
>>> intent would be to make the files as small as possible, and also to 
>>> group
>>> and name them in a way that would be easy to understand what each file 
>>> is
>>> doing without the need of opening it.
>>> As a example:
>>> static/js/backup will contain all the backup related functionality
>>> inside of this folder we can see the file:
>>>
>> menu_utils.js At this moment in time we decided to group all the
>>> functions that are related to the menu, but we can split that also if we
>>> believe it is easier to see.
>>>
>> It's really very good to see the separated code for backup module. As
>> we have done for backup, we would like do it for other PG utilities like
>> restore, maintenance etc.
>> Considering this, we should separate the code in a way that some of
>> the common functionalities can be used for other modules  like menu (as 
>> you
>> have mentioned above), dialogue factory etc.
>> Also, I think these functionalities should be in their respective
>> static folder instead of pgadmin/static.
>>
>
> About the location of the files. The move of the files to
> pgadmin/static/js was made on purpose in order to clearly separate
> Javascript from python code.
> The rational behind it was
> - Create a clear separation between the backend and frontend
> - Having Javascript code concentrated in a single place, hopefully,
> will encourage to developers to look for a functionality, that is already
> implemented in another modules, because they are right there. (When we
> started this journey we realized that the 'nodes' have a big groups of 
> code
> that could be shared, but because the Javascript is spread everywhere it 
> is
> much harder to look for it)
>
>
> There are some drawbacks of this separation:
> - When creating a new module we will need to put the javascript in a
> separate location from the backend code
>
>
>>
>>
>>> static/js/datagrid folder contains all the datagrid related
>>> functionality
>>>
>> Same as backup module,  this should be in it's respective static/js
>> folder.
>>
>>> Inside of the folder we can see the files:
>>> get_panel_title.js is responsible for retrieving the name of the
>>> panel
>>> show_data.js is responsible for showing the datagrid
>>> show_query_tool.js is responsible for showing the query tool
>>>
>>> Does this structure make sense?
>>> Can you give an example of a comment that you think is missing and
>>> that could help?
>>>
>>> As a personal note, unless the algorithm is very obscure or very
>>> complicated, I believe that if the code needs comments it is a signal 
>>> that
>>> something needs to change in terms of naming, structure of the part in
>>> question. This being said, I am open to add some comments that might 
>>> help
>>> people.
>>>
>> You are right, with the help of naming convention and structure of
>> the code, any one can get the idea about the code. But it is very useful 
>> to
>> understand the code
>> very easily with the proper comments especially when there are
>> multiple developers working on a single project.
>>
>> I found some of the places where it would be great to have comments.
>>
>> - treeMenu: new tree.Tree()  in a browser.js
>> - tree.js  (especially Tree class)
>>
> About the comment point I need a more clear understanding on what kind
> of comments you are looking for. 

Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-04-27 Thread Dave Page
Interestingly, the new CI system I'm putting together seems to be suffering
from intermittent failures at the start of the feature tests as well.
Chrome is trying to load the page before the server is ready to go, and
then timing out and failing the first test.

On the plus side, the rest of the feature tests seem to be quite stable on
this system :-D

On Mon, Apr 23, 2018 at 4:37 PM, Anthony Emengo  wrote:

> We also tried running the tests with this patch. It didn't launch without
> some code changes and several tests were failing. We should really defer
> pulling this in until we have more robust results on Firefox
>
> In order to have the tests running we had to do the following change:
>
> diff --git a/web/regression/feature_utils/app_starter.py
> b/web/regression/feature_utils/app_starter.py
> index 77b0400c..50d3e307 100644
> --- a/web/regression/feature_utils/app_starter.py
> +++ b/web/regression/feature_utils/app_starter.py
> @@ -42,10 +44,18 @@ class AppStarter:
>  )
>
>  self.driver.set_window_size(1280, 1024)
> -self.driver.get(
> -"http://; + self.app_config.DEFAULT_SERVER + ":" +
> -random_server_port
> -)
> +# self.driver.implicitly_wait(60)
> +
> +def launch_browser():
> +try:
> +self.driver.get(
> +"http://; + self.app_config.DEFAULT_SERVER + ":" +
> +random_server_port
> +)
> +except WebDriverException as e:
> +time.sleep(5)
> +launch_browser()
> +launch_browser()
>
> This change was required because firefox was throwing an exception when we
> tried to get the address and the server was not running. We saw this
> behavior in Ubuntu.
>
>
> - Anthony and Joao
>
> On Mon, Apr 23, 2018 at 9:12 AM, Dave Page  wrote:
>
>> Hi
>>
>> On Mon, Apr 23, 2018 at 2:05 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> I have added support for running feature tests against FireFox. For that
>>> user will have to download gecko driver from https://github.com/mozilla/
>>> geckodriver/releases and follow the below steps:
>>>
>>>- Extract the gecko driver.
>>>- Run chmod +x geckodriver.
>>>- Either copy the geckodriver to /usr/local/bin or the path of the
>>>geckodriver must be specified in PATH.
>>>- Apply the attached patch.
>>>- Change the parameter "DEFAULT_TEST_BROWSER = 'Firefox' "
>>>- Start the feature test.
>>>
>>> The config option needs to be in test_config.json. We don't really want
>> test-specific config options in config.py (arguably, TEST_SQLITE_PATH
>> shoudn't be there either, as it's useless for end users).
>>
>> I'm surprised to not see any updates to tests. When I tried firefox
>> manually a few weeks back, it was failing at lot.
>>
>> --
>> 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


Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree

2018-04-27 Thread Dave Page
How is your work on this going Ashesh? Will you be committing today?

On Wed, Apr 25, 2018 at 8:52 AM, Dave Page  wrote:

> Ashesh; you had agreed to work on this early this week. Please ensure you
> do so today.
>
> Thanks.
>
> On Tue, Apr 24, 2018 at 8:13 PM, Joao De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hi Hackers,
>>
>> Can someone review and merge this patch?
>>
>> Thanks
>> Joao
>>
>> On Wed, Apr 18, 2018 at 10:23 AM Joao De Almeida Pereira <
>> jdealmeidapere...@pivotal.io> wrote:
>>
>>> Hi Hackers,
>>> Any other comment about this patch?
>>>
>>> Thanks
>>> Joao
>>>
>>> On Tue, Apr 10, 2018 at 12:00 PM Joao De Almeida Pereira <
>>> jdealmeidapere...@pivotal.io> wrote:
>>>
 Hello Khushboo

 On Mon, Apr 9, 2018 at 1:59 AM Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Joao,
>
> I have reviewed your patch and have some suggestions.
>
> On Sat, Apr 7, 2018 at 12:43 AM, Joao De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hello Murtuza/Dave,
>> Yes now the extracted functions are spread into different files. The
>> intent would be to make the files as small as possible, and also to group
>> and name them in a way that would be easy to understand what each file is
>> doing without the need of opening it.
>> As a example:
>> static/js/backup will contain all the backup related functionality
>> inside of this folder we can see the file:
>>
> menu_utils.js At this moment in time we decided to group all the
>> functions that are related to the menu, but we can split that also if we
>> believe it is easier to see.
>>
> It's really very good to see the separated code for backup module. As
> we have done for backup, we would like do it for other PG utilities like
> restore, maintenance etc.
> Considering this, we should separate the code in a way that some of
> the common functionalities can be used for other modules  like menu (as 
> you
> have mentioned above), dialogue factory etc.
> Also, I think these functionalities should be in their respective
> static folder instead of pgadmin/static.
>

 About the location of the files. The move of the files to
 pgadmin/static/js was made on purpose in order to clearly separate
 Javascript from python code.
 The rational behind it was
 - Create a clear separation between the backend and frontend
 - Having Javascript code concentrated in a single place, hopefully,
 will encourage to developers to look for a functionality, that is already
 implemented in another modules, because they are right there. (When we
 started this journey we realized that the 'nodes' have a big groups of code
 that could be shared, but because the Javascript is spread everywhere it is
 much harder to look for it)


 There are some drawbacks of this separation:
 - When creating a new module we will need to put the javascript in a
 separate location from the backend code


>
>
>> static/js/datagrid folder contains all the datagrid related
>> functionality
>>
> Same as backup module,  this should be in it's respective static/js
> folder.
>
>> Inside of the folder we can see the files:
>> get_panel_title.js is responsible for retrieving the name of the
>> panel
>> show_data.js is responsible for showing the datagrid
>> show_query_tool.js is responsible for showing the query tool
>>
>> Does this structure make sense?
>> Can you give an example of a comment that you think is missing and
>> that could help?
>>
>> As a personal note, unless the algorithm is very obscure or very
>> complicated, I believe that if the code needs comments it is a signal 
>> that
>> something needs to change in terms of naming, structure of the part in
>> question. This being said, I am open to add some comments that might help
>> people.
>>
> You are right, with the help of naming convention and structure of the
> code, any one can get the idea about the code. But it is very useful to
> understand the code
> very easily with the proper comments especially when there are
> multiple developers working on a single project.
>
> I found some of the places where it would be great to have comments.
>
> - treeMenu: new tree.Tree()  in a browser.js
> - tree.js  (especially Tree class)
>
 About the comment point I need a more clear understanding on what kind
 of comments you are looking for. Because when you read the function names
 you understand the intent, what they are doing. The parameters also explain
 what you need to pass into them.

 If what you are looking for in these comments is the reasoning being
 the change itself, then that should be present in the commit 

Re: JS Test error on Windows

2018-04-27 Thread Dave Page
Anyone? Khushboo, Murtuza; any ideas?

On Wed, Apr 25, 2018 at 4:45 PM, Dave Page  wrote:

> Hi
>
> Setting up an new build system running Windows 2016 and I'm hitting an
> error with the JS tests as below. I have Yarn 1.6.0, Node 8.11.1 and get
> the following error running yarn run test:karma-once. The linter and
> bundler work fine, FWIW, and I see the same error running either manually
> or through Jenkins. jquery.event.drag 2.2 and 2.3.0 are in the slickgrid
> lib directory. Chrome is 66.0.3359.117.
>
> Does anyone have any idea what's going on?
>
> webpack: Compiled successfully.
> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>   {
> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
> module to be loaded\nat 
> regression/javascript/selection/column_selector_spec.js:13842:3\n\nError:
> SlickGrid requires jquery.event.drag module to be loaded\nat
> Object. 
> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>   at Object.5 
> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at Object.904 
> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at regression/javascript/selection/column_selector_spec.js:63:18\n
> at regression/javascript/selection/column_selector_spec.js:66:10",
> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module to
> be loaded\nat 
> regression/javascript/selection/column_selector_spec.js:13842:3\n\nError:
> SlickGrid requires jquery.event.drag module to be loaded\nat
> Object. 
> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>   at Object.5 
> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at Object.904 
> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at regression/javascript/selection/column_selector_spec.js:63:18\n
> at regression/javascript/selection/column_selector_spec.js:66:10"
>   }
>
> HeadlessChrome 0.0.0 (Windows 10 0.0.0) ERROR
>   {
> "message": "Uncaught Error: SlickGrid requires jquery.event.drag
> module to be loaded\nat 
> regression/javascript/selection/column_selector_spec.js:13842:3\n\nError:
> SlickGrid requires jquery.event.drag module to be loaded\nat
> Object. 
> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>   at Object.5 
> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at Object.904 
> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at regression/javascript/selection/column_selector_spec.js:63:18\n
> at regression/javascript/selection/column_selector_spec.js:66:10",
> "str": "Uncaught Error: SlickGrid requires jquery.event.drag module to
> be loaded\nat 
> regression/javascript/selection/column_selector_spec.js:13842:3\n\nError:
> SlickGrid requires jquery.event.drag module to be loaded\nat
> Object. 
> (regression/javascript/selection/column_selector_spec.js:13842:9)\n
>   at Object.5 
> (regression/javascript/selection/column_selector_spec.js:17810:30)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at Object.904 
> (regression/javascript/selection/column_selector_spec.js:18335:1)\n
>   at __webpack_require__ 
> (regression/javascript/selection/column_selector_spec.js:20:30)\n
>   at regression/javascript/selection/column_selector_spec.js:63:18\n
> at regression/javascript/selection/column_selector_spec.js:66:10"
>   }
>
> error Command failed with exit code 1.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
> this command.
> error Command failed with exit code 1.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
> this command.
>
> 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