chore: Moving action settings from editor form to toolbar (#36894)
## Description Moving action settings from editor form to toolbar to follow the new designs under action redesign project. Fixes [#35512](https://github.com/appsmithorg/appsmith/issues/35512) [#34670](https://github.com/appsmithorg/appsmith/issues/34670) [#35535](https://github.com/appsmithorg/appsmith/issues/35535) ## 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/11384449381> > Commit: 027e2a33685e50c2cb16e513993fff62b0d62e08 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11384449381&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Sanity` > Spec: > <hr>Thu, 17 Oct 2024 12:40:29 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced new components for managing API and query settings in the Plugin Action Settings. - Added functionality to open plugin action settings directly from the toolbar. - Implemented a settings popover interface for improved user interaction. - Added documentation links for QUERY_SETTINGS to enhance user guidance. - **Improvements** - Simplified rendering logic in the Plugin Action Form for better performance. - Updated form naming conventions for consistency across API and GraphQL editors. - Streamlined configuration settings by replacing `subtitle` with `tooltipText` for clarity. - Enhanced styling in Action Settings for better layout and user experience. - **Bug Fixes** - Corrected the navigation logic to open plugin action settings instead of debugger state. These enhancements aim to improve user experience and streamline plugin action management. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
5801f49e0e
commit
faed301e32
|
|
@ -65,5 +65,5 @@ export const StyledBody = styled.div`
|
|||
max-height: calc(
|
||||
var(--popover-max-height) - calc(var(--popover-padding) * 2 + 25.5px)
|
||||
);
|
||||
overflow-y: scroll;
|
||||
overflow-y: auto;
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ const PluginActionForm = () => {
|
|||
{plugin.uiComponent === UIComponentTypes.GraphQLEditorForm && (
|
||||
<GraphQLEditorForm />
|
||||
)}
|
||||
{plugin.uiComponent === UIComponentTypes.DbEditorForm ||
|
||||
(plugin.uiComponent === UIComponentTypes.UQIDbEditorForm && (
|
||||
<UQIEditorForm />
|
||||
))}
|
||||
{(plugin.uiComponent === UIComponentTypes.DbEditorForm ||
|
||||
plugin.uiComponent === UIComponentTypes.UQIDbEditorForm) && (
|
||||
<UQIEditorForm />
|
||||
)}
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
& > div:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
This section can be removed once the condition abouve each is resolved
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ import {
|
|||
useAnalyticsOnRunClick,
|
||||
} from "PluginActionEditor/hooks";
|
||||
|
||||
const FORM_NAME = API_EDITOR_FORM_NAME;
|
||||
|
||||
const APIEditorForm = () => {
|
||||
const { action } = usePluginActionContext();
|
||||
const { handleRunClick } = useHandleRunClick();
|
||||
|
|
@ -43,7 +41,7 @@ const APIEditorForm = () => {
|
|||
theme={EditorTheme.LIGHT}
|
||||
/>
|
||||
}
|
||||
formName={FORM_NAME}
|
||||
formName={API_EDITOR_FORM_NAME}
|
||||
httpMethodOptions={HTTP_METHOD_OPTIONS}
|
||||
isChangePermitted={isChangePermitted}
|
||||
paginationUiComponent={
|
||||
|
|
@ -58,6 +56,7 @@ const APIEditorForm = () => {
|
|||
);
|
||||
};
|
||||
|
||||
export default reduxForm({ form: FORM_NAME, enableReinitialize: true })(
|
||||
APIEditorForm,
|
||||
);
|
||||
export default reduxForm({
|
||||
form: API_EDITOR_FORM_NAME,
|
||||
enableReinitialize: true,
|
||||
})(APIEditorForm);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import { getHasManageActionPermission } from "ee/utils/BusinessFeatures/permissi
|
|||
import { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig";
|
||||
import useGetFormActionValues from "../CommonEditorForm/hooks/useGetFormActionValues";
|
||||
|
||||
const FORM_NAME = API_EDITOR_FORM_NAME;
|
||||
|
||||
function GraphQLEditorForm() {
|
||||
const { action } = usePluginActionContext();
|
||||
const theme = EditorTheme.LIGHT;
|
||||
|
|
@ -30,13 +28,13 @@ function GraphQLEditorForm() {
|
|||
<CommonEditorForm
|
||||
action={action}
|
||||
bodyUIComponent={<PostBodyData actionName={action.name} />}
|
||||
formName={FORM_NAME}
|
||||
formName={API_EDITOR_FORM_NAME}
|
||||
httpMethodOptions={GRAPHQL_HTTP_METHOD_OPTIONS}
|
||||
isChangePermitted={isChangePermitted}
|
||||
paginationUiComponent={
|
||||
<Pagination
|
||||
actionName={action.name}
|
||||
formName={FORM_NAME}
|
||||
formName={API_EDITOR_FORM_NAME}
|
||||
paginationType={action.actionConfiguration.paginationType}
|
||||
query={actionConfigurationBody}
|
||||
theme={theme}
|
||||
|
|
@ -46,6 +44,7 @@ function GraphQLEditorForm() {
|
|||
);
|
||||
}
|
||||
|
||||
export default reduxForm({ form: FORM_NAME, enableReinitialize: true })(
|
||||
GraphQLEditorForm,
|
||||
);
|
||||
export default reduxForm({
|
||||
form: API_EDITOR_FORM_NAME,
|
||||
enableReinitialize: true,
|
||||
})(GraphQLEditorForm);
|
||||
|
|
|
|||
|
|
@ -35,13 +35,16 @@ import { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig
|
|||
import BindDataButton from "./BindDataButton";
|
||||
import {
|
||||
getPluginActionDebuggerState,
|
||||
openPluginActionSettings,
|
||||
setPluginActionEditorSelectedTab,
|
||||
} from "../../../store";
|
||||
import { EDITOR_TABS } from "constants/QueryEditorConstants";
|
||||
import {
|
||||
createMessage,
|
||||
PREPARED_STATEMENT_WARNING,
|
||||
} from "ee/constants/messages";
|
||||
import { EDITOR_TABS } from "constants/QueryEditorConstants";
|
||||
import { useFeatureFlag } from "utils/hooks/useFeatureFlag";
|
||||
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
|
||||
|
||||
const HelpSection = styled.div``;
|
||||
|
||||
|
|
@ -89,6 +92,10 @@ const QueryResponseTab = (props: Props) => {
|
|||
} = props;
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const isActionRedesignEnabled = useFeatureFlag(
|
||||
FEATURE_FLAG.release_actions_redesign_enabled,
|
||||
);
|
||||
|
||||
const actionResponse = useSelector((state) =>
|
||||
getActionData(state, currentActionConfig.id),
|
||||
);
|
||||
|
|
@ -211,8 +218,12 @@ const QueryResponseTab = (props: Props) => {
|
|||
}
|
||||
|
||||
const navigateToSettings = useCallback(() => {
|
||||
dispatch(setPluginActionEditorSelectedTab(EDITOR_TABS.SETTINGS));
|
||||
}, [dispatch]);
|
||||
if (isActionRedesignEnabled) {
|
||||
dispatch(openPluginActionSettings(true));
|
||||
} else {
|
||||
dispatch(setPluginActionEditorSelectedTab(EDITOR_TABS.SETTINGS));
|
||||
}
|
||||
}, [dispatch, isActionRedesignEnabled]);
|
||||
|
||||
const preparedStatementCalloutLinks: CalloutLinkProps[] = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
import { API_EDITOR_FORM_NAME } from "ee/constants/forms";
|
||||
import { reduxForm } from "redux-form";
|
||||
import PluginActionSettingsPopover, {
|
||||
type SettingsProps,
|
||||
} from "./SettingsPopover";
|
||||
|
||||
export default reduxForm<unknown, SettingsProps>({
|
||||
form: API_EDITOR_FORM_NAME,
|
||||
enableReinitialize: true,
|
||||
})(PluginActionSettingsPopover);
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
import { QUERY_EDITOR_FORM_NAME } from "ee/constants/forms";
|
||||
import { reduxForm } from "redux-form";
|
||||
import PluginActionSettingsPopover, {
|
||||
type SettingsProps,
|
||||
} from "./SettingsPopover";
|
||||
|
||||
export default reduxForm<unknown, SettingsProps>({
|
||||
form: QUERY_EDITOR_FORM_NAME,
|
||||
enableReinitialize: true,
|
||||
})(PluginActionSettingsPopover);
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import {
|
||||
Link,
|
||||
Popover,
|
||||
PopoverBody,
|
||||
PopoverContent,
|
||||
PopoverHeader,
|
||||
PopoverTrigger,
|
||||
ToggleButton,
|
||||
} from "@appsmith/ads";
|
||||
import ActionSettings from "pages/Editor/ActionSettings";
|
||||
import { usePluginActionContext } from "../../PluginActionContext";
|
||||
import styled, { css } from "styled-components";
|
||||
import {
|
||||
API_EDITOR_TAB_TITLES,
|
||||
createMessage,
|
||||
LEARN_MORE,
|
||||
} from "ee/constants/messages";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import {
|
||||
isPluginActionSettingsOpen,
|
||||
openPluginActionSettings,
|
||||
} from "../../store";
|
||||
import { THEME } from "../../constants/PluginActionConstants";
|
||||
import { type DocsLink, openDoc } from "constants/DocumentationLinks";
|
||||
|
||||
export interface SettingsProps {
|
||||
formName: string;
|
||||
docsLink?: DocsLink;
|
||||
}
|
||||
|
||||
const Variables = css`
|
||||
--popover-width: 280px;
|
||||
`;
|
||||
|
||||
/* TODO: Remove this after removing custom width from server side (Ankita) */
|
||||
const SettingsWrapper = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ads-v2-spaces-4);
|
||||
|
||||
.t--form-control-INPUT_TEXT,
|
||||
.t--form-control-DROP_DOWN {
|
||||
> div {
|
||||
min-width: unset;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledPopoverHeader = styled(PopoverHeader)`
|
||||
margin-bottom: var(--ads-v2-spaces-5);
|
||||
`;
|
||||
|
||||
const StyledPopoverContent = styled(PopoverContent)`
|
||||
${Variables};
|
||||
`;
|
||||
|
||||
const LearnMoreLink = styled(Link)`
|
||||
span {
|
||||
font-weight: bold;
|
||||
}
|
||||
`;
|
||||
|
||||
const PluginActionSettingsPopover = (props: SettingsProps) => {
|
||||
const { settingsConfig } = usePluginActionContext();
|
||||
const openSettings = useSelector(isPluginActionSettingsOpen);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(() => {
|
||||
if (openSettings) {
|
||||
handleOpenChange(true);
|
||||
}
|
||||
}, [openSettings]);
|
||||
|
||||
const handleOpenChange = useCallback(
|
||||
(open: boolean) => {
|
||||
setIsOpen(open);
|
||||
|
||||
if (openSettings && !open) {
|
||||
dispatch(openPluginActionSettings(false));
|
||||
}
|
||||
},
|
||||
[openSettings],
|
||||
);
|
||||
|
||||
const handleEscapeKeyDown = () => {
|
||||
handleOpenChange(false);
|
||||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
handleOpenChange(true);
|
||||
};
|
||||
|
||||
const handleLearnMoreClick = () => {
|
||||
openDoc(props.docsLink as DocsLink);
|
||||
};
|
||||
|
||||
return (
|
||||
<Popover onOpenChange={handleOpenChange} open={isOpen}>
|
||||
<PopoverTrigger>
|
||||
<ToggleButton
|
||||
icon="settings-2-line"
|
||||
isSelected={isOpen}
|
||||
onClick={handleButtonClick}
|
||||
size="md"
|
||||
/>
|
||||
</PopoverTrigger>
|
||||
<StyledPopoverContent
|
||||
align="end"
|
||||
onEscapeKeyDown={handleEscapeKeyDown}
|
||||
size="sm"
|
||||
>
|
||||
<StyledPopoverHeader isClosable>
|
||||
{createMessage(API_EDITOR_TAB_TITLES.SETTINGS)}
|
||||
</StyledPopoverHeader>
|
||||
<PopoverBody>
|
||||
<SettingsWrapper>
|
||||
<ActionSettings
|
||||
actionSettingsConfig={settingsConfig}
|
||||
formName={props.formName}
|
||||
theme={THEME}
|
||||
/>
|
||||
{props.docsLink && (
|
||||
<LearnMoreLink
|
||||
className="t--action-settings-documentation-link"
|
||||
endIcon="share-box-line"
|
||||
kind="secondary"
|
||||
onClick={handleLearnMoreClick}
|
||||
>
|
||||
{createMessage(LEARN_MORE)}
|
||||
</LearnMoreLink>
|
||||
)}
|
||||
</SettingsWrapper>
|
||||
</PopoverBody>
|
||||
</StyledPopoverContent>
|
||||
</Popover>
|
||||
);
|
||||
};
|
||||
|
||||
export default PluginActionSettingsPopover;
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
import React from "react";
|
||||
import { UIComponentTypes } from "api/PluginApi";
|
||||
import { usePluginActionContext } from "../../PluginActionContext";
|
||||
import ApiSettings from "./ApiSettings";
|
||||
import QuerySettings from "./QuerySettings";
|
||||
import {
|
||||
API_EDITOR_FORM_NAME,
|
||||
QUERY_EDITOR_FORM_NAME,
|
||||
} from "ee/constants/forms";
|
||||
import { DocsLink } from "constants/DocumentationLinks";
|
||||
|
||||
const API_FORM_COMPONENTS = [
|
||||
UIComponentTypes.ApiEditorForm,
|
||||
UIComponentTypes.GraphQLEditorForm,
|
||||
];
|
||||
|
||||
const PluginActionSettings = () => {
|
||||
const { plugin } = usePluginActionContext();
|
||||
|
||||
return API_FORM_COMPONENTS.includes(plugin.uiComponent) ? (
|
||||
<ApiSettings formName={API_EDITOR_FORM_NAME} />
|
||||
) : (
|
||||
<QuerySettings
|
||||
docsLink={DocsLink.QUERY_SETTINGS}
|
||||
formName={QUERY_EDITOR_FORM_NAME}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default PluginActionSettings;
|
||||
|
|
@ -11,6 +11,7 @@ import {
|
|||
import { useToggle } from "@mantine/hooks";
|
||||
import { useSelector } from "react-redux";
|
||||
import { isActionRunning } from "../store";
|
||||
import PluginActionSettings from "./PluginActionSettings";
|
||||
|
||||
interface PluginActionToolbarProps {
|
||||
runOptions?: React.ReactNode;
|
||||
|
|
@ -51,12 +52,7 @@ const PluginActionToolbar = (props: PluginActionToolbarProps) => {
|
|||
Run
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Button
|
||||
isIconButton
|
||||
kind="secondary"
|
||||
size="sm"
|
||||
startIcon="settings-2-line"
|
||||
/>
|
||||
<PluginActionSettings />
|
||||
<Menu onOpenChange={toggleMenuOpen} open={isMenuOpen}>
|
||||
<MenuTrigger>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
import { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig";
|
||||
|
||||
export const THEME = EditorTheme.LIGHT;
|
||||
|
|
@ -1 +1,4 @@
|
|||
import { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig";
|
||||
|
||||
export const POST_BODY_FORM_DATA_KEY = "displayFormat";
|
||||
export const THEME = EditorTheme.LIGHT;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,13 @@ export const setPluginActionEditorSelectedTab = (payload: string) => ({
|
|||
},
|
||||
});
|
||||
|
||||
export const openPluginActionSettings = (payload: boolean) => ({
|
||||
type: ReduxActionTypes.OPEN_PLUGIN_ACTION_SETTINGS,
|
||||
payload: {
|
||||
settingsOpen: payload,
|
||||
},
|
||||
});
|
||||
|
||||
export const updatePostBodyContentType = (
|
||||
title: string,
|
||||
apiId: string,
|
||||
|
|
|
|||
|
|
@ -59,3 +59,6 @@ export const getPluginActionDebuggerState = (state: AppState) =>
|
|||
|
||||
export const isPluginActionCreating = (state: AppState) =>
|
||||
state.ui.pluginActionEditor.isCreating;
|
||||
|
||||
export const isPluginActionSettingsOpen = (state: AppState) =>
|
||||
state.ui.pluginActionEditor.settingsOpen;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ export interface PluginActionEditorState {
|
|||
selectedConfigTab?: string;
|
||||
formData: Record<string, Record<string, { label: string; value: string }>>;
|
||||
debugger: PluginEditorDebuggerState;
|
||||
settingsOpen?: boolean;
|
||||
}
|
||||
|
||||
const initialState: PluginActionEditorState = {
|
||||
|
|
@ -42,6 +43,7 @@ const initialState: PluginActionEditorState = {
|
|||
open: false,
|
||||
responseTabHeight: ActionExecutionResizerHeight,
|
||||
},
|
||||
settingsOpen: false,
|
||||
};
|
||||
|
||||
export const handlers = {
|
||||
|
|
@ -170,6 +172,14 @@ export const handlers = {
|
|||
[ReduxActionTypes.RESET_EDITOR_REQUEST]: (state: PluginActionEditorState) => {
|
||||
state.isSaving = {};
|
||||
},
|
||||
[ReduxActionTypes.OPEN_PLUGIN_ACTION_SETTINGS]: (
|
||||
state: PluginActionEditorState,
|
||||
action: ReduxAction<{ settingsOpen: boolean }>,
|
||||
) => {
|
||||
const { settingsOpen } = action.payload;
|
||||
|
||||
state.settingsOpen = settingsOpen;
|
||||
},
|
||||
};
|
||||
|
||||
const pluginActionEditorReducer = createImmerReducer(initialState, handlers);
|
||||
|
|
|
|||
|
|
@ -499,6 +499,7 @@ const IDEActionTypes = {
|
|||
CLOSE_QUERY_ACTION_TAB: "CLOSE_QUERY_ACTION_TAB",
|
||||
CLOSE_QUERY_ACTION_TAB_SUCCESS: "CLOSE_QUERY_ACTION_TAB_SUCCESS",
|
||||
SET_IS_LIST_VIEW_ACTIVE: "SET_IS_LIST_VIEW_ACTIVE",
|
||||
OPEN_PLUGIN_ACTION_SETTINGS: "OPEN_PLUGIN_ACTION_SETTINGS",
|
||||
};
|
||||
|
||||
const IDEActionErrorTypes = {
|
||||
|
|
|
|||
|
|
@ -2509,6 +2509,6 @@ export const FIELD_REQUIRED_MESSAGE = () => `This field is required`;
|
|||
|
||||
export const PREPARED_STATEMENT_WARNING = {
|
||||
MESSAGE: () =>
|
||||
"Prepared Statements are currently enabled, which may be causing the query error. Turn them off and try running the query again",
|
||||
"Prepared statements are currently enabled, which may be causing the query error. Turn them off and try running the query again",
|
||||
LINK: () => "Open settings",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ export function PreparedStatementViewer(props: {
|
|||
const { parameters, value } = props.evaluatedValue;
|
||||
|
||||
if (!value) {
|
||||
Sentry.captureException("Prepared Statement got no value", {
|
||||
Sentry.captureException("Prepared statement got no value", {
|
||||
level: Severity.Debug,
|
||||
extra: { props },
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9772,8 +9772,9 @@ export const defaultAppState = {
|
|||
},
|
||||
},
|
||||
{
|
||||
label: "Use Prepared Statement",
|
||||
info: "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
label: "Use prepared statements",
|
||||
tooltipText:
|
||||
"Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
controlType: "SWITCH",
|
||||
|
|
@ -10040,18 +10041,17 @@ export const defaultAppState = {
|
|||
label: "Run query on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running query",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Smart BSON substitution",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
|
||||
configProperty:
|
||||
"actionConfiguration.formData.smartSubstitution.data",
|
||||
|
|
@ -10077,18 +10077,17 @@ export const defaultAppState = {
|
|||
label: "Run query on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running query",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Use Prepared Statement",
|
||||
subtitle:
|
||||
label: "Use prepared statements",
|
||||
tooltipText:
|
||||
"Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
|
|
@ -10114,20 +10113,19 @@ export const defaultAppState = {
|
|||
label: "Run API on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running API",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Encode query params",
|
||||
configProperty: "actionConfiguration.encodeParamsToggle",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded",
|
||||
},
|
||||
{
|
||||
|
|
@ -10135,7 +10133,7 @@ export const defaultAppState = {
|
|||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
initialValue: true,
|
||||
},
|
||||
|
|
@ -10144,8 +10142,6 @@ export const defaultAppState = {
|
|||
configProperty: "actionConfiguration.httpVersion",
|
||||
name: "actionConfiguration.httpVersion",
|
||||
controlType: "DROP_DOWN",
|
||||
subtitle:
|
||||
"Select the protocol that best suits your security and performance requirements.",
|
||||
initialValue: "HTTP/1.1",
|
||||
options: [
|
||||
{
|
||||
|
|
@ -10183,20 +10179,19 @@ export const defaultAppState = {
|
|||
label: "Run API on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running API",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Encode query params",
|
||||
configProperty: "actionConfiguration.encodeParamsToggle",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded",
|
||||
},
|
||||
{
|
||||
|
|
@ -10204,7 +10199,7 @@ export const defaultAppState = {
|
|||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
initialValue: true,
|
||||
},
|
||||
|
|
@ -10213,8 +10208,6 @@ export const defaultAppState = {
|
|||
configProperty: "actionConfiguration.httpVersion",
|
||||
name: "actionConfiguration.httpVersion",
|
||||
controlType: "DROP_DOWN",
|
||||
subtitle:
|
||||
"Select the protocol that best suits your security and performance requirements.",
|
||||
initialValue: "HTTP/1.1",
|
||||
options: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ const StyledFormLabel = styled.label<{
|
|||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
letter-spacing: 0.02em;
|
||||
letter-spacing: normal;
|
||||
margin-bottom: ${(props) =>
|
||||
props.extraStyles?.marginBottom
|
||||
? props.extraStyles?.marginBottom
|
||||
|
|
@ -153,6 +153,7 @@ const FormEncrytedSection = styled.div`
|
|||
`;
|
||||
|
||||
interface FormLabelProps {
|
||||
className?: string;
|
||||
config?: ControlProps;
|
||||
children: JSX.Element | React.ReactNode;
|
||||
// TODO: Fix this the next time the file is edited
|
||||
|
|
@ -163,7 +164,11 @@ interface FormLabelProps {
|
|||
//Wrapper on styled <label/>
|
||||
function FormLabel(props: FormLabelProps) {
|
||||
return (
|
||||
<StyledFormLabel config={props.config} extraStyles={props.extraStyles}>
|
||||
<StyledFormLabel
|
||||
className={props.className}
|
||||
config={props.config}
|
||||
extraStyles={props.extraStyles}
|
||||
>
|
||||
{props.children}
|
||||
</StyledFormLabel>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -16,27 +16,26 @@ export default [
|
|||
label: "Run API on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running API",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Encode query params",
|
||||
configProperty: "actionConfiguration.encodeParamsToggle",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded",
|
||||
},
|
||||
{
|
||||
label: "Smart JSON substitution",
|
||||
configProperty: "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
initialValue: true,
|
||||
},
|
||||
|
|
@ -45,8 +44,6 @@ export default [
|
|||
configProperty: "actionConfiguration.httpVersion",
|
||||
name: "actionConfiguration.httpVersion",
|
||||
controlType: "DROP_DOWN",
|
||||
subtitle:
|
||||
"Select the protocol that best suits your security and performance requirements.",
|
||||
initialValue: HTTP_PROTOCOL.HTTP11.label,
|
||||
options: HTTP_PROTOCOL_VERSIONS,
|
||||
placeholder: createMessage(HTTP_PROTOCOL_INPUT_PLACEHOLDER),
|
||||
|
|
|
|||
|
|
@ -7,13 +7,12 @@ export default [
|
|||
label: "Run API on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running API",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,13 +7,12 @@ export default [
|
|||
label: "Run query on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running query",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ export enum DocsLink {
|
|||
CONNECT_DATA = "CONNECT_DATA",
|
||||
QUERY = "QUERY",
|
||||
TROUBLESHOOT_ERROR = "TROUBLESHOOT_ERROR",
|
||||
QUERY_SETTINGS = "QUERY_SETTINGS",
|
||||
}
|
||||
|
||||
const LinkData: Record<DocsLink, string> = {
|
||||
|
|
@ -19,6 +20,8 @@ const LinkData: Record<DocsLink, string> = {
|
|||
"https://docs.appsmith.com/core-concepts/data-access-and-binding/capturing-data-write",
|
||||
TROUBLESHOOT_ERROR:
|
||||
"https://docs.appsmith.com/help-and-support/troubleshooting-guide",
|
||||
QUERY_SETTINGS:
|
||||
"https://docs.appsmith.com/connect-data/reference/query-settings",
|
||||
};
|
||||
|
||||
export const openDoc = (type: DocsLink, link?: string, subType?: string) => {
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ type APIFormProps = {
|
|||
|
||||
type Props = APIFormProps & InjectedFormProps<Action, APIFormProps>;
|
||||
|
||||
const FORM_NAME = API_EDITOR_FORM_NAME;
|
||||
|
||||
/**
|
||||
* Graphql Editor form which uses the Common Editor and pass on the differentiating components from the API Editor.
|
||||
* @param props using type Props
|
||||
|
|
@ -36,12 +34,12 @@ function GraphQLEditorForm(props: Props) {
|
|||
<CommonEditorForm
|
||||
{...props}
|
||||
bodyUIComponent={<PostBodyData actionName={actionName} />}
|
||||
formName={FORM_NAME}
|
||||
formName={API_EDITOR_FORM_NAME}
|
||||
httpsMethods={GRAPHQL_HTTP_METHOD_OPTIONS}
|
||||
paginationUIComponent={
|
||||
<Pagination
|
||||
actionName={actionName}
|
||||
formName={FORM_NAME}
|
||||
formName={API_EDITOR_FORM_NAME}
|
||||
paginationType={props.paginationType}
|
||||
query={props.actionConfigurationBody}
|
||||
/>
|
||||
|
|
@ -50,7 +48,7 @@ function GraphQLEditorForm(props: Props) {
|
|||
);
|
||||
}
|
||||
|
||||
const selector = formValueSelector(FORM_NAME);
|
||||
const selector = formValueSelector(API_EDITOR_FORM_NAME);
|
||||
|
||||
export default connect(
|
||||
// TODO: Fix this the next time the file is edited
|
||||
|
|
@ -101,7 +99,7 @@ export default connect(
|
|||
// TODO: Fix this the next time the file is edited
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
reduxForm<Action, any>({
|
||||
form: FORM_NAME,
|
||||
form: API_EDITOR_FORM_NAME,
|
||||
enableReinitialize: true,
|
||||
})(GraphQLEditorForm),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ type APIFormProps = {
|
|||
|
||||
type Props = APIFormProps & InjectedFormProps<Action, APIFormProps>;
|
||||
|
||||
const FORM_NAME = API_EDITOR_FORM_NAME;
|
||||
|
||||
function ApiEditorForm(props: Props) {
|
||||
const { actionName } = props;
|
||||
const theme = EditorTheme.LIGHT;
|
||||
|
|
@ -34,7 +32,7 @@ function ApiEditorForm(props: Props) {
|
|||
bodyUIComponent={
|
||||
<PostBodyData dataTreePath={`${actionName}.config`} theme={theme} />
|
||||
}
|
||||
formName={FORM_NAME}
|
||||
formName={API_EDITOR_FORM_NAME}
|
||||
httpsMethods={HTTP_METHOD_OPTIONS}
|
||||
paginationUIComponent={
|
||||
<Pagination
|
||||
|
|
@ -48,7 +46,7 @@ function ApiEditorForm(props: Props) {
|
|||
);
|
||||
}
|
||||
|
||||
const selector = formValueSelector(FORM_NAME);
|
||||
const selector = formValueSelector(API_EDITOR_FORM_NAME);
|
||||
|
||||
export default connect((state: AppState) => {
|
||||
const httpMethodFromForm = selector(state, "actionConfiguration.httpMethod");
|
||||
|
|
@ -106,7 +104,7 @@ export default connect((state: AppState) => {
|
|||
};
|
||||
})(
|
||||
reduxForm<Action, APIFormProps>({
|
||||
form: FORM_NAME,
|
||||
form: API_EDITOR_FORM_NAME,
|
||||
enableReinitialize: true,
|
||||
})(ApiEditorForm),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -14,18 +14,13 @@ interface ActionSettingsProps {
|
|||
theme?: EditorTheme;
|
||||
}
|
||||
|
||||
const FormRow = styled.div`
|
||||
margin-bottom: ${(props) => props.theme.spaces[10] + 1}px;
|
||||
`;
|
||||
|
||||
const ActionSettingsWrapper = styled.div`
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
padding-bottom: 1px;
|
||||
|
||||
.form-config-top {
|
||||
flex-grow: 1;
|
||||
}
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ads-v2-spaces-4);
|
||||
|
||||
.t--form-control-SWITCH {
|
||||
display: flex;
|
||||
|
|
@ -33,6 +28,15 @@ const ActionSettingsWrapper = styled.div`
|
|||
align-items: center;
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.form-config-top {
|
||||
flex-grow: 1;
|
||||
.form-label {
|
||||
min-width: unset;
|
||||
width: 100%;
|
||||
line-height: 1.43;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
function ActionSettings(props: ActionSettingsProps): JSX.Element {
|
||||
|
|
@ -64,9 +68,11 @@ const renderEachConfig = (section: any, formName: string): any => {
|
|||
const { configProperty } = formControlOrSection;
|
||||
|
||||
return (
|
||||
<FormRow key={configProperty}>
|
||||
<FormControl config={formControlOrSection} formName={formName} />
|
||||
</FormRow>
|
||||
<FormControl
|
||||
config={formControlOrSection}
|
||||
formName={formName}
|
||||
key={configProperty}
|
||||
/>
|
||||
);
|
||||
} catch (e) {
|
||||
log.error(e);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ const LabelWrapper = styled.div`
|
|||
.label-icon-wrapper {
|
||||
&.help {
|
||||
cursor: help;
|
||||
text-decoration: underline dashed var(--ads-v2-color-border) from-font;
|
||||
text-underline-position: under;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
|
@ -209,9 +211,10 @@ function renderFormConfigTop(props: {
|
|||
<>
|
||||
<FlexWrapper>
|
||||
<FormLabel
|
||||
className="form-label"
|
||||
config={props.config}
|
||||
extraStyles={{
|
||||
marginBottom: shouldRenderSubtitle && "0px",
|
||||
marginBottom: (shouldRenderSubtitle || !subtitle) && "0px",
|
||||
minWidth: !!props.changesViewType && "unset",
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1288,8 +1288,8 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"info": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2545,18 +2545,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart BSON substitution",
|
||||
"info": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2579,18 +2578,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"info": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2613,26 +2611,25 @@
|
|||
{
|
||||
"label": "Run API on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "CHECKBOX"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running API",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Encode query params",
|
||||
"configProperty": "actionConfiguration.encodeParamsToggle",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded"
|
||||
"tooltipText": "Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
"initialValue": true
|
||||
},
|
||||
{
|
||||
|
|
@ -2653,14 +2650,13 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
|
|
@ -2680,18 +2676,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"info": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[13].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2714,18 +2709,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"info": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2748,18 +2742,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
"info": "Maximum time after which the query will return",
|
||||
"tooltipText": "Maximum time after which the query will return",
|
||||
"configProperty": "actionConfiguration.timeoutInMillisecond",
|
||||
"controlType": "INPUT_TEXT",
|
||||
"dataType": "NUMBER"
|
||||
|
|
|
|||
|
|
@ -1287,8 +1287,8 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"info": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2544,18 +2544,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart BSON substitution",
|
||||
"info": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2578,18 +2577,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"info": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2612,26 +2610,25 @@
|
|||
{
|
||||
"label": "Run API on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "CHECKBOX"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running API",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Encode query params",
|
||||
"configProperty": "actionConfiguration.encodeParamsToggle",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded"
|
||||
"tooltipText": "Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "CHECKBOX",
|
||||
"info": "Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
"initialValue": true
|
||||
},
|
||||
{
|
||||
|
|
@ -2652,14 +2649,13 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
|
|
@ -2679,18 +2675,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"info": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[13].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2713,18 +2708,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"info": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
@ -2747,14 +2741,13 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"info": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
|
|
|
|||
|
|
@ -6933,8 +6933,9 @@ export default {
|
|||
},
|
||||
},
|
||||
{
|
||||
label: "Use Prepared Statement",
|
||||
info: "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
label: "Use prepared statements",
|
||||
tooltipText:
|
||||
"Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
controlType: "SWITCH",
|
||||
|
|
@ -6954,20 +6955,19 @@ export default {
|
|||
label: "Run API on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running API",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Encode query params",
|
||||
configProperty: "actionConfiguration.encodeParamsToggle",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded",
|
||||
},
|
||||
{
|
||||
|
|
@ -6975,7 +6975,7 @@ export default {
|
|||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
initialValue: true,
|
||||
},
|
||||
|
|
@ -6984,8 +6984,6 @@ export default {
|
|||
configProperty: "actionConfiguration.httpVersion",
|
||||
name: "actionConfiguration.httpVersion",
|
||||
controlType: "DROP_DOWN",
|
||||
subtitle:
|
||||
"Select the protocol that best suits your security and performance requirements.",
|
||||
initialValue: "HTTP/1.1",
|
||||
options: [
|
||||
{
|
||||
|
|
@ -7023,20 +7021,19 @@ export default {
|
|||
label: "Run API on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running API",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Encode query params",
|
||||
configProperty: "actionConfiguration.encodeParamsToggle",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Encode query params for all APIs. Also encode form body when Content-Type header is set to x-www-form-encoded",
|
||||
},
|
||||
{
|
||||
|
|
@ -7044,7 +7041,7 @@ export default {
|
|||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Turning on this property fixes the JSON substitution of bindings in API body by adding/removing quotes intelligently and reduces developer errors",
|
||||
initialValue: true,
|
||||
},
|
||||
|
|
@ -7053,8 +7050,6 @@ export default {
|
|||
configProperty: "actionConfiguration.httpVersion",
|
||||
name: "actionConfiguration.httpVersion",
|
||||
controlType: "DROP_DOWN",
|
||||
subtitle:
|
||||
"Select the protocol that best suits your security and performance requirements.",
|
||||
initialValue: "HTTP/1.1",
|
||||
options: [
|
||||
{
|
||||
|
|
@ -7092,13 +7087,12 @@ export default {
|
|||
label: "Run query on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running query",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
|
|
@ -7122,18 +7116,17 @@ export default {
|
|||
label: "Run query on page load",
|
||||
configProperty: "executeOnLoad",
|
||||
controlType: "SWITCH",
|
||||
subtitle: "Will refresh data each time the page is loaded",
|
||||
},
|
||||
{
|
||||
label: "Request confirmation before running query",
|
||||
configProperty: "confirmBeforeExecute",
|
||||
controlType: "SWITCH",
|
||||
subtitle:
|
||||
tooltipText:
|
||||
"Ask confirmation from the user each time before refreshing data",
|
||||
},
|
||||
{
|
||||
label: "Use Prepared Statement",
|
||||
subtitle:
|
||||
label: "Use prepared statements",
|
||||
tooltipText:
|
||||
"Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
configProperty:
|
||||
"actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
|
|
|
|||
|
|
@ -764,7 +764,7 @@ public class FilterDataServiceCE implements IFilterDataServiceCE {
|
|||
AppsmithPluginError.PLUGIN_IN_MEMORY_FILTERING_ERROR,
|
||||
"Error while interacting with value " + value + " : " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
// The data type recognized does not match the data type of the value being set via Prepared Statement
|
||||
// The data type recognized does not match the data type of the value being set via prepared statement
|
||||
// Add proper handling here.
|
||||
throw new AppsmithPluginException(
|
||||
AppsmithPluginError.PLUGIN_IN_MEMORY_FILTERING_ERROR,
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"subtitle": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution.data",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"subtitle": "Turning on this property fixes the JSON substitution of bindings in the Body field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Body field by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart JSON substitution",
|
||||
"subtitle": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution.data",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Smart BSON substitution",
|
||||
"subtitle": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
|
||||
"tooltipText": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
|
||||
"configProperty": "actionConfiguration.formData.smartSubstitution.data",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public class MssqlPlugin extends BasePlugin {
|
|||
return executeCommon(hikariDSConnection, actionConfiguration, FALSE, null, null);
|
||||
}
|
||||
|
||||
// Prepared Statement
|
||||
// Prepared statement
|
||||
// First extract all the bindings in order
|
||||
List<MustacheBindingToken> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(query);
|
||||
// Replace all the bindings with a `?` as expected in a prepared statement.
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ public class MySqlPlugin extends BasePlugin {
|
|||
return executeCommon(connectionContext, actionConfiguration, FALSE, null, null, requestData);
|
||||
}
|
||||
|
||||
// This has to be executed as Prepared Statement
|
||||
// This has to be executed as prepared statement
|
||||
// First extract all the bindings in order
|
||||
List<MustacheBindingToken> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(query);
|
||||
// Replace all the bindings with a ? as expected in a prepared statement.
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Query timeout (in milliseconds)",
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.formData.preparedStatement.data",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ public class PostgresPlugin extends BasePlugin {
|
|||
return executeCommon(connection, datasourceConfiguration, actionConfiguration, FALSE, null, null, null);
|
||||
}
|
||||
|
||||
// Prepared Statement
|
||||
// Prepared statement
|
||||
|
||||
// First extract all the bindings in order
|
||||
List<MustacheBindingToken> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(query);
|
||||
|
|
|
|||
|
|
@ -7,18 +7,17 @@
|
|||
{
|
||||
"label": "Run query on page load",
|
||||
"configProperty": "executeOnLoad",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Will refresh data each time the page is loaded"
|
||||
"controlType": "SWITCH"
|
||||
},
|
||||
{
|
||||
"label": "Request confirmation before running query",
|
||||
"configProperty": "confirmBeforeExecute",
|
||||
"controlType": "SWITCH",
|
||||
"subtitle": "Ask confirmation from the user each time before refreshing data"
|
||||
"tooltipText": "Ask confirmation from the user each time before refreshing data"
|
||||
},
|
||||
{
|
||||
"label": "Use Prepared Statement",
|
||||
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"label": "Use prepared statements",
|
||||
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
|
||||
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
|
||||
"controlType": "SWITCH",
|
||||
"initialValue": true
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user