Re: pgadmin4 - Use classic style interface, don't launch browser?

Поиск
Список
Период
Сортировка
От Avin Kavish
Тема Re: pgadmin4 - Use classic style interface, don't launch browser?
Дата
Msg-id CAFpscOQE42e9bWO3k3dweEOFKLXqK_Py4xq=LCx0J2HZz9bxsQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgadmin4 - Use classic style interface, don't launch browser?  (richard coleman <rcoleman.ascentgl@gmail.com>)
Ответы Re: pgadmin4 - Use classic style interface, don't launch browser?  (richard coleman <rcoleman.ascentgl@gmail.com>)
Список pgadmin-support
They weren't aimed directly at anyone in particular. They were suggestions for go-getters who like to take control of their own fate and instead of waiting for the randomness of the universe to deliver unto them what they seek. Maybe I should have put a warning saying "not for the faint hearted, requires effort and reading docs to accomplish"

so he would need to install nodejs, npm, nativefier, either open a command line/terminal every time he wants to start pgAdmin4 or write a batch/shell script to start it.  He would also have to remember to start the pgAdmin server separately and forget about using the "New pgAdmin window" function.  To add insult to injury, he'd have to have separate scripts/commands if he should want a tray icon or to run it full screen.

^ With the way you word things, even standing up sounds hard. It's all perspective, it's accomplishable with a bit of effort. While it may not be possible to get nativefier to behave as described above, because it's an automated tool, you can script electron to do all of the above for you.

To add insult to injury,

^ There are no insults nor injuries mate, surely nothing physical. It leads me to believe that you are referring to emotional injury. Which then leads me to conclude that you are too emotional about this whole business of administering a database thing. Or maybe you are a fan of hyperbole, I don't know. Tone is up to interpretation in written communication.

quite often actually.  I have lots of work to do that doesn't involve a web browser.

^ Sure, do that work and also keep the web browser open? How does a web browser window interrupt your work? How is it any different from having a dedicated window open? Do you run out of RAM or something? Do you accidentally start browsing memes when you have a browser open? What's the problem? Be explicit about what's wrong with the browser.

pulling the tab out wouldn't do anything toward solving his problem, which revolved around password management

^ It wasn't meant to solve the password problem but needing a standalone window problem, which is also mentioned in the write up. In fact, this email wasn't aimed at anyone in particular. It is a general write up with a few suggestions for all the standalone window needs I've seen over the past few days. I haven't directly addressed anyone. I'm not sure you who you are referring to by "his". I'm just a developer sharing my knowledge in hopes that someone would benefit from it.

Personally I have my own issues with the decision to write pgAdmin4 as a web app running in it's own self contained web server.  However I don't think that there is much of a desire among the official dev team to change this

^ pgAdmin4 cannot be changed from a client-server architecture to anything else. It is too late. A re-write would be required, which is a breaking change. The only possibility is to affect the design decisions of pgAdmin5 or 6. If anyone makes a factual and formal presentation of why the existing client-server architecture should be replaced with something else rather than improving it, we could have a serious discussion. But I doubt it, I think everything can be improved within the current architecture.

One thing I don't see in these emails is any credible facts and arguments against browsers, just a statement of personal unhappiness at the change of status quo. Maybe, if arguments based on facts that affect user experience, security or performance were provided, the team would do something about them, as they have been doing since the start. Instead, I see complaints. I don't see constructive feedback on possible improvements on this topic. I don't see solutions. I don't even see real problems.

so, your final suggestion is that, if he's a javascript developer he could simply write his own program to fix a perceived pgAdmin4 shortcoming.

^ yeah absolutely, write your own programs without asking other people to do it for you for free of charge !!!!????? It's open source software. No one owes you anything. This is distributed without liability. The existence of postgresql and pgadmin itself are mere courtesies.

