Introduced two config params:
1. USER_INACTIVITY_TIMEOUT - Interval in seconds for the timeout. Default is 0-Zero which means disabled.
2. OVERRIDE_USER_INACTIVITY_TIMEOUT - If set to true, tools like query tool or debugger will override USER_INACTIVITY_TIMEOUT
and will not allow the application to timeout if a query is running for a long time.
2) Added Dark(Beta) UI Theme option. Fixes#3741.
3) Fix an issue where a black arrow-kind image is displaying at the background of browser tree images. Fixes#4171
Changes include:
1) New theme option in preferences - Miscellaneous -> Themes. You can select the theme from the dropdown.
It also has a preview of the theme just below the dropdown. Note that, a page refresh is needed to apply changes.
On saving, a dialog appears to ask for refresh.
2) You can create your own theme and submit to hackers. README is updated to help you create a theme. Theme will be available only after the bundle.
3) Correction of SASS variables at few places and few other CSS corrections.
4) Added iconfont-webpack-plugin, which will convert all the SVG files(monochrome) used as icons for buttons to font icons.
This will allow us to change the color of the icon by using CSS color property.
5) All the .css files will bundle into a separate file now- pgadmin.style.css. This will help reduce the size of
theme CSS files as CSS in .css files will not change with the change of SASS variables.
Changes include:
1) Remove underscore-string and sprintf-js packages as we were using only %s. Instead, added a function to do the same. Also changed gettext to behave like sprintf directly.
2) backgrid.sizeable.columns was not used anywhere, removed. @babel/polyfill is deprecated, replaced it with core-js.
3) Moved few css to make sure they get minified and bundled.
4) Added Flask-Compress to send static files as compressed gzip. This will reduce network traffic and improve initial load time for pgAdmin.
5) Split few JS files to make code reusable.
6) Lazy load few modules like leaflet, wkx is required only if geometry viewer is opened. snapsvg loaded only when explain plan is executed. This will improve sqleditor initial opening time.
Reviewed By: Khushboo Vashi
Fixes#4701
Werkzeug middleware allows us to set the number of trusted ports and few other params
behind the proxy. By default values are set to zero.
Added 'X-Forwarded-*' configuration options and set the default value of the port to 1 to work with non-standard port.
Fixes#4768
For some unknown reason, font-mfizz was showing the slonik icon in
italic. Even after upgrading it to the latest version of font-mfizz, the
problem was not resolved.
So - instead of using the vector font, using the PostgreSQL SVG logo as
the application icon, and documentation link on dashboard now.
Ship the web code using server mode with appropriate paths by default and enable the runtime to override the mode, and force into desktop changing the appropriate paths to user-specific ones.
Note that this change will likely cause more advanced users to have to tweak configs.
RPMs will also need changes to create /var/lib/pgadmin and /var/log/pgadmin, owned by the webserver account.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).
We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.
TODO
* Add better support for non-ascii characters in the database name on
windows with Python 3
* Improve the messages created after the background processes by
different modules (such as Backup, Restore, Import/Export, etc.),
which does not show short-paths, and xml representable characters for
non-ascii characters, when found in the database objects, and the file
PATH.
Fixes#2174, #1797, #2166, #1940
Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
Turns out using the config file isn't a good idea if users copy config.py to config_local.py, as it prevents upgrades to the database. This has the added side-effect of simplifying future changes, as you only need to edit 2 files to modify the config DB now, not 3.
slower system - user may need to set the value to some higher value.
This value decide - for how long SQLITE operation will wait, before
throwing an operation timeout error because of the locked database.
Fixes#1329
A distro can now install a config_distro.py file alongside config.py
in which distro-specific configuration settings can be set, overriding
those in config.py. User settings in config_local.py will override
all other settings. This is useful to allow packagers to config
settings like the doc path, that may be specific to RPMs or Wheels
etc.
inaccessible.
In stand (without threaded) mode, flask application is not able to
process more than one request at a time. Hence - even the client
(browser) send multiple request, when connecting the server (which is
inaccessible), rest of operations get blocked, as making the connection
with the database server is blocking operation.
In order to fix the issue, we're starting the application with thread
support, in which it will create a separate thread of each request.
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.
selection, creation, upload/download files/directories resides on the
server side.
This will be useful for file selection/creation for different server
side utilites like pg_dump, pg_dumpall, pg_restore.
While accessing the configuration database from multiple session, it
results in to the error - OperationError, because - sqlite locks all the
database, and does not allow to access it simultaneously. We added the
timeout to give some time window for accessing it simultaneously.