Commit Graph

1179 Commits (687a793383fa2531c8c2a6a9f82213c5779e470a)

Author SHA1 Message Date
Murtuza Zabuawala c336e8a743 Fix an issue in foreign tables node where it was displaying catalog tables in inherits options causing internal server error. Fixes RM#1520 2016-08-16 15:44:44 +01:00
Dave Page 99b4a0fe5b Add unit tests for schemas, collations and trigger functions. 2016-08-16 12:54:02 +01:00
Surinder Kumar 67f481ab11 Prevent creation of FTS objects in catalogs. Fixes #1122 2016-08-16 12:49:19 +01:00
Surinder Kumar 6d839a2924 Prevent a query being executed whilst one is already in progress. Fixes #1532 2016-08-16 12:10:16 +01:00
Akshay Joshi 035066bd41 Fix query tool button/menu inconsistencies. Fixes #1461 2016-08-09 16:23:24 +01:00
Navnath Gadakh 81e2bc1e80 Test suite enhancements:
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
2016-08-09 16:05:40 +01:00
Dave Page 2b13d55016 Add missing updates from the previous commit. 2016-08-09 12:17:02 +01:00
Akshay Joshi 9dfc7bff35 Add missing collection node child counts. Fixes #1250 2016-08-09 12:12:05 +01:00
Dave Page 33457e6a90 Update message catalog. 2016-08-08 16:51:03 +01:00
Dave Page 48384cd6cd Bump version. 2016-08-08 16:48:10 +01:00
Harshal Dhumal 8918b8894d Fixed privileges parsing issue while editing privileges of existing object. Fixes #1417 2016-08-08 16:31:57 +01:00
Dave Page a025c0ebf0 Missing comma. Sigh. 2016-08-08 15:39:06 +01:00
Surinder Kumar 1bcac0b67c Fix more of the funky keyboard shortcuts. 2016-08-08 15:26:37 +01:00
Neel Patel 37ca3579f3 Fix a JS error in the runtime caused by f78024808e (#1177) 2016-08-08 14:42:14 +01:00
Surinder Kumar 5900848842 Sequence related validation/fixes. Fixes #1119
1) Add proper validation checks for fields.
2) Fixed wrong sql generation due to incorrect conditions in template.
2016-08-08 12:47:20 +01:00
Surinder Kumar 7cf4ac2474 Fix RE-SQL for Trigger Functions which was missing an 'AS'. Fixes #1524 2016-08-08 12:17:54 +01:00
Harshal Dhumal f78024808e Prevent the user attempting to run external commands if the bin path is not configured. Fixes #1177 2016-08-08 11:59:37 +01:00
Khushboo Vashi 8e099e29c3 Fix various escaping issues. Fixes #1527 2016-08-05 12:20:00 +01:00
Surinder Kumar a43f053a10 Fix file upload in File Manager in pgAdmin4 Runtime. Fixes #1397 2016-08-04 16:34:30 +01:00
Khushboo Vashi b00e94e904 Fix drop trigger function, function and procedures. Fixes #1467 2016-08-04 15:24:03 +01:00
Surinder Kumar 42f8745aba Fix error running VACUUM FULL FREEZE ANALYZE VERBOSE. Fixes #1519 2016-08-04 12:13:34 +01:00
Harshal Dhumal cb35c46f03 Fix View Data options for tables with columns that need quoting. Fixes #1492 2016-08-04 11:54:36 +01:00
Murtuza Zabuawala 8c433fbfce Fix display of numerics in the query tool. Fixes #1463 2016-08-04 11:31:24 +01:00
Harshal Dhumal dfceb63986 Add save password option in sever create mode. Fixes #1450
Do a little string/layout cleanup whilst passing.
2016-08-03 15:55:45 +01:00
Khushboo Vashi 68497b00f6 Fix dropping of Domains. Fixes #1470 2016-08-03 15:44:24 +01:00
Harshal Dhumal de568b3021 Fix renaming of constraints from the table dialogue. Fixes #1500
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.
2016-08-03 15:39:14 +01:00
Dave Page 5d52767ba7 Move the dashboard tab filters into a button bar, and add a refresh button. Fixes #1505 2016-08-03 13:39:32 +01:00
Dave Page 4f90a5d4f4 Move button bar related classes together. 2016-08-03 13:38:12 +01:00
Dave Page 1ec1e9663c Ignore the pickle. 2016-08-03 10:25:10 +01:00
Harshal Dhumal ec3b9bb15b Allow to create the foreign table with inherits options. Fixes #1260 2016-08-02 09:38:56 +05:30
Murtuza Zabuawala 01252a13cf Further misc quoting/encoding related fixes. 2016-08-01 15:23:06 +01:00
Akshay Joshi e1cc3dded2 Allow customisable delete confirmation messages in backgrid. 2016-08-01 15:18:57 +01:00
Dave Page 16304aafd2 s/buttton/button/g, per Anthony DeBarros. Fixes #1518 2016-08-01 15:16:14 +01:00
Surinder Kumar 9c4eed70b4 Use the same keyboard shortcuts in the query tool as pgAdmin 3. Refs #1478
Per discussion on the mailing list, the shortcuts override the browser defaults (where there are any), but only when the query tool has focus.
2016-08-01 15:10:52 +01:00
Dmitriy Olshevskiy 94aa36f3d5 Remove redundant -- marker in the SQL panel on the properties dialogues. 2016-08-01 14:28:14 +01:00
Dave Page 5987af1b44 Minor readme tweak. 2016-07-27 15:35:11 +01:00
Navnath Gadakh 5c3c543d2e Test suite improvements:
- 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/’.
2016-07-27 15:33:36 +01:00
Murtuza Zabuawala b6e8d195dc Security label providers are an optional parameter. Fixes #1478. 2016-07-27 15:01:16 +01:00
Dave Page f4f8273994 Display basic query info when execution completes in the query tool. Fixes #1507 2016-07-27 11:36:13 +01:00
Murtuza Zabuawala 06e881570a Fix numerous encoding issues. Fixes #1307. Fixes #1479 2016-07-26 15:05:14 +01:00
Harshal Dhumal 166d42953c Give a more useful error message if attempting to drop an object that doesn't exist. Fixes #1154 2016-07-26 14:40:02 +01:00
Murtuza Zabuawala d3d96d5c05 Disable SQLALCHEMY track modification feature as it puts overhead on system, and if not set, now emits a warning. 2016-07-26 13:01:56 +01:00
Akshay Joshi e803464ee0 Replace 'Add' buttons with '+' 2016-07-26 12:54:59 +01:00
daze 19306934a0 Property 'URL' (of type string) not quoted in browser.js template when extending pgAdmin.Browser. Fixes #1504
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/).
2016-07-26 12:47:46 +01:00
Dave Page 790b28fb61 Flask-Babel 0.11+ compatibility. Fixes #1496 2016-07-25 17:23:10 +01:00
Harshal Dhumal 875360d1c8 When we use deps functionality, backform controls re-render then. But before we re-render them we must remove old grid (if any) otherwise is causes js error "Unable to call exitEditMode of undefined". Fixes #1497 2016-07-25 14:31:17 +01:00
Harshal Dhumal 9dd3cf2399 Make Save/Save As menu options work a little more sanely. Fixes #1460 2016-07-25 12:55:06 +01:00
Neel Patel dbd3c7f4c5 Allow creation of FDWs if the extension is in a non-default schema. Fixes #1320
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.
2016-07-25 12:48:11 +01:00
Surinder Kumar 91559c622b Fixes for function, procedure and trigger reverse SQL. Fixes #1293. Fixes #1294
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.
2016-07-22 16:38:21 +01:00
Dave Page 60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Dave Page a014cf82a1 Use a numeric version check for upgrades. 2016-07-22 16:14:57 +01:00
Dave Page f783aeac63 Change button label to initcap. 2016-07-21 17:18:15 +01:00
Murtuza Zabuawala 3d7b40e111 Fix support for security labels. Fixes #1457 2016-07-21 16:35:35 +01:00
Harshal Dhumal a7d7577c7c Query tool file handling cleanup. Fixes #1460
- 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.
2016-07-21 13:44:42 +01:00
Murtuza Zabuawala 419ead9121 Ensure ajax requests are sent on second click of an object. Fixes #1462 2016-07-21 13:26:09 +01:00
Ashesh Vashi 417af3676d Using better way to find the current object in the properties panel. 2016-07-19 15:30:39 +05:30
Ashesh Vashi 8b35a60c08 Generate the proper unique name for the duplicate column name.
Thanks Murtuza for reporting the issue.
2016-07-19 11:27:03 +05:30
Dave Page 8e29d16eec Beta 3 version bump 2016-07-18 16:34:00 +01:00
Harshal Dhumal 83a1535f89 Fix saving of query output as CSV data. Fixes #1405 2016-07-18 15:29:09 +01:00
Dave Page ae9bbc0305 Ignore regression test files. 2016-07-18 14:50:49 +01:00
Dave Page f17c2e3b84 Enhancements to the regression test suite.
Navnath Gadakh and Priyanka Shendge
2016-07-18 14:50:21 +01:00
Harshal Dhumal c7d25c33f2 Make the Parameter grid use a workflow consistent with other grids. Fixes #1241
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)
2016-07-18 11:50:42 +01:00
Murtuza Zabuawala 5560d5b334 Properly support the interval type. Fixes #1437 2016-07-18 09:40:45 +01:00
Ashesh Vashi 9ba6bafb2b Using own version of cursor class to allow us to take care of the
duplicate name in column description.
2016-07-16 10:42:51 +05:30
Murtuza Zabuawala d15dfac60f FIx a hang in the query tool that could occur if a column type couldn't be determined. Fixes #1438 2016-07-15 12:59:01 +01:00
Murtuza Zabuawala e94b14e7d7 Fix the issue in MATERIALIZED VIEW node where user was not able to add/update security label. Fixes #1458 2016-07-15 12:13:57 +01:00
Murtuza Zabuawala 517a797947 Fix query tool display of various types:
date
reltime
abstime
time with timezone
time without timezone
2016-07-15 11:59:45 +01:00
Surinder Kumar 1a129cf30e File management dialogue enhancements:
- 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
2016-07-15 10:50:25 +01:00
Surinder Kumar efb254c966 Ensure newly created database can be dropped. 2016-07-15 10:14:11 +01:00
Murtuza Zabuawala 573abbe6ef Allow users to select a data type with the keyboard only when creating a column in the subnode grid. Sanitise the list of fields shown. 2016-07-15 10:12:23 +01:00
Murtuza Zabuawala fdcb9d2a57 Fix an issue in procedure node where users were not able to create a new procedure when they provide arguments. Fixes #1416 2016-07-13 14:57:08 +01:00
Murtuza Zabuawala f79ca32e45 Allow selection of 'PUBLIC' as a role in privileges. Fixes #1416 2016-07-13 14:51:25 +01:00
Murtuza Zabuawala ae692d2416 Display comments on languages. Fixes #1412 2016-07-13 14:45:34 +01:00
Surinder Kumar f58c4df85d Fix incomplete reverse engineered SQL for databases. Fixes #1420 2016-07-13 12:42:01 +01:00
Surinder Kumar 9ad0bd1026 Fix clear query option which was opening a query tool in new window in Mac Runtime 2016-07-13 12:35:22 +01:00
Surinder Kumar 47e849dee0 The spinner icon is not visible while executing query or running debugger in Runtime environment specific to Ubuntu. This issue is related to RM#1186
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.
2016-07-13 12:32:05 +01:00
Neel Patel d22ea8bf61 Properly support file downloads in the desktop runtime. Fixes #1405. Fixes #1342 2016-07-13 12:26:24 +01:00
Ashesh Vashi 1ada5031cd 'hasattr' function on '__builtins__' for 'xrange' function does not
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.
2016-07-12 13:21:21 +05:30
Ashesh Vashi 6fa4065eee Do not try to show the database dashboard, when clicked on one of the
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.
2016-07-11 16:31:52 +05:30
Ashesh Vashi 2b809523eb [Python 3 Compability] Made changes to make the new server-side session
implementation works with Python 3.
2016-07-11 16:29:06 +05:30
Ashesh Vashi 889b69ac82 [Python 3 compability] Allow to run the auto-discovery implementation on
Python 3. Refs #1389
2016-07-11 01:18:24 +05:30
Ashesh Vashi 61698b7b4d Do not use the sqlite for session handling, as the old implementation is
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
2016-07-08 16:57:46 +05:30
Surinder Kumar 52d1af63a5 Scroll to the new row when adding one in the query tool. Fixes #1435 2016-07-07 12:35:44 +01:00
Harshal Dhumal 4077de2187 Fix Select2 issues. Fixes #1418. Fixes #1434
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
2016-07-05 12:58:48 +01:00
Surinder Kumar 6c6660e576 Resolve "Move to last page" warning shown unnecessarily issue. Fixes #1422 2016-07-05 12:20:40 +01:00
Surinder Kumar 1bd27b847b Grey the SQL panel in edit data mode. Fixes #1423
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.
2016-07-05 12:11:36 +01:00
Murtuza Zabuawala 3ee8861d44 Fix JSON type rendering. Fixes #1404 2016-07-04 10:05:59 +01:00
Dave Page d4c3b1bcff Fix trigger function help link. Fixes #1410 2016-07-02 17:24:21 +01:00
Dave Page 51a33e57c9 Fix blurred text in Alertify on webkit. Fixes #1347 2016-07-02 17:13:32 +01:00
Dave Page 9c39fe2f2e Fix architecture detection on 32 bit Windows. Fixes #1427 2016-07-01 15:50:28 +01:00
Dave Page 7b3b7736d9 Resolve loading panel does not hide in Mac runtime. Fixes #1425 2016-07-01 10:20:43 +01:00
Dave Page c45960df5e Beta 2.1 - a favour for our friends in QA. 2016-06-30 16:05:23 +01:00
Dave Page d79524ff60 Require passwords to be at least 6 chars long in setup.py. Fixes #1322 2016-06-30 14:16:30 +01:00
Dave Page a1d8ca8c1c Fix subnode header colour 2016-06-30 14:07:26 +01:00
Dave Page 685b2f4ab7 Correct label 2016-06-30 14:05:10 +01:00
Dave Page aa44122a8a Fix query execution keys in the Mac runtime. Needs more work to sanitize with CodeMirror, but this is a step further. Fixes #1336 2016-06-30 09:56:15 +01:00
Dave Page 80e108aa55 Fix regression test harness to allow for removal of the schema version from config.py 2016-06-30 09:46:46 +01:00
Dave Page 71443deceb Fix email validation 2016-06-30 09:46:06 +01:00
Dave Page 0282ef7992 Use a standard colour for error highlighting. 2016-06-29 20:54:08 +01:00
Dave Page c4504f1dc2 Localise the loading message. 2016-06-29 20:48:09 +01:00
Dave Page d795f37fe5 Prefix the version number with 'v' in the Loading message. 2016-06-29 20:47:11 +01:00
Murtuza Zabuawala 8246fc56e8 Offer the various serial pseudo-types as column type options. Fixes #1393 2016-06-29 19:50:43 +01:00
Surinder Kumar 53434030c1 Consistent busy indication. Fixes #1242 2016-06-29 12:16:02 +01:00
Harshal Dhumal 9396cb03d5 Fix intermittent CodeMirror rendering issue. Fixes #1399 2016-06-29 11:19:04 +01:00
Surinder Kumar 5d0c160fb8 Show a loading indicator until things are ready to rock. Fixes #1400 2016-06-29 10:46:48 +01:00
Dave Page 1222681888 Revert "Display busy indicators in a much more consistent way. Fixes #1242"
This reverts commit 7fbefa507b which seems to be
missing things.
2016-06-29 10:32:20 +01:00
Dave Page 7fbefa507b Display busy indicators in a much more consistent way. Fixes #1242 2016-06-27 17:09:37 +01:00
Murtuza Zabuawala 4267545e08 Handle special chars and spaces properly in select2 controls. Fixes #1292 2016-06-24 14:09:32 +01:00
Murtuza Zabuawala 4bb849c58c Allow toggling of the Primary Key option in the un-expanded column grid when defining a table. Fixes #1235 2016-06-24 14:05:59 +01:00
Dave Page 78d329fc47 Don't blink the elapsed time - it's distracting. 2016-06-24 14:01:23 +01:00
Murtuza Zabuawala e9ad27678f Allow maintenance operations on Index/Primary key/Unique constraints. Fixes #1390 2016-06-24 13:59:16 +01:00
Dave Page d63b54610b Move the config database schema version out of the configuration file and into the model class.
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.
2016-06-24 12:50:52 +01:00
Surinder Kumar a7e1e25cf4 Add a title bar to the treeview browser, as this is the only (currently) supported way to fix docking issues with our code in wcDocker. Fixes #1184
Original patch by Surinder. Simplified and re-styled by me.
2016-06-24 10:12:57 +01:00
Dave Page 8f643a1946 Styling tweaks 2016-06-24 10:04:51 +01:00
Dave Page a1f979c3e4 Fix icon spacing 2016-06-24 09:45:21 +01:00
Dave Page 30682c2a68 String fix. 2016-06-24 09:27:29 +01:00
Dave Page 1acc1a7678 Auto-discover locally installed servers at login. Fixes #1389 2016-06-23 16:27:06 +01:00
Murtuza Zabuawala e4ef927da3 Fix tablespace statistics. Fixes #1196 2016-06-23 13:06:05 +01:00
Murtuza Zabuawala 8b0e65dc57 Allow default ACLs to be specified when creating schemas. Fixes #1108. 2016-06-23 13:03:18 +01:00
Dave Page 5928f70a1d Fix default ACL queries which were using invalid values for defaclobjtype. 2016-06-23 13:02:30 +01:00
Surinder Kumar 09569a23bd Fix "number.toFixed is not function" JS error.
Issue:
We got the following error in console log
"number.toFixed is not function"

