fix: self signed certificates value set in the props (#32474)

## Description
Earlier the `useSelfSignedCert` value for the rest api datasource was
not being sent from the transformer to the props. After this pr the
value is being sent to the props which will persist the changed data
instead of overriding it with initialvalues where the
`useSelfSignedCert` was not selected. Fixed the `data-location-id` for
the form control as well from `selfsignedcert` to
`authentication.useSelfSignedCert`, just like the other form control
values.


Fixes #26598 
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8596380653>
> Commit: `1b5a9c8c713b61bd633b377810bc964a3f085ece`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8596380653&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved the handling of self-signed certificates in REST API
datasource configurations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Aman Agarwal 2024-04-08 14:34:53 +05:30 committed by GitHub
parent 1ac6fc49d4
commit ed23046ded
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -751,7 +751,9 @@ class DatasourceRestAPIEditor extends React.Component<Props> {
</FormInputContainer>
)}
{isConnectSelfSigned && (
<FormInputContainer data-location-id={btoa("selfsignedcert")}>
<FormInputContainer
data-location-id={btoa("authentication.useSelfSignedCert")}
>
{this.renderCheckboxViaFormControl(
"authentication.useSelfSignedCert",
"Use Self-Signed Certificate for Authorization requests",

View File

@ -259,6 +259,7 @@ const datasourceToFormAuthentication = (
authentication.sendScopeWithRefreshToken || false,
refreshTokenClientCredentialsLocation:
authentication.refreshTokenClientCredentialsLocation || "BODY",
useSelfSignedCert: authentication.useSelfSignedCert,
};
if (isClientCredentials(authType, authentication)) {
return {