Thread: PoC electron and pgAdmin4
Hi Hackers,
After the removal of the Webkit environment we gave a shot to add electron as our runtime environment. We were able to do it with some degree of success.
The links to get a version running with electron are:
What did we accomplish:
- Use Electron as a runtime and packaging solution for the application
- Support opening new windows when the preferences ask for them
- Make the application generally work
- Use Chrome as a default browser for the application
- Building scripts for all platforms using `yarn`, please review Readme
- The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows
- In our point of view it is a simpler way to generate the installers
Work in progress:
- No random port for the server, so you can only start 1 instance per machine
- Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome
- Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had)
- In Linux despite the fact that we close the window, the application is still running and need to be killed by hand
- We didn't test Debigger opening in new window
- Loading screen has no reference to pgAdmin
- No logging file for the runtime
- Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2)
- This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around it
Please give it a try and let us know what you think about it. If you find any problem let us know as well.
This is just a Proof Of Concept, where the majority of the application should be running correctly but there might be some glitches,
You can find the code in: https://github.com/greenplum-db/pgadmin4/tree/electron-over-master
Thanks
Joao
On Sat, Feb 24, 2018 at 1:44 AM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Hackers,After the removal of the Webkit environment we gave a shot to add electron as our runtime environment. We were able to do it with some degree of success.The links to get a version running with electron are:
After successful installation on my Ubuntu machine, the app couldn't started.
What did we accomplish:- Use Electron as a runtime and packaging solution for the application- Support opening new windows when the preferences ask for them- Make the application generally work- Use Chrome as a default browser for the application- Building scripts for all platforms using `yarn`, please review Readme- The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows- In our point of view it is a simpler way to generate the installersWork in progress:- No random port for the server, so you can only start 1 instance per machine- Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome- Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had)- In Linux despite the fact that we close the window, the application is still running and need to be killed by hand- We didn't test Debigger opening in new window- Loading screen has no reference to pgAdmin- No logging file for the runtime- Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2)- This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around itPlease give it a try and let us know what you think about it. If you find any problem let us know as well.This is just a Proof Of Concept, where the majority of the application should be running correctly but there might be some glitches,You can find the code in: https://github.com/greenplum-db/pgadmin4/tree/ electron-over-master ThanksJoao
Hi,
--
Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: syed.fahar.abbas
Website: www.enterprisedb.com
On Sat, Feb 24, 2018 at 1:14 AM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Hackers,After the removal of the Webkit environment we gave a shot to add electron as our runtime environment. We were able to do it with some degree of success.The links to get a version running with electron are:
Blank white screen displayed on fresh VM of Windows 07 64 Ultimate.
What did we accomplish:- Use Electron as a runtime and packaging solution for the application- Support opening new windows when the preferences ask for them- Make the application generally work- Use Chrome as a default browser for the application- Building scripts for all platforms using `yarn`, please review Readme- The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows- In our point of view it is a simpler way to generate the installersWork in progress:- No random port for the server, so you can only start 1 instance per machine- Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome- Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had)- In Linux despite the fact that we close the window, the application is still running and need to be killed by hand- We didn't test Debigger opening in new window- Loading screen has no reference to pgAdmin- No logging file for the runtime- Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2)- This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around itPlease give it a try and let us know what you think about it. If you find any problem let us know as well.This is just a Proof Of Concept, where the majority of the application should be running correctly but there might be some glitches,You can find the code in: https://github.com/greenplum-db/pgadmin4/tree/ electron-over-master ThanksJoao
--
Fahar Abbas
![](https://drive.google.com/a/enterprisedb.com/uc?id=0B3A76rNrVTJVNkdxY3hCTU1KUEk&export=download)
QMG
EnterpriseDB Corporation
Phone Office: +92-51-835-8874Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: syed.fahar.abbas
Website: www.enterprisedb.com
Attachment
Hi Joao,
Does not work for me either.
Tested on platforms:
Win10 Pro x64 (Old VM)
Win10 Pro x64 (Fresh VM)
Same behaviour on both of the VMs, I waited for one and half minutes but still it didn't start.
--![](https://drive.google.com/a/enterprisedb.com/uc?id=0B6jGeB3BfKRMV0t4MEp0YnZCTTA&export=download)
Regards,
On Sat, Feb 24, 2018 at 1:44 AM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Hackers,After the removal of the Webkit environment we gave a shot to add electron as our runtime environment. We were able to do it with some degree of success.The links to get a version running with electron are:What did we accomplish:- Use Electron as a runtime and packaging solution for the application- Support opening new windows when the preferences ask for them- Make the application generally work- Use Chrome as a default browser for the application- Building scripts for all platforms using `yarn`, please review Readme- The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows- In our point of view it is a simpler way to generate the installersWork in progress:- No random port for the server, so you can only start 1 instance per machine- Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome- Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had)- In Linux despite the fact that we close the window, the application is still running and need to be killed by hand- We didn't test Debigger opening in new window- Loading screen has no reference to pgAdmin- No logging file for the runtime- Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2)- This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around itPlease give it a try and let us know what you think about it. If you find any problem let us know as well.This is just a Proof Of Concept, where the majority of the application should be running correctly but there might be some glitches,You can find the code in: https://github.com/greenplum-db/pgadmin4/tree/ electron-over-master ThanksJoao
Attachment
Hello
That is unfortunate. Can you run directly the python app?
Go to the folder where you installed the application using a terminal/PowerShell/cmd and use the python from the venv folder to run the pgadmin4.py file and let me know the error that you are getting.
venv/bin/python pgadmin4/pgadmin4.py
Or
venv\Scripts\python.exe pgadmin4\pgadmin4.py
Depending on the environment
Also there might be a caption problem I am not on my machine now so I cannot double check.
Thanks
Joao
On Mon, Feb 26, 2018, 2:44 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Joao,Does not work for me either.Tested on platforms:Win10 Pro x64 (Old VM)Win10 Pro x64 (Fresh VM)Same behaviour on both of the VMs, I waited for one and half minutes but still it didn't start.--Regards,On Sat, Feb 24, 2018 at 1:44 AM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:Hi Hackers,After the removal of the Webkit environment we gave a shot to add electron as our runtime environment. We were able to do it with some degree of success.The links to get a version running with electron are:What did we accomplish:- Use Electron as a runtime and packaging solution for the application- Support opening new windows when the preferences ask for them- Make the application generally work- Use Chrome as a default browser for the application- Building scripts for all platforms using `yarn`, please review Readme- The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows- In our point of view it is a simpler way to generate the installersWork in progress:- No random port for the server, so you can only start 1 instance per machine- Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome- Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had)- In Linux despite the fact that we close the window, the application is still running and need to be killed by hand- We didn't test Debigger opening in new window- Loading screen has no reference to pgAdmin- No logging file for the runtime- Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2)- This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around itPlease give it a try and let us know what you think about it. If you find any problem let us know as well.This is just a Proof Of Concept, where the majority of the application should be running correctly but there might be some glitches,You can find the code in: https://github.com/greenplum-db/pgadmin4/tree/electron-over-masterThanksJoao
Hi Joao,
Attaching the screenshot.
On Mon, Feb 26, 2018 at 7:50 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
HelloThat is unfortunate. Can you run directly the python app?Go to the folder where you installed the application using a terminal/PowerShell/cmd and use the python from the venv folder to run the pgadmin4.py file and let me know the error that you are getting.venv/bin/python pgadmin4/pgadmin4.pyOrvenv\Scripts\python.exe pgadmin4\pgadmin4.pyDepending on the environmentAlso there might be a caption problem I am not on my machine now so I cannot double check.ThanksJoaoOn Mon, Feb 26, 2018, 2:44 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: Hi Joao,Does not work for me either.Tested on platforms:Win10 Pro x64 (Old VM)Win10 Pro x64 (Fresh VM)Same behaviour on both of the VMs, I waited for one and half minutes but still it didn't start.--Regards,On Sat, Feb 24, 2018 at 1:44 AM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:Hi Hackers,After the removal of the Webkit environment we gave a shot to add electron as our runtime environment. We were able to do it with some degree of success.The links to get a version running with electron are:What did we accomplish:- Use Electron as a runtime and packaging solution for the application- Support opening new windows when the preferences ask for them- Make the application generally work- Use Chrome as a default browser for the application- Building scripts for all platforms using `yarn`, please review Readme- The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows- In our point of view it is a simpler way to generate the installersWork in progress:- No random port for the server, so you can only start 1 instance per machine- Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome- Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had)- In Linux despite the fact that we close the window, the application is still running and need to be killed by hand- We didn't test Debigger opening in new window- Loading screen has no reference to pgAdmin- No logging file for the runtime- Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2)- This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around itPlease give it a try and let us know what you think about it. If you find any problem let us know as well.This is just a Proof Of Concept, where the majority of the application should be running correctly but there might be some glitches,You can find the code in: https://github.com/greenplum-db/pgadmin4/tree/ electron-over-master ThanksJoao
Attachment
Thanks Murtuza,
Looks like something is wrong with the venv for windows at least. Tomorrow I will give it a try again in a VM to see if I can understand what is happening, maybe I will need some help to understand what is added on the current windows build to ensure we have all the required libraries present.
Thanks
Joao
On Mon, Feb 26, 2018 at 9:42 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Joao,Attaching the screenshot.On Mon, Feb 26, 2018 at 7:50 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:HelloThat is unfortunate. Can you run directly the python app?Go to the folder where you installed the application using a terminal/PowerShell/cmd and use the python from the venv folder to run the pgadmin4.py file and let me know the error that you are getting.venv/bin/python pgadmin4/pgadmin4.pyOrvenv\Scripts\python.exe pgadmin4\pgadmin4.pyDepending on the environmentAlso there might be a caption problem I am not on my machine now so I cannot double check.ThanksJoaoOn Mon, Feb 26, 2018, 2:44 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi Joao,Does not work for me either.Tested on platforms:Win10 Pro x64 (Old VM)Win10 Pro x64 (Fresh VM)Same behaviour on both of the VMs, I waited for one and half minutes but still it didn't start.--Regards,On Sat, Feb 24, 2018 at 1:44 AM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:Hi Hackers,After the removal of the Webkit environment we gave a shot to add electron as our runtime environment. We were able to do it with some degree of success.The links to get a version running with electron are:What did we accomplish:- Use Electron as a runtime and packaging solution for the application- Support opening new windows when the preferences ask for them- Make the application generally work- Use Chrome as a default browser for the application- Building scripts for all platforms using `yarn`, please review Readme- The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows- In our point of view it is a simpler way to generate the installersWork in progress:- No random port for the server, so you can only start 1 instance per machine- Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome- Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had)- In Linux despite the fact that we close the window, the application is still running and need to be killed by hand- We didn't test Debigger opening in new window- Loading screen has no reference to pgAdmin- No logging file for the runtime- Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2)- This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around itPlease give it a try and let us know what you think about it. If you find any problem let us know as well.This is just a Proof Of Concept, where the majority of the application should be running correctly but there might be some glitches,You can find the code in: https://github.com/greenplum-db/pgadmin4/tree/electron-over-masterThanksJoao