Commit Graph

319 Commits

Author SHA1 Message Date
Khushboo Vashi
12d75e0a51 Styling improvements for password input fields in backgrid. 2016-11-15 09:55:32 +00:00
Surinder Kumar
19bd021696 Ensure select2 instances have a destroy property before calling destroy. 2016-10-21 16:16:10 +01:00
Dave Page
62a35f24e7 Fix layout of DateTimePicker control help message. Fixes #1864 2016-10-18 12:43:58 +01:00
Surinder Kumar
7f507f294e While clicking on Select2 control, it tries to destroy the control and thus it doesn't get this object sometimes and throws error.
It should attempt to destroy the select2 object only if this object is not undefined.
2016-10-14 12:20:29 -07:00
Surinder Kumar
e4d870cbe6 Ensure errorModel unset property properly in while adding a new server. Fixes #1786 2016-10-03 13:50:54 +01:00
Dave Page
6790f14c6c Fix button label and colour 2016-09-26 16:10:00 +01:00
Surinder Kumar
3b4776ab5f Improve network/server activity feedback for the user. Fixes #1751 2016-09-26 15:10:38 +01:00
Ashesh Vashi
e591c6b5c0 pgAgent misc fixes:
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.
2016-09-26 13:43:13 +01:00
Dave Page
7f3ca548cd Fix SQL box sizing. 2016-09-26 11:35:11 +01:00
Ashesh Vashi
b80cd43ae6 Misc changes
- Setting the CodeMirror height when panel is resized, which you had mentioned.
- Added a new CellEditor (DatetimePickerEditor) for datetime picker.
2016-09-26 10:04:49 +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
Dave Page
7a40171300 Handle nested JSON correctly in SlickGrid. Fixes #1713. Fixes #1404 2016-09-21 13:43:27 +01:00
Dave Page
fcc81d32cc Fix condition check for avoiding sorting of columns. 2016-09-14 12:33:54 +01:00
Murtuza Zabuawala
4ba8f4830b Don't sort columns (tables, views, matviews, catalogs etc) on the treeview by name, but by ordinal. Fixes #1687 2016-09-14 11:13:50 +01:00
Murtuza Zabuawala
ffc58b74d2 Allow viewing of long data values in the grid. Fixes #1672 2016-09-12 12:39:40 +01:00
Murtuza Zabuawala
087332f32e Fix the boolean editor, and warn the user if there are unsaved changed in the edit grid before refreshing. 2016-09-01 11:50:48 +01:00
Murtuza Zabuawala
c56e4667df SlickGrid Integration in to query tool. Fixes #1618 2016-08-29 20:17:01 +05:30
Ashesh Vashi
b6f307256b Sorting the data during tree data loading using the natural sort
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
2016-08-29 20:06:58 +05:30
Surinder Kumar
2d75eac117 SqlFieldControl enhancements 2016-08-29 13:21:45 +05:30
Ashesh Vashi
f12d981a9d Handling the bad/lost connection of a database server.
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
2016-08-29 12:01:35 +05:30
Akshay Joshi
e016869ad5 Trigger issues through right click. Fixes #1209 2016-08-24 12:10:54 +05:30
Surinder Kumar
4c2020cdc7 Allow the use of the tab key to select options in combo boxes. Fixes #1251 2016-08-22 12:18:38 +01:00
Surinder Kumar
761b54ce69 Allow the user to configure tabs in the SQL editor. Fixes #1406 2016-08-19 11:40:19 +01:00
Khushboo Vashi
eca47efb03 Update MFizz font library. Fixes #1311 2016-08-19 11:17:42 +01:00
Surinder Kumar
d5b0cd29d8 Display full text from backgrid cells that overflow in a tooltip. Fixes #1442 2016-08-19 10:54:13 +01:00
Akshay Joshi
2b1b60bc2b Reduce main menu height a little. Fixes #1453 2016-08-18 16:51:22 +01:00
Surinder Kumar
1bcac0b67c Fix more of the funky keyboard shortcuts. 2016-08-08 15:26:37 +01:00
Khushboo Vashi
8e099e29c3 Fix various escaping issues. Fixes #1527 2016-08-05 12:20:00 +01:00
Dave Page
4f90a5d4f4 Move button bar related classes together. 2016-08-03 13:38:12 +01:00
Harshal Dhumal
ec3b9bb15b Allow to create the foreign table with inherits options. Fixes #1260 2016-08-02 09:38:56 +05:30
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
Akshay Joshi
e803464ee0 Replace 'Add' buttons with '+' 2016-07-26 12:54:59 +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
Dave Page
f783aeac63 Change button label to initcap. 2016-07-21 17:18:15 +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
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
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
51a33e57c9 Fix blurred text in Alertify on webkit. Fixes #1347 2016-07-02 17:13:32 +01:00
Dave Page
a1d8ca8c1c Fix subnode header colour 2016-06-30 14:07:26 +01:00
Surinder Kumar
53434030c1 Consistent busy indication. Fixes #1242 2016-06-29 12:16:02 +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
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
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
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
Sanket Mehta
f4e76a22b9 Ensure we properly escape data from Select2 controls. Fixes #1292 2016-06-20 16:04:09 +01:00
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
Surinder Kumar
0e11f4d082 A more appropriate fix for RM1362 - horizontal scrolling of query results. 2016-06-15 11:59:20 +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
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
Dave Page
970d3aafbf Help buttons for various dialogues. 2016-06-13 16:17:36 +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
Harshal Dhumal
e4f21568ad Fix styling of Alertify buttons 2016-06-07 09:23:58 +01:00
Harshal Dhumal
e3ab4501d5 User management. 2016-06-06 13:34:08 +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
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
Harshal Dhumal
dea4b8ca31 Proper evaluation of the optionsValues in the Backgrid Select2Cell. 2016-06-03 15:20:56 +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
79d5e33955 Do not allow to edit properties for the object under a catalog schema. 2016-05-31 00:16:33 +05:30
Ashesh Vashi
f247153920 Updated the Alertify to use latest version 1.7.0 2016-05-27 14:54:29 +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
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
Ashesh Vashi
2c6ca7d82c Changed the Select2Control to work more consistently. 2016-05-21 15:41:38 +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
Surinder Kumar
ecde42cbed Implementation of View & Materialized View 2016-05-20 17:43:30 +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
63b951baee Adding initial version for showing statistics for the server, and
database nodes.
2016-05-16 01:58: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
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
Ashesh Vashi
f682f06c94 Adding a background process executor, and observer.
We will be using the external utilities like pg_dump, pg_dumpall,
pg_restore in background. pgAdmin 4 can be run as a CGI script, hence -
it is not good idea to run those utility in a controlled environment.
The process executor will run them in background, and we will execute
the process executor in detached mode.

