diff --git a/app/client/.gitlab-ci.yml b/app/client/.gitlab-ci.yml
index 4fa48d9a2a..ce20400cf2 100644
--- a/app/client/.gitlab-ci.yml
+++ b/app/client/.gitlab-ci.yml
@@ -113,7 +113,11 @@ cypress-test:
- cp $APPSMITH_SSL_CERTIFICATE /etc/certificate/dev.appsmith.com.pem
- cp $APPSMITH_SSL_KEY /etc/certificate/dev.appsmith.com-key.pem
- nginx
- - yarn test:ci
+ # This command configures the cypress suite to point to our custom installation of sorry-cypress that will help us parallelize our tests
+ - |
+ DEBUG=cypress:* $(npm bin)/cypress version
+ sed -i -e 's|api_url:.*$|api_url: "https://appsmith-cypress.herokuapp.com/"|g' /builds/theappsmith/internal-tools-client/cache/Cypress/4.1.0/Cypress/resources/app/packages/server/config/app.yml
+ - BUILD_ID=$CI_COMMIT_SHORT_SHA yarn test:ci
artifacts:
when: always
expire_in: 1 week
diff --git a/app/client/cypress/fixtures/uiBindDsl.json b/app/client/cypress/fixtures/uiBindDsl.json
index 40c18ac707..90f8be6e87 100644
--- a/app/client/cypress/fixtures/uiBindDsl.json
+++ b/app/client/cypress/fixtures/uiBindDsl.json
@@ -56,7 +56,7 @@
"isVisible": true,
"isDisabled": false,
"datePickerType": "DATE_PICKER",
- "dateFormat": "DD/MM/YYYY",
+ "dateFormat": "YYYY-MM-DD",
"label": "Date",
"widgetName": "DatePicker1",
"defaultDate": "2020-05-29T12:02:04.074+05:30",
@@ -75,7 +75,7 @@
"isVisible": true,
"isDisabled": false,
"datePickerType": "DATE_PICKER",
- "dateFormat": "DD/MM/YYYY",
+ "dateFormat": "YYYY-MM-DD",
"label": "Date",
"widgetName": "DatePicker2",
"defaultDate": "2020-05-29T12:02:04.074+05:30",
diff --git a/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js
index 32f432adfd..fe4e7ae45b 100644
--- a/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js
+++ b/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js
@@ -1,5 +1,3 @@
-const testdata = require("../../../fixtures/testdata.json");
-
describe("API Panel Test Functionality ", function() {
it("Test API copy/Move/delete feature", function() {
cy.log("Login Successful");
@@ -8,7 +6,6 @@ describe("API Panel Test Functionality ", function() {
cy.CreateAPI("FirstAPI");
cy.log("Creation of FirstAPI Action successful");
cy.CopyAPIToHome("FirstAPI");
- cy.DeleteAPI("FirstAPI");
cy.MoveAPIToPage();
cy.DeleteAPI("FirstAPI");
cy.CreateAPI("FirstAPI");
diff --git a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js
index 2c2798c777..85692ff96f 100644
--- a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js
+++ b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js
@@ -49,7 +49,7 @@ describe("DatePicker Widget Functionality", function() {
);
});
- it("Datepicker-Claer date validation", function() {
+ it("Datepicker-Clear date validation", function() {
const today = Cypress.moment()
.add(0, "days")
.format("DD/MM/YYYY");
@@ -58,37 +58,37 @@ describe("DatePicker Widget Functionality", function() {
cy.PublishtheApp();
cy.get(publishPage.datepickerWidget + " .bp3-input").should(
"contain.value",
- today + " 00:00",
+ "",
);
});
- it("DatePicker-check Required field validation", function() {
- // Check the required checkbox
- cy.CheckWidgetProperties(commonlocators.requiredCheckbox);
- cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should(
- "contain.text",
- "From Date",
- );
- cy.PublishtheApp();
- cy.get(publishPage.datepickerWidget + " .bp3-label").should(
- "contain.text",
- "From Date",
- );
- });
-
- it("DatePicker-uncheck Required field validation", function() {
- // Uncheck the required checkbox
- cy.UncheckWidgetProperties(commonlocators.requiredCheckbox);
- cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should(
- "contain.text",
- "From Date",
- );
- cy.PublishtheApp();
- cy.get(publishPage.datepickerWidget + " .bp3-label").should(
- "contain.text",
- "From Date",
- );
- });
+ // it("DatePicker-check Required field validation", function() {
+ // // Check the required checkbox
+ // cy.CheckWidgetProperties(commonlocators.requiredCheckbox);
+ // cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should(
+ // "contain.text",
+ // "From Date",
+ // );
+ // cy.PublishtheApp();
+ // cy.get(publishPage.datepickerWidget + " .bp3-label").should(
+ // "contain.text",
+ // "From Date",
+ // );
+ // });
+ //
+ // it("DatePicker-uncheck Required field validation", function() {
+ // // Uncheck the required checkbox
+ // cy.UncheckWidgetProperties(commonlocators.requiredCheckbox);
+ // cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should(
+ // "contain.text",
+ // "From Date",
+ // );
+ // cy.PublishtheApp();
+ // cy.get(publishPage.datepickerWidget + " .bp3-label").should(
+ // "contain.text",
+ // "From Date",
+ // );
+ // });
it("DatePicker-check Visible field validation", function() {
// Check the visible checkbox
diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js
index 85cf8fb4ad..c61b68609b 100644
--- a/app/client/cypress/support/commands.js
+++ b/app/client/cypress/support/commands.js
@@ -38,6 +38,11 @@ Cypress.Commands.add("DeleteApp", appName => {
"response.body.responseMeta.status",
200,
);
+ cy.wait("@organizations").should(
+ "have.nested.property",
+ "response.body.responseMeta.status",
+ 200,
+ );
cy.get('button span[icon="chevron-down"]').should("be.visible");
cy.get(homePage.searchInput).type(appName, { force: true });
cy.get(homePage.appMoreIcon)
@@ -352,9 +357,7 @@ Cypress.Commands.add("MoveAPIToPage", () => {
.first()
.click({ force: true });
cy.get(apiwidget.moveTo).click({ force: true });
- cy.get(
- ".single-select >div:contains('".concat(pageidcopy).concat("')"),
- ).click({ force: true });
+ cy.get(apiwidget.home).click({ force: true });
cy.wait("@createNewApi").should(
"have.nested.property",
"response.body.responseMeta.status",
diff --git a/app/client/cypress/test.sh b/app/client/cypress/test.sh
index 53f7a463d5..cbc96b79a9 100755
--- a/app/client/cypress/test.sh
+++ b/app/client/cypress/test.sh
@@ -26,7 +26,11 @@ echo "Got the target: $target"
if [ "$target" == "ci" ]; then
# On the CI server run the tests in parallel
# This requires the projectId and the record_key to be configured in your environment variables. By default this is defined on the CI server
- $(npm bin)/cypress run --headless --browser chrome --record --parallel --group "Electrons on Gitlab CI" --spec "cypress/integration/Smoke_TestSuite/*/*"
+ echo "Got the Build ID: $BUILD_ID"
+ CYPRESS_PROJECT_ID=appsmith-project $(npm bin)/cypress run --headless --browser chrome \
+ --record --key "random-key" --ci-build-id $BUILD_ID \
+ --parallel --group "Electrons on Gitlab CI" \
+ --spec "cypress/integration/Smoke_TestSuite/*/*"
else
$(npm bin)/cypress run --headless --browser chrome --spec "cypress/integration/Smoke_TestSuite/*/*"
fi
\ No newline at end of file
diff --git a/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx b/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx
index 6f339a6cd2..e8042904f7 100644
--- a/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx
+++ b/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx
@@ -69,8 +69,8 @@ class DatePickerComponent extends React.Component<
componentDidUpdate(prevProps: DatePickerComponentProps) {
if (
this.props.selectedDate !== this.state.selectedDate &&
- !moment(this.props.selectedDate).isSame(
- moment(prevProps.selectedDate),
+ !moment(this.props.selectedDate, this.props.dateFormat).isSame(
+ moment(prevProps.selectedDate, this.props.dateFormat),
"seconds",
)
) {
@@ -106,7 +106,7 @@ class DatePickerComponent extends React.Component<
className={this.props.isLoading ? "bp3-skeleton" : ""}
formatDate={this.formatDate}
parseDate={this.parseDate}
- placeholder={this.props.dateFormat}
+ placeholder={"Select Date"}
disabled={this.props.isDisabled}
showActionsBar={true}
timePrecision={TimePrecision.MINUTE}
@@ -114,7 +114,7 @@ class DatePickerComponent extends React.Component<
onChange={this.onDateSelected}
value={
this.state.selectedDate
- ? moment(this.state.selectedDate).toDate()
+ ? this.parseDate(this.state.selectedDate)
: null
}
maxDate={maxDate.toDate()}
@@ -137,16 +137,15 @@ class DatePickerComponent extends React.Component<
}
formatDate = (date: Date): string => {
- const dateFormat = "DD/MM/YYYY HH:mm";
- return moment(date).format(dateFormat);
+ return moment(date).format(this.props.dateFormat);
};
parseDate = (dateStr: string): Date => {
- return moment(dateStr, "DD/MM/YYYY HH:mm").toDate();
+ return moment(dateStr, this.props.dateFormat).toDate();
};
onDateSelected = (selectedDate: Date) => {
- const date = selectedDate ? moment(selectedDate).toISOString(true) : "";
+ const date = selectedDate ? this.formatDate(selectedDate) : "";
this.setState({ selectedDate: date });
this.props.onDateSelected(date);
};
@@ -156,7 +155,7 @@ interface DatePickerComponentProps extends ComponentProps {
label: string;
dateFormat: string;
enableTimePicker?: boolean;
- selectedDate: string;
+ selectedDate?: string;
minDate?: Date;
maxDate?: Date;
timezone?: string;
@@ -167,7 +166,7 @@ interface DatePickerComponentProps extends ComponentProps {
}
interface DatePickerComponentState {
- selectedDate: string;
+ selectedDate?: string;
}
export default DatePickerComponent;
diff --git a/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx b/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx
index 957481d21e..3e61315bd5 100644
--- a/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx
+++ b/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx
@@ -367,6 +367,11 @@ class DynamicAutocompleteInput extends Component {
let inputValue = this.props.input.value || "";
if (typeof inputValue === "object") {
inputValue = JSON.stringify(inputValue, null, 2);
+ } else if (
+ typeof inputValue === "number" ||
+ typeof inputValue === "string"
+ ) {
+ inputValue += "";
}
this.editor.setValue(inputValue);
this.startAutocomplete();
@@ -383,6 +388,11 @@ class DynamicAutocompleteInput extends Component {
// Safe update of value of the editor when value updated outside the editor
if (typeof inputValue === "object") {
inputValue = JSON.stringify(inputValue, null, 2);
+ } else if (
+ typeof inputValue === "number" ||
+ typeof inputValue === "string"
+ ) {
+ inputValue += "";
}
if ((!!inputValue || inputValue === "") && inputValue !== editorValue) {
this.editor.setValue(inputValue);
@@ -574,7 +584,8 @@ class DynamicAutocompleteInput extends Component {
}
const showEvaluatedValue =
this.state.isFocused &&
- ("evaluatedValue" in this.props || "dataTreePath" in this.props);
+ ("evaluatedValue" in this.props ||
+ ("dataTreePath" in this.props && !!this.props.dataTreePath));
return (
diff --git a/app/client/src/components/editorComponents/ResizeStyledComponents.tsx b/app/client/src/components/editorComponents/ResizeStyledComponents.tsx
index 32382ca63d..be73e16c29 100644
--- a/app/client/src/components/editorComponents/ResizeStyledComponents.tsx
+++ b/app/client/src/components/editorComponents/ResizeStyledComponents.tsx
@@ -3,7 +3,7 @@ import { WIDGET_PADDING } from "constants/WidgetConstants";
import styled, { css } from "styled-components";
const EDGE_RESIZE_HANDLE_WIDTH = 10;
-const CORNER_RESIZE_HANDLE_WIDTH = 40;
+const CORNER_RESIZE_HANDLE_WIDTH = 10;
export const VisibilityContainer = styled.div<{
visible: boolean;
diff --git a/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx b/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx
index 01c61accf9..9673601420 100644
--- a/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx
+++ b/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx
@@ -195,6 +195,7 @@ const views = {
props.set(event);
}
}}
+ dataTreePath={""}
isValid={props.isValid}
errorMessage={props.validationMessage}
/>
diff --git a/app/client/src/components/propertyControls/BaseControl.tsx b/app/client/src/components/propertyControls/BaseControl.tsx
index 97acbd760b..b3440fd518 100644
--- a/app/client/src/components/propertyControls/BaseControl.tsx
+++ b/app/client/src/components/propertyControls/BaseControl.tsx
@@ -37,7 +37,7 @@ export interface ControlData {
expected: string;
evaluatedValue: any;
validationMessage?: string;
- dataTreePath: string;
+ dataTreePath?: string;
}
export interface ControlFunctions {
diff --git a/app/client/src/components/propertyControls/ChartDataControl.tsx b/app/client/src/components/propertyControls/ChartDataControl.tsx
index f73d15f673..f64c22dc41 100644
--- a/app/client/src/components/propertyControls/ChartDataControl.tsx
+++ b/app/client/src/components/propertyControls/ChartDataControl.tsx
@@ -1,11 +1,7 @@
import React from "react";
import _ from "lodash";
import BaseControl, { ControlProps } from "./BaseControl";
-import {
- ControlWrapper,
- StyledInputGroup,
- StyledPropertyPaneButton,
-} from "./StyledControls";
+import { ControlWrapper, StyledPropertyPaneButton } from "./StyledControls";
import styled from "constants/DefaultTheme";
import { FormIcons } from "icons/FormIcons";
import { AnyStyledComponent } from "styled-components";
@@ -18,24 +14,6 @@ const StyledOptionControlWrapper = styled(ControlWrapper)`
width: 100%;
`;
-const StyledOptionControlInputGroup = styled(StyledInputGroup)`
- margin-right: 2px;
- width: 100%;
- margin-bottom: 0;
- &&& {
- input {
- border: none;
- color: ${props => props.theme.colors.textOnDarkBG};
- background: ${props => props.theme.colors.paneInputBG};
- &:focus {
- border: none;
- color: ${props => props.theme.colors.textOnDarkBG};
- background: ${props => props.theme.colors.paneInputBG};
- }
- }
- }
-`;
-
const StyledDynamicInput = styled.div`
width: 100%;
&&& {
diff --git a/app/client/src/components/propertyControls/CodeEditorControl.tsx b/app/client/src/components/propertyControls/CodeEditorControl.tsx
index 8f8daf94b4..0a6d13b647 100644
--- a/app/client/src/components/propertyControls/CodeEditorControl.tsx
+++ b/app/client/src/components/propertyControls/CodeEditorControl.tsx
@@ -5,20 +5,23 @@ import { EventOrValueHandler } from "redux-form";
class CodeEditorControl extends BaseControl {
render() {
const {
- errorMessage,
+ validationMessage,
expected,
propertyValue,
isValid,
dataTreePath,
+ evaluatedValue,
} = this.props;
+
return (
{
- const selectedDate = date ? moment(date).toISOString(true) : "";
+ const selectedDate = date ? moment(date).toISOString(true) : undefined;
this.setState({ selectedDate: selectedDate });
this.updateProperty(this.props.propertyName, selectedDate);
};
@@ -94,7 +94,7 @@ export interface DatePickerControlProps extends ControlProps {
}
interface DatePickerControlState {
- selectedDate: string;
+ selectedDate?: string;
}
export default DatePickerControl;
diff --git a/app/client/src/constants/ApiEditorConstants.ts b/app/client/src/constants/ApiEditorConstants.ts
index 8710587491..1d0f5082c7 100644
--- a/app/client/src/constants/ApiEditorConstants.ts
+++ b/app/client/src/constants/ApiEditorConstants.ts
@@ -28,13 +28,23 @@ export const DEFAULT_API_ACTION: Partial = {
export const API_CONSTANT = "API";
export const DEFAULT_PROVIDER_OPTION = "Business Software";
export const CONTENT_TYPE = "content-type";
-export const POST_BODY_FORMATS = [
- "application/json",
- "application/x-www-form-urlencoded",
- "raw",
+
+export const POST_BODY_FORMAT_OPTIONS = [
+ { label: "json", value: "application/json" },
+ {
+ label: "x-www-form-urlencoded",
+ value: "application/x-www-form-urlencoded",
+ },
+ { label: "form-data", value: "multipart/form-data" },
+ { label: "raw", value: "raw" },
];
-export const POST_BODY_FORMAT_OPTIONS = POST_BODY_FORMATS.map(method => ({
- label: method,
- value: method,
-}));
+export const POST_BODY_FORMAT_OPTIONS_NO_MULTI_PART = POST_BODY_FORMAT_OPTIONS.filter(
+ option => {
+ return option.value !== "multipart/form-data";
+ },
+);
+
+export const POST_BODY_FORMATS = POST_BODY_FORMAT_OPTIONS.map(option => {
+ return option.value;
+});
diff --git a/app/client/src/constants/FieldExpectedValue.ts b/app/client/src/constants/FieldExpectedValue.ts
index b4930d4091..1a0c7f82d0 100644
--- a/app/client/src/constants/FieldExpectedValue.ts
+++ b/app/client/src/constants/FieldExpectedValue.ts
@@ -21,7 +21,7 @@ const FIELD_VALUES: Record<
isRequired: "boolean",
isVisible: "boolean",
isDisabled: "boolean",
- onDateSelected: "undefined",
+ onDateSelected: "Function Call",
},
TABLE_WIDGET: {
tableData: "Array
http://api.example.com/users?pageNo={"{{Table1.pageNo}}"}
+
+
+ 2. Enable server side pagination in Table1
+
+
+
+
+ 3. Call this API onPageChange in Table1.
+
+
);
diff --git a/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx b/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx
index f2533efeed..487c49629a 100644
--- a/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx
+++ b/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx
@@ -7,6 +7,7 @@ import {
POST_BODY_FORMAT_OPTIONS,
POST_BODY_FORMATS,
CONTENT_TYPE,
+ POST_BODY_FORMAT_OPTIONS_NO_MULTI_PART,
} from "constants/ApiEditorConstants";
import { API_EDITOR_FORM_NAME } from "constants/forms";
import FormLabel from "components/editorComponents/FormLabel";
@@ -62,7 +63,7 @@ const PostBodyData = (props: Props) => {
} = props;
return (
- {"Post Body"}
+ {"Body"}
@@ -113,13 +108,16 @@ const PostBodyData = (props: Props) => {
@@ -128,22 +126,29 @@ const PostBodyData = (props: Props) => {
{displayFormat?.value === POST_BODY_FORMAT_OPTIONS[1].value && (
)}
+ {/* Commenting this till we figure the code to create a multipart request
{displayFormat?.value === POST_BODY_FORMAT_OPTIONS[2].value && (
+
+
+
+ )} */}
+
+ {displayFormat?.value === POST_BODY_FORMAT_OPTIONS[3].value && (
@@ -185,7 +190,7 @@ export default connect((state: AppState) => {
return {
displayFormat:
- extraFormData["displayFormat"] || POST_BODY_FORMAT_OPTIONS[2],
+ extraFormData["displayFormat"] || POST_BODY_FORMAT_OPTIONS[3],
contentType,
apiId,
};
diff --git a/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx b/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx
index 90e9ec8b0d..4ae93ca6e9 100644
--- a/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx
+++ b/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx
@@ -257,7 +257,7 @@ const RapidApiEditorForm: React.FC = (props: Props) => {
/>
{postbodyResponsePresent && (
- {"Post Body"}
+ {"Body"}
{typeof actionConfigurationBodyFormData ===
"object" && (
diff --git a/app/client/src/pages/Editor/PropertyPane/PropertyControl.tsx b/app/client/src/pages/Editor/PropertyPane/PropertyControl.tsx
index 13aa20aa5f..64ee97bbc8 100644
--- a/app/client/src/pages/Editor/PropertyPane/PropertyControl.tsx
+++ b/app/client/src/pages/Editor/PropertyPane/PropertyControl.tsx
@@ -9,7 +9,7 @@ import { ControlIcons } from "icons/ControlIcons";
import PropertyControlFactory from "utils/PropertyControlFactory";
import { WidgetProps } from "widgets/BaseWidget";
import { PropertyControlPropsType } from "components/propertyControls";
-import { Tooltip, Position } from "@blueprintjs/core";
+import PropertyHelpLabel from "pages/Editor/PropertyPane/PropertyHelpLabel";
import FIELD_EXPECTED_VALUE from "constants/FieldExpectedValue";
type Props = {
@@ -19,57 +19,6 @@ type Props = {
onPropertyChange: (propertyName: string, propertyValue: any) => void;
};
-function UnderlinedLabel({
- tooltip,
- label,
-}: {
- tooltip?: string;
- label: string;
-}) {
- const toolTipDefined = tooltip !== undefined;
- return (
-
-
-
-
-
-
- );
-}
-
const PropertyControl = (props: Props) => {
const {
widgetProperties,
@@ -136,8 +85,10 @@ const PropertyControl = (props: Props) => {
}
>
-
-
+
{isConvertible && (
{
+ const toolTipDefined = props.tooltip !== undefined;
+ return (
+
+
+
+
+
+
+ );
+};
+
+export default PropertyHelpLabel;
diff --git a/app/client/src/pages/Editor/QueryEditor/Form.tsx b/app/client/src/pages/Editor/QueryEditor/Form.tsx
index 991c7614e3..4f0f44a2d5 100644
--- a/app/client/src/pages/Editor/QueryEditor/Form.tsx
+++ b/app/client/src/pages/Editor/QueryEditor/Form.tsx
@@ -4,6 +4,7 @@ import {
InjectedFormProps,
Field,
FormSubmitHandler,
+ formValueSelector,
} from "redux-form";
import {
GridComponent,
@@ -31,6 +32,8 @@ import "@syncfusion/ej2-react-grids/styles/material.css";
import { Colors } from "constants/Colors";
import JSONViewer from "./JSONViewer";
import { RestAction } from "entities/Action";
+import { connect } from "react-redux";
+import { AppState } from "reducers";
const QueryFormContainer = styled.div`
font-size: 20px;
@@ -205,7 +208,7 @@ type QueryFormProps = {
onDeleteClick: () => void;
onSaveClick: () => void;
onRunClick: () => void;
- createTemplate: (template: any, name: string) => void;
+ createTemplate: (template: any) => void;
onSubmit: FormSubmitHandler;
isDeleting: boolean;
allowSave: boolean;
@@ -223,7 +226,11 @@ type QueryFormProps = {
};
};
-export type StateAndRouteProps = QueryFormProps;
+type ReduxProps = {
+ actionName: string;
+};
+
+export type StateAndRouteProps = QueryFormProps & ReduxProps;
type Props = StateAndRouteProps &
InjectedFormProps;
@@ -400,18 +407,15 @@ const QueryEditorForm: React.FC = (props: Props) => {
{isNewQuery && showTemplateMenu ? (
{
- const name = isSQL
- ? "actionConfiguration.query.cmd"
- : "actionConfiguration.query";
-
setMenuVisibility(false);
- createTemplate(templateString, name);
+ createTemplate(templateString);
}}
selectedPluginPackage={selectedPluginPackage}
/>
) : isSQL ? (
= (props: Props) => {
/>
) : (
{
- try {
- return JSON.parse(value);
- } catch (e) {
- return value;
- }
- }}
/>
)}
@@ -437,7 +435,7 @@ const QueryEditorForm: React.FC = (props: Props) => {
{dataSources.length === 0 && (
- Seems like you don’t have any Datasouces to create a query
+ Seems like you don’t have any Datasources to create a query