[pgadmin-hackers] pgAdmin 4 commit: Load, and save the files in the Query Editor.

2016-05-14 Thread Ashesh Vashi
Load, and save the files in the Query Editor.

Also, the changes done by Ashesh to resolved few issue with the file
manager in 'Select' mode.

Branch
--
master

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

Modified Files
--
.../templates/file_manager/js/utility.js   | 1386 +++-
web/pgadmin/static/css/overrides.css   |9 +
.../tools/datagrid/templates/datagrid/index.html   |3 +
web/pgadmin/tools/sqleditor/__init__.py|   93 +-
.../sqleditor/templates/sqleditor/js/sqleditor.js  |  133 +-
5 files changed, 995 insertions(+), 629 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]: Load/Save file in query tool

2016-05-14 Thread Ashesh Vashi
On Sat, May 14, 2016 at 10:59 AM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

> Hi Surinder
>
> On 13-May-2016 7:12 pm, "Surinder Kumar" 
> wrote:
> >
> > Hi,
> >
> > Please find updated patch
> >
> > Following are the review comments given by Akshay:
> > 1. Save button shouldn't enable when data grid is loaded.
> > 2. CodeMirror text area change event should only be enabled when query
> tool is loaded.
>
> I have tested the patch it is not working with Chrome Browser version 48.0
> gives error "unexpected token =". I have check error comes in
> file_manager.js line number 177. It is working fine with Firefox. Please
> check and send the patch again.
>
I've resolved those issues in file-manager.
And, reviewed the patch, which looked good to me.

Thanks - Committed with the file-manager changes, and few tweaks.

Surinder,

It does not work well, whenever we select file other than SQL/text file, it
results into an unexpected error at server side.
Can you please take a look at it?


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


> >
> >
> > On Thu, May 12, 2016 at 1:23 AM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
> >>
> >> Hi,
> >>
> >> Please find attached patch for load/save file in query tool.
> >> This patch is dependent on FileManager patch.
> >>
> >> Do review the patch and let me know for any comments.
> >>
> >> 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
> >
>


Re: [pgadmin-hackers] Destroy select2 controls before re-rendering [pgadmin4]

2016-05-14 Thread Ashesh Vashi
Thanks - this has been committed yesterday/day before yesterday.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Thu, May 12, 2016 at 3:58 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for select2 controls.
>
> Change: Destroy existing any select2 controls before re-rendering them.
> Otherwise this was causing wired dialogue UI hang issue.
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
>
> --
> 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/Save file in query tool

2016-05-14 Thread Surinder Kumar
On Sat, May 14, 2016 at 3:33 PM, Ashesh Vashi  wrote:

> On Sat, May 14, 2016 at 10:59 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Surinder
>>
>> On 13-May-2016 7:12 pm, "Surinder Kumar" 
>> wrote:
>> >
>> > Hi,
>> >
>> > Please find updated patch
>> >
>> > Following are the review comments given by Akshay:
>> > 1. Save button shouldn't enable when data grid is loaded.
>> > 2. CodeMirror text area change event should only be enabled when query
>> tool is loaded.
>>
>> I have tested the patch it is not working with Chrome Browser version
>> 48.0 gives error "unexpected token =". I have check error comes in
>> file_manager.js line number 177. It is working fine with Firefox. Please
>> check and send the patch again.
>>
> I've resolved those issues in file-manager.
> And, reviewed the patch, which looked good to me.
>
> Thanks - Committed with the file-manager changes, and few tweaks.
>
> Surinder,
>
> It does not work well, whenever we select file other than SQL/text file,
> it results into an unexpected error at server side.
> Can you please take a look at it?
>
Ok.

>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>> >
>> >
>> > On Thu, May 12, 2016 at 1:23 AM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> Please find attached patch for load/save file in query tool.
>> >> This patch is dependent on FileManager patch.
>> >>
>> >> Do review the patch and let me know for any comments.
>> >>
>> >> 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
>> >
>>
>
>


[pgadmin-hackers] pgAdmin 4 commit: Fixed an issue creating extensions 'postgis_topology'

2016-05-14 Thread Ashesh Vashi
Fixed an issue creating extensions 'postgis_topology', and
'postgis_tiger_geocoder'.

Current implementation changes the schema name, whenever we chance the
name, which is wrong. We should have not change the schema for this
event.

Thanks Fahar Abbas for reporting.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=491bd3605bb943ee0291f5b7c674e49be578d530

Modified Files
--
.../databases/extensions/templates/extensions/js/extensions.js| 4 +---
1 file changed, 1 insertion(+), 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]: Unable to create extension "postgis_topology" and "postgis_tiger_geocoder" installed through stack builder