Steps to reproduce:
1) Click on statistics tab.
1) Select any database node.
2) then select Databases collection node.
3) The above error will appear into console.

Reason:
I discussed the issue with @Murtaza and here we are explicitly
converting values at server side to string as JSON do not directly
support NaN & Infinity values. Because of which NumberFormatter receives
values of type string and breaks.

Solution:
Overrides the NumberFormatter to support NaN & Infinity values.
and we need to parse the values again in float at client side.
2016-06-23 12:46:48 +01:00
Dave Page 4983eb2f1c Fix SQL formatting. Fixes #1234 2016-06-23 12:14:23 +01:00
Murtuza Zabuawala 97d49af43a Fix constraint on server table to allow port 65535 to be used. Fixes #1388 2016-06-23 11:43:50 +01:00
Murtuza Zabuawala e5ee592470 Don't offer an option to drop the current maintenance database. Fixes #1382 2016-06-23 11:37:32 +01:00
Ashesh Vashi b78b3904cd Use PUBLIC (in caps) whenever used as a keyword. Fixes #1138 2016-06-23 09:15:09 +05:30
Dave Page 0ee096dbf6 Code tidy. 2016-06-21 15:33:33 +01:00
Dave Page 8908c5b2d3 Code tidy. 2016-06-21 15:29:50 +01:00
Neel Patel ae99ce7428 Query tool and debugger rendering issue in Linux
Issue : -

