Commit Graph

95 Commits

Author SHA1 Message Date
nupur
d0e60a1890
Mysql plugin integration (#53)
This commit adds the Mysql plugin to the Appsmith server. We also add a migration to ensure that this plugin is installed by default for all existing organizations. The migration also adds the plugin details into the DB.

Also adding the test cases for mysql plugin.

Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Co-authored-by: Hetu Nandu <hetu@appsmith.com>
Co-authored-by: Arpit Mohan <me@arpitmohan.com>
Co-authored-by: Nupur Singhal <nupursinghal@Nupurs-MacBook-Air.local>
2020-07-21 16:01:42 +05:30
Trisha Anand
8734067cad
Resolving the dependabot vulnerabilities. (#69) 2020-07-09 21:12:16 +05:30
Shrikant Sharat Kandula
ff3c0c0451 Fix column ordering not being consistent in responses from PostgresPlugin 2020-07-07 10:56:56 +05:30
Shrikant Sharat Kandula
8c113834d6
Fix error when dealing with null value columns in Postgres plugin (#46) 2020-07-07 10:52:09 +05:30
Shrikant Sharat Kandula
afe0dfdc75
Dates from Postgres queries now show up as ISO date strings (#5)
* Dates from Postgres queries now show up as ISO date strings
* Use constant for date column name in PostgresPlugin
* Fix formats for more date-time types on Postgres
* Add support for time and timestamp data types in Postgres plugin
* Add support for timestamptz column data type in Postgres plugin
* Add support for interval data type in PostgresPlugin
2020-07-06 18:52:41 +05:30
Shrikant Sharat Kandula
f0658d69b2
Read RapidAPI variables directly form environment (#38) 2020-07-06 14:56:39 +05:30
Shrikant Sharat Kandula
56547ec02f
Move application configuration to be loaded from environment variables (#23)
* Move application configuration to be loaded from environment variables
* Remove unused sentry.properties
* Make missing value sentinel a constant and ignore all *.env files
* Removed now-used ACL properties
* Prefix RapidAPI environment variable with APPSMITH_
* Fix application properties not being loaded into static fields
* Remove application-test.properties file
* Add required env variables for test in GitHub
* Quote URLs for MongoDB and Redis in test config
* Change RAPIDAPI to RAPID_API in environment variable names
* Source .env file in the root of repo in start script
2020-07-06 14:35:56 +05:30
Shrikant Sharat Kandula
0dd1114917
Clean up MongoDB object types before sending data to client (#8) 2020-07-01 16:40:39 +05:30
Arpit Mohan
b63ca6726d Merge branch 'feat/plugin-templates' into 'release'
Add server-side templates support for plugins

Two main themes in this MR:

1. Add support for saving query templates as resource files inside a plugin. This has been done for both Postgres and MongoDB plugins, based on current template contents.
2. Loading of form JSON is now reactive. The blocking call has been moved inside a `Mono.fromSupplier`.
3. The loading of from JSON as well as the templates is cached and are loaded on-demand. This means that the templates are loaded once for a plugin through the lifetime of the server process, and that they are loaded only at the first time they are needed.
4. If loading of these resources fails, we try again when they are needed the next time.

See merge request theappsmith/internal-tools-server!385
2020-06-24 11:08:25 +00:00
Shrikant Kandula
eee2cfcaff Add server-side templates support for plugins 2020-06-24 11:08:25 +00:00
Shrikant Kandula
40b5466bd8 Fill response body with value when running findAndModify Mongo query 2020-06-24 11:05:19 +00:00
Shrikant Kandula
522e6221f7 Make NO_SSL the default for Mongo datasources 2020-06-24 11:02:34 +05:30
Trisha Anand
cd30e36eaa Hacky solve for setting the action execution request in case of failures in URL/HTTP Method/etc. 2020-06-19 23:43:32 +05:30
Trisha Anand
0603da29ee User test - Add request URL and http method to the execution result 2020-06-19 16:24:58 +00:00
Trisha Anand
73757c3425 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	.gitignore
#	appsmith-plugins/mongoPlugin/plugin.properties
#	appsmith-plugins/postgresPlugin/plugin.properties
#	appsmith-plugins/rapidApiPlugin/plugin.properties
#	appsmith-plugins/restApiPlugin/plugin.properties
#	appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
#	appsmith-server/src/main/java/com/appsmith/server/constants/FieldName.java
#	appsmith-server/src/main/java/com/appsmith/server/repositories/ActionRepository.java
#	appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java
#	appsmith-server/src/main/java/com/appsmith/server/services/DatasourceContextServiceImpl.java
#	appsmith-server/src/main/java/com/appsmith/server/services/DatasourceServiceImpl.java
#	appsmith-server/src/test/java/com/appsmith/server/services/ActionServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/ApplicationServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/LayoutServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java
#	build.sh
2020-06-12 19:14:31 +05:30
Arpit Mohan
01737b9599 Experimenting with maven-shade-plugin to create a fat-jar of the postgres dependency.
Will have to do this for all plugins. Currently, it's not registering the plugin with the SpringPluginManager
2020-06-10 11:11:23 +00:00
Shrikant Kandula
1ce336257c Mark any 2xx status code in REST API plugin as successful execution. 2020-06-10 10:51:07 +00:00
Arpit Mohan
3cf8ff008f Hacky fix for the postgres plugin to work. Including the dependency in the appsmith-server/pom.xml file instead of the plugin 2020-06-10 10:46:09 +05:30
Arpit Mohan
bbd33c2968 Removing the query field in ActionConfiguration and using String body as the field to store the query
This is to simplify the query pane on the frontend client. The client doesn't need to have separate interfaces for sql and non-sql plugins. All queries will be sent to the server in the form of a String that is parsed in different formats based on the plugin.

Also adding test cases for PostgresPlugin. Used TestContainers to simulate the postgres db in Docker inside the Java test itself. Very useful.
2020-06-09 12:12:27 +00:00
Arpit Mohan
99e7519550 Handling form data via the field bodyFormData in ActionConfiguration
This is because the client sends us the data for form-data in the form of a list of Property fields with keys and values. This is consistent with how the client stores & renders headers & query parameters as well.
For MediaType application/x-www-form-urlencoded we will use the bodyFormData field.
2020-06-09 05:48:16 +00:00
Shrikant Kandula
c18c344f4b Don't fail after executing a non-SELECT query on Postgres. 2020-05-15 18:13:36 +05:30
Arpit Mohan
fb9e9fbf4c Request body and header in Action Execution Response 2020-05-14 02:08:46 +00:00
Trisha Anand
5829a92998 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java
2020-05-13 23:37:31 +05:30
Shrikant Kandula
9c48f42990 Rename ActionExecutionResult.shouldCacheResponse -> isExecutionSuccess. 2020-05-12 18:25:49 +05:30
Nikhil Nandagopal
5dad85ff3e Update form.json 2020-05-12 09:48:56 +00:00
Shrikant Kandula
f3e448019d Auth mechanism is not added to URI in the MongoPlugin. Fixed now. 2020-05-11 12:16:09 +05:30
Trisha Anand
f7bb87824c Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-server/src/main/java/com/appsmith/server/domains/User.java
2020-05-08 20:57:51 +05:30
Shrikant Kandula
3e2dea8f84 Merge branch 'bug/hide-exception-class-in-plugin-error-message' into 'release'
Hide Exception class details in the Plugin error message.

See merge request theappsmith/internal-tools-server!321
2020-05-05 11:08:38 +00:00
Shrikant Kandula
e99c104fe7 Hide Exception class details in the Plugin error message. 2020-05-05 16:34:09 +05:30
Nikhil Nandagopal
8f95fe22a9 Update form.json 2020-05-05 10:46:58 +00:00
Nikhil Nandagopal
c4f3ccfd8b Update form.json 2020-05-05 10:34:02 +00:00
Shrikant Kandula
57dc2205e2 Add missing default database field in Mongo plugin form. 2020-05-05 13:39:03 +05:30
Trisha Anand
c43218eea6 Merge branch 'release' into feature/acl-spring-object 2020-05-01 17:05:43 +05:30
Shrikant Kandula
8ea8fb295e Handle 500 when JSON body doesn't make up an object data type. 2020-04-30 13:32:24 +00:00
Trisha Anand
bc99ce9244 Merge branch 'release' into feature/acl-spring-object 2020-04-30 17:50:32 +05:30
Shrikant Kandula
c8e8c9136d Check the value of Content-Type before trying to make an HTTP call. 2020-04-30 16:50:17 +05:30
Shrikant Kandula
50a8bad19e Merge branch 'bug/restapi-test-without-port' into 'release'
Fix testing of REST API datasources fails when no port is set.

See merge request theappsmith/internal-tools-server!307
2020-04-30 06:02:28 +00:00
Shrikant Kandula
be7f1c0a81 Fix testing of REST API datasources fails when no port is set. 2020-04-30 06:02:28 +00:00
Shrikant Kandula
06e85c308f Update form.json for datasource configurations. 2020-04-29 16:25:30 +05:30
Trisha Anand
2d1fe9d8b4 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-interfaces/src/main/java/com/appsmith/external/models/SSHPrivateKey.java
#	appsmith-server/src/main/java/com/appsmith/server/filters/AclFilter.java
#	appsmith-server/src/main/java/com/appsmith/server/services/CurlImporterService.java
#	appsmith-server/src/test/java/com/appsmith/server/services/CurlImporterServiceTest.java
2020-04-28 18:13:06 +05:30
Shrikant Kandula
23bd4e1722 Add NO_SSL option to SSL authType to turn off SSL explicitly. 2020-04-28 12:31:34 +00:00
Shrikant Kandula
e0880c7d31 Support separate default database for MongoPlugin, besides authDatabase. 2020-04-23 11:09:02 +00:00
Trisha Anand
a8f32d8b2a Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-server/src/main/java/com/appsmith/server/services/MarketplaceService.java
2020-04-23 14:45:40 +05:30
Nikhil Nandagopal
18acf373f5 Update form.json 2020-04-23 06:08:25 +00:00
Trisha Anand
dacc6a5c9e The header key should be matched to all possible variations : Content-Type, content-type, etc. This fixes that. 2020-04-22 18:13:31 +05:30
Shrikant Kandula
3ad98a4367 Support SSL connections with self-signed from MongoPlugin. 2020-04-21 18:53:30 +05:30
Shrikant Kandula
3dfc62034f Merge branch 'feature/datasource-form-config-apis' into 'release'
Add form config JSONs for individual plugins and an API for GETting them.

See merge request theappsmith/internal-tools-server!295
2020-04-21 12:23:23 +00:00
Shrikant Kandula
58c0f94508 Add form config JSONs for individual plugins and an API for GETting them. 2020-04-21 17:42:14 +05:30
Shrikant Kandula
9f2427f1df Merge branch 'bug/mongo-plugin-test-on-unavailable-host' into 'release'
Fix MongoPlugin test returning success even when host is unavailable.

See merge request theappsmith/internal-tools-server!294
2020-04-21 10:22:50 +00:00
Shrikant Kandula
d94a231934 Fix MongoPlugin test returning success even when host is unavailable. 2020-04-21 15:39:44 +05:30