Commit Graph

108 Commits

Author SHA1 Message Date
Neel Patel
56e1fd85f4 Ensure line numbers form CodeMirror don't appear on top of menus. Fixes #2738 2017-10-12 10:07:18 +01:00
Akshay Joshi
13665f68d8 Fix validation message styling on thegrant wizard. Fixes #2673 2017-09-20 11:34:01 +01:00
Atul Sharma
788f7f3a69 Bundle fonts with pgAdmin so we have a standard set for all platforms.
Research by Shirley at Pivotal.
2017-09-13 16:01:14 +01:00
Ashesh Vashi
3bbd1a8a48 Remove icons from the menus to de-clutter the UI and make it more consistent with most OSs. 2017-09-11 09:51:26 +01:00
Harshal Dhumal
dbf760c6e7 Improve datamodel validations for default Validator if user (developer) do not implement validate function in datamodel. Fixes #2670 2017-08-31 09:54:31 +01:00
Violet Cheng
d527769bf8 Extract the generate_url(..) function from node.js, and collection.js 2017-08-17 21:43:07 +05:30
Ashesh Vashi
845025db8f Some cosmetic changes.
- 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
2017-08-09 16:52:12 +05:30
Akshay Joshi
e506fa1dbe Improved alertify notification logic. Remove AlertifyWrapper class and extend notification methods in alertify itself. 2017-07-31 18:59:44 +05:30
Ashesh Vashi
bdefdf5d4e Requests for statistics were not stopped even when Dashboard panel is
closed. It is a regression of webpack.
2017-07-31 16:48:52 +05:30
Surinder Kumar
6d5417709c Moved the javascripts of different modules from 'templates' to 'static' directory.
Moving the javascripts for the following modules:
 - About
 - Browser nodes
 - Dashboard
 - FileManager
 - Vendor/snap.svg
 - Preferences
 - Settings
 - Backup
 - Datagrid
 - Debugger
 - Sqleditor
 - Grant Wizard
 - Import & Export
 - Maintenance
 - Restore and
 - User Management
2017-07-27 17:25:08 +05:30
Surinder Kumar
4a91bcde30 Webpack all the things! Fixes #2135
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.
2017-07-18 15:13:17 +01:00
Khushboo Vashi
501120701e Allow the dashboard panel to be closed. Fixes #2506 2017-06-30 10:11:34 +01:00
Dave Page
96412b3219 Revert "Allow the user to close the dashboard panel. Fixes #2506"
This reverts commit a87ee6d059.
2017-06-27 10:35:43 -04:00
Khushboo Vashi
a87ee6d059 Allow the user to close the dashboard panel. Fixes #2506 2017-06-27 09:21:24 -04:00
Ashesh Vashi
d26337a1ba Moved the javascripts of the following browser node modules to the
'static' directory from 'templates' in the respective module directory:
- Server Group
- Server
- Database
- Schema
- Cast
- Event trigger
- Extension
- Foreign data wrapper
- Language
- Catalog Object
- Collation
- Domain Constraint
- Domain
- Foreign server
- FTS Configuration
- FTS Dictionary
- FTS Parser
- FTS Template
- Function
- Procedure
- Trigger Function
- Package
- Sequence
- Catalog
- Schema
- Synonym
- Table
- Type
- Materialized View
- View
- pgAgent Modules
  + Job (pga_job)
  + Schedule (pga_schedule)
  + Steps (pga_jobstep)

Added new dynanic modules for listing the supported server types, and
current user information.

NOTE: We've not yet moved the javascripts for the children of the table
module.
2017-06-22 15:58:32 +05:30
Harshal Dhumal
aa400cbc12 Fix integer/numeric validation on various dialogues. Fixes #2421 2017-06-08 14:59:26 +01:00
Shruti B Iyer
0d05385585 Update the styling to use the set of grays defined in the WIP style guide. 2017-06-07 13:57:49 +01:00
Ashesh Vashi
ae80976689 Using the client-side translation using the client-side 'gettext'
implementation.

