Commit Graph

698 Commits

Author SHA1 Message Date
Arpit Mohan
a4132d5845 Adding the widget names set to the default layout for a page 2020-06-16 10:50:07 +05:30
Arpit Mohan
a2a4cbb2d7 Merge branch 'hotfix/plugin-fat-jar' into 'release'
Creating a fat jar for plugins

The plugins should be completely independent of the appsmith-server. Earlier, the plugins were picking their dependencies from the main appsmith-server maven module. 

Now using the maven-shade-plugin, they are an independent entity and completely self sufficient. The only exception is restapi-plugin & rapidapi-plugin because they inherit from spring-boot-starter which is not compatible with the maven-shade-plugin.

See merge request theappsmith/internal-tools-server!377
2020-06-10 11:11:23 +00:00
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
Trisha Anand
f00c9c23c8 Merge branch 'bug/mark-2xx-as-success-restapi-plugin' into 'release'
Mark any 2xx status code in REST API plugin as successful execution.

See merge request theappsmith/internal-tools-server!372
2020-06-10 10:51:07 +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
f74e8a45be Merge branch 'feature/query-action-configuration' into 'release'
Remove the query field in ActionConfiguration and use body instead

The client code is getting complicated because of the difference in SQL and non-SQL handling of the query field in actionConfiguration. If we expect the request to be sent in the `body` field, the plugin can parse the String body however it feels like.

See merge request theappsmith/internal-tools-server!340
2020-06-09 12:12:27 +00:00
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
Trisha Anand
8ff7c56e64 Merge branch 'feature/rest-form-data' into 'release'
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.

See merge request theappsmith/internal-tools-server!370
2020-06-09 05:48:16 +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
Arpit Mohan
1a68b7f561 Fixing the DSL Json for default layouts in new pages. 2020-06-04 16:13:47 +05:30
Arpit Mohan
c6a87eba51 Merge branch 'hotfix/change-default-page-name' into 'release'
Modifying the default page name to Page1

Also creating a default empty layout when a new page is created. This ensures that the client can show the default message on new page creations.

See merge request theappsmith/internal-tools-server!363
2020-06-04 08:16:54 +00:00
Arpit Mohan
1ac69bab50 Modifying the default page name to Page1
Also creating a default empty layout when a new page is created. This ensures that the client can show the default message on new page creations.
2020-06-04 13:05:34 +05:30
Arpit Mohan
d20e92a587 Modifying the Action object to include an array of Property for dynamicBindingPathList 2020-05-27 13:16:38 +05:30
Arpit Mohan
6630446506 Merge branch 'feature/dynamic-binding-action' into 'release'
Adding dynamicBinding to Action

Also adding the status code to ActionExecutionResult when plugin returns with an error.

See merge request theappsmith/internal-tools-server!356
2020-05-26 11:50:09 +00:00
Arpit Mohan
9f82bde92c Adding statusCode from AppsmithPluginErrors when plugins error out
This ensures that we can always display a status code on the client.
2020-05-26 11:50:09 +00:00
Arpit Mohan
a569156029 Merge branch 'hotfix/action-error' into 'release'
Creating the actionExecutionResult object for error scenarios as well.

See merge request theappsmith/internal-tools-server!354
2020-05-23 07:23:13 +00:00
Arpit Mohan
e6b7ffca9c Creating the actionExecutionResult object for error scenarios as well.
This ensures that we can populate the request fields for all action executions
2020-05-23 12:49:01 +05:30
Arpit Mohan
0ee1699603 Merge branch 'bug/datasources-name-clashes' into 'release'
Use sequences for numbering new datasources.

Introduces a new collection in the database, `sequence`. We intend store one document per domain collection (hence a unique index on `name` field), which has a sequence number. The number is *always* set to a value that can be used next and never been used before (hence the human-readable-name `nextNumber`). Of course, this holds true only if the collection is accessed through `SequenceService.getNext(DomainClass.class)`.

This MR also includes two migrations. One for adding a unique index on `sequence.name`. Another for setting an initial value for the `nextNumber` for datasources, such that the next new datasource has a unique name. We are computing this value based off of the existing datasources named `Untitled Datasource <number>`, finding the highest number in the names and incrementing it.

See merge request theappsmith/internal-tools-server!351
2020-05-20 11:21:32 +00:00
Shrikant Kandula
7037d99cfa Use sequences for numbering new datasources. 2020-05-20 11:21:32 +00:00
Shrikant Kandula
b13a7a5df3 Fix incorrect call to updatedAt. 2020-05-19 19:25:32 +05:30
Arpit Mohan
eae29e5cba Merge branch 'bug/datasource-without-updated-at' into 'release'
Fix NPE when using datasources without updatedAt.

Notion ref: <https://www.notion.so/appsmith/NPE-in-DatasourceContextServiceImpl-be9b92a0d71848aea89dd695cd784034>.

See merge request theappsmith/internal-tools-server!348
2020-05-19 13:48:58 +00:00
Shrikant Kandula
329587f5ff Fix NPE when using datasources without updatedAt. 2020-05-19 13:48:58 +00:00
Arpit Mohan
14c1778645 Merge branch 'bug/curl-auto-add-protocol' into 'release'
Automatically add protocol to URL provided to cURL command.

Notion ref: <https://www.notion.so/appsmith/CURL-import-for-incomplete-but-valid-URLs-like-www-google-com-leads-to-the-URL-not-getting-read-Th-9191456cb1b24cd68b92072c1a6f3ab6>.

