We will be using the external utilities like pg_dump, pg_dumpall,
pg_restore in background. pgAdmin 4 can be run as a CGI script, hence -
it is not good idea to run those utility in a controlled environment.
The process executor will run them in background, and we will execute
the process executor in detached mode.
Now that - the process executor runs in detached mode, we need an
observer, which will look at the status of the processes. It also reads
output, and error logs on demand.
Thanks - Surinder for helping in some of the UI changes.
known events, when any activity happens on the browser layout.
The following types of events will be triggered through the browser
event manager.
- pgadmin-browser:frame:* [1]
- pgadmin-browser:frame-<name>:* [1]
- pgadmin-browser:panel:* [1]
- pgadmin-browser:panel-<name>:* [1]
- pgadmin-browser:panel
- pgadmin-browser:frame
- pgadmin-browser:tree
- pgadmin-browser:tree:* [2]
[1] The '*' denotes some of the events generated by the wcDocker, which
can be useful to do some operations.
These events are:
+ wcDocker.EVENT.UPDATED
+ wcDocker.EVENT.VISIBILITY_CHANGED
+ wcDocker.EVENT.BEGIN_DOCK
+ wcDocker.EVENT.END_DOCK
+ wcDocker.EVENT.GAIN_FOCUS,
+ wcDocker.EVENT.LOST_FOCUS
+ wcDocker.EVENT.CLOSED
+ wcDocker.EVENT.BUTTON
+ wcDocker.EVENT.ATTACHED
+ wcDocker.EVENT.DETACHED
+ wcDocker.EVENT.MOVE_STARTED
+ wcDocker.EVENT.MOVE_ENDED
+ wcDocker.EVENT.MOVED
+ wcDocker.EVENT.RESIZE_STARTED
+ wcDocker.EVENT.RESIZE_ENDED
+ wcDocker.EVENT.RESIZED
+ wcDocker.EVENT.SCROLLED
[2] The '*' denotes all the events generated by the Browser Tree
(aciTree).
The extension modules can utilize these events to do some operations on
nodes, and panels.
This patch includes showing 'Reversed Engineered Query' for the selected
node (if allowed) using the above approch.
The ShowNodeSQL module looks for two events.
1. SQL Panel Visibility change.
- Based on the visibility of that panel, we start/stop listening the
node selection event.
2. Node Selection in Browser tree
- Based on the selected node type, it will look for 'hasSQL'
parameter of the node, and fetch the Query from the server, and
show it in the SQL editor.