Commit Graph

725 Commits

Author SHA1 Message Date
Arpit Mohan
ba9c2f0831 Modifying the base uri for oauth2 for release environment 2019-11-29 14:42:16 +05:30
Arpit Mohan
2b959f3af4 Renaming executorClass to packageName and adding uiComponent field to plugin object
This will allow the frontend to be able to dynamically load the component based on the configuration provided in the plugin object.
2019-11-29 13:43:13 +05:30
Trisha Anand
de2bd38e9d Dsl actions now store not just the ids but also the name, plugin type and json path keys. 2019-11-29 07:16:16 +00:00
Arpit Mohan
473bba594a Updating redis properties for heroku environment 2019-11-28 19:01:56 +05:30
Arpit Mohan
8a442d429c Dummy commit to trigger Heroku deployment 2019-11-27 16:37:03 +05:30
Arpit Mohan
fdb2f7a25d Adding query parameters to filter get API calls. Specifically adding filter by plugin type in the get plugins API. 2019-11-27 10:51:43 +00:00
Arpit Mohan
dea2efa776 Merge branch 'feature/oauth2-custom-url' into 'release'
Adding the base uri for google oauth2 redirect uri

This is required because when we host the server in a docker container, by default the baseUri picked up by Spring security is the DNS name of the appsmith server inside the docker networking bridge. These names may not be valid DNS names that Google can redirect to in the event of a successful Oauth2 login. Hence, we are overriding the base uri with our own uri for each environment.

The customer will have to provide this uri when they host it on their internal networks. This uri must be publicly accessible for Oauth2 to work.

See merge request theappsmith/internal-tools-server!90
2019-11-27 08:34:57 +00:00
Arpit Mohan
92ad45091d Adding the base uri for google oauth2 redirect uri
This is required because when we host the server in a docker container, by default the baseUri picked up by Spring security is the DNS name of the appsmith server inside the docker networking bridge. These names may not be valid DNS names that Google can redirect to in the event of a successful Oauth2 login. Hence, we are overriding the base uri with our own uri for each environment.

The customer will have to provide this uri when they host it on their internal networks. This uri must be publicly accessible for Oauth2 to work.
2019-11-27 13:57:01 +05:30
Trisha Anand
b0452b74c6 Datasources are now returned only for the organization of the current user. 2019-11-27 08:22:29 +00:00
Trisha Anand
606c09067e Fixes the test cases : create for PageService and ApplicationService is no longer used. Instead ApplicationPageService provides createPage and createApplication for the same. Updated the test cases to use the correct service to do this. 2019-11-27 08:17:46 +00:00
Arpit Mohan
e492bf2622 Fixing stupid bug in action execution timeout. Applying only on the action execution instead of the whole execute function 2019-11-27 02:10:01 +05:30
Trisha Anand
7e6e19e14e PageController : Find pages by application name instead of application id. This first fetches the application from name and then fetches pages using the application id. 2019-11-26 12:21:20 +00:00
Trisha Anand
0fd6351a76 Added timeout on the plugin execution.
Next TODO : Make the timeout duration configurable
2019-11-26 11:34:27 +00:00
Trisha Anand
4c0aa5956e Converted list to set to ensure unique action ids in the list of actions per dsl 2019-11-21 07:44:20 +00:00
Trisha Anand
781788f4a3 Extracting mustache keys from layout and finding all the action names from the same. This is then stored to the layout 2019-11-21 07:30:07 +00:00
Trisha Anand
9a4fea1c56 Updates for getting the test cases for Organization service to run. Since unique name is a new constraint added, the old test cases didnt account for the same. 2019-11-19 09:02:14 +00:00
Trisha Anand
44e17eef7b Added fields : flag isValid & string array of invalids to track if an action/datasource is invalid and what are the invalidities. This allows for the creation of actions and datasources even if they are invalid. Each update to the object leads to new computation of the validity.
When executing the isValid flag is tested and if false, the execution is stopped.
2019-11-18 12:20:10 +00:00
Arpit Mohan
c5445533f3 Merge branch 'master' into 'release'
Merging master into release to sync up the branches

