forked from appsmithorg/appsmith
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release' of github.com:Namatek/appsmith into release
- Loading branch information
Showing
59 changed files
with
833 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...lient/packages/design-system/ads/src/__assets__/icons/ads/datasource-config.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...nActionEditor/components/PluginActionResponse/components/DatasourceTab/DatasourceInfo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React from "react"; | ||
import { Button, Flex, Tooltip } from "@appsmith/ads"; | ||
import DatasourceSelector from "./DatasourceSelector"; | ||
import { createMessage, EDIT_DS_CONFIG } from "ee/constants/messages"; | ||
import { DatasourceEditEntryPoints } from "constants/Datasource"; | ||
import AnalyticsUtil from "ee/utils/AnalyticsUtil"; | ||
import { datasourcesEditorIdURL } from "ee/RouteBuilder"; | ||
import { omit } from "lodash"; | ||
import { getQueryParams } from "utils/URLUtils"; | ||
import history from "utils/history"; | ||
import { useEditorType } from "ee/hooks"; | ||
import { useParentEntityInfo } from "ee/hooks/datasourceEditorHooks"; | ||
|
||
interface Props { | ||
datasourceId: string; | ||
datasourceName: string; | ||
showEditButton: boolean; | ||
} | ||
|
||
const DatasourceInfo = ({ | ||
datasourceId, | ||
datasourceName, | ||
showEditButton, | ||
}: Props) => { | ||
const editorType = useEditorType(location.pathname); | ||
const { parentEntityId } = useParentEntityInfo(editorType); | ||
|
||
// eslint-disable-next-line react-perf/jsx-no-new-function-as-prop | ||
const editDatasource = () => { | ||
const entryPoint = DatasourceEditEntryPoints.QUERY_EDITOR_DATASOURCE_SCHEMA; | ||
|
||
AnalyticsUtil.logEvent("EDIT_DATASOURCE_CLICK", { | ||
datasourceId: datasourceId, | ||
pluginName: "", | ||
entryPoint: entryPoint, | ||
}); | ||
|
||
const url = datasourcesEditorIdURL({ | ||
baseParentEntityId: parentEntityId, | ||
datasourceId: datasourceId, | ||
params: { ...omit(getQueryParams(), "viewMode"), viewMode: false }, | ||
generateEditorPath: true, | ||
}); | ||
|
||
history.push(url); | ||
}; | ||
|
||
return ( | ||
<Flex alignItems={"center"} gap="spaces-2"> | ||
<DatasourceSelector | ||
datasourceId={datasourceId} | ||
datasourceName={datasourceName} | ||
/> | ||
{showEditButton && ( | ||
<Tooltip content={createMessage(EDIT_DS_CONFIG)} placement="top"> | ||
<Button | ||
isIconButton | ||
kind="tertiary" | ||
onClick={editDatasource} | ||
size="sm" | ||
startIcon="datasource-config" | ||
/> | ||
</Tooltip> | ||
)} | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default DatasourceInfo; |
13 changes: 13 additions & 0 deletions
13
...luginActionResponse/components/DatasourceTab/DatasourceSelector/ApiDatasourceSelector.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { API_EDITOR_FORM_NAME } from "ee/constants/forms"; | ||
import { type Action } from "entities/Action"; | ||
import { reduxForm } from "redux-form"; | ||
import { | ||
PluginDatasourceSelector, | ||
type CustomProps, | ||
} from "./PluginDatasourceSelector"; | ||
|
||
export default reduxForm<Action, CustomProps>({ | ||
form: API_EDITOR_FORM_NAME, | ||
destroyOnUnmount: false, | ||
enableReinitialize: true, | ||
})(PluginDatasourceSelector); |
Oops, something went wrong.