This is the first step towards 'Avoid creating the javascript modules
using Jinja templates'.
2017-06-07 15:53:05 +05:30
Murtuza Zabuawala
95f763463f Fix an issue in NodeAjaxControl caching with cache-node field and add cache-node field in Trigger & Event trigger node so that whenever the user creates new Trigger Function we get new data from server in NodeAjaxControl. . Fixes #2242 2017-05-04 16:02:28 +01:00
Khushboo Vashi
618d9bc7a9 Enable horizontal scrolling in the treeview. Fixes #2339 2017-04-21 10:00:22 +01:00
Dave Page
9f6041b2a7 Revert "Ensure the treeview can be scrolled horizontally. Fixes #2339"
This reverts commit 78c25cef21 which apparently prevents tree nodes being collapsed.
2017-04-18 14:51:26 +01:00
Khushboo Vashi
78c25cef21 Ensure the treeview can be scrolled horizontally. Fixes #2339 2017-04-18 14:01:13 +01:00
Sarah McAlear
a0a31e55ae Move 3rd party client code into vendor/ directories for ease of maintenance. 2017-02-24 17:01:21 +00:00
Murtuza Zabuawala
bdf9761472 Improve consistency of dialogue controls offered. Fixes #1364 2017-01-08 16:05:34 +05:30
Harshal Dhumal
713c692ddd Fix View privilege management. Fixes #1531
1. Fixed update privileges for views and materialized views.
2. Apart from this fixed wrong sql for privilege update.
3. Fixed: Error message was not got cleared even after removing entry with error on privilege tab.
2016-10-10 09:42:22 +01:00
Ashesh Vashi
163ae4d53d Misc fixes and additions for pgAgent support:
- 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.
2016-09-22 15:27:59 +01:00
Ashesh Vashi
2540e9687f Fixed some of the javascript syntax in menu.js 2016-09-06 23:20:38 +05:30
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
Harshal Dhumal
ec3b9bb15b Allow to create the foreign table with inherits options. Fixes #1260 2016-08-02 09:38:56 +05:30
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
Surinder Kumar
47d7e24bb9 Add a Help button to the bottom left of the Wizard framework 2016-06-08 14:08:12 +01:00
Murtuza Zabuawala
bf042d46a2 Check valid DOMElement existance before accessing it while updating the
menu updation.
2016-06-02 15:01:16 +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
Ashesh Vashi
cf0f692d00 Dialog default sizing. 2016-05-25 11:18:05 +01:00
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
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
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
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
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
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
Harshal Dhumal
585daddce2 Destroy the existing Select2 object before rerendering the control. 2016-05-12 16:14:06 +05:30
Surinder Kumar
01e83f1807 Adding missing dependency 'underscore.string' in the 'menu.js'. 2016-05-11 12:11:06 +05:30
Ashesh Vashi
b383c67fa5 Treat the Array different from the Object to make sure session tracking
works well with it.
2016-05-08 23:55:57 +05:30
Ashesh Vashi
07e0de5399 Resolved an issue, a copy-paste issue (was using field instead of the
column object) in NodeAjaxOptionsCell.

It was regression of '32e0a0d4b62462d45da88c177ffc6966de3dbcbb' commit.

Thanks Harshal for reporting this.
2016-04-29 17:25:43 +05:30
Ashesh Vashi
9ef7132e83 Set proper context object, when triggering the 'pgadmin-session' events
in order to resolve few corner cases for validation.
2016-04-29 15:56:56 +05:30
Ashesh Vashi
32e0a0d4b6 Clear the node cache, when an node is created/updated to make sure - we
will always have latest data related to that type of node. Also, fixed
the cache_level for different node types.

This commit also contains fixes for the following issue:
* In extension module - use the 'node-list-by-name' instead of using a
  custom 'node-ajax-options' control, and removed redundant template
  schemas from it.
* When we tries to destroy the select2 object from
  Select2Cell/Select2Control while releasing the properties view,
  sometimes select2 can not find the instance related it for some
  unknown reason. Hence - before removing it we will check for manual
  instance existance using $.data('select2').
* When we traverse through the browser tree nodes very quickly, it tries
  to remove the object before it gets created completely, and results
  into an exception.
* Icon in the select2 drop down list was not visible due to some CSS
  issues.

Apart of that, we will generate two new browser events -
'pgadmin-node:created:<NODE-TYPE>', 'pgadmin-node:updated:<NODE-TYPE>'
whenever a new node is created, or an existing node will be updated.
2016-04-29 15:50:38 +05:30
Ashesh Vashi
9aee9794c1 Fix the properties toolbar at the top of the panel so it's always
visible.

This patch also introduce a callback 'onCreate' for each panel, and
frame, which will be called whenever a panel/frame is being created.
2016-04-18 12:38:56 +05:30
Khushboo Vashi
2d8633d4ca Fixed few typos/issues in the datamodel.js 2016-04-18 12:10:19 +05:30