See merge request theappsmith/internal-tools-server!78
2019-11-18 08:46:59 +00:00
Arpit Mohan
8fbf61502f Creating dockerfile that creates the server image.
Also modifying .gitlab-ci file to push docker image to the registry
2019-11-14 12:50:37 +00:00
Trisha Anand
31cf94f08e 1. Added datasource validator function in the plugin interface which simply returns true for all the current plugins.
2. Added static method getPluginExecutor as a util function which removes duplicate code from across different files.
2019-11-14 08:50:02 +00:00
Arpit Mohan
f62cd1f21a Endpoint to view published page using just PageId. The layoutId is no longer required. 2019-11-14 07:06:34 +00:00
Trisha Anand
0d21680f08 Action only with name now supported 2019-11-13 12:26:12 +00:00
Arpit Mohan
f4daa33493 Adding CRUD API for configurations. The name for the config will be unique across the dataset. 2019-11-13 12:17:32 +00:00
Trisha Anand
f81e22b1a5 Adding the capability to associate a user with multiple organizations 2019-11-13 10:23:23 +00:00
Trisha Anand
55a29c448c Datasource without any configuration is not valid. Deter the user from creating one in such a scenario 2019-11-13 06:08:36 +00:00
Trisha Anand
df904539ca Datasource instead of DatasourceId is expected as part of Action. During create and update action, datasource can also be created, which is automatically saved as part of datasource collection 2019-11-13 05:51:01 +00:00
Trisha Anand
41be720335 Get all actions returns them in sorted order 2019-11-12 09:59:29 +00:00
Trisha Anand
cb4493dc2d Datasource instead of DatasourceId is expected as part of Action. During create and update action, datasource can also be created, which is automatically saved as part of datasource collection 2019-11-12 09:58:14 +00:00
Trisha Anand
e6d9f1df88 Datasource instead of DatasourceId is expected as part of Action. During create and update action, datasource can also be created, which is automatically saved as part of datasource collection 2019-11-12 09:15:09 +00:00
Arpit Mohan
aac31235f6 Merge branch 'master' of gitlab.com:theappsmith/internal-tools-server
# Conflicts:
#	appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
#	appsmith-server/src/main/java/com/appsmith/server/services/ResourceContextServiceImpl.java
2019-11-07 14:28:09 +05:30
Trisha Anand
63c0f07708 Query param handling has been added to Rest API plugin using URIComponentsBuilder 2019-11-06 12:30:56 +00:00
Arpit Mohan
bcda3f0feb Renaming all the references of resource to datasource
This renaming is reflective of the entity and it's potential values in the future.
2019-11-06 16:25:08 +05:30
Trisha Anand
3c1b08d911 Page Controller now can return list of pages by application id and list of page names & ids by application id 2019-11-05 11:49:52 +00:00
Trisha Anand
3f968afac6 Page Controller now can return list of pages by application id and list of page names & ids by application id 2019-11-05 11:36:10 +00:00
Arpit Mohan
0c0956ca46 Adding ACL bundle for datasources API 2019-11-05 16:36:09 +05:30
Arpit Mohan
3622d8b0d3 Converting actionConfiguration to a string to extract mustache keys
Also making jsonPathKeys a read-only field. Cannot be written via the API.
2019-11-05 10:40:09 +00:00
Trisha Anand
00fa2e80f7 Added ActionCollectionService which would act on composite functions. Need to handle all scenarios here. 2019-11-05 09:39:54 +00:00
Trisha Anand
bd846bfc8d Fix for dsl getting rewritten 2019-11-05 07:37:39 +00:00
Trisha Anand
68e30ff297 Handles empty params in a request 2019-11-05 05:51:14 +00:00
Trisha Anand
daeba007a1 Bug/rest api 2019-11-04 11:20:18 +00:00
Arpit Mohan
023ef93969 Fixing Heroku credentials again. Need to find permanent solution to this. 2019-11-01 08:52:20 +01:00
Arpit Mohan
00cd806259 Changing the Redis credentials because Heroku changed them again 2019-10-28 13:15:02 +01:00
Arpit Mohan
d17927e1f8 Reducing data response for application publish API
Instead of sending complete application information, we now only send the boolean true or false value to indicate to the client the success or failure of the publish action
2019-10-24 15:41:38 +05:30
Arpit Mohan
2bd8113229 Moving JsonPathKeys from Page document object to Action
This is to ensure that the Action object is independent by itself and the client can derive the mustache keys by looking at the action object directly.
2019-10-24 12:38:52 +05:30
Arpit Mohan
314cdd29d9 Handling error in RedisListenerConfig
When we shut down the server, the redis subscription is not closed cleanly leading to the server to hang. Adding an error handler solves for this issue.
2019-10-23 05:20:44 +00:00
Trisha Anand
d178b1c729 Publishing an application has been implemented by introducting publishedDsl field inside Layout. On Publish, for all pages in the application, for all layouts inside each page, the dsl json object is copied into the publishedDsl json object. 2019-10-23 04:41:51 +00:00
Trisha Anand
f8dddb212f Action Service - Delete 2019-10-21 14:01:21 +00:00
Trisha Anand
8ac0203b83 Fixing stupid bug in the acl rego file 2019-10-21 18:39:41 +05:30
Arpit Mohan
6eb7311197 Adding the permissions for fetching and updating applications & groups.
Also adding permission for deleting actions
2019-10-21 12:57:36 +05:30
Trisha Anand
74a8466528 Analytics Service now caters to all the events that need to be published. Every service should now call the analytics service's sendEvent function for tracking events. 2019-10-18 13:45:18 +00:00
Trisha Anand
84837fe57f Mongo Plugin works here. Barring the scenarios where the query json contains special characters in keys ($, .) it works properly. 2019-10-18 08:27:19 +00:00
Arpit Mohan
3a9f344a51 Removing plugins from appsmith-interfaces module 2019-10-17 09:25:58 +05:30
Arpit Mohan
135b61a4bc Adding mongo seed data that will be recreated whenever docker-compose causes the containers to restart
Note that we have to delete the Mongo volume for the inidtb script to take effect. Else, it will not execute. To be used only for testing right now. Will figure out a more robust solution later.

