Commit Graph

725 Commits

Author SHA1 Message Date
Trisha Anand
217e36aaa9
Enrichment of analytics event for execute. (#3492)
* WIP : enrichment of analytics event for execute.

* Plugin level : Catch all exceptions and set request in the result
Server level : Adding new fields to analytics : `isSuccessfulExecution`, `statusCode`, `timeElapsed`

* Dont catch StaleConnectionException. Server handles the same.

* Removed class specification for onErrorResume in plugins since its supposed to catch all errors.
2021-03-11 15:40:07 +05:30
Shrikant Sharat Kandula
b12057ef73
Allow client to set layouts without id when creating a page (#3477)
* Allow client to set layouts without id when creating a page

* Mild refactoring

* Fix Layout action tests
2021-03-11 15:13:24 +05:30
Shrikant Sharat Kandula
1d683ad458
Fix recaptcha failing on signup when not configured (#3488) 2021-03-11 11:05:48 +05:30
Shrikant Sharat Kandula
65568a4e13
Add more devices in AppLayout options (#3451)
* Remove width and introduce more AppLayout type enums

* Fix: Adding min width to layout options.

Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
2021-03-11 07:51:48 +05:30
Abhishek
0b4adf198d
Add recaptcha verification for user signup on the server (#3383)
Co-authored-by: Abhishek <abhishek.ak@bytedance.com>
2021-03-11 07:25:01 +05:30
Sumit Kumar
04e8acb763
Custom S3 service support (#3469)
- Provide support for non Amazon S3 service providers like Upcloud, Digital Ocean, Wasabi, DreamObjects and any other S3 compliant storage service provider.
- Change plugin label from "Amazon S3" to "S3"
2021-03-10 10:30:07 +05:30
Shrikant Sharat Kandula
bb9a9a307f
APIs for profile photos (#3260)
* Add API for uploading profile photos for current user

* Add delete and get APIs for profile photos

* Add test for uploading and deleting profile photo

* Added negative tests for upload profile photo API
2021-03-09 17:03:20 +05:30
Trisha Anand
38c0151e94
Changed order of message for easy grep in case of invalid dynamic binding path (#3436) 2021-03-08 16:05:05 +05:30
Trisha Anand
79164fde44
Only return request object in action execute if the action was executed in EDIT mode. (#3426) 2021-03-08 16:04:17 +05:30
Sumit Kumar
800d305dab
Gracefully handle the timeout overflow / out of expected range errors (#3411)
- Expect max value of timeout as 60000 ms.
- If value exceeds max value then add error message to the list of invalids. This list is returned to the client in response body.
- Detect integer overflow exception (Number format exception) and override the value to 60000 ms.
2021-03-05 17:09:29 +05:30
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