2016-05-14 Thread Ashesh Vashi
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Fri, May 6, 2016 at 4:32 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue:
> Unable to create extension "postgis_topology" and
> "postgis_tiger_geocoder", due to wrong schema name in generated SQL query.
>
> *For example*:
>
> It generates following query for '*postgis_toplology*' extension:
> CREATE EXTENSION *postgis_topology* SCHEMA *topology*;
>
> which is wrong. the correct query should be:
> CREATE EXTENSION *postgis_topology*;
>
> where it fetches '*topology*' schema from table *pg_available_extensions*
> and
> then sets schema when extension name is selected, but it should not set
> schema on name change.
> It is now fixed in this patch.
> Thanks Fahar for reporting.
>
> Please review and let me know for comments.
>
> 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
>
>


Re: [pgadmin-hackers][pgAdmin4][Patch]: Load/Save file in query tool

2016-05-14 Thread Ashesh Vashi
On Sat, May 14, 2016 at 3:37 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

>
>
> On Sat, May 14, 2016 at 3:33 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Sat, May 14, 2016 at 10:59 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Surinder
>>>
>>> On 13-May-2016 7:12 pm, "Surinder Kumar" <
>>> surinder.ku...@enterprisedb.com> wrote:
>>> >
>>> > Hi,
>>> >
>>> > Please find updated patch
>>> >
>>> > Following are the review comments given by Akshay:
>>> > 1. Save button shouldn't enable when data grid is loaded.
>>> > 2. CodeMirror text area change event should only be enabled when query
>>> tool is loaded.
>>>
>>> I have tested the patch it is not working with Chrome Browser version
>>> 48.0 gives error "unexpected token =". I have check error comes in
>>> file_manager.js line number 177. It is working fine with Firefox. Please
>>> check and send the patch again.
>>>
>> I've resolved those issues in file-manager.
>> And, reviewed the patch, which looked good to me.
>>
>> Thanks - Committed with the file-manager changes, and few tweaks.
>>
>> Surinder,
>>
>> It does not work well, whenever we select file other than SQL/text file,
>> it results into an unexpected error at server side.
>> Can you please take a look at it?
>>
> Ok.
>
FYI - I opened a dump file.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>> >
>>> >
>>> > On Thu, May 12, 2016 at 1:23 AM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> Please find attached patch for load/save file in query tool.
>>> >> This patch is dependent on FileManager patch.
>>> >>
>>> >> Do review the patch and let me know for any comments.
>>> >>
>>> >> 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
>>> >
>>>
>>
>>
>


Re: [pgadmin-hackers] PATCH: Initiale backup utility [pgAdmin4]

2016-05-14 Thread Murtuza Zabuawala
Hi,

PFA patch for backup which is add-on to last patch which includes TODO list
& node selection validation

Regards,
Murtuza

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

On Fri, May 13, 2016 at 5:39 PM, Ashesh Vashi  wrote:

> On Tue, May 3, 2016 at 5:41 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch to add backup server/global/database object functionality.
>>
>> This patch depends on,
>> - File manager control patch & job executer.
>>
>>
>> *TODO:*
>> - Integrate browser tree control
>>
> Put that in the TODO list.
>
> We will select the current object at the moment for backup at the moment.
>
> We will add object selection in later phase.
>
> Please take look at the patch.
> It needs to define the message class properly for better message.
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>>
>> --
>> 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
>>
>>
>


Added_selected_object.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]: Foreign Table Module

2016-05-14 Thread Murtuza Zabuawala
Hi,

One last otherwise rest of functionality looks good.

- We are not able to drop/delete any constraints, not even empty blank row
once added.


Regards,
Murtuza


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