Also using Google's JIB Maven plugin to reduce our Docker image footprint. Will make container upload and download much faster
2019-10-16 11:27:02 +00:00
Arpit Mohan
f51de50725 Adding more acl rules for properties and action controllers 2019-10-14 12:29:20 +00:00
Arpit Mohan
cf5b2c325b Adding a folder for public resources in order to serve OPA bundle
Open Policy Agent requires a bundle in the form of tar.gz in order to bootstrap itself with base policy and data. The server will serve this policy under the public domain. In the future, we will enable a Basic Authentication scheme in order to lock down this pocliy.
2019-10-14 09:24:09 +00:00
Trisha Anand
e1d59ca3a6 Multi data source support for plugins using Resource Context 2019-10-11 10:32:18 +00:00
Arpit Mohan
632aff4faa Adding basic ACL functionality with Open Policy Agent.
Currently, ACLFilter communicates with the OPA daemon to determine if the request should be validated or not based on the resource and permissions in user and group
2019-10-11 10:31:28 +00:00
Trisha Anand
7315802508 Fixing redis connection changes 2019-10-10 11:53:03 +00:00
Trisha Anand
d1bcc282f8 Adding the redis listener via spring-data-redis-reactive.
The listeners need to be configured in the RedisConfig class via Beans. These beans can then invoke complex business logic based on requirements.
2019-10-07 09:02:02 +00:00
Arpit Mohan
ad22e1a406 Adding the redis listener via spring-data-redis-reactive.
The listeners need to be configured in the RedisConfig class via Beans. These beans can then invoke complex business logic based on requirements.
2019-10-07 08:18:54 +00:00
Trisha Anand
59752254b4 On install, the plugins are loaded and started again. This ensures that we don't have to restart the server every time a new plugin is installed. Earlier the plugins were loaded and started only during the boot 2019-10-04 04:27:11 +00:00
Trisha Anand
8658df95a9 All action executions now return object of type ActionExecutionResult. RestApiPlugin returns the same object which contains statusCode, headers and body. 2019-09-30 18:17:35 +00:00
Trisha Anand
51d5c93119 Fixing minor bugs in the Segment analytics flow 2019-09-25 17:06:28 +00:00
Trisha Anand
566a245451 Segment & Rollbar Integration 2019-09-25 16:20:51 +00:00
Trisha Anand
bec8b2e0a1 Adding the docker-compose up command to the build
This should ideally run the mongo-seed container to restore the DB before each run
2019-09-24 12:14:41 +00:00
Trisha Anand
de55ec8f8e Property Pane for Widget 2019-09-24 11:40:53 +00:00
Arpit Mohan
280f8d4dcb Fixing the Cors configuration to ensure that pre-flight requests return the Access-Control-Allow-Origin header 2019-09-18 09:45:00 +00:00
Arpit Mohan
ac44e2c970 Modifying the ResponseDTO to contain the ResponseMeta object. Also moving ErrorDTO inside ResponseMeta object.
This also fixes the logic for multiple ResponseDTOs that were being sent when the service level response was a Flux. Now we only return a single array inside a Mono ResponseDTO object.
2019-09-18 08:52:14 +00:00
Arpit Mohan
0edc0f6363 Adding the executeAction API in the ActionController.
Also changed the interface for the PluginExecutor to include the resourceConfig and ActionConfig as well.
2019-09-17 12:18:23 +00:00
Trisha Anand
4498a301a6 Docker 2019-09-17 09:35:13 +00:00
Trisha Anand
14ec5260d9 Incorporated review comments from Nikhil on action 2019-09-17 07:23:30 +00:00
Trisha Anand
5468436d9f Add Page Actions to Page object. 2019-09-17 06:25:07 +00:00
Arpit Mohan
bb84e74c23 Re-arranging the files to fix bad merge that threw compile errors 2019-09-16 17:04:07 +05:30
Arpit Mohan
661111daaa Setting java version to 11 in system.properties.
This is required by Java Heroku buildpack
2019-09-16 16:54:28 +05:30
Arpit Mohan
b3c987a9f9 Convert the project into a multi-module structure
We are moving to a multi-module structure so that different parts of the codebase can be exposed to the public while others can remain private. Using pf4j for plugin framework.

Also adding a build script `build.sh` which compiles the code and creates the `dist` folder for distribution purposes. Now we can build the code via

```
$ ./build.sh -DskipTests
```
2019-09-16 11:21:57 +00:00