Commit Graph

717 Commits

Author SHA1 Message Date
Arpit Mohan
790ad71a2c
Adding more details to Contributing.md for server compilation (#582) 2020-09-19 12:56:42 +05:30
Arpit Mohan
64549e4b06 Removing cacheResponse from the JSON response for actions (#564)
This is because this `cacheResponse` field is only used for auto-complete on the UI. The user can still run the action manually and get the auto-complete to work. The downside to sending the `cacheResponse` field in the JSON response is that for large responses, the client times out as our response times increase to 20 secs. Hence removing this for now.

In future, we'll extract the JSON schema structure from the response body and send that to the client for populating auto-complete.
2020-09-18 13:19:56 +05:30
Nikhil Nandagopal
cac15f2cac
Update welcomeUserTemplate.html 2020-09-16 18:40:43 +05:30
Trisha Anand
423b7eb176
Added confirmBeforeExecute field in action view dto which is returned only during view mode. (#547)
* Added `confirmBeforeExecute` field in action view dto which is returned only during view mode.

* Added test for fetch actions in view mode.
2020-09-15 15:22:35 +05:30
Shrikant Sharat Kandula
e551043080
Fix plugin executions/test/structure breaks when auth is null (#544) 2020-09-15 12:09:49 +05:30
Shrikant Sharat Kandula
6c7e45d010
Add a connection type variable for Plugin implementations (#531)
* Add a connection type variable for Plugin implementations

This type variable is intended to represent the type of the
connection object, if any, that the plugin will use. This will
help make the implementations more robust by leveraging Java's
type checking instead of rudimentary type casts over the
connection objects.

* Fix missing typevar usage
2020-09-14 20:36:47 +05:30
Shrikant Sharat Kandula
3f5930e52e
Add datasource structure support for DB plugins (#523)
* Base interface for getting datasource structure for databases

* Add keys and constraints to structure for Postgres datasources

* Use connection from datasource context for computing structure

* Refactor context retrying into a separate method

* Add base datastructures for templates in entity explorer

* Fix spring circular dependency

* Add test for postgres datasource structure

* Generate column names and sample values for INSERT query

* Add LIMIT clause to generated SELECT query

* Fix tests for generated SELECT query

* Minor refactoring
2020-09-14 18:59:11 +05:30
Trisha Anand
069dd53e32
Changing spelling of colour to match the front-end used spelling. (#532) 2020-09-11 12:31:07 +05:30
Arpit Mohan
2a3ccd7e25
Removing SSH Tunnel from Mongo & Postgres plugins (#529)
We don't yet support this feature hence removing it from the UI. Will add it back again once the backend supports SSH tunnelling.
2020-09-10 18:29:49 +05:30
Nikhil Nandagopal
3b4db07697
Update welcomeUserTemplate.html 2020-09-10 16:20:00 +05:30
Nikhil Nandagopal
5fbe993541
Update welcomeUserTemplate.html 2020-09-10 16:01:35 +05:30
Nikhil Nandagopal
9063488acf
Update welcomeUserTemplate.html 2020-09-10 14:50:44 +05:30
Trisha Anand
9dcb7d5522
When on page load setting is changed, update layout must be called to update the onPageLoadActions field in the layout. (#467) 2020-09-10 14:30:30 +05:30
Shrikant Sharat Kandula
42545d1e88
Add migration to fix incorrect action IDs for onLoad (#519)
* Add migration to fix incorrect action IDs for onLoad

* Remove redundant comments

* Fix migration to work with published onLoad actions as well

* Only update the action ID when correcting onLoad action IDs

* Fix migration name for correcting action IDs

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

* Fix migration id for correcting action IDs

* Reformat code

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-09-10 11:37:32 +05:30
Nikhil Nandagopal
96093426bf Merge branch 'release' 2020-09-07 23:13:05 +05:30
dependabot[bot]
41a51c2885
Bump bl from 2.2.0 to 2.2.1 in /app/server/scripts/node (#496)
Bumps [bl](https://github.com/rvagg/bl) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v2.2.0...v2.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 12:52:35 +05:30
Shrikant Sharat Kandula
f5f66229ec
Get list of application IDs to be cloned as examples from template config (#442)
* Get list of application IDs to be cloned as examples

* Fix tests so that apps to be cloned are explicit

* Add migration to set applicationIds for example cloning

* Fix example org cloning tests
2020-09-07 11:40:28 +05:30
Trisha Anand
a8a7955f41
Added new fields colour and icon in application required for homepage redesign project (#499) 2020-09-07 11:13:58 +05:30
Trisha Anand
437d04f045
Added a field to denote confirmBeforeExecute field whose functionality would be handled by the client. (#487) 2020-09-07 11:12:08 +05:30
Shrikant Sharat Kandula
3353962719
Fix MongoDB plugin update commands produce an empty response (#469) 2020-09-04 10:56:09 +05:30
Shrikant Sharat Kandula
59349fd03e
Fix column alias names in MySQL actions (#466)
* Fix aliases not showing up for MySQL actions

* Fix date column display for MySQL actions

* Fix datetime columns for MySQL actions

* Add support for timestamp and year data types for MySQL actions

* Fix column label for MySQL plugin

* Add tests for MySQL temporal data types

* Add tests for alias columns in MySQL and Postgres
2020-09-02 17:19:41 +05:30
Trisha Anand
3648a2b804
Returning an error in case the user tries to get all users. (#472) 2020-09-02 17:18:22 +05:30
Shrikant Sharat Kandula
54c75b26dd
Add a node.js script to dump examples organization (#448)
* Add a node.js script to dump examples organization

This dump file is used to setup initial examples organization
in a self-hosted setup.

* Remove unused variable

* Add npm run shortcut for dump script
2020-09-02 17:15:55 +05:30
Shrikant Sharat Kandula
91ad617904
Add validation for host values in DB datasources (#444)
* Add validation for host values in DB datasources

* Mild refactoring, for a dummy commit

* Add test for host name validation in datasources
2020-09-02 11:28:41 +05:30
Shrikant Sharat Kandula
223a735b87
Add API for uploading logo images for organizations (#376)
* Start with new controller for assets

* Progress on uploading logo image

* Saving and loading organization logo assets now works

* Remove existing logo asset before saving a new one

* Fix 500 when uploading logo for the first time

* Fix URL in response for uploading logo image

* Add test for uploading logo for ogranization

* Mild refactoring in tests
2020-09-02 11:28:15 +05:30
akash-codemonk
8f0015eaf3
Show validation errors if any for keyvalue fields (#445)
* Update host field with validation properties
2020-08-31 10:45:04 +05:30
Trisha Anand
dfabda6009
GET API actions recognized as page load actions should also be update… (#450)
* GET API actions recognized as page load actions should also be updated as executeOnLoad actions.

* Update action during updateLayout only if executeOnLoad is not set or is false.
2020-08-27 20:05:07 +05:30
Trisha Anand
a806935f82
Use a new API to set (unset) execute on load for an action. (#443) (#446) 2020-08-27 16:22:50 +05:30
Shrikant Sharat Kandula
9534eeef0a
Add logs to alert when cloned action id is unavailable (#441) 2020-08-27 12:46:04 +05:30
Trisha Anand
11eac73013
Clone application within the same organization (#414)
* WIP : First draft of clone applications

* Cloning of application now works correctly.

* Fixed the failing test case for page cloning.

* Added test case to assert the clone of application successfully.

* Minor function renaming to avoid confusion.

* Minor code refactoring to remove duplicate code.
2020-08-25 14:08:52 +05:30
Trisha Anand
8c20aeb95b
Example app being cloned must be set to private instead of public because public permissions are not given during cloning. (#418) 2020-08-25 11:12:55 +05:30
Trisha Anand
c253b7430b
1. Fixed the bug where policies are being set to empty during organization update (#415)
1. Fixed the bug where policies are being set to empty during organization update.
2. Added email field in organization.

* Updated the test case for update organization to assert the organization policies being present post the update.
2020-08-25 08:13:37 +05:30
Trisha Anand
ce41fec346
Bug fix : Example applications should have make public permissions for the administrator. (#416) 2020-08-25 08:12:13 +05:30
Shrikant Sharat Kandula
eb7dcd69a5
Fix MongoDB datasource testing fails due to unauthorized error (#402) 2020-08-24 12:23:38 +05:30
Shrikant Sharat Kandula
27b7f6c5e2
Fix test DS fails on datasources with direct mongo connection (#400) 2020-08-22 07:40:02 +05:30
Shrikant Sharat Kandula
ba72e21f7b
Add two more apps to examples org dump (#393)
* Add two more apps to examples org dump

* Fix undefined checks in example org dump
2020-08-21 19:53:16 +05:30
Shrikant Sharat Kandula
2a2dda0ab0
Fix race condition in setting default page in application (#394)
We are currently getting the *list* of all pages, updating the
`isDefault` fields inside, and then saving the whole *list* of
all pages. If a new page got added to that list in the DB during
this process, that page would be lost. This commit fixes this
problem.

This race condition was causing tests for cloning applications
to fail *sometimes*.
2020-08-21 16:31:40 +05:30
Shrikant Sharat Kandula
87f27c9182
Add two new/updated apps for self-hosted (#392)
* Add two new/updated apps for self-hosted

* Fix potential NPE when template org dump has API datasources
2020-08-21 14:37:35 +05:30
Shrikant Sharat Kandula
e97ceab412
Fix default page not being set for cloned applications (#383)
* Fix default page not being set for cloned applications

* Add test for setting default page in clone applications
2020-08-21 10:38:23 +05:30
Shrikant Sharat Kandula
27511c90d4
Users created won't have any orgs if a template is configured (#374) 2020-08-20 18:24:31 +05:30
Shrikant Sharat Kandula
3ae6c745b1
Initial implementation to import examples organization as a migration (#290) 2020-08-20 16:46:23 +05:30
Shrikant Sharat Kandula
bd670487a7
Redirect to forked application when signed up by clicking on Fork of a public example app (#335)
* Redirect to forked application works for direct login

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-08-20 14:15:54 +05:30
Shrikant Sharat Kandula
f57e2a2fb8
Refactor: Remove unused type parameter in AnalyticsService (#340)
* Move repeated code for analytics into functions inside AnalyticsService

* Fix type parameters in BaseService & BaseController
2020-08-20 10:47:22 +05:30
Trisha Anand
efab105e19
Clone Page feature inside an application (#357)
* Working version of cloning page given page id. The clone is created inside the same application and is in unpublished state.

* Added a test case for Clone Page feature

* Incorporated review comments.
2020-08-19 15:20:00 +05:30
Trisha Anand
82018547f5
Added tests to test invite user permissions for administrators and developers and make public app permissions for only administrators. Also added test to ensure that roles for an organization are being returned depending on the current user's roles. (#326) 2020-08-18 10:53:46 +05:30
Trisha Anand
336514344b
If an invited user follows the path of reset password (instead of sign up), this should be allowed. (#328) 2020-08-17 14:57:41 +05:30
Shrikant Sharat Kandula
a79951bae9
Don't always automatically create a blank personal org (#306)
* Don't always automatically create a blank personal org

It will still be created, only if a example template organization
has not been configured in the system.

* Name examples organization same as personal organization

* Minor fixes in tests

* Remove unused userService in clone tests
2020-08-14 15:30:52 +05:30
Shrikant Sharat Kandula
50e8ee7255
Fix link in invite emails to point to signup page (#268)
* Fix link in invite emails to point to signup page

* Auto-fill email in signup page and remove CreatePassword component
2020-08-14 11:31:50 +05:30
Trisha Anand
52e7ed4f02
Bug Fix : When role changes from developer to admin, the user was not being given make application public permission for the application (#302)
* During add role to an organziation, the application was only inheriting from subset of the organization permissions. Generalized this code to ensure that this doesnt happen again in the future when more permissions are introduced. Refactored some code as well.
2020-08-13 18:53:00 +05:30
Arpit Mohan
a9e16ee6c0
Adding dummy check in server build to satisfy required status checks (#296)
This is a hack to get around the fact that Github Actions doesn't support conditional status checks for monorepo PRs. Hence, we create similar jobs in the both server & client builds. In the server build, those jobs are dummy jobs that do nothing but satisfy the all-encompassing green tick so that PRs can be merged without using Admin privileges.
2020-08-13 14:50:34 +05:30