Whenever we open any alertify dialog inside the query tool and debugger panel then panel contents are not visible. Query tool panel display as blank.
This issue is only reproducible in Linux.

Solution:-

Animations and transitions are not automatically GPU accelerated and by default use browser's slow rendering engine.
We need to set 'translate3d' value of '-webkit-transform' property in order to use GPU.

After applying this property under linux, Webkit calculates wrong position of the elements so panel contents are not visible.

To make it work, we need to explicitly set '-webkit-transform' property to 'none' for .ajs-notifier, .ajs-message, .ajs-modal classes.

Fixes #1186
2016-06-21 15:24:48 +01:00
Dave Page 7d0fe669ca Code tidy. 2016-06-21 14:21:06 +01:00
Dave Page 3026b470e9 Optimise Python imports. 2016-06-21 14:12:14 +01:00
Sanket Mehta 03d348f7c2 Fix SELECT Script option for functions. Fixes #1191 2016-06-21 13:29:55 +01:00
Dave Page 648eebd230 Bump version for beta 2. 2016-06-21 12:20:01 +01:00
Dave Page e43ff84627 Update message catalog. 2016-06-21 12:17:41 +01:00
Surinder Kumar 85a7104e2c Restore should include database name in dialog title like in backup.
Add icons to restore and cancel button in restore dialog.
2016-06-21 12:16:03 +01:00
Surinder Kumar 52906dd020 Fix subnode-header label not taking full width (in privileges/variable controls), label goes to next line on viewing properties of node(ex: database node properties). 2016-06-21 12:15:08 +01:00
Surinder Kumar 2a778f3c16 Remove debug code 2016-06-21 12:13:51 +01:00
Murtuza Zabuawala 3210975568 Fix creation of exclusion constraints. Fixes #1301 2016-06-21 12:01:39 +01:00
Ashesh Vashi a35288e25d Save the runtime status information in the application object for using
it other places.

globals() does not return consistent value across the application
context.

Thanks Neel Patel for reporting the issue.
2016-06-21 15:13:04 +05:30
Murtuza Zabuawala a1f65e981f Fix an issue in query tool where it was not able to handle special characters in editor title.
Fixes #1381
2016-06-21 09:30:34 +01:00
Surinder Kumar a563e17f9b Make the backup and restore dialogues non-modal. 2016-06-21 09:25:31 +01:00
Dave Page 991cbcabcb Fix help URLs 2016-06-21 09:23:53 +01:00
Harshal Dhumal 19b4f9e01f Issue Fixed: Now User cannot be created with single (or less than 6 ) character password.
Fixes #1386
2016-06-21 09:20:21 +01:00
Surinder Kumar eb5a97bc3c Issue: Unable to create backup of database.
Regression of commit id: bc4703c5
2016-06-21 09:17:13 +01:00
Ashesh Vashi bfe1b773b3 Do not rely on config.SERVER_MODE for determining (if it is running from
runtime, or time), instead check the environment variable PGADMIN_PORT
to do that as per Dave.
2016-06-20 22:00:16 +05:30
Ashesh Vashi 800d5d71d7 Use the python interpreter explicitly while running the background
process from the runtime.
2016-06-20 21:31:19 +05:30
Sanket Mehta f4e76a22b9 Ensure we properly escape data from Select2 controls. Fixes #1292 2016-06-20 16:04:09 +01:00
Surinder Kumar 3f25e9331f Remove Query tool from object menu. It is already shown under tools menu, so no need to show under object menu. 2016-06-20 14:17:10 +01:00
Khushboo Vashi 40b075389f Add missing foreign table column options.
Fixes #1351
2016-06-20 13:45:37 +01:00
Murtuza Zabuawala 1a84c35628 Fix an issue where the save button was not getting enable when user revoke ADMIN option from Role privileges.
Issue: validation callback was missing in the control model.

Fixes #1302
2016-06-20 13:20:51 +01:00
Harshal Dhumal 237f93591f Keyboard shortcuts in the Query Tool:
Execute  -->   Ctrl + Shift + E
Explain  -->    Ctrl + Shift + X
Explain analyze  -->   Ctrl + Shift + A
2016-06-20 13:03:46 +01:00
Akshay Joshi c04b729c1d Set the minimum value to 50 and maximum value to 2000 for the items per page in the result grid 2016-06-20 16:23:49 +05:30
Ashesh Vashi f1eca516f0 Adding comment about setting some higher value for SQLITE_TIMEOUT, on
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
2016-06-20 15:55:00 +05:30
Neel Patel dd4705af60 Fix debugger issues which could occur if one or more of the ajax calls used to gather execution environment info completed in an unexpected order.
To resolve this, we have callbacks from each ajax call initiate the next one so everything is guaranteed to be sequential.