Now that - the process executor runs in detached mode, we need an
observer, which will look at the status of the processes. It also reads
output, and error logs on demand.

Thanks - Surinder for helping in some of the UI changes.
2016-05-13 08:49:51 +05:30
Ashesh Vashi
9cdd1f8098 Added support for the server side file manager, which will be useful in
selection, creation, upload/download files/directories resides on the
server side.

This will be useful for file selection/creation for different server
side utilites like pg_dump, pg_dumpall, pg_restore.
2016-05-13 00:04:32 +05:30
Harshal Dhumal
585daddce2 Destroy the existing Select2 object before rerendering the control. 2016-05-12 16:14:06 +05:30
Harshal Dhumal
a4d981cced Remove all the object view control within the subnode control, whenever
we remove it.

It will remove all the events, controls, elements, etc associated with
the subnode control.
2016-05-12 15:47:36 +05:30
Dave Page
81e59be1bd Fix menu width. 2016-05-11 16:34:25 +01:00
Harshal Dhumal
176b99c90b Added the multiple selection support in the Select2Cell 2016-05-10 13:48:54 +05:30
Harshal Dhumal
baae12dfcc Improve the password error message color on the 'Change Password' page. 2016-05-10 12:47:51 +05:30
Khushboo Vashi
dd7bde5ab8 Introduced the dependencies logic functionality (used in the backform),
which will allow us to add dependencies other model attributes on custom
backgrid cell.
2016-05-10 12:40:56 +05:30
Khushboo Vashi
7a400bacf3 Do not send the incomplete definition of a node object to the server
instead show proper message.

Tweaked by Ashesh for adding the proper message
2016-05-10 12:34:24 +05:30
Khushboo Vashi
86c4dd06b5 Fix dependents/dependency icons. 2016-05-06 14:50:17 +01:00
Akshay Joshi
7867adaa53 Added dependency of messages 'pgadmin.browser.messages' in backfrom.pgadmin.js 2016-05-06 17:55:50 +05:30
Neel Patel
149c59aa4f Fixed below review comments
- Removed the "lineWrapping" option from the codemirror textarea because
  it was creating issue in the code folding.
- Handle the values while depositing during debugging.
- Properly handle the Array values while saving it to sqlite database
  and displayed in input dialog.
- SQL code folding was not supported in codemirror so added the same.
2016-05-06 16:05:32 +05:30
Dave Page
0628ee0425 Dashboards v1 2016-05-05 16:42:16 +01:00
Ashesh Vashi
1b5037afe7 Show the resize handle on the alertify dialog. 2016-04-29 16:19:29 +05:30
Surinder Kumar
c15b7c6cae Remove unnecessary extra classes set in the SqlFieldControl, and also
removed the unnecessary classes for the same in the overrides.css file.
2016-04-29 16:05:55 +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
Murtuza Zabuawala
dac514a4ae Added a new control for rendering the notes to be used by different
tools/utitilities dialog.

Modified a little bit by Ashesh Vashi.
2016-04-28 11:52:06 +05:30
Ashesh Vashi
9dd3aeadb5 Do not close the menu, when clicking on the menu with checkbox.
Introduced a class 'noclose'. Then - menu-item having this class will
not propograte the events to its parent, hence - it will not be closed.

Some of the CSS applicable only to the immediate buttons only, and not
the grand-children.
2016-04-25 22:06:42 +05:30