1) Migrate from webpack 4 to webpack 5. This had a lot of breaking changes,
so updated multiple webpack plugins and changed the config accordingly.
2) Replaced iconfont-webpack-plugin with a more maintained webfonts-loader.
3) Replaced deprecated babel-eslint with @babel/eslint-parser.
4) Replaced optimize-css-assets-webpack-plugin with a more maintained css-minimizer-webpack-plugin.
5) Updated all other JS packages and made the required code changes.
Fixes#6207
1) Replace the deprecated unit test method.
2) Wraps filter usage in a list call.
3) Converts the old metaclass syntax to new.
4) Use range instead of xrange method.
5) Change Unicode to str.
6) Several other transformations.
7) Fixed change password test cases.
8) Use simplejson instead of plain JSON.
- Remove this assignment to the local variable, the value is never used.
- Rename local variables to match the regular expression
- Add logic to this except clause or eliminate it and rethrow the exception automatically.
- Rename fields to match the regular expression
- Extract this nested conditional expression into an independent statement.
- Change this default value to "None" and initialize this parameter inside the function/method.
- Update this function so that its implementation is not identical to __repr__
- Refactor this method to not always return the same value
- Reraise this exception to stop the application as the user expects
- Add missing parameters _w _PY3. This method overrides simplejson.decoder.JSONDecoder.decode.
- Remove this redundant continue.
- Remove this unused function declaration
- Remove this identity check; it will always be False.
1) Schema diff compare button icon is not visible on hover.
2) Schema diff for identical section text is not readable due to the same color as the background.
3) Removed extra variables used for set text color for explain - Analysis section (Issue related dark theme.).
4) Issue related to the disabled toggle button.
refs #5653
1) TypeError can be thrown as <variable_name> might be null or undefined here.
2) Unexpected duplicate "white-space".
3) Unexpected missing generic font family.
4) Unexpected shorthand "padding" after "padding-left".
TODO::
- Don't use unicode in Python 3 for removing the support of Python 2 (
psycopg2 driver - __init__.py, server_manager.py).
- Merge the lastest pgcli (version: 3.0.0) for SQL autocompletion.
- fixed gettext usage with .format() only for original text with %s
- fixed typos
- fixed translation yes/no buttons in the dialog.
- improved translating sentences without "connecting" words (eg. see web/pgadmin/dashboard/static/js/dashboard.js,
word 'cancel' needs to be translated in the Czech language as 'zrušit' but in another sentence as 'zrušení')
- added gettext for text translations.
- Using the 'gettext' as oppose to '_', which is not defined
- Define missing variables
- Fixed escape character in string with double quote
- Removed some dead code in a test case
- Removed unnecessary self assignment
Includes some fixes for Accessibility improvements
- Use semantic markup to mark emphasized or special text
- Added hidden legend in <fieldset> for better screen reader support
1) Fixed usage gettext('') instead of _('') in javascript files.
2) Fixed usage gettext('') instead of `${gettext('')}` in javascript files,
because "pybabel extract" not support extracting from this syntax.
Improve the style of the highlighted code after query execution for Dark mode. Fixes#4996.
Changed background pattern for geometry viewer to use #fff for all themes. Fixes#5077
Changed the color of selected and hovered item for Select2 dropdown, also tweak the appearance of the tags in multi-select boxes. Fixes#4955
Fixed Firefox monospaced issue by updating the font to the latest version. Fixes#5184
2) Fixed minor issue where we use dialog tab navigator keyboard shortcut only on visible tabs.
3) Fixed an issue where Zoom in, Zoom out, Zoom to original and Download button should not blur the focus after a click on them.
Initial patch sent by Murtuza Zabuawala.
pgAdmin wheel distro is not having pgadmin.themes.json file in 'web/pgadmin/misc/themes' directory,
so it's better to refer this file from the generated directory.
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
Look 'n' Feel and implementation logic are inspired from
'http://explain.depsez.com'.
It now creates three tabs under the 'Explain' panel when executing a
query using the Explain Analyze/Explain button from the toolbar of the
Query tool.
Graphical
---------
-> Graphical Explain Plan
Analysis
--------
-> Table to show details of the explain plan analyse.
-> Each row represents the statistics per Explain Plan Node
-> It may contains columns like node information, exclusive timing
(time spent for this explain node excluding the child nodes),
inclusive timing, actual rows, plan rows,
rowsx (misestimation between planned vs actual rows), loop.
-> Background color of exclusive, inclusive, rows changes based on
their values.
i.e.
If Percentage of exclusive, and inclusive timings of total query time
is:
> 90 - Red Color
> 50 - Orange (Between Red & Yellow Color)
> 10 - Yellow color
If planner misestimation for the rows is
> 1000 times - Red Color
> 100 times - Orange (Between Red & Yellow Color)
> 10 times - Yellow Color
Also - if actual rows <= planned rows then it shows up arrow, else it
shows down arrow.
Statistics
----------
-> It contains a HTML table for the statistics per Node Type, and
a HTML table for the statistics per table.
Reviewed by: Akshay Joshi
Along with this, I have also fixed few other issues/icons found on the way:
1) Dependencies tab for inherited tables/foreign keys shows partial text (Fixes ##3994).
2) Dependencies tab for child partition table shows parent partition table as Function.
3) Dependencies tab for triggers shows trigger functions as plain functions.
4) Dependents tab for partitioned table shows the child partition tables as normal table instead for partitioned tables.
- Process watcher made fixed width with header changes, time details rounded to 2 decimals
- Query history will show "No query history" if no query fired. Query editor default size increased.
- Fixed a bug where New folder create button not working when in List mode and No files/folder present.
- Other minor improvements.
- Base font size changed from 0.815rem to 0.875rem, for navbar from 0.875rem to 0.925rem.
- Dialog sizes made consistent throughout the application. Now there are 3 size options for width and height each - sm, md, lg. Combination of any of these to be used hereafter
- Alignment fix for controls of Node properties dialogs which includes showing text and label in one line without dialog size change, checkbox alignment, switch control alignment at places and other minor improvements in other dialogs
- Error message design change in dialogs validation
- SQL Editor data grid editor popup design changes which were missed
- Design change for dashboard server activity grid
- Login page language dropdown color fix
- Properties accordion collapse design fix
- Help, Info icon fixed across all dialogs which were not working if clicked exactly on the text
- Added missing icon with buttons at few places
- Shadow behind the dialogs is increased to make it look clearly separated and depth.
- Control Alignment fix in maintenance dialog
- Min height of alertify dialogs set for better UX
- File dialog design fix when no files found
- Grant wizard fixes - Scroll bar visibility on first page, use full space for SQL generated on the last page
- Browser toolbar buttons changed to sync with SQL editor toolbar buttons
- Rounded corners for docker floating dialog (no properties)
- Renaming file in file dialog should show original file name
- SQL data grid text edit popup buttons behaviour was swapped. This is fixed.
- Import/Export dialog changes as per new design.
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2
Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.
- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
'web' mode
- Improved the look 'n' feel for the key selection in the preferences
dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes
Author(s): Aditya Toshniwal & Khushboo Vashi
1) Shutdown the python server properly.
2) Disabled "Shutdown server" menu till server is not successfully started.
Initial patch sent by Maxim, modified by Akshay Joshi.
Note:
1) Once the keyboard shortcut infrastructure is ready we will add generic shortcut to focus out from CodeMirror editor and set foucs to next element, Right now there is no way of doing this, For testing purpose you can manually focus out from CodeMirror and click on data output panel to continue navigate using Tab key.
2) As of now inner panel's are not getting focused on Tab/Shift-Tab keys but once RM#2895 patch gets committed it will start working automatically as it's inherited code which will add tabindex tag automatically on each newly created wcDocker panel.
1481 of 1831 messages (80%) translated in pgadmin/translations/de/LC_MESSAGES/messages.po
1694 of 1831 messages (92%) translated in pgadmin/translations/ja/LC_MESSAGES/messages.po
1748 of 1831 messages (95%) translated in pgadmin/translations/pl/LC_MESSAGES/messages.po
1750 of 1831 messages (95%) translated in pgadmin/translations/ru/LC_MESSAGES/messages.po
1436 of 1831 messages (78%) translated in pgadmin/translations/zh/LC_MESSAGES/messages.po
1481 of 1777 messages (83%) translated in pgadmin/translations/de/LC_MESSAGES/messages.po
1694 of 1777 messages (95%) translated in pgadmin/translations/ja/LC_MESSAGES/messages.po
1472 of 1777 messages (82%) translated in pgadmin/translations/pl/LC_MESSAGES/messages.po
1750 of 1777 messages (98%) translated in pgadmin/translations/ru/LC_MESSAGES/messages.po
1436 of 1777 messages (80%) translated in pgadmin/translations/zh/LC_MESSAGES/messages.po
- Loading 'pgadmin' as 'sources/pgadmin', as found under the 'sources'
reference directory to be consistent with other files.
- Removed the 'pgadmin' reference from the base.html template.
- Renamed 'pgadmin.slickgrid.editors.js', and
'pgadmin.slickgrid.formatters.js' as 'editors.js', and 'formatters.js'
respectively, as they're already in the 'pgadmin/static/js/slickgrid'
directory.
- Removed the duplicate entry of 'translations' from the webpack.shim.js
This significantly speeds up loading of the application; in an average of 3 tests, v1.6
loaded in 11.5s in the runtime on a Mac, whilst the webpacked version of the code
loaded in 5.53s.
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
Windows 2008 R2 (32 bit), while running the pgAdmin 4 as runtime for
the PostgreSQL one click installers.
- Found a typo in runtime code, we were appending the path using ';' on
*nix systems too. We should have used ':', and that did not allow the
os.environ['PATH'] to identify the correct path of the python
interpreter under the 'venv' directory.
- On Windows 2008, it was not honouring the environment variables, set
under the Qt application (e.g. pgAdmin4.exe runtime), in the python
application. (e.g. pgAdmin4.py). We will need to assume that - the
python interpreter resides under the 'venv' directory outside the
'bin' directory.
- Also, on windows 2008, it was setting PYTHONHOME environment variable
to the full path of the pgAdmin4.exe, we need to reset it to 'venv'
directory, if we find the python interpreter under it.
Thanks Murtuza Zabuawala for tips, and help.
Issue:
Changes done by Ashesh in pgAdmin4.py file for setting up PYTHONHOME variable to sys.prefix was applicable only for windows only.
Additionally I have also added exception handling for file provided by user for Backup/Restore/Import/Export.
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
Re-engineer the background process executor, to avoid using sqlite as some builds of
components it relies on do not support working in forked children.
When a File Manager is closed by clicking cancel button. Its dom element not destroyed.. So on traversing into directories, when it tries to get currently selected file type, it looks into the dom element but it gets dom of previous dialogs not of currently dialog.
Now whenever an instance of File Manager is closed. its dom elements are also destroyed.
Issues fixed:
1) In Python 3, parameter "cmp" is removed from sorted method. So File Manager won't open.
As we are sorting data on JS side using Natural sort, so on server side sorting is not required.
2) Improvement in Exception handling.
Issue:
When clicked on upload icon while saving a file prompt user to leave page. It is because the icon is a button and its type is set to submit which makes it to prompt, instead it should be 'button'
Storage Manager's menu items depends on capabilities list set by the module using it. If capabilities doesn't have 'upload' in it, It won't work. Upload button is bound to click event only when it is in capabilities.
Solution:
As upload button is being added only when it is in capabilities, so upload button html is removed from html file. It will not shown on UI untill it is in capabilities list.
algorithm.
This patch takes care of:
* Consistent behaviour during create, update operation on any node.
- It should return the node data during creating a new object, or
updating the existing one.
* Now that - we have consistent behaviour during these operations, we
can consistently move, update the tree item based the node data from
the server.
* Implemented the methods for each node to get the information about
that particular node only.
* Using the above changes to implement the 'refresh' operation on tree
node properly.
I must thank Surinder, and Harshal for helping me implement the 'node'
method, and also changed the behaviour of create & update methods to
return the node data for most of the nodes.
Fixes#1244
Made backend changes for:
* Taking care of the connection status in the psycopg2 driver. And, when
the connection is lost, it throws a exception with 503 http status
message, and connection lost information in it.
* Allowing the flask application to propagate the exceptions even in the
release mode.
* Utilising the existing password (while reconnection, if not
disconnected explicitly).
* Introduced a new ajax response message 'service_unavailable' (http
status code: 503), which suggests temporary service unavailable.
Client (front-end) changes:
* To handle the connection lost of a database server for different
operations by generating proper events, and handle them properly.
Removed the connection status check code from different nodes, so that
- it generates the proper exception, when accessing the non-alive
connection.
Fixes#1387