Fixes #1354
Fixes #1323
2016-06-20 10:21:43 +01:00
Murtuza Zabuawala 01801e4acb Fix date validation while creating new role.
Fixes #1370
2016-06-20 10:11:42 +01:00
Murtuza Zabuawala ac37d60c03 Fix the issue in Materialized view where user was not able to create Materialized view with PPAS 9.5 due to incorrect template path.
Fixes #1379
2016-06-20 10:03:38 +01:00
Ashesh Vashi 3350eaceab Use the same layout mechanism used as in the panel using elementary
layout support in different dialogs. Fixes #1358.
2016-06-20 12:46:33 +05:30
Ashesh Vashi f1dd39e5e9 Introduces the 'alertify.pgDialogBuild' function, which will register
different resize event callbacks for a particular dialog.

This function needs to be executed from the 'build' function of any of
the alertify dialog. Refs #1358
2016-06-20 12:45:10 +05:30
Ashesh Vashi 95c79e3a4c Upgraded Alertify to v1.7.1
This version includes the feature request about invoking the callbacks
for different resize events. It will allows us to adjust the layout of
the dialogs based on its width, just like we've in the panels.
2016-06-20 11:45:45 +05:30
Dave Page 05e7ee5a05 Second attempt at fixing the file handling code. Tested on Mac and Windows in both desktop and server modes. 2016-06-17 22:05:49 +01:00
Dave Page 2c62d1a4b7 Revert "Make the file manager work a little more sanely with regard to paths."
This breaks things even more on Windows :-(

This reverts commit 35243b9869.
2016-06-17 18:19:51 +01:00
Dave Page 35243b9869 Make the file manager work a little more sanely with regard to paths. 2016-06-17 17:12:04 +01:00
Dave Page 1172e31019 File dialogue layout tweaks. 2016-06-17 17:11:30 +01:00
Dave Page a53811ef27 Get rid of canvas colouring in graphical explain. 2016-06-17 16:34:03 +01:00
Dave Page be100b82e6 Missed string change 2016-06-17 15:28:40 +01:00
Dave Page f2b6ab816b Process manager UI cleanup. 2016-06-17 15:24:15 +01:00
Dave Page 3bcc5a4bd3 Further string improvements. 2016-06-17 14:51:01 +01:00
Dave Page 8c279421f3 Re-order view data options 2016-06-17 14:39:44 +01:00
Dave Page 69d8f01d01 String improvements. 2016-06-17 14:35:16 +01:00
Dave Page fd6c43b393 String improvements. 2016-06-17 14:21:14 +01:00
Murtuza Zabuawala bc4703c5b7 Fix the issue in backup/restore while selecting section-> data option, it was throwing error.. Fixes #1219 2016-06-17 14:01:30 +01:00
Murtuza Zabuawala b94b47f021 Fix issue which was showing incorrect datetime in Backup/Restore dialog. Fixes #1377 2016-06-17 13:54:31 +01:00
Murtuza Zabuawala 014eb2a5c2 Don't allow creation of edbspl trigger functions (they should be created as part of the trigger). Fixes #1212. 2016-06-17 13:46:42 +01:00
Ashesh Vashi 359b1d0176 Use a separate class to remove the footer space in the query editor,
when no of records in a page is set to 0 (or, less than 0). So that -
we do not loose CSS applied on the children DOM Elements dependent of
the original class.

This was regression of commit-id:
f9393aee44

We were loosing the formatting under the grid table due to this change.
2016-06-17 15:11:47 +05:30
Dave Page 262ae7d28c Improve detection of the runtime environment, and subsequent self-configuration. 2016-06-17 10:03:32 +01:00
Murtuza Zabuawala c702ef9c48 Fix password encryption with non-alpha passwords. Fixes #1371 2016-06-16 20:32:57 +01:00
Dave Page 5f3511ce39 Figure out storage paths in a more Windows friendly way. Fixes #1369 2016-06-16 20:11:43 +01:00
Dave Page bc16a1a61f Don't output the startup message in Desktop mode as it hangs the runtime
on Windows.
2016-06-16 17:13:32 +01:00
Ashesh Vashi fc295f94a3 Remove recusive call of _wait_timeout() due to which python server is crashing 2016-06-16 17:49:02 +05:30
Murtuza Zabuawala a800b19c87 Fix display of NaN and Bytea data. Fixes #1350. Fixes #1309 2016-06-16 11:20:00 +01:00
Akshay Joshi f9393aee44 Allow a value of 0 rows per page to mean "no paging". Allow rows to be added on any page.
Fixes #1356
2016-06-16 09:57:44 +01:00
Dave Page 17b6053f45 Support distro-specific configs, and include docs in the PIP wheel.
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.
2016-06-15 20:56:27 +01:00
Murtuza Zabuawala d4e5d9c4f4 Add "Move objects..” functionality in tablespace node. Fixes #1286 2016-06-15 13:21:01 +01:00
Dave Page 0717b40543 Wording improvements. 2016-06-15 12:42:21 +01:00
Harshal Dhumal fc40197d39 Fix handling of errors when using "Connect Now?" for new servers. Fixes #1313.
Also fixes #1363 - display the server group properly in server properties.
2016-06-15 12:36:56 +01:00
Surinder Kumar 0e11f4d082 A more appropriate fix for RM1362 - horizontal scrolling of query results. 2016-06-15 11:59:20 +01:00
Murtuza Zabuawala 71ec9ef914 Add stats on Sequences/Functions/Trigger functions collection nodes. Fixes #1299 2016-06-15 11:53:58 +01:00
Harshal Dhumal 6b95d6ac75 Added connect now option in server create dialog. Fixes #1313 2016-06-14 17:23:25 +01:00
Surinder Kumar 5dbbd8e638 Resolve problem displaying intervals and timestamps. Fixes #1352
1) No handling for INTERVAL type datetime.
For example: executing query
SELECT INTERVAL '15 minutes';
throws json serialization error, because it returns time in timedelta format which is not handled.

Added support to handle timedelta datetime format in DataTypeJSONEncoder class

2) When we try to get BC dates from database raises ValueError: year is out of range
For eg:
SELECT TIMESTAMP '0044-03-15 10:00:00 BC',
It is because pyscopg2 doesn't handle BC datetime format.

So we have defined our method which type cast the datetime value to string in pyscopg2 overriding default behaviour.

