Skip to content

Commit 72b8045

Browse files
committed
Merge remote-tracking branch 'origin/release' into fix/tooltip-position-fix
2 parents 1362d70 + 6f67dbd commit 72b8045

File tree

21 files changed

+190
-92
lines changed

21 files changed

+190
-92
lines changed

.github/workflows/scripts/test-tag-parser.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ function parseTags({core, context}) {
1818

1919
for (const [rawTag] of config.matchAll(/\w+/g)) {
2020
console.log("Given: '" + rawTag + "'");
21+
const rawTagLowerAndPrefixed = "@tag." + rawTag.toLowerCase();
2122

2223
// See if there is exact case-insensitive match.
23-
const exactTagMatch = allTags.find(t => t.toLowerCase() === "@tag." + rawTag);
24+
const exactTagMatch = allTags.find(t => t.toLowerCase() === rawTagLowerAndPrefixed);
2425
if (exactTagMatch) {
2526
console.log("\tMatch found:", exactTagMatch);
2627
concreteTags.push(exactTagMatch);
2728
continue;
2829
}
2930

3031
// See if there is a singular/plural match (very rudimentary language skills).
31-
const countedMatch = allTags.find(t => t.toLowerCase().replace(/s$/, "") === "@tag." + rawTag.replace(/s$/, ""));
32+
const countedMatch = allTags.find(t => t.toLowerCase().replace(/s$/, "") === rawTagLowerAndPrefixed.replace(/s$/, ""));
3233
if (countedMatch) {
3334
console.log("\tMatch found:", countedMatch);
3435
concreteTags.push(countedMatch);
@@ -38,7 +39,7 @@ function parseTags({core, context}) {
3839
// More smart matchers?
3940

4041
// No match, fail.
41-
core.setFailed("\tNo match found for tag:", rawTag);
42+
core.setFailed("\tNo match found for tag: " + rawTag);
4243

4344
// We still process the rest, so we report all invalid tags in the input in a single run.
4445
}

app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Date_column_editing_1_spec.ts

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,28 @@ describe(
6060
);
6161
agHelper.AssertElementAbsence(table._dateInputPopover);
6262
agHelper.AssertElementAbsence(table._editCellEditor);
63-
agHelper
64-
.GetText(locators._textWidget, "text", 0)
65-
.then(($textData) =>
66-
expect($textData).to.eq(
67-
`{"revenue":42600000,"imdb_id":"tt3228774","release_date":"2021-05-17"}`,
68-
),
69-
);
70-
agHelper
71-
.GetText(locators._textWidget, "text", 1)
72-
.then(($textData) =>
73-
expect($textData).to.eq(
74-
`[{"index":0,"updatedFields":{"release_date":"2021-05-17"},"allFields":{"revenue":42600000,"imdb_id":"tt3228774","release_date":"2021-05-17"}}]`,
75-
),
76-
);
63+
agHelper.GetText(locators._textWidget, "text", 0).then(($textData) =>
64+
expect(JSON.parse($textData as string)).to.deep.eq({
65+
revenue: 42600000,
66+
imdb_id: "tt3228774",
67+
release_date: "2021-05-17",
68+
}),
69+
);
70+
agHelper.GetText(locators._textWidget, "text", 1).then(($textData) =>
71+
expect(JSON.parse($textData as string)).to.deep.eq([
72+
{
73+
index: 0,
74+
updatedFields: {
75+
release_date: "2021-05-17",
76+
},
77+
allFields: {
78+
revenue: 42600000,
79+
imdb_id: "tt3228774",
80+
release_date: "2021-05-17",
81+
},
82+
},
83+
]),
84+
);
7785
agHelper
7886
.GetText(locators._textWidget, "text", 2)
7987
.then(($textData) => expect($textData).to.eq("[0]"));
Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1 @@
1-
{
2-
"widgetName": "MainContainer",
3-
"backgroundColor": "none",
4-
"rightColumn": 1296,
5-
"snapColumns": 64,
6-
"detachFromLayout": true,
7-
"widgetId": "0",
8-
"topRow": 0,
9-
"bottomRow": 440,
10-
"containerStyle": "none",
11-
"snapRows": 125,
12-
"parentRowSpace": 1,
13-
"type": "CANVAS_WIDGET",
14-
"canExtend": true,
15-
"version": 47,
16-
"minHeight": 420,
17-
"parentColumnSpace": 1,
18-
"dynamicBindingPathList": [
19-
20-
],
21-
"leftColumn": 0,
22-
"children": [
23-
24-
]
25-
}
1+
{}

app/client/src/api/LibraryAPI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default class LibraryApi extends Api {
2121
library: Partial<JSLibrary>,
2222
) {
2323
const url = LibraryApi.getUpdateLibraryBaseURL(applicationId) + "/remove";
24-
return Api.patch(url, library);
24+
return Api.patch(url, { accessor: library.accessor, url: library.url });
2525
}
2626

2727
static async getLibraries(applicationId: string, mode: APP_MODE) {

app/client/src/ce/api/JSActionAPI.tsx

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,39 @@ class JSActionAPI extends API {
7474
static async createJSCollection(
7575
jsConfig: CreateJSCollectionRequest,
7676
): Promise<AxiosPromise<JSCollectionCreateUpdateResponse>> {
77-
return API.post(JSActionAPI.url, jsConfig);
77+
const payload = {
78+
...jsConfig,
79+
actions:
80+
jsConfig.actions?.map((action) => ({
81+
...action,
82+
entityReferenceType: undefined,
83+
datasource: (action as any).datasource && {
84+
...(action as any).datasource,
85+
isValid: undefined,
86+
new: undefined,
87+
},
88+
})) ?? undefined,
89+
};
90+
return API.post(JSActionAPI.url, payload);
7891
}
7992

8093
static async copyJSCollection(
8194
jsConfig: Partial<JSCollection>,
8295
): Promise<AxiosPromise<JSCollectionCreateUpdateResponse>> {
83-
return API.post(JSActionAPI.url, jsConfig);
96+
const payload = {
97+
...jsConfig,
98+
actions:
99+
jsConfig.actions?.map((action) => ({
100+
...action,
101+
entityReferenceType: undefined,
102+
datasource: (action as any).datasource && {
103+
...(action as any).datasource,
104+
isValid: undefined,
105+
new: undefined,
106+
},
107+
})) ?? undefined,
108+
};
109+
return API.post(JSActionAPI.url, payload);
84110
}
85111

86112
static async updateJSCollectionBody(
@@ -95,8 +121,20 @@ class JSActionAPI extends API {
95121
static async updateJSCollection(
96122
jsConfig: JSCollection,
97123
): Promise<AxiosPromise<JSCollectionCreateUpdateResponse>> {
98-
const jsAction = Object.assign({}, jsConfig);
99-
return API.put(`${JSActionAPI.url}/${jsAction.id}`, jsAction);
124+
const payload = {
125+
...jsConfig,
126+
actions:
127+
jsConfig.actions?.map((action) => ({
128+
...action,
129+
entityReferenceType: undefined,
130+
datasource: (action as any).datasource && {
131+
...(action as any).datasource,
132+
isValid: undefined,
133+
new: undefined,
134+
},
135+
})) ?? undefined,
136+
};
137+
return API.put(`${JSActionAPI.url}/${jsConfig.id}`, payload);
100138
}
101139

102140
static async deleteJSCollection(id: string) {
@@ -128,10 +166,25 @@ class JSActionAPI extends API {
128166
static async updateJSCollectionActionRefactor(
129167
updateJSCollectionActionName: UpdateCollectionActionNameRequest,
130168
) {
131-
return API.put(
132-
JSActionAPI.url + "/refactorAction",
133-
updateJSCollectionActionName,
134-
);
169+
const payload = {
170+
...updateJSCollectionActionName,
171+
actionCollection: updateJSCollectionActionName.actionCollection && {
172+
...updateJSCollectionActionName.actionCollection,
173+
actions:
174+
updateJSCollectionActionName.actionCollection.actions?.map(
175+
(action) => ({
176+
...action,
177+
entityReferenceType: undefined,
178+
datasource: (action as any).datasource && {
179+
...(action as any).datasource,
180+
isValid: undefined,
181+
new: undefined,
182+
},
183+
}),
184+
) ?? undefined,
185+
},
186+
};
187+
return API.put(JSActionAPI.url + "/refactorAction", payload);
135188
}
136189
}
137190

app/client/src/sagas/FormEvaluationSaga.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export function* fetchDynamicValuesSaga(
139139
formId,
140140
datasourceId,
141141
pluginId,
142-
key,
143142
);
144143
}
145144

@@ -159,7 +158,6 @@ function* fetchDynamicValueSaga(
159158
actionId: string,
160159
datasourceId: string,
161160
pluginId: string,
162-
configProperty: string,
163161
) {
164162
try {
165163
const { config, evaluatedConfig } =
@@ -247,9 +245,7 @@ function* fetchDynamicValueSaga(
247245
url,
248246
{
249247
actionId,
250-
configProperty,
251248
datasourceId,
252-
pluginId,
253249
...evaluatedParams,
254250
},
255251
);

app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/Authentication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class Authentication {
1010
public static final String API_KEY_AUTH_TYPE_QUERY_PARAMS = "queryParams";
1111
public static final String API_KEY_AUTH_TYPE_HEADER = "header";
1212
public static final String BEARER_TOKEN = "bearerToken";
13+
public static final String SNOWFLAKE_KEY_PAIR_AUTH = "snowflakeKeyPairAuth";
1314

1415
// Request parameter names
1516
public static final String CLIENT_ID = "client_id";
Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
package com.appsmith.external.constants.spans;
22

3-
import static com.appsmith.external.constants.spans.BaseSpan.APPSMITH_SPAN_PREFIX;
3+
import com.appsmith.external.constants.spans.ce.ActionSpanCE;
44

55
/**
66
* Please make sure that all span names start with `appsmith.` because span with any other naming format would get
77
* dropped / ignored as defined in TracingConfig.java
88
*/
9-
public final class ActionSpan {
10-
11-
// Action execution spans
12-
public static final String ACTION_EXECUTION_REQUEST_PARSING = APPSMITH_SPAN_PREFIX + "request.parsing";
13-
public static final String ACTION_EXECUTION_CACHED_DATASOURCE = APPSMITH_SPAN_PREFIX + "get.datasource.cached";
14-
public static final String ACTION_EXECUTION_DATASOURCE_CONTEXT = APPSMITH_SPAN_PREFIX + "get.datasource.context";
15-
public static final String ACTION_EXECUTION_EDITOR_CONFIG = APPSMITH_SPAN_PREFIX + "get.editorConfig.cached";
16-
public static final String ACTION_EXECUTION_PLUGIN_EXECUTION = APPSMITH_SPAN_PREFIX + "total.plugin.execution";
17-
public static final String ACTION_EXECUTION_SERVER_EXECUTION = APPSMITH_SPAN_PREFIX + "total.server.execution";
18-
19-
// Getter spans
20-
public static final String GET_UNPUBLISHED_ACTION = APPSMITH_SPAN_PREFIX + "get.action.unpublished";
21-
public static final String GET_VIEW_MODE_ACTION = APPSMITH_SPAN_PREFIX + "get.action.viewmode";
22-
public static final String GET_ACTION_REPOSITORY_CALL = APPSMITH_SPAN_PREFIX + "get.action.repository.call";
23-
}
9+
public final class ActionSpan extends ActionSpanCE {}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package com.appsmith.external.constants.spans;
22

3-
import static com.appsmith.external.constants.spans.BaseSpan.APPSMITH_SPAN_PREFIX;
3+
import com.appsmith.external.constants.spans.ce.DatasourceSpanCE;
44

5-
public class DatasourceSpan {
6-
public static final String FETCH_ALL_DATASOURCES_WITH_STORAGES =
7-
APPSMITH_SPAN_PREFIX + "get_all_datasource_storage";
8-
public static final String FETCH_ALL_PLUGINS_IN_WORKSPACE = APPSMITH_SPAN_PREFIX + "get_all_plugins_in_workspace";
9-
}
5+
public class DatasourceSpan extends DatasourceSpanCE {}
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
package com.appsmith.external.constants.spans;
22

3-
import static com.appsmith.external.constants.spans.BaseSpan.APPSMITH_SPAN_PREFIX;
3+
import com.appsmith.external.constants.spans.ce.TenantSpanCE;
44

5-
public class TenantSpan {
6-
public static final String FETCH_DEFAULT_TENANT_SPAN = APPSMITH_SPAN_PREFIX + "fetch_default_tenant";
7-
public static final String FETCH_TENANT_CACHE_POST_DESERIALIZATION_ERROR_SPAN =
8-
APPSMITH_SPAN_PREFIX + "fetch_tenant_cache_post_deserialization_error";
9-
public static final String FETCH_TENANT_FROM_DB_SPAN = APPSMITH_SPAN_PREFIX + "fetch_tenant_from_db";
10-
}
5+
public class TenantSpan extends TenantSpanCE {}

0 commit comments

Comments
 (0)