Commit Graph

156 Commits

Author SHA1 Message Date
Aman Agarwal
c49c42b0be
fix: functionality of placeholdertext in key value array control (#24483)
## Description
This PR fixes : 
- the functionality of placeholder for the key value array control which
was earlier accessing `placeholderText` key from a wrong path for host.
- Added placeholders for different datasources as well
2023-06-16 18:04:25 +05:30
Aman Agarwal
dba06b1705
feat: added trigger for collection property editor, making it dd for mongo (#24213)
## Description
Added a dynamic trigger config to mongo editor json for each command to fetch the collections whenever the mongo action is opened and populate those in the dropdown to allow users ease in selecting the collection to run a query.
2023-06-14 12:16:09 +05:30
ChandanBalajiBP
b5185ab8b5
fix: Update connection mode DropDown by Segmented Control (#23730)
## Description
> Update the Drop-Down component to Segemented Control as per the
designs in datasource configuration.
>Here is the FIGMA
[link](https://www.figma.com/file/xlYswIZx9noaldAPmv3ji4/Multiple-Environments-V2?type=design&node-id=79-36425&t=egGDXQsYmAFAWjBU-0)

>Current state 
><img width="393" alt="Screenshot 2023-05-25 at 3 08 38 PM"
src="https://github.com/appsmithorg/appsmith-ee/assets/104058110/5f623fee-5ba7-464d-be34-a106f0e7c438">

>Updated State 
><img width="393" alt="Screenshot 2023-05-25 at 3 08 38 PM"
src="https://user-images.githubusercontent.com/104058110/237018777-132f6607-a757-41c0-9d52-c00e70745f36.png">

#### PR fixes following issue(s)
Fixes #

#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
>
## Testing
>
#### How Has This Been Tested?
- [x] Manual
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [x] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [x] Test plan has been peer reviewed by project stakeholders and other
QA members
- [x] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-05-29 16:45:52 +05:30
albinAppsmith
629999f124
feat: [epic] appsmith design system version 2 deduplication (#22030)
## Description

### Fixes
- [x] https://github.com/appsmithorg/appsmith/issues/19383
- [x] https://github.com/appsmithorg/appsmith/issues/19384
- [x] https://github.com/appsmithorg/appsmith/issues/19385
- [x] https://github.com/appsmithorg/appsmith/issues/19386
- [x] https://github.com/appsmithorg/appsmith/issues/19387
- [x] https://github.com/appsmithorg/appsmith/issues/19388
- [x] https://github.com/appsmithorg/appsmith/issues/19389
- [x] https://github.com/appsmithorg/appsmith/issues/19390
- [x] https://github.com/appsmithorg/appsmith/issues/19391
- [x] https://github.com/appsmithorg/appsmith/issues/19392
- [x] https://github.com/appsmithorg/appsmith/issues/19393
- [x] https://github.com/appsmithorg/appsmith/issues/19394
- [x] https://github.com/appsmithorg/appsmith/issues/19395
- [x] https://github.com/appsmithorg/appsmith/issues/19396
- [x] https://github.com/appsmithorg/appsmith/issues/19397
- [x] https://github.com/appsmithorg/appsmith/issues/19398
- [x] https://github.com/appsmithorg/appsmith/issues/19399
- [x] https://github.com/appsmithorg/appsmith/issues/19400
- [x] https://github.com/appsmithorg/appsmith/issues/19401
- [x] https://github.com/appsmithorg/appsmith/issues/19402
- [x] https://github.com/appsmithorg/appsmith/issues/19403
- [x] https://github.com/appsmithorg/appsmith/issues/19404
- [x] https://github.com/appsmithorg/appsmith/issues/19405
- [x] https://github.com/appsmithorg/appsmith/issues/19406
- [x] https://github.com/appsmithorg/appsmith/issues/19407
- [x] https://github.com/appsmithorg/appsmith/issues/19408
- [x] https://github.com/appsmithorg/appsmith/issues/19409

Fixes # (issue)
> if no issue exists, please create an issue and ask the maintainers
about this first


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video


## Type of change

> Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide
instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
> Delete anything that is not important

- Manual
- Jest
- Cypress

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvi@appsmith.com>
Co-authored-by: Arsalan <arsalanyaldram0211@outlook.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Rohit Agarwal <rohit_agarwal@live.in>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvibhakta@gmail.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Vijetha-Kaja <vijetha@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Apple <nandan@thinkify.io>
Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com>
Co-authored-by: rahulramesha <rahul@appsmith.com>
Co-authored-by: Aswath K <aswath.sana@gmail.com>
Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com>
Co-authored-by: Vijetha-Kaja <119562824+Vijetha-Kaja@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-05-20 00:07:06 +05:30
Shrikant Sharat Kandula
4280ded88e
chore: Fix unnecessary re-shading of jars (#21994)
Solves a single thing in the build configurations, resulting in a few
wins.

1. Reduced number of warnings in the output.
   1. In release branch:
      ```
mvn clean package -DskipTests | grep --fixed-strings --count '[WARNING]'
      3233
      ```
   1. In this PR's branch:
      ```
mvn clean package -DskipTests | grep --fixed-strings --count '[WARNING]'
      172
      ```

2. All uber-jar files are shaded twice, currently. Once with the default
execution of `maven-shade-plugin`, and again with the `shade-plugin-jar`
execution in these `pom.xml` files. This is double-work, and is the
cause of most of the warnings we see.
1. This `shade-plugin-jar` was added to have the plugin information
included in the `/META-INF/MANIFEST.MF` file, since we can't configure
the default execution of the shade plugin (it comes to us from Spring
Boot).
2. Instead, we switch to configuring plugin information in a
`/plugin.properties` file.
3. Previously, we used `/plugin.properities` for plugin information in
dev time, and `/META-INF/MANIFEST.MF` in production. This PR will change
it so that we use `/plugin.properties` all the time. We configure PF4J
with a custom plugin manager to achieve this.

3. Moved all `plugin.properties` into `src/main/resources`, so that they
land up in the root of the final jar files. But this means, during
development, loading the plugin fails since it looks for a
`plugin.properties` at the root of the plugin module, i.e., next to the
`src` folder.
1. For this, in the custom plugin manager class, we change where we look
for the `plugin.properties` file during development mode. In this mode,
we look at the `target/classes/plugin.properties` file, which is where
maven saves this file, taken from
`src/main/resources/plugin.properties`.
2. This also solves the duplication of the plugin properties that's
currently present, between `plugin.properties` and the `<properties>`
section of `pom.xml` files.


Here's the shade plugin's default execution and configuration, from
Spring Boot:
https://github.com/spring-projects/spring-boot/blob/v3.0.1/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/build.gradle#L174.
2023-04-03 17:49:21 +05:30
PiyushPushkar02
f04c474fc4
fix: MongoDB Invalid DB Name Error Msg (#21599)
## Description

- This PR adds a check to throw a proper error if the default database
name is empty and an invalid database name is provided in the
authentication section for mongo db.
- Added JUnit test cases for the same. one for an invalid db name and
one for a valid db name (Both with empty default db name)
- There is one more issue observed here which is not taken part in this
ticket. When you try to save the mongo data source with the default
database name and empty database name under auth section. Once you try
to save the data source it will throw an internal server error. Created
a ticket for the same:
https://app.zenhub.com/workspaces/data-integration-pod-6322a759b3296d249ce5c4ed/issues/gh/appsmithorg/appsmith/21598

Fixes #12260 

## Type of change
- Bug Fix(non-breaking change which adds functionality)

## How Has This Been Tested?
- Manual
- JUnit TC added 

### **Checklist**:

- [x]  My code follows the style guidelines of this project
- [x]  I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ]  I have made corresponding changes to the documentation
- [ ]  My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x]  New and existing unit tests pass locally with my changes
- [ ]  PR is being merged under a feature flag

### **QA activity:**

- [ ]  Test plan has been approved by relevant developers
- [x]  Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ]  Added Test Plan Approved label after reveiwing all Cypress test
2023-03-23 11:23:56 +05:30
PiyushPushkar02
df62613709
chore: JUnit TC For Many Form Update (#21671)
## Description

- Added a test case for array type input for many form update command as
mentioned in
[#17732](https://github.com/appsmithorg/appsmith/pull/17732)

Fixes #17732

## Type of change

> Please delete options that are not relevant.
- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?
- JUnit

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-03-22 19:49:27 +05:30
Manish Kumar
60626a14cf
fix: Ensure backward compatibility w.r.t. statusCode and response.body in case of errors (#21052)
## Description
Since we have introduced the error handling framework, each plugin
produces error messages specific to the plugin execution exception. This
Pr is just about standardising these error messages.
In this PR we are handling only five plugins as mentioned:
- Rest API
- MongoDB
- Postgres
- MySql
- Google Sheets

> Modifying error messages for five plugins Rest API, Mongo, Postgres,
MySQL, and Google Sheets for improving consistency.

In addition it also takes care of the following issues
- If the downstream error message is available response.body will hold
that value and it will hold the appsmith error message otherwise
- Don't override the actual http status code with Appsmith error code in
case of RestAPI and GraphQL plugins

Fixes #20438 #21022

## Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## How Has This Been Tested?
- Manual


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag

---------

Co-authored-by: subrata <subrata@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
2023-03-03 21:18:01 +07:00
ChandanBalajiBP
b72dea33f3
feat: Error handling phase 1 (#20629)
## Description
This PR updates the error logs 
- Establishing a consistent format for all error messages.
- Revising error titles and details for improved understanding.
- Compiling internal documentation of all error categories,
subcategories, and error descriptions.

Updated Error Interface:
https://www.notion.so/appsmith/Error-Interface-for-Plugin-Execution-Error-7b3f5323ba4c40bfad281ae717ccf79b

PRD:
https://www.notion.so/appsmith/PRD-Error-Handling-Framework-4ac9747057fd4105a9d52cb8b42f4452?pvs=4#008e9c79ff3c484abf0250a5416cf052

>TL;DR 

Fixes # 


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video


## Type of change

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Manual
- Jest
- Cypress

### Test Plan


### Issues raised during DP testing


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: subrata <subrata@appsmith.com>
2023-02-18 18:25:46 +05:30
Nidhi
dfccd5a058
chore: Upgrade to Spring Boot 3.0.1 (#19044)
This upgrade takes care of our move to JDK 17, Spring Boot 3.0.1 and a
few other security upgrades along the way.

Fixes #18993 

TODO:

- [x] Check CI changes for Java 17
- [x] Check vulnerability report
- [x] Mongock needs an upgrade
- [x] Add JVM args at all possible places for exposing java.time module
- [x] Add type adapters everywhere / use the same config for type
adapters everywhere
2023-01-02 19:40:59 +07:00
Nidhi
5329010415
fix: Refactor entities based on AST parsing logic (#18517)
* feat: Refactor entities based on AST parsing logic

* Deleted jmh file

* rts updates for the edge cases

* adding jest test cases

* update review comments

* Fixed issue with references outside of bindings and some other stuff

* Added tests for DSLUtils

* bug fix 18699

* Test fixes

* Test fixes

* Review comments

* Changed type to boxed

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
2022-12-12 08:12:21 +03:00
amogh2019
a99a989929
chore: Mongo plugin refactor Mongo plugin JUnit TCs (#17633)
* Refactoring MongoPlugin Junit TCs into smaller files
2022-10-31 18:42:54 +05:30
amogh2019
37a1738490
fix: MongoPlugin Update Command : parsing valid document or array of valid documents (#17732)
* parse array of valid documents for update command
2022-10-30 17:07:02 +05:30
subratadeypappu
19e2e5785e
Fix/16994 refactor common datatype handling (#17429)
* fix:Add array datatype to execute request

* feat: Consume and store type of array elements in Param class (#16994)

* Append param instead of clientDataType in varargs (#16994)

* Refactor common data type handling w.r.t newer structure (#16994)

This commit takes care of the following items:
- It minimizes the number of usage to the older stringToKnownDataTypeConverter method
- Modifies the existing test cases to conform to the newer structure
- Marks stringToKnownDataTypeConverter method as deprecated to discourage further use

* Remove comma delimited numbers from valid test cases (#16994)

* Fix extracting clientDataType from varargs in MySQL (#16994)

* Pass param as a dedicated parameter in json smart replacement (#16994)

* Remove varargs from json smart replacement method (#16994)

* Move BsonType to mongoplugin module (#16994)

* Introduce NullArrayType and refactor BsonType test cases (#16994)

* Add new test cases on numeric string with leading zero (#16994)

* Refactor test case name (#16994)

* Add comment on the ordering of Json and Bson types (#16994)

* Add comment on the ordering of Json and Bson types (#16994)

* Add NullArrayType in Postgres and introduce postgres-specific types (#16994)

* Add data type test cases for Postgres and change as per review comments (#16994)

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
2022-10-18 11:02:37 +05:30
Nidhi
c3e935ef40
fix: Remove datasource connection from cache when datasource is deleted (#17364)
* Changes to testDatasource interface method and archive flow

* Tests for plugin level testDatasource implementations

* Added test for refreshing cache on deleting datasource

* Modified warnings to errors in logs

* Fixed test

* Fixed test
2022-10-17 10:31:26 +05:30
Ayangade Adeoluwa
18ef195f13
fix: Switches mongo field type from dynamic input text to dynamic text (#17447)
Switches mongo field type from dynamic input text to dynamic text
2022-10-13 19:26:55 +05:30
Aman Agarwal
78c89894f8
fix: updated settings page design (#16990)
fix: updated settings page design
2022-10-06 16:36:29 +05:30
Manish Kumar
00486833ea
fix: MongoPlugin smart substitution for regex arguments (#16977)
* BugFix: Fix for mongoPlugin smart substitution of regex attributes, Fixes: https://github.com/appsmithorg/appsmith/issues/11880
	Changes:
		MongoPlugin.java
		MongoPluginTest.java

* Added test for decimal numbers and made changes to regex

* code formatting: Formatted some test cases in MongoPluginTest.java
2022-09-29 10:37:19 +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
Shrikant Sharat Kandula
8a0838505a
All outgoing requests should go through the configured proxy (#14427)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-09-01 11:16:45 +05:30
Nidhi
10c9f77359
fix: Make default DB compulsory in URI string format (#15881)
* fix: Use admin as default database when no Mongo DB is specified

* fix: Make default db compulsary instead

* Added back check during execution per review

* Json field spec fix

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-08-11 15:35:27 +05:30
Ayangade Adeoluwa
1ecffb8272
fix: Modify Form Control Inputs for various Datasource Actions (#15396)
* Modify control type for MongoDB Collection field

* Make more form control changes across datasources

* Fix cypress errors

* Fix typescript error

* Fix more cypress tests

* Fix failing MongoDBShoppingCart spec

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-08-09 13:05:59 +00:00
Sumit Kumar
f5de45dfd7
fix: fix Mongo plugin query execution failure (#15591)
* add handling for IllegalStateException
add TCs

* rename var
2022-08-02 14:55:06 +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
subratadeypappu
41c3446f5b
fix: Enable parsing dates before Jan 1, 1970 in MongoDB (#15105)
* fix: Enable parsing dates before Jan 1, 1970 in MongoDB

This commit takes care of three things
1. It enables the application to parse dates before Jan 1, 1970 in case of MongoDB
2. JUnit test
3. Cypress test

* fix: Enable parsing dates before Jan 1, 1970 in MongoDB

This commit takes care of three things
1. It enables the application to parse dates before Jan 1, 1970 in case of MongoDB
2. JUnit test
3. Cypress test

Co-authored-by: Nidhi <nidhi.nair93@gmail.com>
2022-07-14 15:45:34 +05:30
Nidhi
906a7298dc
feat: Simplified Google Sheets queries (#14869)
* Client changes 1

* add DSL functionality

* Temp commit for refactoring changes

* Do I even know what I'm doing here?

* chore: Second GS layout

* Update: Visibility conditional outputs for schemas

- Added the output from conditional outputs for schema children too

* Update: Entity selector visibility control

- Added logic for controlling visibility of sub components via the JS expressions system

* Update: Passing disabled prop to toggle button

* Update: Passing disabled prop to toggle btn

* Update: Styled component for toggle button

- Added disabled styles based on the disabled prop sent to the toggle form view JSON button

* Update: configProperty role in Entity Selector

- Removed dependance of the configProperty of the entity selector children to it's parent component

* Update: type of placeholder key

- Made placeholder key from form config JSON to accept either string or an object
- Earlier only string was accepted
- This is for pagination component

* Update: Added placeholder control for pagination

* Client changes 1

* add DSL functionality

* Do I even know what I'm doing here?

* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design

* fix: updated tooltip component for wrong ui on entity explore

* temp triggers

* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design (#12395)

* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design

* fix: updated tooltip component for wrong ui on entity explore

* fix: updated tooltip ui, where condition placement, sort by ui

* temp form data access logic

* fix: updated sorting type width ui

* fix: updated ui for spacing, width and text issues

* Update: Type for tooltip of UQI forms

- Added option to send an object to the tooltipText object.
- This allows for composite components like pagination to have tooltips for each sub component

* Update: tooltip for pagination component

- Added handling to parse the tooltip for multiple components.
- This allows for composite components like pagination to have tooltips for each sub component

* Update: Type cast for tooltip component

- Made the content passed to tooltip component as a string only

* Update: Fixed tooltip component CSS

* Update: Dropdown option component

- Added a tooltip wrapper to each option
- This is to show on hover text like disabled state

* fix: updated ẇhere clause broken ui for condition

* Add: functions to check and extract expressions

- Loop through the formConfig and find any keys that have a value that is bindable
- Used pre defined regex to check if value is a moustache binding

* Add: Types for evaluated form configs

- Added types for the form configs to be evaluated and their output post eval

* Add: Flow to run the form config

- Run the form config and update the result to the redux state

* Update: Name of the type for formconfigs

- Updated since it was clashing with a component of the same name

* Add: Function to enforce config type checks

- This is done so that the improper configs can be weeded out and the rest of the form can be shown

* Add: Function to update evaluated config

- Added option to update the config if it's values needed evaluation

* Add: Type check for schema sections

* Update: Error handling for invalid control type

- We were throwing an exception till now, changed it to a warning text

* Add: Exposed tooltip for dropdown option disabled state

* Update: switch to json mode functionality

- Added logic to convert data to a string rather than an object when the first switch to JSON mode happens

* Update: Added key to tooltip for dropdown options

* Trigger API modification

* Add: function to fetch default trigger URL

* Update: Made URL optional in dynamic trigger config

* Update: Dynamic trigger API call

- Made the API call for dynamic triggers have URL as optional field
- Added type check to the response of the API call

* Update: resp type for trigger APIs

* Update: Moved code to utils folder

- Moved functions for UQI form eval processing to utils file

* Update: passing original controltype to JS switch

* Update: config for JSON editor mode

- Updated the config to have different options for JSON mode depending on the original control type

* Update: Connected line numbers flag to config

* Revert: CSS changes for tooltip

* Refactor: Removed consle

* Add: type for the config of dynamic values

* Add: Feature to evaluate config for triggers

* Refactor: fix type check errors

* fix: dropdown ui width with text alignment

* Update: fixed selector for dynamic values

* Update: selector call for fetchDynamicValues

* Add table header index prop for columns selector

* migration partial commit

* migration partial commit

* Refactor: removed unused import

* Update: reused function for checking dynamic value

* Update: removed unused import

* Fix format JSON issues

* Retrieve binding paths from entity selector components

* Fixes 6 remaining issues with UQI implementation

* Fix dropdown issues

* Fix dropdown height issues and fixes triggering of APIs when option is deselected

* Migration changes

* Fix QA generated UQI issues

* Fix projection component height and route change logic

* Fix multi select dropdown placeholder text issue and json stringify issue with switching view types

* Reset entity type value when command value changes

* Test changes

* Review comments

* Moved migrations around

* Corrected import statement

* Added JSON schema migration

* Updated schema version

* perf improvements and filter dropdown options feature

* Fix Code mirror component config for toggleComponentToJson input fields.

* Fix prettier issues

* fix prettier issues

* Fix style issues as a result of the merged conflicts

* Fix failing test case

* Fixed a few other flows (#14225)

* Fixed a few other flows

* Review comments

* Fix generate CRUD, fix evaluation of dynamic bindings and fix various styling issues.

* More fixes (#14367)

* Factor in the root formconfig parent key.

* Fix flickering issues, and evaluatedFormConfig issues

* fix: Teeny bugs (#14455)

* Teeny bugs

* Added previous functionality as is

* Improvements in the way we fetch dynamic values

* Fix stringiification issue and cyclic dependency issues

* Resolve projection component values deletion

* Resolve merge conflicts and fix prettier issues

* fix: Tsc issues

* Fix property pane connection navigation

* updating ee locator

* updating inputfield locator

* dropdown locator update

* Merge conflict not properly resolved.

* Fix s3 spec

* Fix Mongo Spec

* Fix some more tests

* fix: prevent cyclic dependency when switching to js mode (#14668)

* add delete events for change from array to string in diff

* add test to assert absence of cyclic dependency error when switching to js in switchgroup widget

* Assert that evaluation is not disabled when no cyclic dependency happens

* Cypress test preparations for google sheets and form controls

* Fixed a few test errors (#14874)

* Add: unit tests for uqi UI updates

- view type tests
- conditional output extraction
- processing conditional output to handle view/enabled state of the component

* Add: completed isValidFormConfig test

* Update: improved tests for update config

- These tests cover the functionality to update a section config after it's components are done evaluating

* Fix failing cypress tests and cyclic dependency issue

* Fixes some more tests

* Fixed migration of row objects (#14896)

* Bumped the version of design system package

* Update: reverted change to EE selector

* Fix deletion pointer

* Update: selector for js on load spec

- Synced with changes related to ADS dropdown

* Fix mongoDBShoppingCart spec

* Remove comments

* Fix: mongo shopping cart test failures

* fix: mongo shopping cart spec

* Dummy push to retrigger vercel

* fix: mongo shopping cart spec

* Update MongoDBShoppingCart_spec.js

* fix: removed unused click away

* dummy commit

* Update: moved helper functions to separate file

* Add: added tests for saga functions

- Worked on testing for
   - extractFetchDynamicValueFormConfigs
   - extractQueueOfValuesToBeFetched

* Add if check for queueOfValuesToBeFetched

* Resolve review comments

* Empty-Commit

Co-authored-by: Irongade <adeoluayangade@yahoo.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Ayangade Adeoluwa <37867493+Irongade@users.noreply.github.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com>
Co-authored-by: Albin <albin@appsmith.com>
2022-07-04 11:13:27 +05:30
sidhantgoel
0ccc1aee93
fix: Fixes issue where CI was not executing all tests (#14338)
* made test classes public

* added surefire compatible with junit 4

* Revert the changes of tests class accessibility

* Fix test failures

* test case fixes

* fixed NPE

* Fixed failing tests

Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Nidhi <nidhi.nair93@gmail.com>
2022-06-15 12:04:28 +05:30
Nidhi
b2d356bcce
fix: Fixes connection pool minimum size to 0, also refactored uri related operations (#12837) 2022-04-12 16:33:07 +05:30
Leo Thomas
f8cc2f5e54
fix: add support for reading DBRef type in Mongo plugin (#12670)
* DBRef fix with codec

* Added code comments regarding custom codec implemented

* Added Unit Test for Mongo DBRef

Co-authored-by: Leo Thomas <leoweb2010@gmail.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2022-04-11 09:38:17 +05:30
Sumit Kumar
c2f39f4eda
feat: [server side change only] convert Mongo's form data to raw / native query (#10058) 2022-04-01 18:44:32 +05:30
Sumit Kumar
027161e033
fix smart substitution setting toggle fetch method and path. (#12181)
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-03-24 17:55:32 +05:30
Nidhi
1ca9fd803a
fix: S3 formData path for bucket name (#12049) 2022-03-22 12:56:42 +01:00
Nidhi
c97b7e31e7
chore: Migrations to enable JSON and form mode (#11534)
* feat: added new component to perform generic json raw toggle functionality

* chore: Migration to convert formData references

* fix: Redid migration for per plugin changes, fixed consumption

* fix: Added JSON migration for git import

* Added JSON migration as well

* Reverted client side changes

* fix: Modified plugin config aggregation logic

* Merge conflict fixes

* different paths for different commands

* Whoopsie

* Modified usage to different paths

* Reverting env change

* Config changes to show json mode

* Test fixes

* Migrated body,path,next,prev

* Cypress test fixes

* Modified dynamic binding replacement

* Changed view type

* Reverted json form mode display

* Modified structure of JSON mmigrations

Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-03-21 11:22:14 +05:30
Nidhi
8b1638aba6
chore: Modified plugin config aggregation logic (#11561)
* fix: Modified plugin config aggregation logic

* Modified logs a bit

* Reverted incorrect path from another branch
2022-03-03 19:26:55 +05:30
Mojtaba
29be75e0e9
feat: add smart substitution handling for known MongoDB types (#11135)
* shelf: start working on substitution for `ISODate`

* a draft for Sumit to check what I did wrong in my tests

* test: tests are working

* test: cleanup

* refactor: add replacementDataType parameter to DataTypeStringUtils.jsonSmartReplacementPlaceholderWithValue

* fix: remove quotes for Mongo Types work in single form, arrays and json.

* add handling for more use cases
add/update more TCs

* add comments

* add more comments

* add space (cosmetic change)

Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2022-03-02 22:33:50 +05:30
Mojtaba
dad6dfb636
fix: Fixed test MongoDB datasource shows ok even if there is no database matching the name in the 'Default Database Name' input (#11238) 2022-02-18 10:41:01 +03:30
Mojtaba
497dd1a21b
fix: showing invalid credentials message on MongoDB test datasource if there is an unauthorized error (#11124)
* fix: if test datasource gets Unauthorized accessing admin database
It will try to access the default database.

* fix: fix broken test

* fix: cleanup unused imports

* test: make test more readable with better comments
2022-02-16 14:03:13 +05:30
Félix Suarez Bonilla
9bcd4afff1
feat: Add Mongo Templates for plugin. (#11153)
Adds templates for the Aggregate, Distinct and Count commands for the MongoDB plugin.
2022-02-15 10:29:01 -06:00
Mojtaba
f6463d0cf8
fix: Added stricter validation for Mongo pipeline (#11034)
* fix(mongoPlugin): try to make JSON validation more strict

* test(mongoPlugin): add testAggregateCommandWithInvalidQuery
2022-02-09 22:04:03 +05:30
Favour Ohanekwu
72f8b7e2e1
feat: Support OAuth for all plugin types (#9657)
* customize datasource authorization

* improve performance

* fix save datasource bug

* switch auth type from form config

* better naming of components

* fix minor bug

* minor bug fix

* minor bug fix

* syntax cleanup

* Add comments where necessary

* Added comments where necessary

* fix broken airtable page

* code refactor and annotation
2022-01-14 12:01:54 +05:30
Sumit Kumar
18edb18b20
fix: implement getStructure method for S3 plugin (#8919)
* Add `getStructure` implementation for S3 to return a list of accessible buckets.
* Add command templates for S3.
  - List files
  - Read file
  - Create file
  - Delete file
* Remove getDatasourceMetadata implementation as getStructure method can be directly used now.
2022-01-13 11:33:50 +05:30
Sumit Kumar
f045af8bfc
feat: Mongo plugin: add limit field to aggregate command to allow users to define batchSize (#10257)
* This PR adds a limit field which sets the batchSize for aggregate command. This way the user can set the number of documents they want in their Mongo query result.
* limit is set to 10 initially. However, for pre-existing Mongo actions, migration has been added to set this field to 101 - which is the default value that has been used by Mongodb in the absence of any user set value. Ref: https://docs.mongodb.com/manual/tutorial/iterate-a-cursor/
2022-01-10 16:42:30 +00:00
Leo Thomas
9cd89884bf
fix: 9648 The Update query fails to update for all matching Document in mongo (#9975)
* fix:9648 Mongo update All issue-In Progress

* fix: Mongo Multi update query fail fixes

* Added updated testcases that got affected by the code change

* Changes reverted as per review comments
2021-12-31 19:12:19 +05:30
Nidhi
e6f4513b48
fix: Appends authSource param to mongo URI if absent, also fixes inability to connect to mongo without user info (#9995) 2021-12-24 19:42:04 +05:30
Sumit Kumar
c858edf726
fix Mongo smart substitution for quotes around ObjectId (#9856)
- fix Mongo plugin's smart substitution feature to handle quotes around ObjectId in array. e.g. Initial replacement value: ["ObjectId(xyz)"] , final replacement value: [ObjectId(xyz)]
- unrelated: added version number to lombok dependency to stop build failures in IntelliJ.
2021-12-21 18:47:19 +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
Nayan
28c181b59c
feat: [Feature] Upgrade spring boot version to 2.5.5 (#8932)
Upgrades spring boot version to 2.5.5
2021-12-14 16:22:37 +06:00
Sumit Kumar
611ff3b776
feat: make Mongodb plugin error messages more readable. (#7857)
* Make MongoDB plugin's error messages more readable. A Client side change is required before this change becomes visible to the end user.
2021-09-27 15:10:14 +00:00
Trisha Anand
17baadfb84
Adding input type to BSON fields to ensure future client side validations can be added to these fields (#7596) 2021-09-19 15:34:28 +00:00
Trisha Anand
936f014b3e
feat: Add UQI infrastructure to Mongo Plugin (#7238) 2021-09-17 12:22:22 +00:00