Reference:
http://initd.org/psycopg/docs/advanced.html#type-casting-from-sql-to-python
ccf3693be6/pgcli/pgexecute.py
2016-06-14 17:09:47 +01:00
Surinder Kumar e881695050 Fix query tool horizontal scrolling of results. Fixes #1362
The backgrid-sizeable's css property 'overflow: hidden' was overriding backgrid table css property and It was reproducible only in runtime.
Removed 'overflow: hidden' property from backgrid-sizeabled-columns.css
2016-06-14 15:51:14 +01:00
Harshal Dhumal b0b21fd46c Avoid showing multiple 'Reset Layout' options under file menu. Fixes #1348
Also restructured code related to reset layout functionality.
2016-06-14 15:01:15 +01:00
Murtuza Zabuawala 62c1369938 Add "Move objects..” functionality to tablespace node. Fixes #1286
Additionally I have removed pre_9.1 sql's & align SQL line indentation as well.
2016-06-14 14:53:48 +01:00
Harshal Dhumal 93706ee40b Preferences and user management help button fixes. Fixes #1318 2016-06-14 12:33:03 +01:00
Murtuza Zabuawala fe1c86cbbe Fix SSL mode selection. Fixes #1144 2016-06-14 12:26:07 +01:00
Dave Page 0f12defd20 Tell the user where the app server is running. 2016-06-14 12:00:06 +01:00
Surinder Kumar 677008af10 Fix file type detection for Python 2.6. Fixes #1330
To find out the type of file selected using FileManager in query tool, we use bitwise OR( | ) on two sets which is not working on python-2.6.9 version.
Now we took list of elements instead of sets to fix the issue.
2016-06-13 16:35:11 +01:00
Sebastiaan van Stijn 8b770ae479 Fix "global name 'execfile' not defined".
execfile was removed in Python 3.0. This
uses 'exec(open(filename).read())' as an
alternative, which works on all Python
versions.
2016-06-13 16:24:54 +01:00
Murtuza Zabuawala 1f9d0ffc54 Fix comment removal for various nodes. Fixes #1331 2016-06-13 16:22:50 +01:00
Dave Page 970d3aafbf Help buttons for various dialogues. 2016-06-13 16:17:36 +01:00
Surinder Kumar c331b514a9 Auto-close the date picker when selecting a role expiry date. Fixes #1327 2016-06-10 17:13:06 +01:00
Surinder Kumar 1783e040e6 Fix re-display of privileges on the grant wizard if the back button is used. Fixes #1324
This issue was regression of commit id: 47d7e24bb9
Shouldn't have return statement in view object because it is called by render of wizard object class to render the page in wizard.
2016-06-10 17:08:48 +01:00
Surinder Kumar 9e8e3fc787 Fix file selection on Windows. Fixes #1319
1) Unable to select sql file through query tool on windows OS. In file_manager.js, we are stripping initial slash '/' from the path obtained, but we should not strip if it is full path like 'c:/path/to/dir/filename.ext'

2) Handle directory path if STORAGE_DIR is None. Proper checks are added.
2016-06-10 17:06:22 +01:00
Murtuza Zabuawala d9804ae2a2 Add a menu option to reset the layout. Fixes #1248 2016-06-10 16:55:58 +01:00
Harshal Dhumal 6cfa022e35 Validate email addresses when creating the config DB. 2016-06-10 16:19:46 +01:00
Murtuza Zabuawala fcd33162a9 Fix role valid until date handling. Fixes #1107 2016-06-10 16:12:51 +01:00
Sanket Mehta d5a91c969c Ensure the properties dialogues create objects in a single transaction/statement. Fixes #1107 2016-06-10 16:07:24 +01:00
Surinder Kumar 085f8e198e Make the Grant Wizard non-modal. 2016-06-08 16:57:03 +01:00
Surinder Kumar 47d7e24bb9 Add a Help button to the bottom left of the Wizard framework 2016-06-08 14:08:12 +01:00
Surinder Kumar 802840fd7f Fix various cosmetic issues with preference dialog
1. Foreign keys listed twice
The label for Exclusion constraint was set to 'Foreign keys'. fixed it.
2. Trigger function, Unique constraint, Primary key should be in title case
3. if user click outside of Preferences window it disappear (it should not disappear)
set preference alertify dialog option closableByDimmer to false.
4. Columns node settings listed twice
Override the register_preferences method in Columns CatalogObjectColumnsModule class
because there are two types of columns node, catalogs columns and tables columns.
so the settings for table columns should also work for catalog columns. Thats why we are not showing preference option for catalogs column node.
Ashesh fixed this issue.
2016-06-08 13:29:49 +01:00
Neel Patel 17fa6dcc40 Properly quote function names when starting the debugger. Fixes #1225 2016-06-08 13:22:03 +01:00
Surinder Kumar 8eb0742076 Add the Query Tool to the context menu, and improve prioritisation. Fixes #1256 2016-06-08 13:18:59 +01:00
Murtuza Zabuawala d7f5e95b2b Fix unwanted space indentation issue in Database node. 2016-06-08 12:56:56 +01:00
Murtuza Zabuawala 47007076cc Fix validation issue causing statistics tab to break if no node is selected on browser tree and user clicks on statistics tab. 2016-06-08 12:48:34 +01:00
Surinder Kumar a871b15fe9 When any of the docked tab(statistics, dependents & dependencies)
are clicked without selecting any tree node. it gives error in browser
console panel.
Because the node passed is undefined. and check is missing. This is now
fixed by adding check for node passed.
2016-06-08 12:46:30 +01:00
Murtuza Zabuawala 61037d4f60 Fix styling of statistics table. Fixes #1315 2016-06-08 09:30:53 +01:00
Dave Page 8a571df248 Revert "Fix appicon font styling."
This doesn't actually work - there seems to be something funky about
the way the runtime renders mfizz icons on Windows.

This reverts commit 5bbaf7841e.
2016-06-07 14:55:38 +01:00
Dave Page 5bbaf7841e Fix appicon font styling. 2016-06-07 14:08:37 +01:00
Murtuza Zabuawala 4ace8bb5b6 Statistics support remaining object types that support them. 2016-06-07 13:16:12 +01:00
Murtuza Zabuawala ac2612264c Fix validation of object before using it 2016-06-07 12:37:58 +01:00
Murtuza Zabuawala 20a22731e0 Fix incorrect condition checking for privileges. 2016-06-07 12:37:02 +01:00
Harshal Dhumal f3fae9d238 Fix email validation and mouse pointer over the Users option. 2016-06-07 09:24:44 +01:00
Harshal Dhumal e4f21568ad Fix styling of Alertify buttons 2016-06-07 09:23:58 +01:00
Dave Page 124f49869e Fix typo per Susan. 2016-06-07 09:06:29 +01:00
Ashesh Vashi 7d08e42bbe During encryption password is converted to buffer (instead of
bytearray), and that is causing the issue in Python 2.

This was regress of commit-id: 37e2e1d24b
2016-06-07 13:26:43 +05:30
Ashesh Vashi 37e2e1d24b Fixing the decryption issue during restoring the connection on restart.
As we convert the binary password to string during storing the
connection information, we also need to convert it back to byte-arrays
during restoring the connections.

Hence - decode the passowrd using 'utf-8' encoding during storing the
connection information, and encode it during restoring the connections.
2016-06-06 22:48:53 +05:30
Harshal Dhumal 7f1e57c2a6 Remove the header controls of subnode control properly, when removing it
from the VariableControl, and the customized TokenControl in the
fts_configuration javascript module during clean up process.
2016-06-06 18:53:19 +05:30
Murtuza Zabuawala 9ed2530b1f Fixes #1110 - Proper validation for the security labels. 2016-06-06 18:07:13 +05:30
Harshal Dhumal e3ab4501d5 User management. 2016-06-06 13:34:08 +01:00
Dave Page 4398d1d869 Fix mouse cursor on dashboard quick links. Fixes #1163 2016-06-03 13:10:49 +01:00
Ashesh Vashi 129ca87937 Removing wrongly overridden CSS on the Select2 arrow, and
selection__rendered.
2016-06-03 16:16:15 +05:30
Harshal Dhumal 5eef63c068 Added support for the password cell. 2016-06-03 16:13:43 +05:30
Murtuza Zabuawala 6dbfb7db7e Fixes #1273 - Resolved an issue setting privileges on the SHELL type. 2016-06-03 15:58:10 +05:30
Murtuza Zabuawala 6501f4cf36 Fixes #1280 - Resolved issue in json encoding while dealing with the
date format.
2016-06-03 15:54:04 +05:30
Dave Page fc654a0934 Let's make it Beta 1 2016-06-03 11:19:57 +01:00
Murtuza Zabuawala c14ff8e15e Fixes #1300 - Honour show system object in the table dialog, and do not
show catalog schema tables.
2016-06-03 15:45:13 +05:30
Murtuza Zabuawala 9c8637cf0f Corrected the z-index of backgrid-filter so that - it does not take
precedence over top panel.
2016-06-03 15:43:06 +05:30
Murtuza Zabuawala 6036c431b0 Fixes #1283, #1287 - Do not show null description in the create mode,
corrected the index expression on table node.

