Commit Graph

803 Commits

Author SHA1 Message Date
Shrikant Sharat Kandula
95a385dad7
Update names in comments when user name is changed (#4466)
* Update names in comments when changed

* Move database operation to repository class
2021-05-17 12:01:09 +05:30
Sumit Kumar
247e5d7ea4
Feature: return prepared stmt / smart substitution params under request params section for debugging (#4421)
- return prepared stmt / smart substitution params under request params section for debugging
2021-05-17 08:59:17 +05:30
Nayan
51dd6587cf
[Issue #2093]-show last used organizations first in home page (#4461)
* [Issue #2093]-show last used organizations first in home page

* -updated as per the comments in PR
2021-05-16 09:42:10 +06:00
Trisha Anand
3e016296e6 Merge branch 'master' into release
# Conflicts:
#	app/client/src/workers/DataTreeEvaluator.ts
2021-05-13 14:43:00 +05:30
Shrikant Sharat Kandula
27af947852
APIs for adding and removing reactions on comments (#4457)
* Add APIs for reacting and unreacting on comments

* Add tests for Reactions APIs

* Fix s/create/delete typo

Co-authored-by: Nidhi <nidhi@appsmith.com>

* Deletion is successful if more than one are deleted

Co-authored-by: Nidhi <nidhi@appsmith.com>
2021-05-13 12:52:43 +05:30
Nidhi
53c2d815f6
Fixes refresh token flow (#4450)
* Fixes refresh token flow

* Review comments

* Reverting mistake with CI cs url
2021-05-12 17:07:59 +05:30
Snyk bot
5671494b9e
fix: upgrade com.github.cloudyrock.mongock:mongock-spring from 3.2.5 to 3.3.2 (#4355)
Snyk has created this PR to upgrade com.github.cloudyrock.mongock:mongock-spring from 3.2.5 to 3.3.2.

See this package in Maven Repository:
https://mvnrepository.com/artifact/com.github.cloudyrock.mongock/mongock-spring/

See this project in Snyk:
https://app.snyk.io/org/nikhil-nu4/project/b1eb6091-e23c-476f-bcc4-c4ae240497f8?utm_source=github&utm_medium=upgrade-pr
2021-05-10 19:53:59 +05:30
Shrikant Sharat Kandula
7b222b27fb
Don't create new org, if the new user has been invited to one (#4380) 2021-05-10 13:51:43 +05:30
Sumit Kumar
0ec3604eac
Feature: connect to mongo db via connection string URI (#4131)
allow user to connect using a mongo connection string URI directly.
2021-05-10 10:35:45 +05:30
dependabot[bot]
5a289b51ed
Bump commons-io from 2.6 to 2.7 in /app/server/appsmith-server (#4171)
Bumps commons-io from 2.6 to 2.7.

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-09 09:49:19 +05:30
Snyk bot
5b9b348035
fix: upgrade org.springframework.boot:spring-boot-starter-mail from 2.2.1.RELEASE to 2.4.4 (#4305)
Snyk has created this PR to upgrade org.springframework.boot:spring-boot-starter-mail from 2.2.1.RELEASE to 2.4.4.

See this package in Maven Repository:
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-mail/

See this project in Snyk:
https://app.snyk.io/org/nikhil-nu4/project/b1eb6091-e23c-476f-bcc4-c4ae240497f8?utm_source=github&utm_medium=upgrade-pr
2021-05-09 09:47:45 +05:30
Snyk bot
11c1a01566
fix: upgrade org.springframework.boot:spring-boot-starter-actuator from 2.3.4.RELEASE to 2.4.4 (#4308)
Snyk has created this PR to upgrade org.springframework.boot:spring-boot-starter-actuator from 2.3.4.RELEASE to 2.4.4.

See this package in Maven Repository:
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator/

See this project in Snyk:
https://app.snyk.io/org/nikhil-nu4/project/b1eb6091-e23c-476f-bcc4-c4ae240497f8?utm_source=github&utm_medium=upgrade-pr
2021-05-09 09:47:12 +05:30
Nidhi
39bb0ac805
Removed prod url from default config (#4377) 2021-05-07 23:22:20 +05:30
Shrikant Sharat Kandula
3b3e24f8cf
Add delete thread API (#4363) 2021-05-07 15:58:02 +05:30
Shrikant Sharat Kandula
8c7e844d80
Accept PUT requests for thread updates (#4357)
We were using PATCH, because that was semantically more
correct for what we are doing here. But since PUT is used
everywhere else in the project, changing this to PUT for
consistency.
2021-05-07 14:02:41 +05:30
Shrikant Sharat Kandula
1f2f5ec227
Fix ACL not applied on editing comments (#4351) 2021-05-07 12:35:53 +05:30
Trisha Anand
f7d3beef50
Added success log when the email is sent out successfully. (#4233) 2021-05-06 16:27:17 +05:30
Trisha Anand
aa51040c99
Small housekeeping server side changes (#4245)
* Minor refactor datasource policy generation for easy re-use.

* Added simple widget name refactor test
2021-05-06 16:27:08 +05:30
Snyk bot
bf81709492
fix: upgrade org.hibernate.validator:hibernate-validator from 6.0.18.Final to 6.2.0.Final (#4307)
Snyk has created this PR to upgrade org.hibernate.validator:hibernate-validator from 6.0.18.Final to 6.2.0.Final.

See this package in Maven Repository:
https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator/

See this project in Snyk:
https://app.snyk.io/org/nikhil-nu4/project/b1eb6091-e23c-476f-bcc4-c4ae240497f8?utm_source=github&utm_medium=upgrade-pr
2021-05-06 16:23:37 +05:30
Nidhi
6c0668e74d Tests for encryption 2021-05-06 13:36:37 +05:30
Nidhi
b2aaa7787c Merge branch 'release' of github.com:appsmithorg/appsmith into task/apply-encryption 2021-05-06 12:55:25 +05:30
Nidhi
96123890cd
Merge pull request #4296 from appsmithorg/release
Fixes for broken evaluation
2021-05-04 22:49:00 +05:30
Sumit Kumar
1286af4285
fix for NPE (#4288) 2021-05-04 18:39:45 +05:30
Shrikant Sharat Kandula
568c0f92ac Merge branch 'release'
# Conflicts:
#	app/client/public/privacy-policy.html
#	app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java
2021-05-04 13:16:26 +05:30
Nidhi
e855123542
DB change for SAAS editor UI component (#4268) 2021-05-04 00:05:48 +05:30
Shrikant Sharat Kandula
d950aeca22
Check for error class type before casting (#4256) 2021-05-03 16:13:26 +05:30
Sumit Kumar
52bfd25824
Feature: return request parameters with type for debug tab (#4078)
- return request parameters with type for debug tab.
- request params are stored in a RequestParamDTO object.
- a configProperty -> label map is cached in pluginService, which returns the param label as per the configProperty it is mapped to via editor.json file.
- This feature currently only works with prepared statements disabled.
2021-04-30 16:26:51 +05:30
Shrikant Sharat Kandula
0895c68f1f
Send time information in comments and threads even from RTS (#4235)
* Include time information in comments from RTS

* Fix ISO formatting missing Z suffix
2021-04-30 15:32:34 +05:30
Rishabh Saxena
a0d2e8533d
Initialise comments (#3328)
* Initial scaffolding for comments CRUD APIs

* add actions

* add assets

* state management for existing comments and creating new

* add ui components

* add overlay comments wrapper to baseWidget

* add toggle comment mode button at editor header

* trigger tests

* Disallow commenting as someone else

* Add applicationId for comments

* lint

* Add overlay blacklist to prevent component interaction while adding comments

* Comment thread style updates

* Placeholder comment context menu

* Controlled comment thread visibility for making new comments visible by default

* Update comment type description

* Reset input on save

* Resolve comment thread button ui

* fix close on esc key, dont create new comment on outside click

* Submit on enter

* add emoji picker

* Attempt at adding a websocket server in Java

* CRUD APIs for comment threads

* Add API for getting all threads in application

* Move types to a separate file

* Initial commit for real time server (RTS)

* Add script to start RTS

* Fix position property

* Use create comment thread API

* Use add comment to thread API

* Add custom cursor

* Dispatch logout init on 401 errors

* Allow CORS for real time connection

* Add more logs to RTS

* Fix construction of MongoClient

* WIP: Real time comments

* Enable comments

* Minor updates

* Read backend API base URL from environment

* Escape to reset comments mode

* Set popover position as auto and boundary as scroll parent

* Disable warning

* Added permissions for comment threads

* Add resolved API for comment threads

* Migration to set commenting permission on existing apps

* Fix updates bringing the RTS down

* Show view latest button, scroll to bottom on creating a new comment

* Cleanup comment reducer

* Move to typescript for RTS

* Add missing server.ts and tsconfig files

* Resolve / unresolve comment

* Scaffold app comments

* Minor fixes: comment on top of all widgets, add toggle button at viewer header

* Reconnect socket on creating a new app, set connected status in store

* Retry socket connection flow

* Integration tests for comments with api mocks using msw

* Fix circular depependency

* rm file

* Minor cleanup and comments

* Minor refactors: move isScrolledToBottom to common hooks, decouple prevent interactions overlay from comments wrapper

* Use policies when pushing updates in RTS

* ENV var to set if comments are enabled

* Fix: check if editor/viewer is initialised before waiting for init action

* Add tests for comments reducer

* Revert "ENV var to set if comments are enabled"

This reverts commit 988efeaa69d378d943a387e1e73510334958adc5.

* Enable comments for users with appsmith email

* lint

* fix

* Try running a socket.io server inside backend

* Update comment reducer tests

* Init mentions within comments

* Fix comment thread updates with email rooms

* Minor fixes

* Refactors / review suggestions

* lint

* increase cache limit for builds

* Comment out tests for feature that's under development

* Add Dockerfile for RTS

* Fix policies missing for first comment in threads

* Use draftJS for comments input with mentions support

* fix fixtures

* Use thread's policies when querying for threads

* Update socket.io to v4

* Add support for richer body with mentions

* Update comment body type to RawDraftContentState

* fix stale method

* Fix mentions search

* Minor cleanups

* Comment context menu and thread UI updates

* revert: Scaffold app comments

* Yarn dependencies

* Delete comment using id api added

* Init app comments

* Add test for creating thread

* Api for delete comment with id

* Test comment creation response and policies

* Copy comment links

* Fix reset editor state

* Delete valid comment testcase added

* Delete comment TC : code refactor

* Don't allow creating comments with an empty body

* Pin comments WIP[]

* Ignore dependency-reduced-pom.xml files from VCS

* Cleanup of some dev-only files, for review

* Delete comment

* Update socket.io to v4 in RTS

* Pin and resolve comment thread object added in commentThread

* Pin and resolve comment thread object added in commentThread

* Update comment thread API

* Added creationTime and updationTime in comment thread response

* Added creationTime and updationTime in comment thread response

* Added human readable id to comment threads, fallback to username for null name in user document

* Refactor

* lint

* fix test, rm duplicate selector

* comment out saga used for dev

* CommentThread viewed status, username fallback for getName=null, username field added in pin & resolve status

* lint

* trigger tests

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com>
2021-04-29 16:03:51 +05:30
Trisha Anand
09748de6c0 NPE check when there are no mongo escaped widgets (#4200) 2021-04-28 22:31:13 +05:30
Trisha Anand
9884135cb7
NPE check when there are no mongo escaped widgets (#4200) 2021-04-28 22:27:01 +05:30
Trisha Anand
4a441b5ca2 [Bug Fix] : In case the table being renamed has mongo escaped fields, rename the table name in set keeping a track of these widgets as well (#4195) 2021-04-28 17:39:13 +05:30
Trisha Anand
73c2b09dc4
[Bug Fix] : In case the table being renamed has mongo escaped fields, rename the table name in set keeping a track of these widgets as well (#4195) 2021-04-28 17:36:30 +05:30
Nidhi
8afac888c7 Merge branch 'release' of github.com:appsmithorg/appsmith into task/apply-encryption 2021-04-26 13:30:49 +05:30
Sumit Kumar
275843e61a
Fix: Return helpful error message when get structure fails for mongo db due to lack of read permission. (#4077)
- return helpful error message when get structure fails for mongo db due to lack of read permission. The message returned is: Appsmith has failed to get database structure. Please provide read permission on the database to fix this.
- any get structure error is also generically being caught by the getStrucuture method in DatasourceStructureSolution.java
- error msg and status code is now returned as part of DatasourceStructure object.
- ErrorDTO is used to store error info.
- ErrorDTO definition is moved to appsmith-interfaces package so that it can be used all packages.
- Other changes:
  - stop logging PLUGIN_GET_STRUCTURE_ERROR externally, as this error is mostly triggered by credentials error or -lack of read permission.
  - start logging PLUGIN_GET_STRUCTURE_TIMEOUT_ERROR externally, because this is not a user error.
2021-04-26 11:18:08 +05:30
Abhijeet
c11dab9673 Auto-generated-organization field added in organization DB to differentiate between user created and auto generated organization 2021-04-23 19:29:20 +05:30
Trisha Anand
432b365980
[Hotfix] Fixed the migration script where actions with no default smart substitution configuration get the correct configuration of turned off (#4122)
* Fixed the migration script where actions with no default smart substitution configuration get the correct configuration of turned off

* Removed debug logs

* Stupid comment correction
2021-04-23 17:36:31 +05:30
Abhijeet
bb0516a495
Default counter for new datasource in organization should initiate at 1 (#4005)
* OrgId is added as a suffix to link datasource entry with orgId when creating document in sequenceDB.

* Each document entry in sequenceDB is linked to organization ID which is then used by the datasourceDB to generate default name. Testcase for testing default names to new datasources (#2212)

* Migration ChangeSet added to setup sequenceDB with organization ID in name field

* Optimization in string operation
2021-04-22 12:46:43 +05:30
Trisha Anand
dd00f51808
Type Migration for Plugins Part 2 : Migration of existing actions + revert hotfix for editor.json (#4085)
* WIP :  Migration of data type for smart substitution configuration

* Fixed the migration code. Also reverted editor.jsons  back to equality check after migrations of existing actions

* Only fetching actions for plugins which belong to supported plugins.

* Setting a default value of "false" for all the actions which don't have a valid configuration for smart substitution.

* Minor code formatting

* Minor language change in comment

* Removed debug logs
2021-04-22 12:07:25 +05:30
Abhijeet
005e00a8a8
Added new analytics datapoint to capture invite users event (#4095)
New analytics datapoint added to capture event : invite users to organisation
2021-04-22 10:59:47 +05:30
Nidhi
6b31aa333b
Introducing Google Sheets Plugin (#3517)
* cherry pick -make new

* revert to enable fix from release

* attempt to hook into existing datasource editor

* gSheets plugin skeleton from Rest API

* Changes for database migration

* fix for auth code

* separate it out

* action page loads!

* add to explorer

* create action from datasource

* Editor JSON WIP

* working query form

* Editor JSON WIP

* import to

* fix toast message

* redirect from datasource and editor pages

* fix onboarding

* fix imports and constants

* refactor form out

* refactor queryForm

* Merge branch 'release' into feature/google-sheets

* Merge branch 'release' into feature/google-sheets

* initial values from settings, editor and form

* Check

* remove dangling code around lightTheme

* Safety net

* remove class

* try mouseover solve

* force click

* changes from review

* fix action form name on import

* Merge branch 'release' into feature/google-sheets

* minor cleanup

* Merge branch 'release' into feature/google-sheets

* WIP

* Google sheets changes

* Merge conflicts

* Merging and fixes, needs refactoring

* Check

* Merge branch 'release' into feature/google-sheets

* Fixed tests

* Add cloud services env variable

* Clean up saga

* Clean up

* Refactoring

* Deleted svg file

* Minor fixes

* Modified design to allow behaviour in google sheets methods (#3486)

* Modified design to allow behaviour in google sheets methods

* Review changes

* Removed sysout

* Added handling of edge cases with table data

* Merge branch 'release' into feature/google-sheets

* Fixes

* Fixes

* Added validations

* Improved tests

* Removed extraneous injected bean

* Review changes

* Fixed bug with method

* Changes to Google sheets plugin's request and response structures (#3692)

* Method changes

* Removed logging

* Renaming options

* Reverting pom version

* Modified type of collection variables, fixed errors

* Converted row offset field to one that supports dynamic bindings

* Review changes

* List SAAS plugin type actions under lightning menu apis (#3820)

* list saas plugin type actions under lightning menu apis

* combine saas plugin type actions in the other sub menu of lightning menu

Co-authored-by: Hetu Nandu <hetunandu@gmail.com>

* Fix merge issues

* Prettified query editor and a few fixes w/ ux

* Test fixes

* Reformatting request

* code for REST added (#3876)


Co-authored-by: hetunandu <hetu@appsmith.com>

* Renamed body to row object

* Renamed placeholder for range

* Renamed range heading

* Modifications to handle range semantics

* Use spreadsheet Url instead of id

* Ordering of methods

* Removed logging

* Add tests for Dynamic text controls

* Add tests for url helpers

* Fix coverage config

* Nevermind

* Interface changes

* There is no body here

* Yay to hints

* Delete row field is separately handled as row index

* placeholder support (#4001)

* Fixed tests, typos and creating new sheets with random rows

* Switched to using 'rowIndex' throughout

* binding path added for query input field (#4016)

* - Fixed QA bugs (#4032)

- Split delete sheet into two
- Removed dynamic query input types from hidden keys

* Proper exceptions

* Removed extra logging

* Throw exception if update method does not match any of the columns

* Same for bulk update

* Zero-indexed delete row

* I'm a space bound rocket ship

* Logic to register installations with cs (#4062)

* Logic to register installations with cs

* Clean up

* Casting to string

* Checking to see if this makes the test pass

* Added an extra null check

Co-authored-by: Piyush <piyush@codeitout.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Apeksha Bhosale <7846888+ApekshaBhosale@users.noreply.github.com>
2021-04-22 09:00:09 +05:30
Trisha Anand
04601b5bcb
Merge pull request #4071 from appsmithorg/release
Release Patch 2
2021-04-20 15:41:58 +05:30
Nidhi
963d1225dc
Reverting use of Mongo Listener since we aren't applying this yet (#4073)
* Added synchronization to encryption map

* Reverting listener for now
2021-04-20 13:58:59 +05:30
Trisha Anand
f1253074a8
Added null check for NPE handling in sanitize datasource (#4072) 2021-04-20 13:13:22 +05:30
Sumit Kumar
5f96642e73 Merge branch 'release' into master 2021-04-19 12:55:31 +05:30
Trisha Anand
eaa24ca894
[Bug Fix] : Fetch actions by id during refactor action name to solve IncorrectResultSizeDataAccessException for pages where duplicate action names exist (#4030)
* New dto for refactoring action name which includes actionId as well

* Refactor action name now also takes actionId as payload and fetches the action from db by id instead of name to solve for the scenario where the action names could be duplicated.

* Adding actionId to QP of action refactor API.

* WIP : test for asserting the bug fix

* WIP test

* Fixed the test case asserting refactoring works for an action when there are duplicate action names in the page.

Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
2021-04-19 12:35:10 +05:30
Trisha Anand
4f8cf79041
[Bug fix] : Disallowing action creation with existing names from the page (#4015) 2021-04-16 16:13:03 +05:30
Abhijeet
6ea795e8a1
Autoscroll to invited organisation (#3945)
* Added organization slug to the invite Url, which is finally used by email template(#2359)

* Separate method to create email params. Welcome email url variable updated so as to be consistent with other email templates

* Unused enum emailType removed, importing of java.util.* removed as per suggestion
2021-04-15 16:46:46 +05:30
Trisha Anand
9b49308abe
Adding dependency relationship to plugins (#3997)
* Added dependencies to be added to dependencyMap on client to Postgres, MSSQL, MySQL and Mongo plugins

* Added Dependency config for API

* Fixed the test case
2021-04-15 11:36:41 +05:30
Shrikant Sharat Kandula
a259dd00ed
Fix internal server error on invalid header in curl command (#3931)
* Fix internal server error on invalid header in curl command

* Add tests for invalid header/method
2021-04-14 10:44:43 +05:30