- Extract SQLEditor.execute and SQLEditor._poll into their own files and add test around them
- Extract SQLEditor backend functions that start executing query to their own files and add tests around it
- Move the Explain SQL from the front-end and now pass the Explain plan parameters as a JSON object in the start query call.
- Extract the compile_template_name into a function that can be used by the different places that try to select the version of the template and the server type
Because - the get_locale(...) function was being executed before any
request, and user login after first request. Hence - the values for
the labels in the Preferences are not being translated properly.
Fetch the raw value of user_language from configuration in case of
runtime/non-server mode to fix the issue.
This issue was caused because we recently added session_write_delay in session.
So session won't be written/updated to disk from memory until specified seconds are elapsed.
However we must forcefully write/update session to disk if user loges in or out irrespective of session_write_delay to keep sessions from memory and disk in sync as user logged in status is kept in session.
Session object is updated, everytime a request is being served, and
that was forcing the session object dumped on the dist on every request.
On windows, it was causing issues on slower system on startup. Because -
windows file system locks the file, when it is opened by any
application. And, frequent requests on the pgAdmin main UI rendering
was causing issues, because of that.
In order to resolve the issue, we will not write the session data on
disk for every request, but - only after certain delay (in seconds),
from it was last written. It can be configured using the attribute
'PGADMIN_SESSION_DISK_WRITE_DELAY' in the configuration file,
default vaule for the delay is 10.
(i.e. 10 seconds)
This allows the user to create partitioned table and it's partitions.
- Edit partitions, Create/Listing of constraints, rules, triggers under partitions. (Implemented by Harshal)
- Updating browser tree node when create/attach/detach partitions from table dialog.(Implemented by Ashesh)
Created a url_for function module to be used by different javascript
modules to use the same functionality of flask at client side.
A python module can expose the list of endpoints, used by its
javascripts, by overriding the 'get_exposed_url_endpoints(self)'
function.
In this patch, we have modified all the browser modules to use this
function. It will allow us to move the majority of the javascript
modules of browser nodes from templates directory to the static
directory.
TODO::
- Move these javascripts modules to the static directory.
- Use this function in all the applicable javascript modules.
e.g. tools, miscellaneous modules