Reported by Thom Brown.
2016-06-03 15:41:24 +05:30
Akshay Joshi 967159664e Fixes #1303 Query with Order by clause is not working in Query Tool 2016-06-03 14:40:57 +05:30
Murtuza Zabuawala 8b54b59f2b Fixes #1285 - Update the comments (description) over the tablespace
properly.
2016-06-03 15:36:47 +05:30
Murtuza Zabuawala 9436542074 Fixes #1223 - Do not allow to drop user from non-super user.
Also - fixed some javascript variable scope issue in the 'delete_obj'
function of nodes.
2016-06-03 15:32:33 +05:30
Murtuza Zabuawala 1bd37d1f76 Fixes #1275 Issue with Query tool for PPAS - not showing the correct output 2016-06-03 14:34:50 +05:30
Harshal Dhumal ab9f63d960 Fixes# 1210 - Send the columns SQL with proper mime type. 2016-06-03 15:24:39 +05:30
Murtuza Zabuawala 40ab0b7c88 Fixes #1298 - ACL for the SEQUENCE node were not parsed properly. 2016-06-03 15:23:14 +05:30
Harshal Dhumal dea4b8ca31 Proper evaluation of the optionsValues in the Backgrid Select2Cell. 2016-06-03 15:20:56 +05:30
Murtuza Zabuawala c3e2f5f212 Resolve threading issue in the dashboards. 2016-06-03 09:16:11 +01:00
Ashesh Vashi af1e70ba4f Load the collection node sorted on order by 'label'. 2016-06-03 06:49:20 +05:30
Ashesh Vashi 8313bc9b8a Do proper validation of the server node. 2016-06-03 06:29:23 +05:30
Ashesh Vashi 57f3cbfa3b Select parent node when deleting/dropping the last children. 2016-06-03 06:06:40 +05:30
Ashesh Vashi 05a3d509bc Fixes #1104 - Load the first level node properly, whenever we add first
node under it, and select that node.

This fixes the problem of adding first server.
2016-06-03 05:57:58 +05:30
Susan Douglas e47671edaa Table dialog and backup tool docs 2016-06-02 14:05:46 +01:00
Murtuza Zabuawala 1f25e90fa4 Fixes #1276 - Resolved an issue - 'TypeError: c is undefined on removing
member type from Type=composite'.
2016-06-02 15:31:07 +05:30
Ashesh Vashi e18b135f6f Rename the 'Auto Vacuum' tab to 'Parameter' as it represents 'Storage
Parameters'.
2016-06-02 15:28:32 +05:30
Surinder Kumar 2610eaefbe Fixes# 1290 - Use qtLiteral with parameterized values.
When not using qtLiteral, it was result into an error - "unknown
error displayed when modify comments which may special characters on
Materialized view".
2016-06-02 15:08:24 +05:30
Murtuza Zabuawala bf042d46a2 Check valid DOMElement existance before accessing it while updating the
menu updation.
2016-06-02 15:01:16 +05:30
Murtuza Zabuawala 60208b7ae5 Fixes an issue rendering the dashboard, when data object is missing.
Also, fixed an issue checking the existence of the data object before
accessing it in schema javascript module.
2016-06-02 14:58:14 +05:30
Murtuza Zabuawala d202366a5d Fixes #1185 - While connecting to the server, application becomes almost
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.
2016-06-02 14:51:33 +05:30
Surinder Kumar e8a52fcd31 Fixes #1295 - Added menu for the 'Grant Wizard' for the trigger function
nodes.
2016-06-02 14:48:24 +05:30
Surinder Kumar 278f18bab8 Fixes #1243 - Allow to resize the columns of the result table in the
Query editor.
2016-06-02 14:46:58 +05:30
Ashesh Vashi 486da5e12c Fixed issue only coming in the runtime.
* Do not need to translate an empty string. (that results into the
  translation header inclusion in the javacript module).
* String.prototype.StartsWith is not an well received function, it has
  not been available in the QWebkit for linux.
2016-06-02 13:15:26 +05:30
Ashesh Vashi 954163b495 Resolved an typo in Backup dialog.
Reported by Susan Douglas.
2016-06-01 15:39:54 +05:30
Ashesh Vashi adcaeeeaf8 Resolved an typo in Backup dialog.
Reported by Susan Douglas.
2016-06-01 13:43:57 +05:30
Murtuza Zabuawala 4482bbb1ba Fixed a typo in Type node javascript module. 2016-05-31 23:29:50 +05:30
Khushboo Vashi b4d195aafe Fixes #1278 - Load the foreign server node javascript module when
databases (not when servers) are being loaded.
2016-05-31 23:26:55 +05:30
Murtuza Zabuawala afcb62cfd6 Fixes #1262 - Do not allow to delete the default server group. 2016-05-31 13:48:07 +05:30
Ashesh Vashi 79d5e33955 Do not allow to edit properties for the object under a catalog schema. 2016-05-31 00:16:33 +05:30
Surinder Kumar 4aaa58352c Support for the 'Refresh CONCURRENTLY' is applicable only on the
database server >= 9.4.
2016-05-30 17:01:04 +05:30
Murtuza Zabuawala 70cca42d61 Fixes #1147 - 65536 is valid port for PostgreSQL. 2016-05-29 16:04:10 +05:30
Murtuza Zabuawala f4cb7d8f9c Fixes #1231, #1237
* 'Of type' can't be used with 'Like'.
* 'Of type' usage conflicts with adding columns.
2016-05-29 16:02:08 +05:30
Surinder Kumar 6cb83f08d6 Load nodes under the schema at database level.
The following node module script will be loaded, when first database
node object is added in the browser tree.
* Domains
* Foreign tables
* FTS Configuration
* FTS Dictionary, and
* Functions

Icons for these modules needs to be shown in the dependents list.
2016-05-29 15:33:35 +05:30
Murtuza Zabuawala c96f28b66f Fixes #1123 - Options other than 'Create' are not available in the
procedure node.

This patch also includes other fixes related 'procedure' node as below:
* Generate correct statement for dropping procedure.
* Fetch the missing schema name for the EXEC script.
* Removed the 'DROP CASCADE' menu options, as it is not supported by
  procedure.
2016-05-29 15:28:17 +05:30
Ashesh Vashi 7e51a8fd56 Improvement in the security tab for each of the nodes.
* Hide the security tab for the objects under the catalog schema.
  Patched by Surinder Kumar, vastly improved by me.

* Make the securtiy label across all the nodes, using the same backbone
  model across the nodes, and make changes in the backend code for the
  same.
2016-05-29 15:19:36 +05:30
Murtuza Zabuawala 100f075510 Fixes #1142 - Update the comments in edit mode for the function,
procedure, trigger function nod objects.
2016-05-28 19:47:12 +05:30
Murtuza Zabuawala fd0d740acc Fixes #1143 - Update the comments in edit mode for the foreign data
wrapper, and foreign table objects.
2016-05-28 19:45:12 +05:30
Sanket Mehta 2fb1e96e2f Fixes #1113 - Casts should be in alphabetical order. 2016-05-28 18:57:26 +05:30
Susan Douglas b482ba6ce9 Additional documentation pages for dialogs. 2016-05-27 17:13:36 +01:00
Ashesh Vashi f247153920 Updated the Alertify to use latest version 1.7.0 2016-05-27 14:54:29 +05:30
Dave Page b85fa58344 Additional docs from Susan. 2016-05-26 15:29:33 +01:00
Dave Page 7aea8f8536 s/domain-constraints/domain_constraints for consistency. 2016-05-26 15:27:06 +01:00
Paresh More 0dabbf3dad Auto-run setup.py if the config database doesn't exist. 2016-05-26 13:00:27 +01:00
Surinder Kumar 6f2c8cfb31 Fixing couple issues with some of the nodes.
* Added 'catalog' as parent type for the domain, procedure nodes.
* Proper initialization of the FTS Configuration, FTS Parser, FTS
  Dictionary, FTS Template Nodes.