On Fri, May 13, 2016 at 3:25 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached updated patch for the foreign table module.
>
> Thanks,
> Khushboo
>
> On Fri, May 13, 2016 at 10:50 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> *1)* If we delete one inherited table and add another one
>> It generated drop columns sql for that inherited table which throws error,
>> for example "Test123"."TEST" has col1, col2 in it, once we remove table
>> see the wrong drop column sql.
>>
>> SQL:
>> 
>> ALTER FOREIGN TABLE pem.asdas
>> DROP COLUMN col1;
>>
>> ALTER FOREIGN TABLE pem.asdas
>> DROP COLUMN col2;
>>
>> ALTER FOREIGN TABLE pem.asdas INHERIT pemdata.number_of_wal_files;
>>
>> ALTER FOREIGN TABLE pem.asdas NO INHERIT "Test123"."TEST";
>>
>> Expected:
>> -
>> ALTER FOREIGN TABLE pem.asdas INHERIT pemdata.number_of_wal_files;
>>
>> ALTER FOREIGN TABLE pem.asdas NO INHERIT "Test123"."TEST";
>>
>> Done
>
>>
>> *2)* In EDIT mode, Changing just column name of existing column first
>> drops the entire column
>> and adds it again, instead of just renaming column name
>>
>> (*** Consider a case when user have data in the table & just want to
>> rename column col1 to col2
>> or any other attribute like default value/not null etc, why do we need to
>> drop entire column in that case? ***)
>>
>> SQL:
>> 
>> ALTER FOREIGN TABLE test.test_ft
>> DROP COLUMN c1;
>>
>> ALTER FOREIGN TABLE test.test_ft
>> ADD COLUMN c12 bigint NOT NULL;
>>
>> Expected:
>> -
>> ALTER FOREIGN TABLE test.test_ft
>> RENAME c1 TO c12;
>>
>>
>> Done
>
>> *3)* We should not allow user to delete columns inherited from
>> other table in edit mode from UI
>>
>>
>> Done
>
>> *4)* We should not allow user to delete constraint inherited from
>> other table in edit mode from UI
>>
>> Done
>
>>
>> *5)* Issue from my last email still exists, changing type of column
>> creates wrong sql if it has Length/Precision.
>>
>> eg: col12 was numeric(12) which I changed to aclitem
>> See the wrong sql
>>
>> ALTER FOREIGN TABLE pem."test-2"
>> DROP COLUMN col12;
>>
>> ALTER FOREIGN TABLE pem."test-2"
>> ADD COLUMN col12 aclitem(12) NOT NULL COLLATE pg_catalog."default";
>>
>>
>> Expected:
>> -
>> ALTER FOREIGN TABLE pem."test-2"
>> ADD COLUMN col12 aclitem;
>>
>> Done
>
>>
>> *6)* EDIT mode, clearing Data Type from column throws Error on console
>>
>> TypeError: this.dataAdapter is null
>>
>> Couldn't reproduce.
>
>>
>> *7)* EDIT mode, If i have blank column row and clicks on SQL tab throws
>> error
>>
>> app_iter = app(environ, start_response)
>> TypeError: 'KeyError' object is not callable
>>
>> Done
>
>>
>> *8)* User can clear Owner which we should not allow to clear OR we have
>> to generate SQL for that opration
>>
>>
>> Done
>
>> *9)* I do not have option to provide Statistics attribute for column
>>
>> Done
>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, May 11, 2016 at 3:17 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached updated patch for the Foreign Table module.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>> On Tue, May 10, 2016 at 4:33 PM, Dave Page  wrote:
>>>


 On Mon, May 9, 2016 at 1:23 PM, Ashesh Vashi <
 ashesh.va...@enterprisedb.com> wrote:

> On Mon, May 9, 2016 at 5:50 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached updated patch for the Foreign Tables module.
>>
>
 Feedback from my initial testing:

 - Owner is missing from the New dialogue.

 Done
>>>
 - The Properties list shows "Select from the list" in a combo box for
 Owner and
   Inherits.

>>>
>>>


>>> This is a generalize issue, I will create a new Kanban card for the same.
>>>
 - s/Oid/OID

 Done
>>>
 - s/Foreign Server/Foreign server

 Done
>>>
 - SQL Help filenames are not defined.

 Done
>>>
 - SQL formatting is weird, e.g.

 CREATE FOREIGN TABLE public.redis_table
 (id text NOT NULL COLLATE pg_catalog."default",
 value text NULL COLLATE pg_catalog."default")
 SERVER redis_server1
 OPTIONS (database '0');

 instead of:

 CREATE FOREIGN TABLE public.redis_table (
 id text NOT NULL COLLATE pg_catalog."default",
 value text NULL COLLATE pg_catalog."default"
 )
 SERVER redis_server1
 OPTIONS (database '0');


>>> Done
>>>
 - In the validation error messages, please repla

[pgadmin-hackers] pgAdmin 4 commit: [Python 3 compatibility] Improved the background proc

2016-05-14 Thread Ashesh Vashi
[Python 3 compatibility] Improved the background process executor to
work with Python 3.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=fe0911f28523d898fb965c8aead11d56a40ac94b

Modified Files
--
web/pgadmin/misc/bgprocess/process_executor.py | 15 +--
web/pgadmin/misc/bgprocess/processes.py| 12 ++--
2 files changed, 15 insertions(+), 12 deletions(-)


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