I did not mean write an entirely new admin app, I meant embed pgAdmin4 in Electron which literally takes 5 lines of code as a start.  1. Create a browser window. 2. Point it to pgAdmin4 URL. 3. Enjoy !!. If you know SQL, this is definitely do-able. And no it's not like the normal browser window. It will look like a normal app. Or you could increase the immersion by creating a frameless window but you may not be able to close it normally. https://electronjs.org/docs/api/frameless-window

Here's a starting point. Follow this getting started first and replace the code in main.js
const { app, BrowserWindow } = require('electron')

let win

function createWindow () { win = new BrowserWindow({   width: 800,   height: 600,   webPreferences: {     nodeIntegration: true   } })
 win.loadURL('http://127.0.0.1:45707/browser/') // <--- Fix the port number and point this address to it.
  win.on('closed', () => {   win = null })
}

app.on('ready', createWindow)

app.on('window-all-closed', () => { if (process.platform !== 'darwin') {   app.quit() }
})

app.on('activate', () => { if (win === null) {   createWindow() }
})
That's all there is to it. Once you have that working, you can take it a step further by getting electron to launch the pgadmin4 server if it is not running already by using spawn 

Maybe an alternate launch option based on Electron should be an officially supported feature ?


On Sun, Jul 28, 2019 at 1:07 AM richard coleman <rcoleman.ascentgl@gmail.com> wrote:
Hi Avin, 

My $0.02

On Sat, Jul 27, 2019 at 2:11 PM Avin Kavish <avinkavish@gmail.com> wrote:
Hey,

Here's some unofficial input on the topic. 

This request baffles me for two reasons. 

a. Why does one need a standalone window when they can have pgAdmin open in a tab while multi-tasking. Is there ever a time when the web browser is closed while using a pc in 2019? If you lose tabs you can pin the tab and it will always be on the left side.
quite often actually.  I have lots of work to do that doesn't involve a web browser.
 
b. If you want it to run in it's own window, you can drag and pull the tab to it's own standalone window.
pulling the tab out wouldn't do anything toward solving his problem, which revolved around password management
If that doesn't solve your problem,

You can try Nativefier but you might need to launch pgAdmin on the same port each time. It basically wraps any web site in an electron app. Electron fyi allows developing desktop apps using web technologies. It's based on chromium and nodejs and renders web apps just like google chrome would. https://github.com/jiahaog/nativefier
 so he would need to install nodejs, npm, nativefier, either open a command line/terminal every time he wants to start pgAdmin4 or write a batch/shell script to start it.  He would also have to remember to start the pgAdmin server separately and forget about using the "New pgAdmin window" function.  To add insult to injury, he'd have to have separate scripts/commands if he should want a tray icon or to run it full screen.

Or if you are a javascript developer you can write an electron app yourself to encapsulate and extend upon the current functionality. https://electronjs.org/
so, your final suggestion is that, if he's a javascript developer he could simply write his own program to fix a perceived pgAdmin4 shortcoming.
Personally, I find it convenient to have it as a tab while reading docs and other stuff and often prefer it to switching to my IDE.

I'm glad that you find the current set up convenient, unfortunately it seems like this is a problem for at least Mark and tutiluren.
Once again, this is unofficial. I'm not part of the team.
neither am I.

Personally I have my own issues with the decision to write pgAdmin4 as a web app running in it's own self contained web server.  However I don't think that there is much of a desire among the official dev team to change this. 

rik. 
Regards,
Avin

On Sat, Jul 27, 2019 at 10:51 PM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hello,

I am afraid this is not possible at a moment,  pgAdmin4 doesn't have its own UI  rendering engine so it is dependent on the default web browser on the user's system.

-- Murtuza

On Fri, 26 Jul 2019, 21:32 Mark Murawski, <markm-lists@intellasoft.net> wrote:
Hello!

How can I go back to the traditional pgadmin4 interface where it runs in
its own window.  I do not want to launch it as a browser tab.


В списке pgadmin-support по дате отправления:

Предыдущее
От: richard coleman
Дата:
Сообщение: Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'
Следующее
От: Dave Page
Дата:
Сообщение: Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'