* Proper Indentation in collection.js
2016-05-26 11:19:17 +05:30
Neel Patel 95fe98600f Use the correct URL in the 'View Filtered Rows' dialog for the table
node. It should have not honoured the object node which is selected
afterwards.
2016-05-25 17:56:37 +05:30
Surinder Kumar f4938beb3c Error out - when user tries to load a binary file in the Query Editor. 2016-05-25 17:51:44 +05:30
Murtuza Zabuawala db79f3ff3d Fixes #1150 - Disconnecting a database action should followed by
updating the menu state according to its current state.
2016-05-25 17:44:39 +05:30
Surinder Kumar 4741992ad7 [Grant Wizard] Added support for Materialized View in the Grant Wizard.
Also - done proper view clean up when the wizard is cancelled.
2016-05-25 17:41:02 +05:30
Murtuza Zabuawala b1aa956af8 Fixes #1118 - Handle null, or empty string for the comments in Jinja2
template for Sequence Node.
2016-05-25 17:37:06 +05:30
Ashesh Vashi cf0f692d00 Dialog default sizing. 2016-05-25 11:18:05 +01:00
Ashesh Vashi 75fb99651a Center align the switch in backgrid 2016-05-25 13:46:42 +05:30
Ashesh Vashi 798ff03818 Role can update the catalog is not support from PG >= 9.5.
We will set rolcatupdate same as rolsuper from the properties query for
PG >= 9.5
2016-05-25 13:46:42 +05:30
Ashesh Vashi 748497916e Honour the node type (if provided) in the menu item, and disable it on
any other nodes.
2016-05-25 01:15:10 +05:30
Ashesh Vashi d20db0f43e Defined SwitchDepsCell in the schema javascript module, because - it
will be loaded before every other javascript module requires this Cell.
2016-05-25 01:01:02 +05:30
Surinder Kumar 05dde57651 Fixes #1207 - Unable to comments on materialized view with Postgres Plus
Advanced Server.

Made changes in the query templates for create, view-id, and update to
make it work properly with it.
2016-05-25 00:48:41 +05:30
Surinder Kumar c0ab396fad Fixes #1213 - Dropping the materialized view using an non-super user
results into an error - "list index out of range".

Using correct variable name while accessing parameter from an
dictionary.
2016-05-25 00:45:38 +05:30
Surinder Kumar d4644428e6 Fixes #1217 - Added support for the context menu - 'View Data' for the
Materialized View.
2016-05-25 00:02:52 +05:30
Murtuza Zabuawala c81977d441 Fixes #1136 - do not to allow create a server group with same name. 2016-05-25 00:00:28 +05:30
Murtuza Zabuawala 42a3b784ba Fixes #1135 - resolved an issue dropping a role with special characters. 2016-05-24 23:56:26 +05:30
Surinder Kumar 3b3cf7502b Added support for the CREATE script for View and Materialized View, and
SELECT & INSERT support for the Materialized View Node.
2016-05-24 23:53:19 +05:30
Murtuza Zabuawala af84ba5a4f Fixed all the review comments from Dave.
* Moved the Columns, and Constraint to its repective tabs.
* Ensure all the labels only have a capital letter on the first word
  (except for keywords or acronyms).
* Resolve the typo in string - 'System table'.
* Error messages on fields should not be shown unless the field loses
  focus and has an error.
* "General" section should have a limited subset of information.
* Variables grids should not be on the Security tab.
* Fixes the field labels that imply a question.
* Privileges controls on the Properties lists should be in a "Security"
  group.

Apart from review comments improved few other areas too:
* Used in-place DepsCell functionality for columns in both index, and
  type node.
* Improved the error handling in constraint nodes.
* Added create, alert SQL Help for nodes associated with the table node.
2016-05-24 23:29:55 +05:30
Murtuza Zabuawala aa1c283514 Added Insert/Delete/Update script functionality for foreign table objects 2016-05-24 12:41:00 +05:30
Ashesh Vashi dca6951e74 Fixes #1218 - Backup table not working.
Send parameters in proper format to work it well with table backup.

Thanks Fahar for reporting it.
2016-05-24 12:09:31 +05:30
Ashesh Vashi 0840e6af2d [Backup] Checking for 'only_data' parameter before accessing it.
Reported by Neel Patel
2016-05-24 12:02:49 +05:30
Ashesh Vashi 98fa93413d Initialize the msg to None as we may not have msg available, when
current version, and latest released version is matching.
2016-05-24 11:49:40 +05:30
Surinder Kumar 8a3a44ed25 Fixes the issue about redirection to undesirable URL when clicked on the
file control selection button.

All our views are inherited from the Backform.Form (a extended
Backbone.View), which has an tag element set to 'form'. The default
action for a button in form is to submit the data, and that results into
undesirable redirection within our Views. We can resolve the issue of
redirection by setting 'preventDefault' to true in the click event
object on that button. But - we may use the button control within our
view in future, and that will have the similar behaviour. Keeping that
in mind, we set the default tag to 'div' instead of 'form' for all our
views.

ommit.
2016-05-23 16:26:42 +05:30
Neel Patel aff0d417bb Fixed the issue related to set proper height, width of the div of a frame in
wcFrame. This is only happens only in the Firefox browser.

This was regression of the commit-id:
9a832086c5.
2016-05-23 13:22:40 +05:30
Dave Page 1724787f2a www.pgadmin.org now supports https. 2016-05-21 13:54:22 -04:00
Akshay Joshi 0a354055a9 Adding support for autocomplete in the SQL Editor.
In Query editor, we can use the autocomplete feature by using keyword
combination - 'Ctrl + Space'.
2016-05-21 16:04:29 +05:30
Neel Patel da28dc8507 Added support for importing and exporting the table data. 2016-05-21 15:43:43 +05:30
Ashesh Vashi 2c6ca7d82c Changed the Select2Control to work more consistently. 2016-05-21 15:41:38 +05:30
Ashesh Vashi b2b6d443b5 Do not validate the model unnecessarily (when closing).
Clear the cache of a node, whenever an object has been removed of that
kind, it will allow us to fetch the latest list.
2016-05-21 15:36:41 +05:30
Murtuza Zabuawala d2eaa8b3dd Adding support for the trigger functions node. 2016-05-21 15:09:44 +05:30
Murtuza Zabuawala 077075c765 Renaming the label of the browser left node after editing the properties
properly.
2016-05-21 15:06:14 +05:30
Surinder Kumar 3120ce1909 Fixes few issues with File Manager.
- Rename file/folder not working in list view.
- Selection folder only should not allow to select file.
- Ui changes in table list to match with the pgadmin color styles.
- Custom STORAGE_DIR path don't list files/folders when opened in window
  system.
- Code cleanup, formatting & did proper commenting.
- In file selection mode, the value typed in text box not setting into
  backbone model.
- Removed create file code, it should be handled on module using it.
- Written a common function to make ajax request, instead of writing
  individual functions for same task.
2016-05-21 15:02:05 +05:30
Ashesh Vashi 875e251359 Allow to specify the height & width from the javascript modules of an
individual node.
2016-05-21 14:18:26 +05:30
Dave Page 238da58732 Helpfile refactoring. 2016-05-20 16:39:35 -04:00
Surinder Kumar ecde42cbed Implementation of View & Materialized View 2016-05-20 17:43:30 +05:30
Akshay Joshi 4dbe058832 Implementation of Table, Column, Index, Trigger, Constraints and Rule Node.
- Table, Column, Index and Trigger (Author:- Murtuza Zabuawala)
 - Constraints Primary Key/Unique/Check/Foreign Key/Exclusion
     with integration into Table node (Author:- Harshal Dhumal)
 - Rule (Author:- Surinder Kumar)
 - Vacuum Control (Initial patch by Surinder Kumar and further enhancement by Murtuza)
