Commit Graph

712 Commits

Author SHA1 Message Date
Trisha Anand
b8b24604a6
[Bug] Update of an action leads to userSetOnLoad getting reset. (#2023)
* Update of an action leads to userSetOnLoad getting reset.

* Added test case to assert the same.
2020-12-04 13:07:34 +05:30
Shrikant Sharat Kandula
4a57a739b6
Render templates directly without Mustache (#2010)
* Render templates directly without Mustache

* Remove an unused variable
2020-12-03 14:38:31 +05:30
Shrikant Sharat Kandula
74cd362057
Firestore Integration (#1799)
* Adding the skeleton for Firestore integration

* Adding the datasource & query editor forms

Also adding the database changelog for the firestore plugin

Commenting out the firestore.close() connection because that causes issues with multiple Firestore tenants running in the same JVM.

* Adding the code for fetching the structure of collections from Firestore

* Use single document path field for Firestore

* Fix potential NPE when datasource destroy timeouts

* Work in progress on collection level ops for Firestore

* Get documents in a collection now works

* Add collection level querying support

* Mild refactoring

* Fix NPE when some fields are missing

* Hide clientJSON as a password field for Firestore

* Make collection level querying reactive

* Make reactive

* Validate before connecting

* Add tests for all supported methods in Firestore

* Fix forms for Firestore with hidden fields

* Hide limit and order by fields when not needed

* Restore log entry deleted by mistake

* Use S3 URL for Firestore/Firebase logo

* Add comments detailing why some code is commented

* Make parsing JSON reactive and fix subscribe calls

* Fix reactive scheduler

Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2020-11-23 18:42:33 +05:30
Trisha Anand
dc7a375543
Making postgres plugin blocking statements run on elastic threadpool. (#1821)
* Making postgres plugin blocking statements run on elastic threadpool.

* Moved the blocking calls to check for the connection validity, etc. also inside the Mono.fromCallable
2020-11-23 11:27:52 +05:30
Trisha Anand
c2d1ac973c
Adding thread name to the context of logs to allow for the thread names to be printed for each log. (#1824) 2020-11-23 10:45:15 +05:30
Trisha Anand
882df291d7
[Bug Fix] Indices not working for fetching actions during update layout (#1813)
Instead of using compound index, using single indices to ensure that both fetch actions by app id (during load of actions in edit/view mode) and fetch actions by page id (during update layout) are indexed queries.
2020-11-20 13:30:17 +05:30
Trisha Anand
63fe27fae1
[Bug Fix] : Clone Application creates corrupted clone when interrupted. (#1800)
* Doing a deep copy during clone application instead of updating the original application which may have been causing a concurrency bug.

* Ensuring that once the clone application flow is triggered, the flow completes eventually even if the client cancels the request before completion.

* Cloned application would not be public.

* Added parametrized Application constructor

* Removed lombok all args constructor

* Optimized import

* Incorporated review comments :
1. Updated the constructor for creating the application
2. Added a test case to assert that if during cloning of an application the flow gets cancelled, the cloning would still complete and ensure that the application created is sane.
2020-11-20 10:55:59 +05:30
Sumit Kumar
b03e815952
Change Sentry log 'environment' tag value. (#1789)
* Change Sentry log 'environment' tag value.

1. Change Sentry log 'environment' tag value to 'Properties' from 'properties'.
2020-11-19 17:29:48 +05:30
Arpit Mohan
9772d64c5b
Disable instance ping check when the disableTelemetry flag is set (#1776)
Also adding the APPSMITH_SEGMENT_CE_KEY as a build arg to the server Dockerfile. This will be used to set the environment variable in the Docker image itself.
2020-11-19 08:54:03 +05:30
Nidhi
941be8c58d
Fixed check for incorrect dynamic bindings (#1775)
* Fixed check for incorrect dynamic bindings
2020-11-18 14:25:55 +05:30
Shrikant Sharat Kandula
f36adeb6b5
Fix #1766: cURL parser eats backslashes in single-quotes (#1768) 2020-11-18 11:20:23 +05:30
Trisha Anand
fc3197b78f
Email sending is now non-blocking. The blocking code for email sending is triggered and then immediately returned. (#1762) 2020-11-18 00:31:39 +05:30
Arpit Mohan
c3a44651f2
Adding null check for dynamic binding path list (#1752)
* Adding null check for dynamic binding path list.

* Increased timeout duration for failing test

Co-authored-by: Nidhi <nidhi.nair93@gmail.com>
2020-11-17 15:38:48 +05:30
Trisha Anand
6ac04d8a9e
Added SLA bucket for metric evaluation for 1 second (#1740) 2020-11-17 12:47:49 +05:30
Nidhi
9de085f264
Switched to using dynamicBindingPathList for generic scan, supports DB queries and nested structures
* Switched to using dynamicBindingPathList for generic scan
2020-11-17 11:26:08 +05:30
Trisha Anand
a722b08002
Adding index for unpublishedAction.pageId to bring down the number of documents fetched in mongo db query during update layouts' fetching actions on page load. (#1739) 2020-11-16 18:59:04 +05:30
Sumit Kumar
2dc2615311
Replace Rollbar with Sentry (#1606)
* Replace Rollbar with Sentry

1. Log exceptions using Sentry instead of Rollbar.
2. Remove all Rollbar infra.
2020-11-10 09:59:10 +05:30
Nidhi
1741e61ba0
Added user roles list to application fetcher (#1624)
* Added user roles list to application fetcher

* Fixed blanket import
2020-11-09 11:54:30 +05:30
Nidhi
62e4e28c8e
Fixed upload logo payload limit and added delete logo API (#1574)
Also changed name of default organization to xyz's apps
2020-11-09 07:52:08 +05:30
Trisha Anand
24582a2e58
Adding server side performance tooling using spring metrics. (#1562)
* Experimenting with spring metrics, prometheus

* Added prometheus config in application.properties.

* Added a few more configurations for spring metrics to improve performance tooling.

* Added basic authentication to allow prometheus to scrape our monitoring data in an authenticated fashion.

* Only exposing prometheus end point at this junction instead of other metric endpoints as well.

* Fixed test case which failed because of actuator instantiating bean.
2020-11-05 14:33:40 +05:30
Sumit Kumar
6db7101662
Report selective errors to rollbar. (#1516)
* Report selective errors to rollbar.

1. Assign an action attribute to each AppsmithError enum item. Take action based on the action attribute.

* Fixing the condition for organization name being empty

* Report selective errors to rollbar.

1. Assign an action attribute to each AppsmithError enum item. Take action based on the action attribute.

Co-authored-by: Sumit Kumar <sumitsum@Sumits-MacBook-Pro.local>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2020-11-04 17:32:43 +05:30
Nidhi
fc4fca8bf0
Added fallback email to new organization from user email (#1536) 2020-11-04 12:57:17 +05:30
Nidhi
c7efe55c9c
Fixed timeout error message, added new type of error for plugin timeout (#1519)
* Fixed timeout error message, added new type of error for plugin timeouts

* Switched error code and added test for a secondary StaleConnectionException
2020-11-04 12:56:52 +05:30
Trisha Anand
936ddc4fa0
Added indexes on NewPage and NewAction. Also made changes to the sorting order of actions when read in view and edit mode. (#1527) 2020-11-03 13:15:51 +05:30
Arpit Mohan
d087b8152d Fixing the condition for organization name being empty 2020-11-03 07:58:22 +05:30
Dmitriy Danilov
26da9ce60b
fix(organization-service): add check that organization is not empty (#1120)
Fixes ##774
2020-11-02 20:35:12 +05:30
imgbot[bot]
f5924c6895
[ImgBot] Optimize images (#1513)
*Total -- 1,942.96kb -> 1,638.83kb (15.65%)

/app/client/src/assets/icons/header/save-loading.gif -- 14.17kb -> 5.67kb (59.99%)
/app/client/src/assets/images/Postman.png -- 10.34kb -> 4.63kb (55.24%)
/app/client/src/assets/images/Google.png -- 11.18kb -> 5.62kb (49.76%)
/static/appsmith_logo_primary.png -- 8.02kb -> 4.06kb (49.34%)
/app/client/src/assets/images/appsmith_logo.png -- 8.02kb -> 4.06kb (49.34%)
/static/logo.png -- 13.20kb -> 7.77kb (41.11%)
/app/client/src/assets/images/no_image.png -- 4.94kb -> 2.97kb (39.97%)
/app/client/src/assets/images/query-image-outline.png -- 1.65kb -> 1.01kb (38.71%)
/app/client/src/assets/images/404-image.png -- 141.37kb -> 94.81kb (32.93%)
/app/server/appsmith-server/src/test/resources/test_assets/OrganizationServiceTest/my_organization_logo.png -- 1.77kb -> 1.20kb (32.41%)
/app/client/src/assets/images/appsmith_logo_white.png -- 1.88kb -> 1.29kb (31.17%)
/app/client/src/assets/icons/control/play-icon.png -- 2.00kb -> 1.39kb (30.15%)
/Query.png -- 219.82kb -> 155.18kb (29.41%)
/app/client/src/assets/images/Github.png -- 4.17kb -> 2.94kb (29.36%)
/API.png -- 332.87kb -> 239.07kb (28.18%)
/static/logo-no-padding.png -- 17.63kb -> 12.84kb (27.16%)
/app/client/src/assets/images/Curl.png -- 40.68kb -> 32.55kb (19.99%)
/app/client/src/assets/icons/ads/logout.svg -- 0.94kb -> 0.76kb (19.38%)
/app/client/src/assets/icons/menu/datasource-column.svg -- 0.64kb -> 0.52kb (19.15%)
/static/API2.png -- 167.58kb -> 140.36kb (16.24%)
/static/Query2.png -- 118.59kb -> 102.85kb (13.27%)
/app/client/src/assets/icons/ads/context-menu.svg -- 0.52kb -> 0.45kb (12.99%)
/app/client/src/assets/icons/help/github-icon.svg -- 2.63kb -> 2.34kb (10.85%)
/app/client/src/assets/icons/ads/search.svg -- 0.26kb -> 0.25kb (3.73%)
/app/client/src/assets/icons/widget/slash.svg -- 0.19kb -> 0.18kb (3.59%)
/app/client/src/assets/icons/widget/plus.svg -- 0.30kb -> 0.29kb (3.58%)
/app/client/src/assets/icons/widget/modal.svg -- 0.20kb -> 0.19kb (2.99%)
/app/client/src/assets/icons/ads/frame.svg -- 0.50kb -> 0.48kb (2.96%)
/app/client/src/assets/icons/menu/explorer.svg -- 0.19kb -> 0.18kb (2.11%)
/app/client/src/assets/icons/control/lightning.svg -- 0.23kb -> 0.23kb (2.1%)
/app/client/src/assets/icons/ads/product.svg -- 0.34kb -> 0.33kb (2.03%)
/app/client/src/assets/icons/widget/container.svg -- 0.20kb -> 0.19kb (1.99%)
/app/client/src/assets/images/placeholder-image.svg -- 0.15kb -> 0.14kb (1.99%)
/static/Share5.png -- 143.35kb -> 140.55kb (1.95%)
/app/client/src/assets/icons/form/info-outline.svg -- 1.77kb -> 1.73kb (1.93%)
/app/client/src/assets/icons/ads/file.svg -- 0.36kb -> 0.35kb (1.89%)
/app/client/src/assets/icons/ads/success.svg -- 0.26kb -> 0.25kb (1.88%)
/app/client/src/assets/icons/widget/input.svg -- 0.32kb -> 0.31kb (1.84%)
/app/client/src/assets/icons/ads/create-new.svg -- 0.23kb -> 0.22kb (1.73%)
/app/client/src/assets/icons/ads/book.svg -- 0.52kb -> 0.51kb (1.69%)
/app/client/src/assets/icons/control/email.svg -- 0.17kb -> 0.17kb (1.69%)
/app/client/src/assets/icons/ads/down_arrow.svg -- 0.18kb -> 0.18kb (1.63%)
/app/client/src/assets/icons/ads/upper_arrow.svg -- 0.18kb -> 0.18kb (1.63%)
/app/client/src/assets/icons/ads/bag.svg -- 0.42kb -> 0.42kb (1.61%)
/app/client/src/assets/icons/control/compact.svg -- 0.55kb -> 0.54kb (1.59%)
/app/client/src/assets/icons/help/openlink.svg -- 0.70kb -> 0.69kb (1.53%)
/app/client/src/assets/icons/help/document.svg -- 0.80kb -> 0.79kb (1.47%)
/app/client/src/assets/images/logo.svg -- 2.61kb -> 2.57kb (1.46%)
/app/client/src/assets/icons/ads/manage.svg -- 0.27kb -> 0.27kb (1.42%)
/app/client/src/assets/icons/ads/error.svg -- 0.35kb -> 0.34kb (1.4%)
/app/client/src/assets/icons/ads/view-all.svg -- 0.21kb -> 0.21kb (1.39%)
/app/client/src/assets/icons/control/pick-location-initial.svg -- 0.50kb -> 0.49kb (1.38%)
/app/client/src/assets/icons/menu/storage.svg -- 0.21kb -> 0.21kb (1.36%)
/app/client/src/assets/icons/ads/calender.svg -- 0.51kb -> 0.50kb (1.35%)
/app/client/src/assets/icons/menu/widgets-colored.svg -- 0.22kb -> 0.22kb (1.32%)
/app/client/src/assets/icons/control/input.svg -- 0.31kb -> 0.30kb (1.27%)
/app/client/src/assets/icons/header/share-white.svg -- 0.47kb -> 0.46kb (1.26%)
/app/client/src/assets/icons/control/pick-location-onclick.svg -- 0.48kb -> 0.48kb (1.21%)
/app/client/src/assets/icons/menu/datasource-table.svg -- 0.25kb -> 0.24kb (1.2%)
/app/client/src/assets/icons/form/add-new.svg -- 0.34kb -> 0.34kb (1.15%)
/app/client/src/assets/icons/ads/camera.svg -- 0.86kb -> 0.85kb (1.14%)
/app/client/src/assets/icons/widget/image.svg -- 0.35kb -> 0.35kb (1.11%)
/app/client/src/assets/icons/ads/shopper.svg -- 0.62kb -> 0.61kb (1.11%)
/app/client/src/assets/icons/control/sort-icon.svg -- 0.27kb -> 0.27kb (1.09%)
/app/client/src/assets/icons/menu/pages.svg -- 0.37kb -> 0.36kb (1.07%)
/app/client/src/assets/icons/ads/delete.svg -- 0.28kb -> 0.27kb (1.06%)
/app/client/src/assets/icons/menu/page.svg -- 0.37kb -> 0.37kb (1.06%)
/app/client/src/assets/icons/ads/workspace.svg -- 0.28kb -> 0.28kb (1.05%)
/app/client/src/assets/icons/control/download-table.svg -- 0.47kb -> 0.47kb (1.03%)
/app/client/src/assets/icons/control/help.svg -- 0.47kb -> 0.47kb (1.03%)
/app/client/src/assets/icons/control/close.svg -- 0.29kb -> 0.29kb (1.01%)
/app/client/src/assets/icons/control/move.svg -- 0.39kb -> 0.39kb (1%)
/app/client/src/assets/icons/ads/general.svg -- 0.29kb -> 0.29kb (1%)
/app/client/src/assets/icons/ads/duplicate.svg -- 0.30kb -> 0.30kb (0.96%)
/app/client/src/assets/icons/control/edit-white.svg -- 0.41kb -> 0.40kb (0.96%)
/app/client/src/assets/icons/control/view.svg -- 0.32kb -> 0.32kb (0.92%)
/app/client/src/assets/icons/header/feedback.svg -- 0.43kb -> 0.42kb (0.91%)
/app/client/src/assets/icons/control/remove.svg -- 0.33kb -> 0.33kb (0.89%)
/app/client/src/assets/icons/ads/heart.svg -- 0.79kb -> 0.79kb (0.86%)
/app/client/src/assets/icons/control/more-vertical.svg -- 1.02kb -> 1.01kb (0.86%)
/app/client/src/assets/icons/widget/rich-text.svg -- 1.60kb -> 1.58kb (0.86%)
/app/client/src/assets/icons/control/info.svg -- 0.34kb -> 0.34kb (0.85%)
/app/client/src/assets/icons/control/draggable.svg -- 0.47kb -> 0.47kb (0.83%)
/app/client/src/assets/images/API.svg -- 4.92kb -> 4.88kb (0.81%)
/app/client/src/assets/icons/widget/radio.svg -- 0.50kb -> 0.49kb (0.79%)
/app/client/src/assets/icons/ads/share.svg -- 0.37kb -> 0.37kb (0.79%)
/app/client/src/assets/images/EditPen.svg -- 0.38kb -> 0.37kb (0.78%)
/app/client/src/assets/icons/widget/collapse.svg -- 0.50kb -> 0.50kb (0.78%)
/app/client/src/assets/icons/control/edit.svg -- 0.65kb -> 0.65kb (0.75%)
/app/client/src/assets/icons/ads/user.svg -- 0.54kb -> 0.53kb (0.73%)
/app/client/src/assets/icons/widget/checkbox.svg -- 0.54kb -> 0.53kb (0.73%)
/app/client/src/assets/icons/ads/edit.svg -- 0.40kb -> 0.40kb (0.73%)
/app/client/src/assets/icons/control/collapse.svg -- 0.55kb -> 0.54kb (0.71%)
/app/client/src/assets/icons/menu/queries.svg -- 0.41kb -> 0.41kb (0.71%)
/app/client/src/assets/icons/ads/close.svg -- 0.42kb -> 0.42kb (0.7%)
/app/client/src/assets/images/NoSearchResult.svg -- 8.61kb -> 8.55kb (0.69%)
/app/client/src/assets/icons/widget/chart.svg -- 0.43kb -> 0.43kb (0.68%)
/app/client/src/assets/icons/control/decrease.svg -- 0.45kb -> 0.45kb (0.65%)
/app/client/src/assets/icons/menu/api.svg -- 1.51kb -> 1.50kb (0.65%)
/app/client/src/assets/icons/widget/filepicker.svg -- 0.61kb -> 0.60kb (0.64%)
/app/client/src/assets/icons/ads/launch.svg -- 0.61kb -> 0.61kb (0.64%)
/app/client/src/assets/icons/menu/homepage.svg -- 0.92kb -> 0.92kb (0.64%)
/app/client/src/assets/icons/control/launch.svg -- 0.62kb -> 0.61kb (0.63%)
/app/client/src/assets/icons/control/pick-location-selected.svg -- 0.48kb -> 0.48kb (0.61%)
/app/client/src/assets/icons/widget/video.svg -- 0.49kb -> 0.49kb (0.6%)
/app/client/src/assets/icons/control/currency.svg -- 0.50kb -> 0.49kb (0.59%)
/app/client/src/assets/icons/control/filter-icon.svg -- 0.84kb -> 0.84kb (0.58%)
/app/client/src/assets/icons/control/search.svg -- 0.55kb -> 0.54kb (0.54%)
/app/client/src/assets/icons/control/zoomout.svg -- 0.55kb -> 0.55kb (0.53%)
/app/client/src/assets/icons/form/lock.svg -- 0.56kb -> 0.56kb (0.52%)
/app/client/src/assets/icons/control/multiline.svg -- 1.51kb -> 1.50kb (0.52%)
/app/client/src/assets/icons/ads/flight.svg -- 1.33kb -> 1.32kb (0.51%)
/app/client/src/assets/icons/control/pick-my-location.svg -- 1.16kb -> 1.16kb (0.5%)
/app/client/src/assets/icons/ads/chat.svg -- 1.36kb -> 1.35kb (0.5%)
/app/client/src/assets/icons/widget/table.svg -- 0.78kb -> 0.78kb (0.5%)
/app/client/src/assets/icons/control/delete.svg -- 0.59kb -> 0.59kb (0.5%)
/app/client/src/assets/icons/control/phone.svg -- 0.59kb -> 0.59kb (0.5%)
/app/client/src/assets/icons/control/password.svg -- 1.97kb -> 1.96kb (0.49%)
/app/client/src/assets/icons/widget/alert.svg -- 0.81kb -> 0.81kb (0.48%)
/app/client/src/assets/icons/control/right-align.svg -- 0.62kb -> 0.61kb (0.48%)
/app/client/src/assets/icons/ads/invite-users.svg -- 0.64kb -> 0.64kb (0.46%)
/app/client/src/assets/icons/widget/tabs.svg -- 0.86kb -> 0.85kb (0.46%)
/app/client/src/assets/icons/control/columns-visibility.svg -- 1.08kb -> 1.07kb (0.45%)
/app/client/src/assets/icons/control/zoomin.svg -- 0.65kb -> 0.65kb (0.45%)
/app/client/src/assets/icons/control/left-align.svg -- 0.67kb -> 0.67kb (0.44%)
/app/client/src/assets/icons/control/underline.svg -- 0.68kb -> 0.68kb (0.43%)
/app/client/src/assets/icons/ads/globe.svg -- 1.60kb -> 1.59kb (0.43%)
/app/client/src/assets/icons/menu/widgets.svg -- 0.97kb -> 0.97kb (0.4%)
/app/client/src/assets/icons/widget/text.svg -- 0.99kb -> 0.98kb (0.4%)
/app/client/src/assets/icons/control/center-align.svg -- 0.76kb -> 0.76kb (0.38%)
/app/client/src/assets/icons/widget/location-picker.svg -- 1.02kb -> 1.02kb (0.38%)
/app/client/src/assets/icons/menu/overflow-menu.svg -- 1.05kb -> 1.05kb (0.37%)
/app/client/src/assets/icons/header/deploy.svg -- 1.59kb -> 1.59kb (0.37%)
/app/client/src/assets/icons/control/italics.svg -- 0.80kb -> 0.80kb (0.36%)
/app/client/src/assets/icons/control/increase.svg -- 0.81kb -> 0.81kb (0.36%)
/app/client/src/assets/icons/help/discord.svg -- 1.08kb -> 1.08kb (0.36%)
/app/client/src/assets/icons/widget/map.svg -- 1.10kb -> 1.09kb (0.36%)
/app/client/src/assets/images/email-not-configured.svg -- 28.71kb -> 28.61kb (0.35%)
/app/client/src/assets/icons/help/help.svg -- 1.15kb -> 1.15kb (0.34%)
/app/client/src/assets/icons/control/copy.svg -- 0.87kb -> 0.86kb (0.34%)
/app/client/src/assets/icons/control/bold.svg -- 0.88kb -> 0.88kb (0.33%)
/app/client/src/assets/icons/widget/dropdown.svg -- 1.21kb -> 1.21kb (0.32%)
/app/client/src/assets/icons/ads/billing.svg -- 0.96kb -> 0.95kb (0.31%)
/app/client/src/assets/icons/control/decimal.svg -- 0.98kb -> 0.97kb (0.3%)
/app/client/src/assets/icons/control/settings.svg -- 1.33kb -> 1.32kb (0.29%)
/app/client/src/assets/icons/control/chevron-down.svg -- 1.02kb -> 1.02kb (0.29%)
/app/client/src/assets/icons/widget/switch.svg -- 1.38kb -> 1.37kb (0.28%)
/app/client/src/assets/images/secure.svg -- 1.07kb -> 1.07kb (0.27%)
/app/client/src/assets/icons/menu/datasource-colored.svg -- 1.12kb -> 1.12kb (0.26%)
/app/client/src/assets/icons/menu/api-colored.svg -- 1.13kb -> 1.12kb (0.26%)
/app/client/src/assets/icons/menu/foreign-key.svg -- 1.15kb -> 1.15kb (0.26%)
/app/client/src/assets/icons/menu/org.svg -- 1.15kb -> 1.15kb (0.25%)
/app/client/src/assets/icons/control/redo.svg -- 1.17kb -> 1.16kb (0.25%)
/app/client/src/assets/icons/menu/primary-key.svg -- 1.17kb -> 1.17kb (0.25%)
/app/client/src/assets/icons/control/undo.svg -- 1.17kb -> 1.17kb (0.25%)
/app/client/src/assets/icons/form/trash.svg -- 2.75kb -> 2.74kb (0.25%)
/app/client/src/assets/icons/control/integer.svg -- 1.25kb -> 1.25kb (0.23%)
/app/client/src/assets/icons/widget/form.svg -- 1.32kb -> 1.32kb (0.22%)
/app/client/src/assets/icons/control/drag.svg -- 1.33kb -> 1.33kb (0.22%)
/app/client/src/assets/icons/header/save-failure.svg -- 1.45kb -> 1.44kb (0.2%)
/app/client/src/assets/icons/control/js-toggle.svg -- 1.97kb -> 1.96kb (0.2%)
/app/client/src/assets/images/Curl-logo.svg -- 5.33kb -> 5.32kb (0.18%)
/app/client/src/assets/icons/alert/info.svg -- 1.60kb -> 1.60kb (0.18%)
/app/client/src/assets/icons/alert/warning.svg -- 1.63kb -> 1.63kb (0.18%)
/app/client/src/assets/icons/header/save-success.svg -- 1.67kb -> 1.66kb (0.18%)
/app/client/src/assets/icons/alert/success.svg -- 1.67kb -> 1.67kb (0.18%)
/app/client/src/assets/icons/menu/data-sources.svg -- 1.74kb -> 1.73kb (0.17%)
/app/client/src/assets/icons/alert/error.svg -- 1.95kb -> 1.95kb (0.15%)
/app/client/src/assets/icons/widget/datepicker.svg -- 3.23kb -> 3.22kb (0.12%)
/app/client/src/assets/icons/widget/button.svg -- 3.75kb -> 3.75kb (0.1%)
/app/client/src/assets/icons/control/address.svg -- 3.37kb -> 3.37kb (0.09%)
/app/client/src/assets/icons/control/datepicker.svg -- 3.75kb -> 3.75kb (0.08%)
/app/client/src/assets/images/appsmith-datasource.svg -- 505.60kb -> 505.43kb (0.03%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-11-02 19:44:01 +05:30
Trisha Anand
32301ae3b4
Printing the invalid messages of the action properly. (#1507) 2020-11-02 14:15:29 +05:30
Trisha Anand
13e2cc2a63
[Do Not Merge]Brought down cloud migration time from 122 minutes to 9.5 minutes (#1441)
* [Do Not Merge]Brought down cloud migration time from 122 minutes to 9.5 minutes

* Removed commented code.
TODO : Figure out if we want to change the migration order numbers once the release environment is reverted back to pre original migration data.

* Added plugin id for the migrated action.

* Renamed the createIndex functions for new action and new page and added a drop collection command before creating the index. This ensures that if any developer has pulled code in the last two days, this migration does not negatively impact them
2020-10-29 15:03:41 +05:30
Nikhil Nandagopal
2d7ccdc515
flipped user id and instance id so that the ping can be correlated with the email from the install script (#1461) 2020-10-29 14:17:45 +05:30
Arpit Mohan
470f2fafcd
Adding support for https endpoints for ES plugin (#1445)
* Adding host:port validation checks to ES plugin & Redis plugin

Also correcting the assertions in the RedisPluginTest so that the error message on test failure is accurate.

* Removing the endpoint validation from datasourceServiceImpl

Moving the endpoint validation to the plugin implementation classes because there are databases that require complete HTTP URL in their configuration. Checking for http/https at the platform level affects the UX for the user & plugin developer when using a new integration. Hence, all plugins must implement their own client/server validations in their own implementations

* Adding tests to assert hostname validation in mysql & postgres plugins
2020-10-28 19:06:10 +05:30
Trisha Anand
5197b17d8c
Bug Fix : Reading the datasource configuration incorrectly from actionDTO instead of datasource object. (#1415)
* Bug Fix : Reading the datasource configuration incorrectly from actionDTO instead of datasource object.

* Added test case to assert that datasource configuration and action configurations are not null when action execute is called.
2020-10-27 15:23:25 +05:30
Trisha Anand
230126ebcf
Remove unnecessary database migration (#1406) 2020-10-26 22:50:36 +05:30
Trisha Anand
fc9ea45e3b
[API breaking change : Automated Tests Will Fail] Page And Action Refactor (#549)
* Introduced new page which stores the published and unpublished pages as separate.

* Mid level commit to save the state.

* Parity of new page repository with old page repository (custom functions)

* WIP : Delete a page. This requires changes across application structure as well.

* Added publishedPages construct inside application to store the pages in the deployed view as well as isDefault so that the same changes (delete or isDefault) in unpublished view doesn't alter these fields for the published application

* Parity reached with PageService.

* Minor ActionService refactor to remove unnecessary code.
ApplicationPageService, LayoutActionService, LayoutService use the new page service to fetch the pages
Minor corrections in fetching the page from new page service in tests

* New save function which sets the PageDTO for unpublished page and then saves the new page into repository.

* Migration of page service functions to new page service functions across other services/tests/controller

* Finished migrating all the page service functions to the new page service functions

* Application Service Tests have been fixed.

* All the existing test cases are working now.

* Publish application implemented to store published pages as well. Added a basic test case to check that published pages is being set and that page's publishedPageDTO is being set accordingly.

* Minor TODOs added to add test cases for published application.

* A few tests to ascertain that published application page fields (deleted, isDefault) does not get changed when these statuses are changed for a page in edit mode.

* Added a new controller end point to fetch application in view mode.

* Added new endpoint for fetching an application in view mode on the client.

* Bug fix where get application in view mode API was not getting called.

* Fixed the get page names by application & archive pages which have been deleted in edit mode during publishing of application.

* During delete page, if a page was never published and it was deleted during edit, delete the entire page instead of just deleting the unpublished PageDTO

* Minor formatting.

* Non working client side code to fetch page list using view mode.

* revert unnecassary changes and streamlined view and edit actions

* Fix missed import

* Fixed a bug where if a page is not published, it should not be returned in view mode in list of page names api.

* Fixed update for a page which was not working in integration test.

* ActionDTO added.

* Solidified the new action structure.

* Migration added for NewAction index creation and NewAction per Action insertion in the database.

* Basic file structure added the new repository, custom repository, service, etc.

* Delete OldPage.java

* Repo functions added - TODO : Haven;t handled the published/edited views

* Helper functions added to convert Action to NewAction and vice-versa. Removed unused currentUserMono usage.

* Create & update action functionality added.

* Execute Action refactored. Removed dry run specific code.

* Repository migrated to handle new data structure. Execute action refactored to no longer support dry runs of actions.

* TODO added for special handling of change view of application to handle edge cases of pages/actions which either exist in published mode but don't exist in unpublished mode or vice versa.

* Migrated finding on load actions from spring repository to custom repository.

* In view mode, now actions are being fetched by application id directly instead of first fetching application and then using the page ids, fetching the actions. This reduces the db calls from 2 to 1 per fetch actions in view mode api call.

* Delete action and get all actions (used in edit mode on the client side) implemented.

* Updated CollectionService and ActionCollectionService to use the new action service instead of the old one.

* LayoutActionService refactored to now use the new service functions.

* ActionController now no longer used ActionService. The remaining service functions have been migrated to the new action service.

* Refactor across ACL code for addition/removal of policies during addition/removal of users to organization, making app public, refactor for services like policy utils, item service, etc.

* Removed the last of action repository and action service and replaced with new action repo and new action service.

* Compile and run time issues fixed. The server is coming up without any spring dependency errors.

* WIP in fixing fetching actions by page id.

* Finally!!! Fixed the fetch actions (both published and unpublished actions) by page id repository function.

* Fixed create action bug where null datasource in published actiondto (inside newly created action) leads to error.

* Fixed the execute action issues :
1. Removed the dry runs from the tests
2. Fixed the null pointer error in variable substituted action and datasource configurations.

* 1. Fixed the custom action repository field names.
2. Fixed the data structures used in ExamplesOrganizationClonerTests

* Fixed countByDatasourceId repository function which was querying the actions incorrectly.

* Fixed the clone example organization error where the id of the action was not getting updated in the page correctly. Yay!

* Fixed post merge compilation failure.

* Fixed more compilation time failures in ActionServiceTest

* Fixed failing test case for fetching actions in view mode.

* Minor changes to resolve merge changes and incorporate in the new refactored code.

* 1. Fixed compile time errors on Client code.
2. Fixed fetching of actions in view mode by application id. The repository function did not need name parameter. Removed the same.

* [Integration Testing Error Fix] : Added a new test case for refactor action name.

* Instead of fetching actions in the page, mistakenly used the base service which was fetching all the actions in the repository, barring none which led to the name refactor being blocked even though no action in the current page exists with the new proposed name,

* Added delete functionality to action service.

* Minor code cleanup

* Adding viewMode to action execution

* Replacing action with actionId.

* 1. Bug fix for deletion of unpublished action. In case of never published action, the entire action should be deleted. In case an action was published, only the unpublished action should be deleted.
2. In case of DB actions (external datasources), only the bare minimum fields should be stored inside the action (datasource id and datasource plugin id). The other fields should not be duplicated across code.

* Fixed yarn build compilation issues.

* Update app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ActionController.java

Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>

* Changed the API path for GET applications in view mode. Some minor code formatting.

* Incorporated review comments.

* Some more unnecessary code removed.

* Instead of returning Page, now the interface object between client and server for Pages is PageDTO

* Migrated Page and Action to PageDTO and ActionDTO
Fixed the compilation issues.
TODO : Fix the test compilation issues.

* Fixed compilation time issues with all the tests by migrating Page and Action to PageDTO and ActionDTO respectively

* Action Controller and Page Controller no longer extend Base Controller. All the required functions have now been implemented and no base line API end points are being re-used from the base.

* Test case fixes.

* Bug Fix : Updating an action was not updating execute on load. Fixed the data flow leading to the error.

* Deprecating Page and Action domain objects. This is to ensure no new code is written with these till we remove this old code.

* Cloned example applications are now published before returning. This is to ensure that the applications are in ready to view mode when the new user signs up.

* Added a function comment to expand on the usage of new param introduced.

* When cloning a page, new actions were not being stored. Added that. Also updated the clonePage test to assert that the actions are also cloned when the pages are cloned.

* Updated a Api call

* removed extra slash

Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Satbir Singh <satbir121@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: nandan.anantharamu <nandan@thinkify.io>
2020-10-26 18:04:23 +05:30
Arpit Mohan
c6d4902e3d
Adding microsoft SQL server plugin integration (#1374) 2020-10-23 20:36:45 +05:30
Shinn Lok
4768fd3848
Fix organization ordering by name on the homepage (#1177) 2020-10-22 17:53:51 +05:30
Arpit Mohan
74fe08f8bf
Adding the database changelog for Redis (#1346)
1. Fixing the build by excluding the slf4j-api from redis-plugin pom.xml
2. Adding the editor.json and form.json for the query pane & datasource pane.
3. Adding array handling in the Redis response by feeding all the output into a "result" key
2020-10-22 16:40:19 +05:30
Shrikant Sharat Kandula
2a53abd8a6
Add DynamoDB Plugin (#1167)
* Added DynamoPlugin to integrate with DynamoDB

* Connection management for DynamoPlugin

* Process action from a single JSON object as input

* Moved ListTables command to separate class

* Add missing UI definition files

* Use reflection to build request objects for AWS SDK

* All DynamoDB actions are now run purely by reflection

* Serialize responses to JSON

* Remove some unused/commented code and some refactorings

* Add non-working test with generic dynamodb container

* Added working test for ListTables action

* Added test for PutItem action

* Add tests for get and update actions

* Added comments and some refactoring

* Removed unused Command class.

* Added more tests for map to SDK object conversion

* Add templates

* Add option to set an endpoint override

* Fix Dynamo plugin tests when ~/.aws is missing

* Add documentation link for DynamoDB plugin

* Fix validation checks

* Remove debug log

* Added comments on expected query structure

* Fix incorrect error condition with incorrect request format

* Add comment for converting action to method name

* Error out if region is missing

* Remove unused throws declaration

* Use rich form for action configuration

* Removed templates

* Use PNG for logo images

* Use PNG logos for all plugins

* Avoid hard-coded field names

* Change logo to PNG only for ElasticSearch for now

* Wrap errors in AppsmithPluginException

* Typo

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

* Fix changeset order number

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

* Minor refactoring and fixed error messaging

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-10-21 17:45:54 +05:30
Shrikant Sharat Kandula
fa1a0549ff
Add ElasticSearch integration (#1181)
* add elasticSearchPlugin

* Fix container startup in tests

* Add elasticsearch dependency

* Get plugin to a base working state

* Add templates and tests for all Document APIs

* Add support for bulk queries

* Add test and template for bulk operations

* Use rich form for action configuration

* Add test API for ElasticSearch

* Use rich form's values for plugin execution

* Add authorization header support

* Fix tests after config object use changes

* Add test for bulk requests with nd-json body

* Remove templates and minor refactoring

* Fix potential NPE with null body

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

* Add datasource validation for endpoint

* Wrap errors in AppsmithPluginException

Co-authored-by: Suman Patra <spatra@akamai.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-10-21 15:34:29 +05:30
Shinn Lok
014ff80548
Parameter missing for email template replace (#1323)
Co-authored-by: Trisha Anand <trisha1990@gmail.com>
2020-10-21 11:40:32 +05:30
Arpit Mohan
c89f5179b3 Removing db changelog for mssql 2020-10-20 22:46:59 +05:30
Trisha Anand
870a38af1c
[Bug Fix] Removed create_USER event during userCreate because this breaks OAUTH first user login. (#1292) 2020-10-19 22:51:26 +05:30
Arpit Mohan
7cb9583034 Making the request to oauth2 endpoints publicly accessible 2020-10-19 19:52:27 +05:30
Sufiyan Gani
f52a2500c1
Added sending email when the role of the member is (#1253)
Added sending email when the role of a member is changed
2020-10-19 17:53:12 +05:30
Trisha Anand
37aedcba24
User emails should be changed to lower case before creating/inviting user. (#1281) 2020-10-19 16:39:04 +05:30
Shrikant Sharat Kandula
a8d5138541
MS SQL Plugin implementation (#1272)
* Working version of MsSQL plugin

* Add tests for mssql-plugin
2020-10-19 15:06:08 +05:30
Akshay Avinash
4e99ab7ace
Fix 781 invalid message on password reset failure (#1234)
* Updated to add button to redirect to forgot password page
2020-10-16 19:48:03 +05:30
Daniel Shuy
a93bd52684
Don't append " Copy" suffix to cloned pages in cloned application (#1172)
* Add test to verify that Pages are cloned
2020-10-15 23:27:32 +05:30
Prashant Chaubey
7a1a2f55e1
Added an WebExceptionHandler to return JSON errors instead of HTML (#1178) 2020-10-15 17:47:13 +05:30
Shrikant Sharat Kandula
921c827817
Add isFromInvite field to create_USER event (#1223) 2020-10-15 17:42:37 +05:30
Prashant Chaubey
05380a9c43
Added email verification while creating user and sending email (#1208) 2020-10-15 12:19:20 +05:30
Prashant Chaubey
8d2701ed75
Made getAll operation of PageController unsupported (#1176) 2020-10-15 11:24:09 +05:30
Prashant Chaubey
67ef538409
Returning validation failures while creating organization (#1084)
* Returning validation failures while creating organization

* Added unit tests

* Changing the name of test security config

Co-authored-by: nitesh261193 <nitesh261193@gmail.com>
2020-10-15 09:07:57 +05:30
Shinn Lok
e85d5ed420
TTL must be set on date field (#1128)
The PasswordResetToken collection now expires the password reset request in 48 hours.
2020-10-15 09:01:30 +05:30
Shrikant Sharat Kandula
ff860e402c
Add logging to segment SDK (#1188) 2020-10-15 00:05:09 +05:30
Shrikant Sharat Kandula
8af1852b6a
Refactor tasks on first-login (#1190)
* Primarily doing example app cloning and analytics in parallel.

* Only create a examples organization, if not already done
2020-10-15 00:02:57 +05:30
Shrikant Sharat Kandula
02dc63840a
Don't send full object to analytics (#1186) 2020-10-14 14:56:09 +05:30
Shrikant Sharat Kandula
164824ca85
Add first_login event for analytics (#1184) 2020-10-14 12:40:47 +05:30
Prashant Chaubey
8a892b6e15
Removed invitation token from the invite email (#1180) 2020-10-14 10:30:19 +05:30
Trisha Anand
421b624cc4
Only mark applications as example applications if the application id exists in the template configuration. (#1093) 2020-10-09 15:21:28 +05:30
Shrikant Sharat Kandula
d872b3631b
Use username instead of object_id in analytics (#1082) 2020-10-09 12:47:27 +05:30
Trisha Anand
ffb1142b20
Adding a new email template for sending an email when an appsmith use… (#1077)
* Adding a new email template for sending an email when an appsmith user's role in an organization changes.

* Minor changes in text.
2020-10-08 14:48:41 +05:30
Shrikant Sharat Kandula
feda7ce022
Use email as id for users and fix signup events not being reported (#1067) 2020-10-07 21:06:58 +05:30
Shrikant Sharat Kandula
c77fcfa9ee
Send separate user create event for new users (#1066) 2020-10-07 18:28:17 +05:30
Shrikant Sharat Kandula
c4332b9a1c
Add source to user sign up event (#1065) 2020-10-07 18:07:30 +05:30
Prashant Chaubey
50072ff179
Fixed the ipify URL in PingScheduledTask (#1013) 2020-10-06 06:54:27 +05:30
Petro Popelyshko
e57615e3eb
Fix(backend): Wrong error message while resetting the password fixed, changed from id to email (#911)
Fixes #637
2020-10-05 09:49:05 +05:30
Dmitriy Danilov
4a26aee19f
Fix(sign-up): change in sign up error message (#908) 2020-10-05 09:42:39 +05:30
Shrikant Sharat Kandula
577e9a7017
Refactor ignoreCache parameter to use Boolean type (#681) 2020-09-23 11:01:58 +05:30
Shrikant Sharat Kandula
19bd7d272a
Use a unique instance ID for pinging home (#566)
* Use a unique instance ID for pinging home

* Fix event name
2020-09-18 06:38:53 +05:30
Arpit Mohan
e688f62378
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-17 18:51:26 +05:30
Shrikant Sharat Kandula
65c247a10c
Add a scheduled task to ping home (#560)
* Add a scheduled task to ping home

* Removed commented logging code

* Add docstrings to ping scheduled task

* Move IP address API URI to a constant
2020-09-17 17:54:48 +05:30
Shrikant Sharat Kandula
75ba90928e
Add datasource structure caching and MySQL structure support (#553)
* Implement caching for datasource structure

* Avoid using final fields so spring-data can load objects

* Use type variable for getStructure method

* Initial version with base structure for MySQL plugin

* Add tests for MySQL plugin structure

* Add sorting for keys in Postgres structure as well

* Show "primary key" instead of just "primary"

* Refactor to reduce inline magic strings
2020-09-17 13:59:46 +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
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
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
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
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
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
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
10f462b229
Adding a test for the valid scenario when returning the plugin form details (#295)
We use @SpyBean annotation to partially mock the PluginService class.
2020-08-12 20:09:56 +05:30
Shrikant Sharat Kandula
368ed79f4b
Removed OPA config (#291)
* Removed OPA config along with the bundle and rules files
2020-08-12 16:52:42 +05:30
Shrikant Sharat Kandula
30c595678d
Set transient fields when loading application by id (#287) 2020-08-12 15:35:50 +05:30
Trisha Anand
c3c8e532c6
Updated the invite and make public app migration script more performant so that it takes lesser time on big db (#289)
* Updated the migration script to make more db queries instead of searching in the local app memory

* Permission correction.
2020-08-12 15:35:04 +05:30
Trisha Anand
7ee21456d5
Share Changes : Adding users to organization permission updates (#262)
* Introduced new permissions for making app public and inviting users.

* WIP : Returning a subset of roles depending on the current user's role

* Added code and tests for generating hierarchical children given a role name

* Get all invite roles now returns roles depending on the current users permissions (aka - admin can invite users for all roles, developers can invite users for roles develoeprs and below)

* When invite api is called, check if the user has correct permissions ( invite permission) and check if the role for which the users are bieng invited is allowed (aka the current user has the permission to invite for the said role)

* Introduced a new permission at application level which is inherited from manage:organizations. This new permission gives the administrator of the organization to make any application public .

* Incorporated review comments.

* Minor code changes.

* Added migration script to add the new policies introduced as part of this new share modal changes.

* Null pointer exception handled due to improper data in the database.

* Integration testing bug fixes.
2020-08-12 13:23:44 +05:30
Trisha Anand
a6496bd5af
Correcting the Docker image for Appsmith server for Github actions test (#260)
* Correcting the Docker image for Appsmith server for Github actions test

* Also fixing the bug where the datasource config is not returned properly for restapi-plugin

Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2020-08-11 16:53:47 +05:30
Shrikant Sharat Kandula
115bff546c
Replace class-level generics with method-level in PolicyUtils (#257) 2020-08-11 14:07:52 +05:30
Shrikant Sharat Kandula
0c344115c3
Add transient field on applications to indicate whether it's an example application (#256)
* Add transient field on application to indicate whether it's an example

* Add test for marking of example applications

* Remove unused constant
2020-08-11 14:00:41 +05:30
Shrikant Sharat Kandula
dc10f09906
Fix organization cloning gets stale action IDs inside onLoad actions (#245)
* Fix organization cloning gets stale action ids for onload

* Fix test for onload action's organization after cloning
2020-08-11 13:58:50 +05:30
Trisha Anand
43d633f007
Setting role name while adding a user to an organizaiton. (#258) 2020-08-11 09:45:23 +05:30
Trisha Anand
d2442eb815
DO NOT MERGE: Bulk invite user to organization (#182)
* WIP: Not working bulk invite.

* WIP : Non compilable.

* Current test cases running.
TODO : Code Cleanup and write new test cases for bulk invite.

* Code cleanup

* Added a test case for bulk invite of users to an organization.

* Incorporated review comment.

* Merged the latest release and incorporated review comments.

* Corrected the error thrown when usernames is empty or null for invite user API.
2020-08-11 09:24:21 +05:30
Shrikant Sharat Kandula
25b752843f
Auto-login on signup (#201)
* Auto-login on signup works!

* Support form-encoded data body for signup requests

* Remove debug log entry when getting session

* Refactoring and add some docs to UserSignup solution

* Move user object construction to UserSignup solution

* Redirect with error message on signup errors
2020-08-10 14:59:56 +05:30
Shrikant Sharat Kandula
b511c3ada9
Change return type of plugin execution to be more specific (#247) 2020-08-10 14:41:32 +05:30
Trisha Anand
b5841e96d2
GET plugin form now returns json to render both datasource configuration form and the editor query pane (#199)
Keeping the function to read plugin resource generic for any type of resource. Now the parent function can also conditionally decide which plugin would require to read which resources from the filesystem.

Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2020-08-03 16:37:28 +05:30
Shrikant Sharat Kandula
cef1241bcb
Return 200 when action could not be executed (#202) 2020-08-03 07:35:14 +05:30
Shrikant Sharat Kandula
43304ca146
Fix form data not showing up in the right place when importing from curl (#198) 2020-07-30 16:30:39 +05:30
Trisha Anand
c6a9fc2bb4
Organization getById should use custom repository get function (#195)
* Overwriting the base service's getById for OrganizationService to ensure that the response contains userPermissions (by using custom repository instead of default mongo repository classes)

* Fixed the failing test cases.

* Minor code formatting.
2020-07-29 16:57:46 +05:30
Arpit Mohan
4475bc2b1e
Configuring dynamic redirect post login (#194)
The client will have to send a query parameter redirectUrl or a header X-Redirect-Url in order for the server to redirect the client to the appropriate URL post login. If neither of these parameters are present, the client is redirected to /applications by default.

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2020-07-29 16:07:40 +05:30
Trisha Anand
eba38ae1fa
During signup, if the user already exists, instead of throwing a generic duplicate key exception, request the user to sign in. (#192)
* During signup, if the user already exists, instead of throwing a generic duplicate key exception, request the user to sign in.

* Minor change in the error message.
2020-07-29 13:44:23 +05:30
Shrikant Sharat Kandula
60efdb998b
Fix: Datasource password gets double encrypted on cloning (#191)
* Decrypt sensitive fields before cloning a datasource

* Fix NPE in cloning datasource when configuration is missing
2020-07-29 11:12:04 +05:30
Trisha Anand
9c51ac3f8d
🔥 & forget asynchronous email sending (#187)
* Email sending is now an asynchronous function. It follows a 🔥 & forget strategy to make it run asynchronously.
2020-07-28 20:06:12 +05:30
Shrikant Sharat Kandula
66bf23106d
Fix cloning fails in some cases for organizations (#159)
* Fix cloning fails in some cases for organizations

Cloning currently fails in cases like the following:
- Application with no pages
- Pages with no actions
- Pages with more than one action

* Remove debug naming of cloned datasources

* Add test for organization cloning

* Add more tests for organization cloning

* Fix potential race condition in adding pages to an application

* Move db update call to add page to application, into repository

* Use `getIdCriteria` to query for document's _id
2020-07-28 17:54:06 +05:30
Shrikant Sharat Kandula
74da0f117e
Reuse layout that's automatically created with page (#163)
* Reuse layout that's automatically created with page

* Use correct API for updating a layout

* Commenting out organization cloning test.

* Removed organization cloning test

* Adding a dummy commit to run the pipeline.

Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2020-07-25 18:13:29 +05:30
Shrikant Sharat Kandula
10ad639b28
Bug/layouts not updated on action change (#161)
* Fix layouts not be updated when an action is updated

* Add test for updating onLoadActions when action updated

* Split layout and action test to separate class

* Remove duplicated test in ActionServiceTest
2020-07-25 16:45:42 +05:30
Shrikant Sharat Kandula
5ee1c24224
Fix layouts not be updated when an action is updated (#160)
* Fix layouts not be updated when an action is updated

* Add test for updating onLoadActions when action updated
2020-07-25 15:43:22 +05:30
Shrikant Sharat Kandula
4a269efd4a
Reset default fields of User object before update (#158)
The policies of `User` objects is an empty set by default. So, when using a new `User` object to call `update`, it also updates existing policies to be an empty list.
2020-07-24 18:32:43 +05:30
Trisha Anand
9f8b5ca4d8
Adding execute action permissions policy to match read actions policy in existing actions. (#156)
* Fixing test cases failing due to non unique names.

* Adding execute action permissions policy to match read actions policy in existing actions.

* Only save the action if there are read actions permission present (and hence could have been updated)
2020-07-24 17:05:49 +05:30
Trisha Anand
61c62c9212
Datasource Test should test against the datasource object sent by the client (#155)
* Datasource test should always test the latest object given by the client (instead of fetching the same from the db). If it is a saved datasource, then we should decrypt and set the password in the datasource (unless the password is one of the changes that is being tested).

* Added function level comment to clarify that this function can no longer be used by just sending the datasource.id field set.
2020-07-24 15:53:40 +05:30
Shrikant Sharat Kandula
23dd84d9c8
Clear application pages list before cloning (#154) 2020-07-24 14:35:16 +05:30
Shrikant Sharat Kandula
dfcabab4cc
Handle stale database connection from datasources (#151)
* Handle stale database connection from datasources

* Fix potential secondary case of stale connection error

* Fix Postgres to MySQL

* Move validity check timeout to a constant field

* Add test for recovery when stale connection error is thrown
2020-07-24 12:18:25 +05:30
Arpit Mohan
36bf14f221
Adding dynamic redirect to form & OAuth2 login (#149)
The client can send the redirect URL in X-Redirect-Url header. The server will honour the value set and redirect the client browser to this particular url. By default the server will redirect to /applications if the custom header is missing. The redirect url can either be absolute or relative.

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2020-07-23 20:32:38 +05:30
Trisha Anand
3c30b38937
Bug fix : External datasources do not execute for public application (#143)
1. Bug fix for when actions for a public application use an external datasource (aka db queries). The db queries were not getting executed because the permission for execute datasource was not getting set for anonymousUser.

2. When using the Test endpoint for datasource, if the datasource is being read from the db and there are encrypted fields, first decrypt the field and then send to the plugin for testing the co
2020-07-23 20:31:36 +05:30
Shrikant Sharat Kandula
fd888e33c8
Add migration for updating plugin doc links to our own docs (#142) 2020-07-22 15:28:27 +05:30
Arpit Mohan
690c327f2c
Adding default values for mysql datasource (#140)
Also correcting icon details to mysql plugin migration.
2020-07-22 14:00:15 +05:30
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
Shrikant Sharat Kandula
1fc582af08
When cloning examples organization, clone only public applications (#125)
* When cloning examples organization, clone only public applications

* Create template organization within the test

* Cleaned up test for cloning of examples organization

* Fix Mono chaning

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

* Create test apps and config simultaneously

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-07-21 13:39:07 +05:30
Trisha Anand
d1dd74018f
Bug fix : Update of datasource object leads to authentication field getting encrypted again. (#124)
* Datasource authentication object fields should only be encrypted during create or if the update object contains authentication object. Added a test case to check that update to any other field doesnt update the encrypted fields.

* Incorporated review comment
2020-07-21 10:53:03 +05:30
Shrikant Sharat Kandula
55a6cc6614
Clone examples organization for every new user (#78)
* Trying to clone the examples repo on new user signup

* Working implementation of cloning examples organization on user sign up

* Fix personal org not being created when template org is missing

* A working version of cloning of examples organization on first-login

* Add docs for methods in ExamplesOrganizationCloner

* Refactor computing user's first name into a method

* Add some menial tests for examples organization cloning

* Use explicit permissions when fetching applications and datasources

* Fix template organization config name hard-coding
2020-07-20 13:07:31 +05:30
Shrikant Sharat Kandula
f9e1d4f1ad
Chore/remove implicit permissions (#90)
* Refactor implicit permissions in service methods as function arguments

* Revert an unintended change that got committed

* Fix permission variable name

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

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-07-20 13:06:47 +05:30