fix: datasource name not reflecting in schema pane (#37131)
## Description Renaming the datasource was not getting updated in schema tab. This is caused because of the use of unpublished action object. Fixes #37118 ## Automation /ok-to-test tags="@tag.Sanity" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/11591002654> > Commit: 2f3b111ab16c35080d1370757d39bb9a3dfbe48f > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11591002654&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Sanity` > Spec: > <hr>Wed, 30 Oct 2024 17:09:22 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new selector for improved datasource retrieval in the Query Debugger. - **Improvements** - Enhanced the way datasource information is accessed, streamlining the process for the `Schema` component. - Updated test configuration to include a mock structure for testing datasource functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
ff70e3a4c6
commit
38c9bc0afc
|
|
@ -24,6 +24,7 @@ const storeState = {
|
|||
},
|
||||
datasources: {
|
||||
structure: {},
|
||||
list: [],
|
||||
},
|
||||
},
|
||||
ui: {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import type { SourceEntity } from "entities/AppsmithConsole";
|
|||
import type { Action } from "entities/Action";
|
||||
import QueryResponseTab from "PluginActionEditor/components/PluginActionResponse/components/QueryResponseTab";
|
||||
import {
|
||||
getDatasource,
|
||||
getDatasourceStructureById,
|
||||
getPluginDatasourceComponentFromId,
|
||||
} from "ee/selectors/entitiesSelector";
|
||||
|
|
@ -97,6 +98,10 @@ function QueryDebuggerTabs({
|
|||
),
|
||||
);
|
||||
|
||||
const datasource = useSelector((state) =>
|
||||
getDatasource(state, currentActionConfig?.datasource?.id ?? ""),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
currentActionConfig?.datasource?.id &&
|
||||
|
|
@ -252,7 +257,7 @@ function QueryDebuggerTabs({
|
|||
<Schema
|
||||
currentActionId={currentActionConfig.id}
|
||||
datasourceId={currentActionConfig.datasource.id || ""}
|
||||
datasourceName={currentActionConfig.datasource.name || ""}
|
||||
datasourceName={datasource?.name || ""}
|
||||
/>
|
||||
),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user