Commit Graph

715 Commits

Author SHA1 Message Date
Trisha Anand
20ed017a58
In case of no mustache bindings are found in dynamic path list, throw invalid dynamic binding reference error. (#3394) 2021-03-04 15:35:46 +05:30
Trisha Anand
5e448b9331
DSL parsing : Catch index out of bound exception (#3364)
* In case index being referred does not exist, throw appropriate error during DSL parsing

* Fixing bad commit.
2021-03-03 18:51:35 +05:30
Trisha Anand
75b0986b92 Fixed the incorrect JSON string in INVALID_DYNAMIC_BINDING_REFERENCE appsmith error. 2021-03-03 18:22:42 +05:30
Trisha Anand
f49cc7b455
Added throwing a properly formatted error for client to consume when dynamic binding path list contains an invalid entry (#3343) 2021-03-03 17:47:35 +05:30
Trisha Anand
ca8be4c7f5
Db Migration : Delete unreferenced dynamic binding paths in actions (#3310)
* WIP compute if the dynamic binding path list is correct.

* Tested code for deleting the incorrect dynamic binding path list from actions.

* Added comments for code readability
2021-03-03 17:11:03 +05:30
Shrikant Sharat Kandula
9c50182f0e
API for forking of public applications (#3221)
* A barely working API for forking a public application

* Tests WIP

* Mild refactoring in tests

* Refactoring in test

* Not all applications are forkable
2021-03-03 15:45:47 +05:30
Trisha Anand
91e308665b
Requests preparation by plugins instead of ActionService (#3159)
* Added action request in S3 plugin.

* Added request data in Dynamo plugin

* Added request in Elastic Search.

* Request in Firestore.

* Request added in Mongo

* MsSQL request added.

* Added MySQL request.

* Added Postgres request.

* Added redis request.

* Redshift doen.

* Catching AppsmithPluginExceptions at the plugin level itself to ensure that the request gets passed on as part of the result.

* Fixed failing plugin test failures

* Fixed AmazonS3 test failures.

* WIP post analytics working

* WIP : Making the request data confirm to existing analytics request data format.

* Fixed the headers in the analytics body.

* Migrations S3, Postgres to the accepted format for request in analytics

* Updated S3 action to be the query

* Migration completed for all plugins for analytics.

* Removed the old analytics event. Now sending only the new one.

* Ensuring all data is captured in S3 plugin request in case of error.

* Minor editing of firestore to ensure that the errors get caught by the plugin itself.

* Fixed test cases in Amazon S3

* Incorporated review comments.
2021-03-02 10:58:46 +05:30
Shrikant Sharat Kandula
a1d027bb59
Save separate appLayout for edit/view and sync on publish (#3245) 2021-02-26 16:18:04 +05:30
Shrikant Sharat Kandula
5808620716
Add API for the signed in user to set their name (#3164)
* Add API for the signed in user to set their name

* Use the correct error in session handling
2021-02-26 14:48:20 +05:30
Shrikant Sharat Kandula
9f18aa2e69
Fix NPE in analytics on action execution (#3216) 2021-02-25 17:46:24 +05:30
Trisha Anand
42af1fa771
Only extract dynamic bindings from leaf nodes on update layout (#3210)
* Only extract dynamic bindings from leaf nodes.

* Minor code refactoring

* Moved to using generic Map type instead of LinkedHashMap
2021-02-25 15:56:45 +05:30
Sumit Kumar
63ff3c73fa
Fix execute on page load for api on app copy (#3150)
* first draft

* added fix without TC

* cleanup

* Update app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java

Co-authored-by: Trisha Anand <trisha@appsmith.com>

* Update app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java

Co-authored-by: Trisha Anand <trisha@appsmith.com>

* Update app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java

Co-authored-by: Trisha Anand <trisha@appsmith.com>

* - add TC
- minor code refactor

* fix condition

* update clone page test

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2021-02-24 10:21:03 +05:30
Piyush
faea2f36ff
Add support for setting.json for pluginType DB (#3156) 2021-02-23 13:57:37 +05:30
Shrikant Sharat Kandula
9b58e683b5
Fix Spring deserialization routines failing at appLayout (#3155) 2021-02-23 12:32:55 +05:30
Nidhi
61af306110
Added null check for OAuth2 scopes(#3153) 2021-02-23 11:10:47 +05:30
Shrikant Sharat Kandula
15b8e0f590
Add appLayout field to Applications (#3144)
* Add `appLayout` field to Applications

* Fix NPE on clone
2021-02-22 19:21:13 +05:30
Trisha Anand
7ff80ea192
In case an action is created without plugin template being set, update doesn't set the property as well. (#3116) 2021-02-19 23:26:33 +05:30
Shrikant Sharat Kandula
a6be22e028
Add request body and some other details in action execution data point (#3096)
* Include request body in action execution data point

* Send analytics data point when analytics fails
2021-02-19 14:39:40 +05:30
Shrikant Sharat Kandula
6eb9f399a3
Add a boolean isHidden field for pages (#3090)
* Add a boolean `isHidden` field for pages

* Add `isHidden` when loading all pages of application
2021-02-18 19:23:15 +05:30
Trisha Anand
e5574c1945
Support Prepared Statements in Postgres (#2967)
* Pushing minor editor form changes to ensure that prepared statement could be turned off.

* Code refactor to do variable substitution in PluginExecutor instead of action service.

* WIP : Prepared Statement handling in psql plugin

* WIP Prepared Statements.

* Working version of prepared statements

* Quote trimming added for post preparing sql statements. Now the unprepared statements and prepared statements do not require edits.

* Fixed existing test cases failing.

* Code formatting.

* Super minor code cleanup.

* Added migration for the existing postgres actions.

* Fixed failing test cases in ActionServiceTest.

* Minor change in the text for turning on and off prepared statements in the postgres query pane.

* Added test cases for prepared statement.

* Some minor comments for code readability

* Moved Prepared Statement setting from Action Configuration to Plugin Specified Templates since this setting does not make sense for all the DB plugins.

* Added function level comments

* Update app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/SqlStringUtils.java

Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>

* Update app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/SqlStringUtils.java

Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>

* Incorporated review comments.

* Fixed compile time error.

Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
2021-02-18 18:33:27 +05:30
Trisha Anand
b565301afe
Datasource is given permission for a public app during create/update of a public action (#3086)
* Added test case to assert that new datasources and actions created post making an application public have the correct permissions for public execution.
2021-02-18 18:05:07 +05:30
Shrikant Sharat Kandula
2a2b55ceaf
Fix NPE on plugin specified templates (#3084) 2021-02-18 09:10:15 +05:30
Shrikant Sharat Kandula
6936a40361
Add more information for action execution (#3060)
* Add more information for action execution

* Add orgId and pageName to action execution data point
2021-02-18 08:30:56 +05:30
Piyush Mishra
74b013d909
Encode params toggle (#3006)
* Makes client side changes to support actionConfiguration.encodeParamsToggle setting.
* Add migration code.

Co-authored-by: Sumit Kumar <sumit@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
2021-02-16 20:31:35 +05:30
Nidhi
afc329fd7b
Added grant type Authorization code to OAuth2 (#2992)
Co-authored-by: Piyush <piyush@codeitout.com>
2021-02-16 17:58:03 +05:30
Shrikant Sharat Kandula
3fd8db90bd
Consistent handling of signup configuration over FORM and OAUTH (#3013)
* Fix OAuth flow throwing 500 when signup is disabled

* Check for error code to identify signup disabled error

* Add consistent handling of allowed-domains for signing up

* Check for existence of valid email before checking domain
2021-02-12 19:48:07 +05:30
Shrikant Sharat Kandula
48b8bb9de1
Fix order of roles in share modal (#3017) 2021-02-12 16:37:34 +05:30
Nidhi
8823f9d407
Added client credentials grant type for OAuth2 (#2649)
* Added client credentials grant type for OAuth2

Co-authored-by: Piyush <piyush@codeitout.com>
2021-02-11 17:58:06 +05:30
Shrikant Sharat Kandula
8440d4e4e3
Allow app-viewers to invite others as app-viewers (#2961)
* Allow app-viewers to invite others as app-viewers

* Fix description for new permissions

* Migration for setting invite policy for app viewers
2021-02-11 16:33:35 +05:30
Sumit Kumar
2a7f7ba8c4
s3 plugin (#2735)
1. Integrate S3 plugin.
2021-02-10 15:26:01 +05:30
Shrikant Sharat Kandula
0861836db4
Fix bindings in Firestore plugin's where condition value (#2934) 2021-02-09 19:11:16 +05:30
Trisha Anand
af273c60d8
When fetching unpublished actions and unpublished pages, check if the undeployed version is not deleted before fetching. (#2792)
* When fetching unpublished actions and unpublished pages, check if the undeployed version is not deleted before fetching.

* Only add unpublished page deleted at check if the view mode is false (aka edit mode)

* 1. Update action repository to fetch only non deleted actions if fetching actions in edit mode.
2. Added test cases to assert re-using of deleted page and action names.
2021-02-09 12:57:10 +05:30
Trisha Anand
078870f7c9
Communicate action execute on load changes in update layout (#2825)
* 1. Update on load actions correctly
2. Send the changed actions with their changes as well as messages back to the client as part of the response.

* Added test case to assert that the action updates are correctly recorded in updateLayout.

* Code cleanup + added more comments for code readability

* Incorporated review comments.
2021-02-09 10:39:08 +05:30
Nidhi
973cd850e7
Modified documentation links for plugins (#2909)
* Modified documentation links for plugins

* Modified documentation links for plugins
2021-02-08 17:11:31 +05:30
Sumit Kumar
e6b77a1299
Stop logging some AppsmithPluginException to Sentry (#2351)
1. Move package  appsmith-interfaces/src/main/java/com/appsmith/external/pluginExceptions-> appsmith-interfaces/src/main/java/com/appsmith/external/exceptions/pluginExceptions
2. Move enum AppsmithErrorAction from appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java -> appsmith-interfaces/src/main/java/com/appsmith/external/exceptions/AppsmithErrorAction.java, so that both plugin exceptions and server exceptions could use the same enum.
3. Log exception based on the error action defined for each exception.
2021-02-04 15:24:30 +05:30
Shrikant Sharat Kandula
5c9f90fd59
Fix missing user name in first organization name (#2873) 2021-02-04 14:04:24 +05:30
Nikhil Nandagopal
8c5213b6fd
Merge pull request #2851 from appsmithorg/fix/docs-link
Fix/docs link
2021-02-03 21:31:33 +05:30
Nikhil Nandagopal
486a9da8dd updated all doc links 2021-02-03 20:45:16 +05:30
Shrikant Sharat Kandula
f950a9352b
Fix datasource hostnames being saved with spaces (#2844) 2021-02-03 16:46:09 +05:30
Shrikant Sharat Kandula
e9ba40f1f4
Analytics data point on action execution (#2740)
* Add analytics data point on action execution

* Include application details in action exec data point

* Only send action execution event on cloud

* Analytics is auto-disabled on self-hosted setups

* Move event name to AnalyticsEvents enum

* Move analytics Mono to separate method

* Use a common function to enqueue analytics message

* Provide analytics properties from caller method

* Use consistent casing in event names for analytics
2021-02-02 20:24:27 +05:30
Nidhi
c83fb70b95
Fixed ExecuteOnLoad not getting set for onPageLoad actions (#2801)
* Piped onpageload update function

* Added tests
2021-02-02 10:48:51 +05:30
Tim Dillon
91d5eb5860
Fix user email duplicated as name (#2787) 2021-02-01 14:51:44 +05:30
Nidhi
c17a2ea536
Modified error displayed to user on generic bad request (#2583)
* Modified error displayed to user on generic bad request

* Separate null check for cURL import
2021-01-28 12:14:34 +05:30
Shrikant Sharat Kandula
a6d76d1672
Fix organization slug computation clashes (#2725)
* Fix organization slug computation clashes

* Handle case where number-less slug is available
2021-01-27 14:35:43 +05:30
Shrikant Sharat Kandula
6bf2be65c0
Don't attempt to get structure for invalid datasources (#2730) 2021-01-27 13:44:15 +05:30
Trisha Anand
9e0f36a6f2
Improve Server thrown Error Messages' language (#2705)
* Improve Error Messages

* Added naming convention expansion for action name in the error

* Fixed failing test case assertion.

* Minor formatting.
2021-01-25 18:50:32 +05:30
Trisha Anand
3776e82fb8
Scheduling of parallel tasks implementation for on-page load actions (#2667)
* Proof of concept code which calculates the on load page actions.

* Refactored the field names introduced in Layout. Added a new field to keep a track of direct action names used in dynamic bindings in the DSL.

* Untested compute on on page load actions completed.

* Working page load actions computation.
TODO : Update the tests for correctness.

* Added fix for BFS starting from root nodes instead of arbitrary nodes.
Fixed a test case to assert for correct page load actions.

* Fixed the bug where the ids of the actions were not getting set in the layout. Also asserting the same in the test case for catching the future breaks.

* Minor refactor of function name to clear its purpose without reading the code.

* Incorporated review comments.

* Added conditional checks for unpublished action deleted and circular dependency of actions depending on each other.
2021-01-25 16:54:45 +05:30
Shrikant Sharat Kandula
468e84aabb
Fix calls to release notes from cloud instances (#2680) 2021-01-22 14:25:24 +05:30
Trisha Anand
48cfa2cea0
In case an action has been deleted in unpublished state, dont return it to the user in edit mode. (#2678) 2021-01-22 13:19:42 +05:30
Shrikant Sharat Kandula
6b406be39e
Fetch release notes for caching every two hours (#2657)
* Fetch release notes for caching every two hours

* Revert unrelated changes in Ping class
2021-01-21 11:59:35 +05:30