Skip to content

Commit

Permalink
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
Browse files Browse the repository at this point in the history
…o overflow-tabs-list-view
  • Loading branch information
albinAppsmith committed Jun 25, 2024
2 parents 296c976 + d0c2d40 commit 1c829af
Show file tree
Hide file tree
Showing 28 changed files with 395 additions and 374 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-debugging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
sudo /etc/init.d/ssh stop ;
mkdir -p ~/git-server/keys
docker run --name test-event-driver -d -p 22:22 -p 5001:5001 -p 3306:3306 \
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
-p 5433:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
appsmith/test-event-driver:latest
cd cicontainerlocal
docker run -d --name appsmith -p 80:80 \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
mkdir -p ~/git-server/keys
ted_tag="${{inputs.ted_tag}}"
docker run --name test-event-driver -d -p 22:22 -p 5001:5001 -p 3306:3306 \
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
-p 5433:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
"appsmith/test-event-driver:${ted_tag:-latest}"
docker run --name cloud-services -d -p 8000:80 -p 8090:8090 \
--privileged --pid=host --ipc=host --add-host=host.docker.internal:host-gateway\
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-limited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
sudo /etc/init.d/ssh stop ;
mkdir -p ~/git-server/keys
docker run --name test-event-driver -d -p 22:22 -p 5001:5001 -p 3306:3306 \
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
-p 5433:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
appsmith/test-event-driver:latest
docker run --name cloud-services -d -p 8000:80 -p 8090:8090 \
--privileged --pid=host --ipc=host --add-host=host.docker.internal:host-gateway\
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ RUN <<END

# Ensure all *.sh scripts are executable.
find . -name node_modules -prune -or -type f -name '*.sh' -print -exec chmod +x '{}' ';'

