Merge branch 'hotfix/unused-vars' into 'release'
Removing unused variables from the codebase See merge request theappsmith/internal-tools-client!624
This commit is contained in:
commit
8560a51751
|
|
@ -81,6 +81,8 @@ react-build-automation:
|
|||
unit_test:
|
||||
image: tarampampam/node:10.16-alpine
|
||||
stage: test
|
||||
# Start running this job only when the build-automation job is complete
|
||||
needs: ["react-build-automation"]
|
||||
script:
|
||||
- *set_automation_env
|
||||
- yarn run test:unit
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/sh
|
||||
# GIT_BRANCH=$(git branch --no-color | grep -E '^\*' | sed 's/\*[^a-z]*//g')
|
||||
|
||||
GIT_SHA=$(eval git rev-parse HEAD)
|
||||
echo $GIT_SHA
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
import SearchBox from "react-google-maps/lib/components/places/SearchBox";
|
||||
import { MarkerProps } from "widgets/MapWidget";
|
||||
import PickMyLocation from "./PickMyLocation";
|
||||
import styled, { AnyStyledComponent } from "styled-components";
|
||||
import styled from "styled-components";
|
||||
|
||||
interface MapComponentProps {
|
||||
widgetId: string;
|
||||
|
|
|
|||
|
|
@ -27,33 +27,14 @@ import {
|
|||
fetchProviderTemplates,
|
||||
addApiToPage,
|
||||
} from "actions/providerActions";
|
||||
import { Colors } from "constants/Colors";
|
||||
import { getDuplicateName } from "utils/AppsmithUtils";
|
||||
import { API_EDITOR_URL_WITH_SELECTED_PAGE_ID } from "constants/routes";
|
||||
import { BaseTextInput } from "components/designSystems/appsmith/TextInputComponent";
|
||||
import Spinner from "components/editorComponents/Spinner";
|
||||
import { getInitialsAndColorCode } from "utils/AppsmithUtils";
|
||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||
|
||||
const TEMPLATES_TOP_SECTION_HEIGHT = "83px";
|
||||
|
||||
const SearchContainer = styled.div`
|
||||
display: flex;
|
||||
width: 40%;
|
||||
.closeBtn {
|
||||
position: absolute;
|
||||
left: 70%;
|
||||
}
|
||||
`;
|
||||
|
||||
const SearchBar = styled(BaseTextInput)`
|
||||
margin-bottom: 10px;
|
||||
input {
|
||||
background-color: ${Colors.WHITE};
|
||||
1px solid ${Colors.GEYSER};
|
||||
}
|
||||
`;
|
||||
|
||||
const ProviderInfo = styled.div`
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@ import ImageAlt from "assets/images/placeholder-image.svg";
|
|||
import Postgres from "assets/images/Postgress.png";
|
||||
import MongoDB from "assets/images/MongoDB.png";
|
||||
import RestTemplateImage from "assets/images/RestAPI.png";
|
||||
import MongoConfigResponse from "mockResponses/MongoConfigResponse";
|
||||
import PostgresConfigResponse from "mockResponses/PostgresConfigResponse";
|
||||
import RestTemplateConfigResponse from "mockResponses/RestTemplateConfigResponse";
|
||||
import { ControlProps } from "components/formControls/BaseControl";
|
||||
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
|
||||
|
||||
|
|
@ -183,19 +180,6 @@ class DatasourceDBEditor extends React.Component<
|
|||
return !_.isEmpty(errors);
|
||||
};
|
||||
|
||||
getMockResponse = (packageName: string) => {
|
||||
switch (packageName) {
|
||||
case PLUGIN_PACKAGE_POSTGRES:
|
||||
return PostgresConfigResponse;
|
||||
case PLUGIN_PACKAGE_MONGO:
|
||||
return MongoConfigResponse;
|
||||
case REST_PLUGIN_PACKAGE_NAME:
|
||||
return RestTemplateConfigResponse;
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
getImageSrc = (pluginPackage: string) => {
|
||||
switch (pluginPackage) {
|
||||
case PLUGIN_PACKAGE_POSTGRES:
|
||||
|
|
@ -246,13 +230,15 @@ class DatasourceDBEditor extends React.Component<
|
|||
const values = _.get(formData, properties[0]);
|
||||
const newValues: ({ [s: string]: unknown } | ArrayLike<unknown>)[] = [];
|
||||
|
||||
values.map((object: { [s: string]: unknown } | ArrayLike<unknown>) => {
|
||||
const isEmpty = Object.values(object).every(x => x === "");
|
||||
values.forEach(
|
||||
(object: { [s: string]: unknown } | ArrayLike<unknown>) => {
|
||||
const isEmpty = Object.values(object).every(x => x === "");
|
||||
|
||||
if (!isEmpty) {
|
||||
newValues.push(object);
|
||||
}
|
||||
});
|
||||
if (!isEmpty) {
|
||||
newValues.push(object);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (newValues.length) {
|
||||
formData = _.set(formData, properties[0], newValues);
|
||||
|
|
@ -265,13 +251,15 @@ class DatasourceDBEditor extends React.Component<
|
|||
const values = _.get(formData, configProperty);
|
||||
const newValues: ({ [s: string]: unknown } | ArrayLike<unknown>)[] = [];
|
||||
|
||||
values.map((object: { [s: string]: unknown } | ArrayLike<unknown>) => {
|
||||
const isEmpty = Object.values(object).every(x => x === "");
|
||||
values.forEach(
|
||||
(object: { [s: string]: unknown } | ArrayLike<unknown>) => {
|
||||
const isEmpty = Object.values(object).every(x => x === "");
|
||||
|
||||
if (!isEmpty) {
|
||||
newValues.push(object);
|
||||
}
|
||||
});
|
||||
if (!isEmpty) {
|
||||
newValues.push(object);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (newValues.length) {
|
||||
formData = _.set(formData, configProperty, newValues);
|
||||
|
|
|
|||
|
|
@ -208,14 +208,14 @@ function* createDatasourceFromFormSaga(
|
|||
return _.map(section.children, (subSection: any) => {
|
||||
if ("children" in subSection) {
|
||||
return parseConfig(subSection);
|
||||
} else {
|
||||
if (subSection.initialValue) {
|
||||
_.set(
|
||||
initialValues,
|
||||
subSection.configProperty,
|
||||
subSection.initialValue,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (subSection.initialValue) {
|
||||
_.set(
|
||||
initialValues,
|
||||
subSection.configProperty,
|
||||
subSection.initialValue,
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -237,7 +237,7 @@ function* createDatasourceFromFormSaga(
|
|||
formConfig = yield select(getPluginForm, actionPayload.payload.pluginId);
|
||||
}
|
||||
|
||||
formConfig.map((section: any) => {
|
||||
formConfig.forEach((section: any) => {
|
||||
parseConfig(section);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user