Skip to content

Commit 5e6cf42

Browse files
authored
Merge pull request #1268 from lowcoder-org/dev
Dev -> Main for 2.4.11 hotfix - /latest
2 parents 9d8ab7b + bdd356b commit 5e6cf42

File tree

13 files changed

+37
-17
lines changed

13 files changed

+37
-17
lines changed

Diff for: client/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.11
1+
2.4.12

Diff for: client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-frontend",
3-
"version": "2.4.11",
3+
"version": "2.4.12",
44
"type": "module",
55
"private": true,
66
"workspaces": [

Diff for: client/packages/lowcoder/src/comps/comps/buttonComp/buttonComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const ButtonTmpComp = (function () {
136136
};
137137
return new UICompBuilder(childrenMap, (props) => {
138138
return(
139-
<ButtonCompWrapper disabled={props.disabled}>
139+
<ButtonCompWrapper $disabled={props.disabled}>
140140
<EditorContext.Consumer>
141141
{(editorState) => (
142142
<Button100

Diff for: client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ export const Button100 = styled(Button)<{ $buttonStyle?: ButtonStyleType }>`
6868
line-height:${(props) => props.$buttonStyle?.lineHeight};
6969
`;
7070

71-
export const ButtonCompWrapper = styled.div<{ disabled: boolean }>`
71+
export const ButtonCompWrapper = styled.div<{ $disabled: boolean }>`
72+
display: flex;
73+
7274
// The button component is disabled but can respond to drag & select events
7375
${(props) =>
74-
props.disabled &&
76+
props.$disabled &&
7577
`
7678
cursor: not-allowed;
7779
button:disabled {

Diff for: client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const DropdownTmpComp = (function () {
116116
);
117117

118118
return (
119-
<ButtonCompWrapper disabled={props.disabled}>
119+
<ButtonCompWrapper $disabled={props.disabled}>
120120
{props.onlyMenu ? (
121121
<Dropdown
122122
disabled={props.disabled}

Diff for: client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const LinkTmpComp = (function () {
9595
// chrome86 bug: button children should not contain only empty span
9696
const hasChildren = hasIcon(props.prefixIcon) || !!props.text || hasIcon(props.suffixIcon);
9797
return (
98-
<ButtonCompWrapper disabled={props.disabled}>
98+
<ButtonCompWrapper $disabled={props.disabled}>
9999
<Link
100100
$animationStyle={props.animationStyle}
101101
ref={props.viewRef}

Diff for: client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const ScannerTmpComp = (function () {
134134
};
135135

136136
return (
137-
<ButtonCompWrapper disabled={props.disabled}>
137+
<ButtonCompWrapper $disabled={props.disabled}>
138138
<Button100
139139
ref={props.viewRef}
140140
$buttonStyle={props.style}

Diff for: client/packages/lowcoder/src/comps/comps/buttonComp/toggleButtonComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const ToggleTmpComp = (function () {
7272

7373
return (
7474
<ButtonCompWrapperStyled
75-
disabled={props.disabled}
75+
$disabled={props.disabled}
7676
$align={props.alignment}
7777
$showBorder={props.showBorder}
7878
$animationStyle={props.animationStyle}

Diff for: client/packages/lowcoder/src/layout/gridLayout.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ class GridLayout extends React.Component<GridLayoutProps, GridLayoutState> {
213213
* @return {String} Container height in pixels.
214214
*/
215215
containerHeight(): string {
216-
const { margin, rowHeight, fixedRowCount } = this.props as Required<GridLayoutProps>;
216+
const { margin, rowHeight, fixedRowCount, isCanvas } = this.props as Required<GridLayoutProps>;
217217
const { extraHeight, emptyRows } = this.props;
218218
const positionParams = genPositionParams(this.props);
219-
220219
const { containerPadding } = positionParams;
221220
const layout = this.getUILayout(undefined, true);
221+
222222
let nbRow = bottom(layout);
223-
if (!_.isNil(emptyRows) && (_.size(layout) === 0 || fixedRowCount)) {
224-
nbRow = emptyRows;// === Infinity ? 0 : emptyRows;
223+
if (!_.isNil(emptyRows) && (_.size(layout) === 0 || (fixedRowCount && isCanvas))) {
224+
nbRow = emptyRows;
225225
}
226226
const containerHeight = Math.max(
227227
nbRow * rowHeight + (nbRow - 1) * margin[1] + containerPadding[1] * 2

Diff for: client/packages/lowcoder/src/util/styleUtils.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const getBackgroundStyle = (style: Record<string, string | undefined>) => {
55
return css`
66
${isValidColor(style.background) && `background-color: ${style.background}`};
77
${isValidGradient(style.background) && !Boolean(style.backgroundImage) && `background-image: ${style.background}`};
8-
${!isValidGradient(style.background) && Boolean(style.backgroundImage) && `background-image: ${style.backgroundImage}`};
8+
${!isValidGradient(style.background) && Boolean(style.backgroundImage) && `background-image: url(${style.backgroundImage})`};
99
${isValidGradient(style.background) && Boolean(style.backgroundImage) && `background-image: url(${style.backgroundImage}), ${style.background}`};
1010
1111
${style.backgroundImageRepeat && `background-repeat: ${style.backgroundImageRepeat};`};

Diff for: server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelog.java

+19-1
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,29 @@ public void addGidIndexesUnique(MongockTemplate mongoTemplate) {
301301
ensureIndexes(mongoTemplate, LibraryQuery.class, makeIndex("gid").unique());
302302
}
303303

304+
private int getMongoDBVersion(MongockTemplate mongoTemplate) {
305+
Document buildInfo = mongoTemplate.executeCommand(new Document("buildInfo", 1));
306+
String versionString = buildInfo.getString("version");
307+
if(versionString == null) return -1;
308+
String[] versionParts = versionString.split("\\.");
309+
int majorVersion = Integer.parseInt(versionParts[0]);
310+
return majorVersion;
311+
}
312+
304313
@ChangeSet(order = "026", id = "add-time-series-snapshot-history", author = "")
305314
public void addTimeSeriesSnapshotHistory(MongockTemplate mongoTemplate, CommonConfig commonConfig) {
315+
int mongoVersion = getMongoDBVersion(mongoTemplate);
316+
if (mongoVersion < 5) {
317+
log.warn("MongoDB version is below 5. Time-series collections are not supported. Upgrade the MongoDB version.");
318+
}
319+
306320
// Create the time-series collection if it doesn't exist
307321
if (!mongoTemplate.collectionExists(ApplicationHistorySnapshotTS.class)) {
308-
mongoTemplate.createCollection(ApplicationHistorySnapshotTS.class, CollectionOptions.empty().timeSeries("createdAt"));
322+
if(mongoVersion < 5) {
323+
mongoTemplate.createCollection(ApplicationHistorySnapshotTS.class);
324+
} else {
325+
mongoTemplate.createCollection(ApplicationHistorySnapshotTS.class, CollectionOptions.empty().timeSeries("createdAt"));
326+
}
309327
}
310328
Instant thresholdDate = Instant.now().minus(commonConfig.getQuery().getAppSnapshotKeepDuration(), ChronoUnit.DAYS);
311329
List<ApplicationHistorySnapshot> snapshots = mongoTemplate.find(new Query().addCriteria(Criteria.where("createdAt").gte(thresholdDate)), ApplicationHistorySnapshot.class);

Diff for: server/api-service/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
<properties>
15-
<revision>2.4.11</revision>
15+
<revision>2.4.12</revision>
1616
<java.version>17</java.version>
1717
<maven.compiler.source>${java.version}</maven.compiler.source>
1818
<maven.compiler.target>${java.version}</maven.compiler.target>

Diff for: server/node-service/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-node-server",
3-
"version": "2.4.11",
3+
"version": "2.4.12",
44
"private": true,
55
"engines": {
66
"node": "^14.18.0 || >=16.0.0"

0 commit comments

Comments
 (0)