2016-05-20 17:15:52 +05:30
Sanket Mehta 6895da9cbc Added support for FTS configuration node 2016-05-19 21:04:07 +05:30
Neel Patel 9a832086c5 Fixed an issue - not displaying query tool & debugger from the runtime.
In order to resolve the issue, set the height, width of the area (div)
under the wcFrame. wcIFrame consider the height, and width of this
container to determine the height, width & position of the iframe.
2016-05-19 15:55:13 +05:30
Akshay Joshi 3a9b331df6 Change the priority of Tools menu item 2016-05-19 13:53:49 +05:30
Dave Page 50c134c4f1 Use a 2 part version number. We never used the first digit in 13 years of pgAdmin 3. 2016-05-17 13:10:18 -04:00
Akshay Joshi 7d5d6dad28 Remove testing code 2016-05-17 19:00:13 +05:30
Akshay Joshi 8312efe927 Fixed issue of getting/setting preferences options for 'Explain' 2016-05-17 14:38:44 +05:30
Akshay Joshi 216b6b16b5 Fixed issue change 'Auto Commit' option from preferences not reflacted properly on UI and also not set the class variable 2016-05-17 12:31:39 +05:30
Dave Page 1606f1d8e8 Link online help to dialogs 2016-05-16 22:35:27 -04:00
Surinder Kumar 2c7a45814c Resolved an issue about missing 'canDrop' function check for the browser
tree nodes.

Each individual node is responsible for introducing the 'canDrop'
function/flag to decide whether the 'Delete/Drop' context menu should be
enabled/disabled.

In commit-id: 26aa5607ad, 'obj.canDrop'
was set to true in the 'pgBrowser.Node' in delete callback, just to make
the server-group droppable, which is wrong, as all the nodes are
getting affected because of this change in a wrong way.

To fix the issue, added the 'canDrop' function in the server-group node.

Apart from them, also added restriction for not allowing to delete the
default server-group.

Also, handled the same restriction at the server end.
2016-05-16 23:09:11 +05:30
Ashesh Vashi d1e3237e2e Fixed misc issues 2016-05-16 19:51:15 +05:30
Ashesh Vashi 735e9ba67b Show the error div only when it has some data within it.
Changed its colour for better attendtion.

Reduced the margin-bottom for the backform-tab, so that - we can see the
control well in the properties dialog.
2016-05-16 19:05:38 +05:30
Ashesh Vashi 8a7a8eb9aa Check for valid object existence before checking its session changed
flag in the data model.

Thanks Murtuza, and Harshal for reporting it.
2016-05-16 18:29:32 +05:30
Ashesh Vashi 76087f3df3 Fixed issue while using decode() without checking type of the variable. Type maybe string or byte. 2016-05-16 13:22:10 +05:30
Ashesh Vashi 8bd17cb433 [Python 3 compatibility] Introduced a separate HTML safe string function
in 'utils' module, earlier the function -'escape(...)' was converting
the strings to bytes, and that's reason, it was not working on Python 3.
2016-05-16 11:58:42 +05:30
Ashesh Vashi 3bbfd8a19f Loading the explain.js as 'application/javascript'
On some older version of browser, it was considering it as HTML.

Thanks Neel Patel for reporting.
2016-05-16 11:28:23 +05:30
Ashesh Vashi 28af92d386 Resolved a bug about listing file type listing, 'All Files' were listed
twice in some cases.
2016-05-16 02:43:38 +05:30
Ashesh Vashi 38bb45ec86 Adding backup as a allowed file type in the backup utility file-control 2016-05-16 02:19:41 +05:30
Ashesh Vashi 63b951baee Adding initial version for showing statistics for the server, and
database nodes.
2016-05-16 01:58:02 +05:30
Khushboo Vashi d1e2b902dc Add support for foreign server 2016-05-16 01:42:09 +05:30
Sanket Mehta fcc3d112e2 Integrate the graphical explain module in the Query Editor.
Added few TODO list for the graphical explain module by Ashesh.
2016-05-16 01:07:54 +05:30
Murtuza Zabuawala 5ca63fba48 Initial version for generationg the CREATE/SELECT/EXEC scripts for the
selected node.
2016-05-16 00:25:34 +05:30
Neel Patel c34e62207a Added support different maintenance operations
i.e. vacuum, analyze, reindex, cluster.

Tweaked by Ashesh for:
* Integrate it with the background process executor, and observer.
* Changed the UI for operation selection from select2 to custom radio
  group.
* Made it consistent with other tools like backup, restore, etc.
2016-05-16 00:16:52 +05:30
Ashesh Vashi ca62825c90 Set PGPASSWORD environment variable from the process executor before running
the external utility.
2016-05-15 22:29:17 +05:30
Murtuza Zabuawala 2da3a710a1 Added support for restoring a tar/custom type backup file in a object.
Tweaked by Ashesh Vashi as below:
- Integrated it with the background process executor, and observer.
- Improved the message format of the backup module messages.
- Created an item in TODO list to list down the objects in the selected
  backup file.
2016-05-15 20:00:02 +05:30
Murtuza Zabuawala 8ca760ee2b Addd support for taking backup for the server.
Tweaked by Ashesh Vashi to integrate the backgroud process, and also
with some improvements as stated below:
* Resolved an issue loading existing preference.
* Improved the background process observer/executor for supporting
  detalied view.
* Added the utility path preferences in the ServerType class.
2016-05-15 16:04:39 +05:30
Ashesh Vashi fe0911f285 [Python 3 compatibility] Improved the background process executor to
work with Python 3.
2016-05-15 00:03:25 +05:30
Ashesh Vashi 491bd3605b Fixed an issue creating extensions 'postgis_topology', and
'postgis_tiger_geocoder'.

Current implementation changes the schema name, whenever we chance the
name, which is wrong. We should have not change the schema for this
event.

Thanks Fahar Abbas for reporting.
2016-05-14 15:42:25 +05:30
Surinder Kumar 1aeab98a2b Load, and save the files in the Query Editor.
Also, the changes done by Ashesh to resolved few issue with the file
manager in 'Select' mode.
2016-05-14 15:29:08 +05:30
Neel Patel 4dc7f84761 Added functionality to Pause/Resume replay of WAL on the database
server.

Tweaked a little bit by Ashesh.
2016-05-14 01:41:20 +05:30
Harshal Dhumal 14839bf5de Always make sure - we convert the psasword to string in the as_dict
function.
2016-05-14 01:14:26 +05:30
Surinder Kumar cc91a538e0 Fixed the canDrop function of the node menus does not get called during
enable/disable menu checks.

Tweaked a little bit by Ashesh.
2016-05-14 01:10:20 +05:30
Ashesh Vashi b22d73ec46 Improvise the pgsql driver to keep the utility names used for different
operation like backup, restore, etc within it.

Also:
* improvised the color combination of the background process logger.
* Removed an unnecessary print statement from the
  get_storage_directory(..) function, also return None if STORAGE_DIR
  is set to None.
2016-05-14 00:48:20 +05:30
Surinder Kumar 5348f6e96a Improvised the file manager functionalities as per comments given:
* Do not show the drives on windows, if STORAGE_DIR is set.
* Do not show non-applicable buttons, whenever no files/directory
  present in the storage directory.
* Showing dimmer under the warning messages for replace/delete.
* Select file type other than 'All Files' in create/replace mode.

Tweaked a bit by Ashesh.
2016-05-14 00:42:41 +05:30
Surinder Kumar 938ea21f40 Fixed following issues:
1) Grant wizard close issue.
   2) Moved grant wizard specific css from wizard.css to grant_wizard.css
   3) removed 'ajs_content' css from wizard.css causing padding issue in alertify dialog
2016-05-13 15:04:36 +05:30
Murtuza Zabuawala 174363c9a7 Fixed typo for acl in tablespace node 2016-05-13 13:43:35 +05:30
Harshal Dhumal 4816f5ed12 Change server password feature 2016-05-13 13:21:20 +05:30