# Ensure all custom command-scripts have executable permission
chmod +x /opt/bin/*
END

#Add the jar to the container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ describe(
dataSources._host(),
dataManager.dsValues[dataManager.defaultEnviorment].postgres_host,
);
agHelper.ClearNType(
dataSources._port,
dataManager.dsValues[
dataManager.defaultEnviorment
].postgres_port.toString(),
);
agHelper.ClearNType(
dataSources._databaseName,
dataManager.dsValues[dataManager.defaultEnviorment]
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/fixtures/datasources.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"mongo-uri": "mongodb://host.docker.internal:28017/mongo_samples?retryWrites=true&w=majority",

"postgres-host": "host.docker.internal",
"postgres-port": 5432,
"postgres-port": 5433,
"postgres-databaseName": "fakeapi",
"postgres-username": "docker",
"postgres-password": "docker",
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/scripts/cypress-local-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function ensureTEDIsRunning() {
);
try {
execSync(
"docker run --name ted --rm -d --pull always -p 2022:22 -p 5001:5001 -p 3306:3306 -p 28017:27017 -p 5432:5432 -p 25:25 -p 4200:4200 appsmith/test-event-driver",
"docker run --name ted --rm -d --pull always -p 2022:22 -p 5001:5001 -p 3306:3306 -p 28017:27017 -p 5433:5432 -p 25:25 -p 4200:4200 appsmith/test-event-driver",
{ stdio: "inherit" },
);
console.log(
Expand Down
1 change: 1 addition & 0 deletions app/client/cypress/setup-test-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ echo "status code: $status_code"

if [ "$status_code" -eq "502" ]; then
echo "Unable to connect to server"
docker logs appsmith
exit 1
fi

Expand Down
4 changes: 2 additions & 2 deletions app/client/cypress/support/Objects/DataManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class DataManager {
mongo_databaseName: "mongo_prod",

postgres_host: "host.docker.internal",
postgres_port: 5432,
postgres_port: 5433,
postgres_databaseName: "fakeapi",
postgres_username: "docker",
postgres_password: "docker",
Expand Down Expand Up @@ -118,7 +118,7 @@ export class DataManager {
mongo_databaseName: "mongo_staging",

postgres_host: "host.docker.internal",
postgres_port: 5432,
postgres_port: 5433,
postgres_databaseName: "stagingdb",
postgres_username: "dockerstaging",
postgres_password: "dockerstaging",
Expand Down
104 changes: 52 additions & 52 deletions app/client/cypress/tags.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
module.exports = {
Tag: [
"@tag.AccessControl",
"@tag.Anvil",
"@tag.excludeForAirgap",
"@tag.airgap",
"@tag.Git",
"@tag.Widget",
"@tag.Slider",
"@tag.CurrencyInput",
"@tag.Input",
"@tag.Chart",
"@tag.Text",
"@tag.Statbox",
"@tag.Modal",
"@tag.Filepicker",
"@tag.Select",
"@tag.RichTextEditor",
"@tag.Switch",
"@tag.List",
"@tag.Audio",
"@tag.Auditlogs",
"@tag.Authentication",
"@tag.AutoHeight",
"@tag.Binding",
"@tag.Button",
"@tag.Camera",
"@tag.Chart",
"@tag.Checkbox",
"@tag.Scanner",
"@tag.Container",
"@tag.CurrencyInput",
"@tag.Datasource",
"@tag.Datepicker",
"@tag.Divider",
"@tag.Dropdown",
"@tag.DocumentViewer",
"@tag.Audio",
"@tag.Radio",
"@tag.Rating",
"@tag.Table",
"@tag.TextEditor",
"@tag.PhoneInput",
"@tag.IconButton",
"@tag.Maps",
"@tag.MenuButton",
"@tag.Progress",
"@tag.Video",
"@tag.Container",
"@tag.Camera",
"@tag.Image",
"@tag.Tab",
"@tag.GSheet",
"@tag.Dropdown",
"@tag.Filepicker",
"@tag.Fork",
"@tag.Form",
"@tag.JSONForm",
"@tag.Iframe",
"@tag.Binding",
"@tag.GSheet",
"@tag.GenerateCRUD",
"@tag.Git",
"@tag.IDE",
"@tag.Datasource",
"@tag.IconButton",
"@tag.Iframe",
"@tag.Image",
"@tag.ImportExport",
"@tag.Input",
"@tag.JS",
"@tag.GenerateCRUD",
"@tag.JSONForm",
"@tag.LicenseAndBilling",
"@tag.List",
"@tag.MainContainer",
"@tag.Maps",
"@tag.MenuButton",
"@tag.MobileResponsive",
"@tag.Theme",
"@tag.Settings",
"@tag.ImportExport",
"@tag.AutoHeight",
"@tag.Fork",
"@tag.Modal",
"@tag.Module",
"@tag.Perf",
"@tag.PhoneInput",
"@tag.Progress",
"@tag.PropertyPane",
"@tag.Workspace",
"@tag.Sanity",
"@tag.Auditlogs",
"@tag.AccessControl",
"@tag.LicenseAndBilling",
"@tag.Authentication",
"@tag.Provisioning",
"@tag.Radio",
"@tag.Rating",
"@tag.RichTextEditor",
"@tag.Sanity",
"@tag.Scanner",
"@tag.Select",
"@tag.Settings",
"@tag.Slider",
"@tag.Statbox",
"@tag.Switch",
"@tag.Tab",
"@tag.Table",
"@tag.Templates",
"@tag.MainContainer",
"@tag.Text",
"@tag.TextEditor",
"@tag.Theme",
"@tag.Video",
"@tag.Visual",
"@tag.Module",
"@tag.Widget",
"@tag.Workflows",
"@tag.Workspace",
"@tag.airgap",
"@tag.excludeForAirgap",
],
};
38 changes: 29 additions & 9 deletions app/client/src/api/ActionAPI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,28 @@ class ActionAPI extends API {
ActionAPI.apiUpdateCancelTokenSource.cancel();
}
ActionAPI.apiUpdateCancelTokenSource = axios.CancelToken.source();
const action: Partial<Action & { entityReferenceType: unknown }> = {
const payload: Partial<Action & { entityReferenceType: unknown }> = {
...apiConfig,
name: undefined,
entityReferenceType: undefined,
};
if (action.datasource != null) {
action.datasource = {
...(action as any).datasource,
actionConfiguration: apiConfig.actionConfiguration && {
...apiConfig.actionConfiguration,
autoGeneratedHeaders:
apiConfig.actionConfiguration.autoGeneratedHeaders?.map(
(header: any) => ({
...header,
isInvalid: undefined,
}),
) ?? undefined,
},
datasource: apiConfig.datasource && {
...(apiConfig as any).datasource,
datasourceStorages: undefined,
isValid: undefined,
new: undefined,
};
}
return API.put(`${ActionAPI.url}/${action.id}`, action, undefined, {
},
};
return API.put(`${ActionAPI.url}/${apiConfig.id}`, payload, undefined, {
cancelToken: ActionAPI.apiUpdateCancelTokenSource.token,
});
}
Expand Down Expand Up @@ -228,7 +236,19 @@ class ActionAPI extends API {
}

static async moveAction(moveRequest: MoveActionRequest) {
return API.put(ActionAPI.url + "/move", moveRequest, undefined, {
const payload = {
...moveRequest,
action: moveRequest.action && {
...moveRequest.action,
entityReferenceType: undefined,
datasource: moveRequest.action.datasource && {
...moveRequest.action.datasource,
isValid: undefined,
new: undefined,
},
},
};
return API.put(ActionAPI.url + "/move", payload, undefined, {
timeout: DEFAULT_EXECUTE_ACTION_TIMEOUT_MS,
});
}
Expand Down
6 changes: 5 additions & 1 deletion app/client/src/api/AppThemingApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ class AppThemingApi extends API {
applicationId: string,
theme: AppTheme,
): Promise<AxiosPromise<ApiResponse<AppTheme[]>>> {
const payload = {
...theme,
new: undefined,
};
return API.put(
`${AppThemingApi.baseUrl}/themes/applications/${applicationId}`,
theme,
payload,
);
}

Expand Down
8 changes: 6 additions & 2 deletions app/client/src/api/PageApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,14 @@ class PageApi extends Api {
static async generateTemplatePage(
request: GenerateTemplatePageRequest,
): Promise<AxiosPromise<ApiResponse>> {
const payload = {
...request,
pageId: undefined,
};
if (request.pageId) {
return Api.put(PageApi.getGenerateTemplateURL(request.pageId), request);
return Api.put(PageApi.getGenerateTemplateURL(request.pageId), payload);
} else {
return Api.post(PageApi.getGenerateTemplateURL(), request);
return Api.post(PageApi.getGenerateTemplateURL(), payload);
}
}

Expand Down
2 changes: 2 additions & 0 deletions app/client/src/pages/Editor/DataSourceEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ class DatasourceEditorRouter extends React.Component<Props, State> {
const {
datasource,
datasourceId,
featureFlags,
formConfig,
formData,
formName,
Expand Down Expand Up @@ -817,6 +818,7 @@ class DatasourceEditorRouter extends React.Component<Props, State> {
applicationId={this.props.applicationId}
currentEnvironment={this.getEnvironmentId()}
datasourceId={datasourceId}
featureFlags={featureFlags}
formConfig={formConfig}
formData={formData}
formName={DATASOURCE_DB_FORM}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
getBoundaryWidgetsFromCopiedGroups,
getNextWidgetName,
getReflowedPositions,
handleIfParentIsListWidgetWhilePasting,
handleSpecificCasesWhilePasting,
} from "../WidgetOperationUtils";

Expand All @@ -55,11 +56,10 @@ import { updateWidgetPositions } from "layoutSystems/autolayout/utils/positionUt
import type { FlexLayer } from "layoutSystems/autolayout/utils/types";
import {
getNewPositions,
handleButtonDynamicTriggerPathList,
handleImageWidgetWhenPasting,
handleWidgetDynamicBindingPathList,
handleWidgetDynamicPropertyPathList,
handleWidgetDynamicTriggerPathList,
handleJSONFormPropertiesListedInDynamicBindingPath,
handleJSONFormWidgetWhenPasting,
handleTextWidgetWhenPasting,
} from "../PasteWidgetUtils";

import ApplicationApi, {
Expand Down Expand Up @@ -829,27 +829,24 @@ function handleOtherWidgetReferencesWhilePastingBuildingBlockWidget(
widgetNameMap: Record<string, string>,
newWidgetList: FlattenedWidgetProps[],
) {
switch (widget?.type) {
case "JSON_FORM_WIDGET":
handleJSONFormWidgetWhenPasting(widgetNameMap, widget);
break;
case "TEXT_WIDGET":
handleTextWidgetWhenPasting(widgetNameMap, widget);
break;
case "IMAGE_WIDGET":
handleImageWidgetWhenPasting(widgetNameMap, widget);
break;
case "BUTTON_WIDGET":
handleButtonDynamicTriggerPathList(widgetNameMap, widget);
break;
default:
widgets = handleSpecificCasesWhilePasting(
widget,
widgets,
widgetNameMap,
newWidgetList,
);
break;
if (["LIST_WIDGET", "LIST_WIDGET_V2", "MODAL_WIDGET"].includes(widget.type)) {
widgets = handleSpecificCasesWhilePasting(
widget,
widgets,
widgetNameMap,
newWidgetList,
);
}
if (widget.dynamicTriggerPathList) {
handleWidgetDynamicTriggerPathList(widgetNameMap, widget);
}
if (widget.dynamicBindingPathList) {
handleWidgetDynamicBindingPathList(widgetNameMap, widget);
}
if (widget.dynamicPropertyPathList) {
handleWidgetDynamicPropertyPathList(widgetNameMap, widget);
}
widgets = handleIfParentIsListWidgetWhilePasting(widget, widgets);

return widgets;
}
Loading

0 comments on commit 1c829af

Please sign in to comment.