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.
1. When an existing schedule updated, or a new schedule is added from a pgAgent job dialog, it was not able to generate the proper update SQL Query.
2. The SubNodeCollectionControl was not removing the grid, when it is being getting removed.
sequences node instead of the server-id.
Due to this - during updating the sequence node, it was not able to find
out the correct parent node, and it was updating the existing node, but
- later it (considering the old node) was removed by the replace logic.
- Added DatetimepickerControl, MomentCell (using moment.js)
- Used the 'DatetimepickerControl' in Role (Also - resolved an issue, when unset the datetime for 'Valid Until'.)
- Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent nodes.
- Fixed an issue with SubNodeCollectionControl, which was not starting the modification session of the child model, when created default value for collection is not null/undefined. And, hence - validation on the child model was not working.
- Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was not releasing the CodeMirror properly.
There are a number of cases where queries in both pgadmin4 and pgadmin3 are done against pg_depend but falis to constrain the query on classid.
In particular, if for example a constraint and a sequence exists with the same oid (which is perfectly valid, as they are in different tables), a column will suddenly refer sequences that are completely incorrect. When we look up sequences, we have to make sure we only match dependencies against pg_class.
case. Its purpose is now to handle certain scinarios specific to table
children modules.
Renamed it to 'TableChildSwitchCell' from 'SwitchDepCell' to avoid any
conflict in future.
1) In SQL pane, the signature in comments had arguments with name and type, Now it will show arguments with type only.
2) There is no indent+newline between arguments (there isn't even a space). - Fixed
3) The default value for the last argument is omitted. - Fixed
Last argument is omitted because the value for the last argument we got from table is empty.
Now we form function signature in the get_definition.sql using 'pg_catalog.pg_get_function_arguments' method.
Above changes will reflect in Functions, Procedures & Trigger function Nodes.
- On droping a synonyms - the query should be modified in SQL pane.
- A proper message should be given on trying to drop an already dropped
synonyms.
- Handle the synonyms with special characters.
Fixes#1607, #1608, #1609
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
1. The user will specify the tablespace path in test_config.json.in
2. If tablespace path not found, skip the test cases for that server(Only tablespace test cases)
3. Add the skipped test summary in the test result. (Now it's showing on console + in log file, but need to update in a final enhanced test summary report. Which is research point we will work on that after finishing all nodes API test cases)
4. Removed the test_ prefix from the values in the config files.
5. Add tablespace and roles tests
1] datamodel.js: For collection type added check before adding model into "changed" list instead of adding it blindly.
2] Type casting from str to int of column properties like attlen, attpricision.
3] Added missing data formating when adding new column to existing table (from table edit mode).
4] Added more validation for Foreign key constraint.
5] Column.js: Column grid (in table edit mode) show proper disabled color for disabled cell when grid renders.
6] All constraints and index js added idattribute to distinguish which s/constraint or s/index is updated on server side.
7] Column update.sql: Fixed sql when altering column data type. The issue was when we alter data type from which has length and precision to data type which don't have these properties and vice versa.
For e.g. alter data type numeric(10,12) to real (and vice versa)
8] Renaming constraint (RM1500).
9] simplejson KeyError handing for Python 2.7.
- Test framework support API testing with multiple server for this we need to modify test_config.json(for user it’s test_config.json.in) and test_advanced_config.json(for user it’s test_advanced_config.json.in). Server details of PG and PPAS are included in both .in files.
- Removed the logic of logging in the test client on each test scenario(As per Khushboo's comment in previous email). We need this logic in test cases under ‘browser/tests/’ as for test scenarios like change password and invalid login test cases as test client should be logged out first. So, as per this the code is slightly modified in ‘browser/tests/’.
Without quotes, the property can be mistakenly treated as a regex:
e.g.: URL: /pgadmin/browser/,
When that happens, JS engine throws "SyntaxError: invalid regular expression flag b" and the whole web interface freezes.
This problem usually occurs when pgadmin is hosted inside a subdirectory (https://host/pgadmin/ instead of https://host/).
Root cause:-
When user change schema of already created fdw extension then while creating the new fdw we should append the <schema_name>.<fdw_handler_name>.
Previously we added only <fdw_handler_name> so while executing the query it will not be able to find fdw handler name without schema name.
e.g. If user changed the fdw handler 'postgres_fdw_handler' under schema 'test' then we should display the handler name under fdw as "test. postgres_fdw_handler".
Solution:-
With this patch, we have added <schema_name>.<fdw_handler_name> so while creating or updating the fdw, proper sql will be generated.
1. RM#1293 - SQL pane is not displaying GRANT queries in functions node
2. RM#1294 - Comments are not visible in sql pane for trigger functions and functions
Explanation:
Previously we we using 'get_defintion.sql' template to generate SQL for SQL pane for functions, procedure & trigger functions node.
but GRANT statements and COMMENTS changes were missing. In order to fix that, now we have used both 'create.sql' and 'get_definition.sql' templates to generate full SQL query for SQL pane.
- Opening a file should set the tab name to the filename
- Editing a file should add a * to the tab name to indicate the file is dirty
- Saving changes to a file should clear the *
- The Save button should have a drop-down menu, with a Save As option.
1. Altered variable control to make its UI consistent with privileges and Security labels.
2. Changed datamodel.js to handle duplicate rows at datamodel level and not UI/Control level. (See variable control for example)
- Double click on file/folder icon or name will navigate to the folder/file.
- Selected file/folder can be renamed by Rename button only. Double click rename is removed.
- Filename text box will not hide on smaller screen. Setting minimum width of File Browser fixed it.
- Path at top will only show directory name, not the file name and it is greyed out
To make it work, we need to explicitly set -webkit-animation property to 'none' for classes "sql-editor-busy-icon.fa-pulse" and ".debugger-container fa-pulse".
'fa-pulse' class is responsible to spin the busy icon, but setting its -webkit-animation property to none will not spin icon but icon and message will be shown.
return correct information from a script, but works well on interactive
shell. Used a more proper check for Python > 2 instead of the current
implementation.
Thanks Vishal for the report.
children node. This implementation will allow to add new nodes at server
level without modifying the dashboard code. I found the issue during the
pgAgent Jobs node implementation.
optimized to work from multiple threads. It has too many frequent
transaction from multiple threads, and that tends to result into the
'database is locked' error of sqlite.
With the new implemenation, we're using the caching mechanism, which
keep the data in the memory all the time, and saves it on request
completion, and loads it only for the first time. Also, it will storage
the data using pickle, which will be faster than accessing sqlite.
Fixes#1329
1. Select2 control fixed for multi-select mode.
2. Index constrains (primary and unique key) fixed column listing issue.
3. Table node "inherited from" (Select2 control) was not showing table name with public schema
Introduced a new class 'cm_disabled' with css property background-color to '#EEEEE'
Query tool in edit mode, add the class 'cm_disabled' to set background color to dark and set the cursor property to 'nocursor' to disable editor.
Increased the query tool title padding to fix the issue of whitespace below the title.
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.