feat: adding current env name to the appsmith context (#38894)
This commit is contained in:
parent
4c278803cd
commit
9bd1a40513
|
|
@ -193,6 +193,7 @@ export interface AppsmithEntity extends Omit<AppDataState, "store"> {
|
|||
currentPageName: string;
|
||||
workspaceName: string;
|
||||
appName: string;
|
||||
currentEnvironmentName: string;
|
||||
}
|
||||
|
||||
export interface DataTreeSeed {
|
||||
|
|
|
|||
1
app/client/src/ce/selectors/dataTreeCyclicSelectors.ts
Normal file
1
app/client/src/ce/selectors/dataTreeCyclicSelectors.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const getCurrentEnvironmentName = () => "";
|
||||
1
app/client/src/ee/selectors/dataTreeCyclicSelectors.ts
Normal file
1
app/client/src/ee/selectors/dataTreeCyclicSelectors.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "ce/selectors/dataTreeCyclicSelectors";
|
||||
|
|
@ -44,6 +44,8 @@ import {
|
|||
import { getCurrentApplication } from "ee/selectors/applicationSelectors";
|
||||
import { getCurrentAppWorkspace } from "ee/selectors/selectedWorkspaceSelectors";
|
||||
import type { PageListReduxState } from "reducers/entityReducers/pageListReducer";
|
||||
import { getCurrentEnvironmentName } from "ee/selectors/dataTreeCyclicSelectors";
|
||||
import { objectKeys } from "@appsmith/utils";
|
||||
|
||||
export const getLoadingEntities = (state: AppState) =>
|
||||
state.evaluations.loadingEntities;
|
||||
|
|
@ -152,6 +154,7 @@ export const getUnevaluatedDataTree = createSelector(
|
|||
getCurrentAppWorkspace,
|
||||
getCurrentApplication,
|
||||
getCurrentPageName,
|
||||
getCurrentEnvironmentName,
|
||||
(
|
||||
actions,
|
||||
jsActions,
|
||||
|
|
@ -162,6 +165,7 @@ export const getUnevaluatedDataTree = createSelector(
|
|||
currentWorkspace,
|
||||
currentApplication,
|
||||
getCurrentPageName,
|
||||
currentEnvironmentName,
|
||||
) => {
|
||||
let dataTree: UnEvalTree = {
|
||||
...actions.dataTree,
|
||||
|
|
@ -183,6 +187,7 @@ export const getUnevaluatedDataTree = createSelector(
|
|||
currentPageName: getCurrentPageName,
|
||||
workspaceName: currentWorkspace.name,
|
||||
appName: currentApplication?.name,
|
||||
currentEnvironmentName,
|
||||
} as AppsmithEntity;
|
||||
(dataTree.appsmith as AppsmithEntity).ENTITY_TYPE = ENTITY_TYPE.APPSMITH;
|
||||
dataTree = { ...dataTree, ...metaWidgets.dataTree };
|
||||
|
|
@ -225,7 +230,7 @@ export const getWidgetEvalValues = createSelector(
|
|||
export const getDataTreeForAutocomplete = createSelector(
|
||||
getDataTree,
|
||||
(tree: DataTree) => {
|
||||
return _.omit(tree, Object.keys(DATATREE_INTERNAL_KEYWORDS));
|
||||
return _.omit(tree, objectKeys(DATATREE_INTERNAL_KEYWORDS));
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user