See merge request theappsmith/internal-tools-server!343
2020-05-19 04:23:59 +00:00
Shrikant Kandula
db0532941d Automatically add protocol to URL provided to cURL command. 2020-05-19 04:23:58 +00:00
Arpit Mohan
85ea6563db Merge branch 'hotfix/server-use-forward-headers' into 'release'
Adding the ForwardedHeaderTransform bean to enable spring to parse...

Adding the ForwardedHeaderTransform bean to enable spring to parse X-Forwarded-* headers from Nginx proxy

See merge request theappsmith/internal-tools-server!344
2020-05-19 03:56:40 +00:00
Arpit Mohan
158f5c8203 Adding the ForwardedHeaderTransform bean to enable spring to parse X-Forwarded-* headers from Nginx proxy 2020-05-19 09:22:33 +05:30
Shrikant Kandula
bffd68b1a9 Merge branch 'bug/postgres-empty-result' into 'release'
Don't fail after executing a non-SELECT query on Postgres.

See merge request theappsmith/internal-tools-server!341
2020-05-18 13:42:24 +00:00
Shrikant Kandula
54febe1779 Merge branch 'feat/onload-actions' into 'release'
Added a boolean field to Actions to explicitly mark them for execution on page-load.

See merge request theappsmith/internal-tools-server!332
2020-05-18 12:13:54 +00:00
Shrikant Kandula
c4d3d535a1 Rename isExecuteOnLoad to executeOnLoad.
The `is` prefix apparently makes Spring unhappy.
2020-05-18 12:13:54 +00:00
Shrikant Kandula
c18c344f4b Don't fail after executing a non-SELECT query on Postgres. 2020-05-15 18:13:36 +05:30
Shrikant Kandula
98c38df397 Merge branch 'bug/stale-database-connections' into 'release'
Destroy connections in stale datasource contexts and create new ones.

See merge request theappsmith/internal-tools-server!338
2020-05-15 03:26:35 +00:00
Shrikant Kandula
180002a984 Handle errors when destroying stale connections.
This happens when the stale connection is an invalid connection object,
like when if it's created with invalid credentials etc.
2020-05-15 03:26:35 +00:00
Arpit Mohan
4fa254a449 Adding error log message whenever an action execution fails because of invalid datasource 2020-05-14 15:26:05 +05:30
Arpit Mohan
a9580effa7 Using the last value of duplicate headers as that is the behaviour displayed by webclient and other clients as well. 2020-05-14 08:49:06 +05:30
Arpit Mohan
cdabc8816b Merge branch 'hotfix/action-execute-duplicate-headers' into 'release'
Fixing bug where duplicate headers were being set in the action execution result

Also removing empty headers from being sent to the action

See merge request theappsmith/internal-tools-server!337
2020-05-14 02:50:14 +00:00
Arpit Mohan
71d8812feb Fixing bug where duplicate headers were being set in the action execution result
Also removing empty headers from being sent to the action
2020-05-14 08:11:24 +05:30
Arpit Mohan
8d38696b90 Merge branch 'feature/request-body-action-execute' into 'release'
Request body and header in Action Execution Response

The actionService.execute() flow now sets the request body and header in the action execute response. 
Will help the user debug the action better.

See merge request theappsmith/internal-tools-server!336
2020-05-14 02:08:46 +00:00
Arpit Mohan
fb9e9fbf4c Request body and header in Action Execution Response 2020-05-14 02:08:46 +00:00
Shrikant Kandula
1c33380820 Merge branch 'chore/rename-should-cache-field' into 'release'
Rename ActionExecutionResult.shouldCacheResponse -> isExecutionSuccess.

See merge request theappsmith/internal-tools-server!334
2020-05-12 13:50:56 +00:00
Shrikant Kandula
9c48f42990 Rename ActionExecutionResult.shouldCacheResponse -> isExecutionSuccess. 2020-05-12 18:25:49 +05:30
Arpit Mohan
d2d0805146 Merge branch 'feat/use-unique-name-on-post-datasource' into 'release'
Automatically use a unique name for creating datasources without name.

In the request from frontend for datasource creation, if the data
doesn't have a `name` value, we now set it to an automatically numbered
value and save with that.

See merge request theappsmith/internal-tools-server!333
2020-05-12 12:23:23 +00:00
Shrikant Kandula
b65690ec74 Automatically use a unique name for creating datasources without name.
In the request from frontend for datasource creation, if the data
doesn't have a `name` value, we now set it to an automatically numbered
value and save with that.
2020-05-12 16:05:29 +05:30
Nikhil Nandagopal
5dad85ff3e Update form.json 2020-05-12 09:48:56 +00:00
Arpit Mohan
f4d79ae25b Merge branch 'bug/curl-error-reporting' into 'release'
Report error when cURL command is invalid.

See merge request theappsmith/internal-tools-server!327
2020-05-12 04:12:55 +00:00
Shrikant Kandula
7f4d32e7d4 Report error when cURL command is invalid. 2020-05-12 04:12:55 +00:00
Arpit Mohan
4207de2c53 Merge branch 'bug/add-mongo-auth-type-to-uri' into 'release'
Auth mechanism is not added to URI in the MongoPlugin. Fixed now.

See merge request theappsmith/internal-tools-server!330
2020-05-12 04:11:47 +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
Shrikant Kandula
0e2320895c Merge branch 'bug/install-default-plugins-to-existing-orgs' into 'release'
Migration to install existing default plugins to existing organizations.

See merge request theappsmith/internal-tools-server!326
2020-05-08 07:12:50 +00:00
Shrikant Kandula
ffc4379a4d Migration to install existing default plugins to existing organizations. 2020-05-08 11:46:13 +05:30