Commit Graph

48 Commits

Author SHA1 Message Date
Aman Agarwal
78c89894f8
fix: updated settings page design (#16990)
fix: updated settings page design
2022-10-06 16:36:29 +05:30
Nidhi
66f3dfe790
chore: Move to Jupiter JUnit5 (#17083)
* Upgrading to Jupiter tests for everything but plugins

* Whoops, too soon

* Fixed failing tests

* Imports fixed

* Removed PowerMock dep and JUnit4 from interfaces

* Woohoo! That's testcontainers

* Added maven enforcer to disallow junit4

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/GitServiceTest.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/UserWorkspaceServiceTest.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Weird formatting and version upgrades

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-09-29 08:54:07 +05:30
Nidhi
6df4dafead
chore: Better server logging infra (#15440)
* Fixed a bunch of server side logging issues

* Tests

* Added ISO8601 timestamp to log format
2022-07-28 09:40:03 +05:30
Shrikant Sharat Kandula
bba78afc3b
chore: Upgrade dependencies reported by Dependabot (#13735)
Upgrades vulnerable dependencies in all plugins except for MySQL. That one is still failing and I'll fix it in a separate PR. Issue #14475

Co-authored-by: Nayan <nayan@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
2022-07-19 10:23:27 +05:30
Leo Thomas
9ddb11dbfb
SQL Server Connection pool with HikariDataSource (#13707)
Co-authored-by: Leo Thomas <leoweb2010@gmail.com>
2022-05-18 22:03:39 +05:30
Arpit Mohan
96677ef673
fix: Updating log4j to 2.17.0 to prevent JNDI lookups (#9863)
Also making minor edit to not show "Application name updated" toast message. This is a counter-productive toast that is distracting the user
2021-12-20 16:01:08 +05:30
Trisha Anand
94f312726b
fix: Updating the MS-SQL select query template to use TOP instead of LIMIT since LIMIT is not supported in the same. (#9082) 2021-11-12 10:48:43 +05:30
Trisha Anand
57ed477510
fix: Adding Prepared Statement setting to the main query pane for Postgres, MySQL and MS SQL plugins (#7762) 2021-09-23 14:39:22 +00:00
Arpit Mohan
37e7a61792
chore: Minor changes for fixing some strings on the home page & action settings page (#7469) 2021-09-15 12:20:25 +00:00
Nidhi
8b8e57f010
Use BigDecimal to maintain precision (#7189) 2021-09-07 09:14:13 +00:00
Trisha Anand
f6df16bde4
fix: Json smart substitution breaks when evaluated value contains the character '?' (#7031)
* Minor refactoring

* Partial code change to replace question mark with appsmith placeholder

* Working version

* Removing unnecessary code

* Added test case to assert that when evaluated value contains a "?", the replacements are still correct

* Added test case in Mongo Plugin as well for the same scenario

* Minor change in the language of the comment
2021-09-02 12:30:04 +00:00
Trisha Anand
ede0df21bc
Adding timeout on execution of postgres and ms sql actions (#5922) 2021-07-16 20:24:18 +05:30
Trisha Anand
18fa47e2b4
Taking Smart Substitution for Mongo out of Beta (#5650) 2021-07-08 11:25:53 +05:30
Nikhil Nandagopal
e8ba1bee7f
removed quotes from sql templates because of prepared statements being on (#5404)
removed comments from sql templates confusing users with errors because of linting
2021-06-25 14:39:39 +05:30
Trisha Anand
06cafb6066
Getting Prepared Statement for Postgres, MySQL, and MS-SQL and Smart Substitution for Rest API plugins out of beta (#5019)
* Correcting text for Mongo Form Insert command

* Getting Prepared Statement for Postgres, MySQL, and MS-SQL and Smart Substitution for Rest API plugins out of beta

* Fixed failing test case

* Fixed Ms-sql plugin test failure
2021-06-10 13:55:56 +05:30
Anagh Hegde
4268e4caaa Replace the repoTag from latest to fixed version 2021-06-04 13:49:20 +05:30
Anagh Hegde
b7ccb1da01 Fix - tests don't run on an M1 Silicon Mac 2021-06-04 11:15:44 +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
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
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
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
Trisha Anand
30a82c2d24
Hotfix for broken release. Would do a proper fix on release tomorrow with migration (#4075) 2021-04-20 18:54:34 +05:30
Trisha Anand
eeaa26a7cc
Type migration from String to Object for plugin specified templates to preserve boolean and any other future data types (#4053)
* WIP : Type migration from String to Object for value

* Migrating config from string to boolean for prepared statement.
Handled error for already stored actions where PS config is stored as String and not Boolean.
2021-04-20 16:09:48 +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
Sumit Kumar
41e44eed30
Feature: add title to action execution errors to improve user experience (#3872)
- add title to action execution errors to improve user experience
    - all errors in AppsmithPluginErrors
    - action execution related errors in AppsmithError : NO_CONFIGURATION_FOUND_IN_DATASOURCE, INVALID_ACTION, INVALID_DATASOURCE, INVALID_DATASOURCE_CONFIGURATION - as these are the likely errors in an action execution flow (excluding plugin specific flow) that might result from faulty action / datasource configuration by a user.
    - title is returned as part of ActionExecutionResult.
    - title is set in ActionExecutionResult on failure during action execution.
    - In response to review comment - added a new BaseException class, so that both AppsmithException and AppsmithPluginException extend this base class. Also, refactored code to introduce setErrorInfo() function in ActionExecutionResult class to set its attributes.
- Some unrelated cleanup:
    - catch PoolInitializationException for Postgres plugin and return AppsmithPuginException
    - catch MongoTimeoutException and return AppsmithPluginException
2021-04-08 09:49:05 +05:30
Hetu Nandu
28995e5b53
Fix PS and smart substitute true false value (#3896) 2021-04-07 16:06:17 +05:30
Hetu Nandu
5a1584377b
Update editor.json for Postgres, Mongo, MySQL, MS-SQL adding evaluation type (#3884)
Co-authored-by: Trisha Anand <trisha@appsmith.com>
2021-04-06 18:27:51 +05:30
Trisha Anand
4a087b172c
Feature : BSON Smart Substitution in Mongo Plugin (#3804)
* Feature : JSON Smart Substitution in Mongo Plugin

* Added BSON data type for Mongo substitution. Added test case

* Minor comment added

* Minor variable re-naming and correcting failing test cases.

* REST API : Escaping special characters in string before smart substitution

* Incorporated review comment
2021-04-05 17:12:29 +05:30
Trisha Anand
b9fd72e89d
Smart Substitution Debugging - Adding Appsmith data type to each parameter in response's request object for execute (#3716)
* Smart Substitution Debugging - Adding appsmith data type to each parameter in response's request object for execute

* Incorporated review comments.

* Fixed failing test cases.

* Fixed MS-SQL test failures.
2021-03-26 23:29:12 +05:30
Nidhi
683176fc48
Increased default limit for webclient payload (#3718)
* Increased default limit for webclient payload
2021-03-26 21:34:10 +05:30
Trisha Anand
c420d0207f
Supporting timestamp datatype in Prepared Statement (#3690)
* WIP : Adding timestamp datatype in Prepared Statement

* Added simple tests for commonly used data types' identification

* Added plugin level test cases for timestamp with Prepared Statement to Postgres
2021-03-26 13:19:22 +05:30
Trisha Anand
ed1a0b4045
Refactor the smart substitution code to extract common code at plugin interface level. (#3497) 2021-03-25 19:10:42 +05:30
Sumit Kumar
56f22edbe8
Return hint message on identical columns (#3656)
- Return hint message if identical column names are found in SQL query for postgres, MySQL, mssql, redshift plugin.
- Add a PluginUtils class to hold general utility functions for plugins.
2021-03-24 08:22:49 +05:30
Trisha Anand
217e36aaa9
Enrichment of analytics event for execute. (#3492)
* WIP : enrichment of analytics event for execute.

* Plugin level : Catch all exceptions and set request in the result
Server level : Adding new fields to analytics : `isSuccessfulExecution`, `statusCode`, `timeElapsed`

* Dont catch StaleConnectionException. Server handles the same.

* Removed class specification for onErrorResume in plugins since its supposed to catch all errors.
2021-03-11 15:40:07 +05:30
Trisha Anand
9f63bfafd2
Adding JSON intelligent substitution for Rest Api plugin (#3474)
* POC : null value getting handled correctly

* Refactor code. Tested with and without quotes. This is working! Woohoo!

* Added support for mustache binding to include json objects and arrays

* Added test for smart substitution.

* Added setting to turn on/off smart substitutions in Rest API plugin

* Handling turning on smart json substitution

* Added error handling

* Added config to turn on smart substitution in JSON to make the tests pass now

* Adding a beta tag to the API setting.

* Spelling error resolved.

* Incorporated review comments.

* Catching JSON Parse exception in http call.
2021-03-11 14:10:00 +05:30
Trisha Anand
092a942036
Added support for Prepared Statement in MS SQL plugin. (#3438)
* Added support for Prepared Statement in MsSQL plugin.

* Minor code formatting

* Merged release and refactored code for compilation.
2021-03-09 14:42:53 +05:30
Trisha Anand
91e308665b
Requests preparation by plugins instead of ActionService (#3159)
* Added action request in S3 plugin.

* Added request data in Dynamo plugin

* Added request in Elastic Search.

* Request in Firestore.

* Request added in Mongo

* MsSQL request added.

* Added MySQL request.

* Added Postgres request.

* Added redis request.

* Redshift doen.

* Catching AppsmithPluginExceptions at the plugin level itself to ensure that the request gets passed on as part of the result.

* Fixed failing plugin test failures

* Fixed AmazonS3 test failures.

* WIP post analytics working

* WIP : Making the request data confirm to existing analytics request data format.

* Fixed the headers in the analytics body.

* Migrations S3, Postgres to the accepted format for request in analytics

* Updated S3 action to be the query

* Migration completed for all plugins for analytics.

* Removed the old analytics event. Now sending only the new one.

* Ensuring all data is captured in S3 plugin request in case of error.

* Minor editing of firestore to ensure that the errors get caught by the plugin itself.

* Fixed test cases in Amazon S3

* Incorporated review comments.
2021-03-02 10:58:46 +05:30
Sumit Kumar
e6b77a1299
Stop logging some AppsmithPluginException to Sentry (#2351)
1. Move package  appsmith-interfaces/src/main/java/com/appsmith/external/pluginExceptions-> appsmith-interfaces/src/main/java/com/appsmith/external/exceptions/pluginExceptions
2. Move enum AppsmithErrorAction from appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java -> appsmith-interfaces/src/main/java/com/appsmith/external/exceptions/AppsmithErrorAction.java, so that both plugin exceptions and server exceptions could use the same enum.
3. Log exception based on the error action defined for each exception.
2021-02-04 15:24:30 +05:30
Shrikant Sharat Kandula
5e04ca5c9d
Add ability to configure order of templates of plugins (#2279) 2020-12-18 20:45:08 +05:30
Nidhi
a00c144e85
Subclassing authentication (#2215)
* Sublcassing authentication

* Removed TODO

* Review changes
2020-12-17 21:38:52 +05:30
Trisha Anand
888d79b06d Removing printing of result objects from plugin execution. 2020-12-09 19:03:51 +05:30
Trisha Anand
8283396056
Moved from boundedElastic to elastic to ensure that the server services the plugin execution request as soon as the request arrives. (#2090) 2020-12-08 22:04:14 +05:30
Trisha Anand
2062c60ca3
Moved all the scheduling of the plugin executions to bounded elastic instead of elastic. (#1931) 2020-11-26 17:50:43 +05:30
Trisha Anand
242afd5753
Making MS-SQL plugin blocking statements run on elastic thread pool (#1827)
* MS-SQL Plugin now creates connection and executes statements over elastic thread pool.

* Added a test to ensure that throwables are clean.
2020-11-23 11:28:01 +05:30
Arpit Mohan
c6d4902e3d
Adding microsoft SQL server plugin integration (#1374) 2020-10-23 20:36:45 +05:30
Arpit Mohan
2bb093a5d7 Removing Mssql plugin 2020-10-20 22:27:29 +05:30
Arpit Mohan
3164c4a7d6
Fixing the build for mssql plugin (#1313) 2020-10-20 14:52:57 +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