Skip to content

Commit c532736

Browse files
authored
Merge branch 'main' into fix--button-width-issue
2 parents 0bad5a1 + 8ad4436 commit c532736

File tree

67 files changed

+697
-324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+697
-324
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ logs/
33
stacks/
44
client/.yarn/cache/*.zip
55
server/node-service/.yarn/cache/*.zip
6+
.metadata/

client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ docker run -d --name lowcoder-dev -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks"
3434
1. Check out source code.
3535
2. Change to client dir in the repository root via cd client.
3636
3. Run yarn to install dependencies: .
37-
4. Start dev server: `API_PROXY_TARGET=http://localhost:3000 yarn start`.
37+
4. Start dev server: `LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start`.
3838
5. After dev server starts successfully, it will be automatically opened in the default browser.
3939

4040
### Before submitting a pull request

client/packages/lowcoder-cli/client.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ declare var REACT_APP_EDITION: string;
3030
declare var REACT_APP_LANGUAGES: string;
3131
declare var REACT_APP_COMMIT_ID: string;
3232
declare var REACT_APP_API_HOST: string;
33+
declare var LOWCODER_NODE_SERVICE_URL: string;
34+
declare var LOWCODER_SHOW_BRAND: string;
35+
declare var LOWCODER_CUSTOM_LOGO: string;
36+
declare var LOWCODER_CUSTOM_LOGO_SQUARE: string;
3337
declare var REACT_APP_ENV: string;
3438
declare var REACT_APP_BUILD_ID: string;
3539
declare var REACT_APP_LOG_LEVEL: string;

client/packages/lowcoder-dev-utils/buildVars.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ export const buildVars = [
1919
name: "REACT_APP_API_HOST",
2020
defaultValue: "",
2121
},
22+
{
23+
name: "LOWCODER_SHOW_BRAND",
24+
defaultValue: 'false',
25+
},
26+
{
27+
name: "LOWCODER_CUSTOM_LOGO",
28+
defaultValue: '',
29+
},
30+
{
31+
name: "LOWCODER_CUSTOM_LOGO_SQUARE",
32+
defaultValue: '',
33+
},
34+
{
35+
name: "LOWCODER_NODE_SERVICE_URL",
36+
defaultValue: "",
37+
},
2238
{
2339
name: "REACT_APP_ENV",
2440
defaultValue: "production",

client/packages/lowcoder/src/app-env.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ declare var REACT_APP_EDITION: string;
3333
declare var REACT_APP_LANGUAGES: string;
3434
declare var REACT_APP_COMMIT_ID: string;
3535
declare var REACT_APP_API_HOST: string;
36+
declare var LOWCODER_NODE_SERVICE_URL: string;
37+
declare var LOWCODER_SHOW_BRAND: string;
38+
declare var LOWCODER_CUSTOM_LOGO: string;
39+
declare var LOWCODER_CUSTOM_LOGO_SQUARE: string;
3640
declare var REACT_APP_ENV: string;
3741
declare var REACT_APP_BUILD_ID: string;
3842
declare var REACT_APP_LOG_LEVEL: string;

client/packages/lowcoder/src/assets/images/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches
22
import { ReactComponent as LogoIcon } from "./logo.svg";
33
import { ReactComponent as LogoWithNameIcon } from "./logo-with-name.svg";
4-
import { ReactComponent as LogoHomeIcon } from "./logo-with-name.svg";
4+
import { ReactComponent as LogoHomeIcon } from "./logo-with-name-home.svg";
55

66
export { default as favicon } from "./favicon.ico";
77

client/packages/lowcoder/src/components/PageSkeleton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ export default function PageSkeleton(props: IProps) {
8383
{!hideHeader && isHeaderReady && (
8484
<Header
8585
headerStart={
86+
LOWCODER_SHOW_BRAND === 'true' ?
87+
LOWCODER_CUSTOM_LOGO !== "" ? <img src={LOWCODER_CUSTOM_LOGO} alt="logo" /> :<StyledLogoWithName branding={true} /> :
8688
<StyledLogoHome branding={true} />
8789
}
8890
style={{ backgroundColor: brandingConfig?.headerColor, ...props.headStyle }}

client/packages/lowcoder/src/pages/common/header.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import history from "util/history";
3434
import { useApplicationId } from "util/hooks";
3535
import { canManageApp } from "util/permissionUtils";
3636
import ProfileDropdown from "./profileDropdown";
37-
import { Logo, LogoWithName } from "@lowcoder-ee/assets/images";
37+
import { Logo, LogoHome, LogoWithName } from "@lowcoder-ee/assets/images";
3838
import { HeaderStartDropdown } from "./headerStartDropdown";
3939
import { AppPermissionDialog } from "../../components/PermissionDialog/AppPermissionDialog";
4040
import { getBrandingConfig } from "../../redux/selectors/configSelectors";
@@ -287,7 +287,9 @@ export default function Header(props: HeaderProps) {
287287
const headerStart = (
288288
<>
289289
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
290-
<LogoIcon />
290+
{LOWCODER_SHOW_BRAND === 'true' ?
291+
LOWCODER_CUSTOM_LOGO_SQUARE !== "" ? <img src={LOWCODER_CUSTOM_LOGO_SQUARE } height={24} width={24} alt="logo" /> :<LogoIcon /> :
292+
<LogoHome />}
291293
</StyledLink>
292294
{editName ? (
293295
<Wrapper>
@@ -429,7 +431,9 @@ export function AppHeader() {
429431
const brandingConfig = useSelector(getBrandingConfig);
430432
const headerStart = (
431433
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
432-
<LogoWithName branding={!user.orgDev} />
434+
{LOWCODER_SHOW_BRAND === 'true' ?
435+
LOWCODER_CUSTOM_LOGO !== "" ? <img src={LOWCODER_CUSTOM_LOGO} height={28} alt="logo" /> :<LogoWithName branding={!user.orgDev} /> :
436+
<LogoHome />}
433437
</StyledLink>
434438
);
435439
const headerEnd = <HeaderProfile user={user} />;

client/packages/lowcoder/src/util/bottomResUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const LargeBottomResIconWrapper = styled(IconWrapper)`
6464
function getBottomResIconInnerByUrl(type: BottomResType, url: string) {
6565
let fullUrl = url;
6666
if (!fullUrl.startsWith("http")) {
67-
fullUrl = `${REACT_APP_API_HOST}/node-service/plugin-icons/${url}`;
67+
fullUrl = `${LOWCODER_NODE_SERVICE_URL !== "" ? LOWCODER_NODE_SERVICE_URL : REACT_APP_API_HOST}/node-service/plugin-icons/${url}`;
6868
}
6969
return <img style={{ width: "100%", height: "100%" }} src={fullUrl} alt="" />;
7070
}

client/packages/lowcoder/vite.config.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { globalDepPlugin } from "lowcoder-dev-utils/globalDepPlguin";
1414

1515
dotenv.config();
1616

17-
const apiProxyTarget = process.env.API_PROXY_TARGET;
17+
const apiProxyTarget = process.env.LOWCODER_API_SERVICE_URL;
1818
const nodeServiceApiProxyTarget = process.env.NODE_SERVICE_API_PROXY_TARGET;
1919
const nodeEnv = process.env.NODE_ENV ?? "development";
2020
const edition = process.env.REACT_APP_EDITION;
@@ -27,8 +27,8 @@ const base = ensureLastSlash(process.env.PUBLIC_URL);
2727

2828
if (!apiProxyTarget && isDev) {
2929
console.log();
30-
console.log(chalk.red`API_PROXY_TARGET is required.\n`);
31-
console.log(chalk.cyan`Start with command: API_PROXY_TARGET=\{backend-api-addr\} yarn start`);
30+
console.log(chalk.red`LOWCODER_API_SERVICE_URL is required.\n`);
31+
console.log(chalk.cyan`Start with command: LOWCODER_API_SERVICE_URL=\{backend-api-addr\} yarn start`);
3232
console.log();
3333
process.exit(1);
3434
}

deploy/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN --mount=type=cache,target=/root/.m2 mvn -f pom.xml clean package -DskipTests
2020
RUN mkdir -p /lowcoder/api-service/plugins /lowcoder/api-service/config /lowcoder/api-service/logs
2121

2222
# Define lowcoder main jar and plugin jars
23-
ARG JAR_FILE=/lowcoder-server/lowcoder-server/target/lowcoder-server-1.0-SNAPSHOT.jar
23+
ARG JAR_FILE=/lowcoder-server/lowcoder-server/target/lowcoder-server-*.jar
2424
ARG PLUGIN_JARS=/lowcoder-server/lowcoder-plugins/*/target/*.jar
2525

2626
# Copy Java runtime for running server

deploy/docker/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Image can be configured by setting environment variables.
3636
| `ENCRYPTION_PASSWORD` | Encryption password | `lowcoder.org` |
3737
| `ENCRYPTION_SALT` | Salt used for encrypting password | `lowcoder.org` |
3838
| `CORS_ALLOWED_DOMAINS` | CORS allowed domains | `*` |
39+
| `LOWCODER_MAX_REQUEST_SIZE` | Lowcoder max request size | `20m` |
3940
| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
4041
| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
4142
| `DEFAULT_ORGS_PER_USER` | Default maximum organizations per user | `100` |
@@ -121,6 +122,7 @@ Image can be configured by setting environment variables.
121122
| --------------------------------| --------------------------------------------------------------------| ------------------------------------------------------- |
122123
| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
123124
| `PGID` | ID of group of the user running services. | `9001` |
125+
| `LOWCODER_MAX_REQUEST_SIZE` | Lowcoder max request size | `20m` |
124126
| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
125127
| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
126128

deploy/docker/docker-compose-multi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ services:
7575
environment:
7676
PUID: "9001"
7777
PGID: "9001"
78+
LOWCODER_MAX_REQUEST_SIZE: 20m
7879
LOWCODER_API_SERVICE_URL: "http://lowcoder-api-service:8080"
7980
LOWCODER_NODE_SERVICE_URL: "http://lowcoder-node-service:6060"
8081
restart: unless-stopped

deploy/docker/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ services:
3636
# api and node service parameters
3737
LOWCODER_API_SERVICE_URL: "http://localhost:8080"
3838
LOWCODER_NODE_SERVICE_URL: "http://localhost:6060"
39+
# frontend parameters
40+
LOWCODER_MAX_REQUEST_SIZE: 20m
3941
volumes:
4042
- ./lowcoder-stacks:/lowcoder-stacks
4143
restart: unless-stopped

deploy/docker/frontend/01-update-nginx-conf.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ else
1818
ln -s /etc/nginx/nginx-http.conf /etc/nginx/nginx.conf
1919
fi;
2020

21+
sed -i "s@__LOWCODER_MAX_REQUEST_SIZE__@${LOWCODER_MAX_REQUEST_SIZE:=20m}@" /etc/nginx/nginx.conf
2122
sed -i "s@__LOWCODER_API_SERVICE_URL__@${LOWCODER_API_SERVICE_URL:=http://localhost:8080}@" /etc/nginx/nginx.conf
2223
sed -i "s@__LOWCODER_NODE_SERVICE_URL__@${LOWCODER_NODE_SERVICE_URL:=http://localhost:6060}@" /etc/nginx/nginx.conf
2324

2425
echo "nginx config updated with:"
25-
echo " Lowcoder api service URL: ${LOWCODER_API_SERVICE_URL}"
26-
echo " Lowcoder node service URL: ${LOWCODER_NODE_SERVICE_URL}"
26+
echo " Lowcoder max upload size: ${LOWCODER_MAX_REQUEST_SIZE:=20m}"
27+
echo " Lowcoder api service URL: ${LOWCODER_API_SERVICE_URL:=http://localhost:8080}"
28+
echo " Lowcoder node service URL: ${LOWCODER_NODE_SERVICE_URL:=http://localhost:6060}"

deploy/docker/frontend/nginx-http.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ http {
1010

1111
include /etc/nginx/mime.types;
1212
default_type application/octet-stream;
13+
client_max_body_size __LOWCODER_MAX_REQUEST_SIZE__;
1314

1415
log_format main '"$time_local" client=$remote_addr '
1516
'method=$request_method request="$request" '

deploy/docker/frontend/nginx-https.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ http {
1010

1111
include /etc/nginx/mime.types;
1212
default_type application/octet-stream;
13+
client_max_body_size __LOWCODER_MAX_REQUEST_SIZE__;
1314

1415
log_format main '"$time_local" client=$remote_addr '
1516
'method=$request_method request="$request" '

server/api-service/lowcoder-domain/pom.xml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,14 @@
55
<parent>
66
<artifactId>lowcoder-root</artifactId>
77
<groupId>org.lowcoder</groupId>
8-
<version>1.0-SNAPSHOT</version>
8+
<version>${revision}</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>lowcoder-domain</artifactId>
13-
<version>1.0-SNAPSHOT</version>
1413
<name>lowcoder-domain</name>
1514

1615
<dependencies>
17-
<dependency>
18-
<groupId>org.lowcoder</groupId>
19-
<artifactId>lowcoder-ee</artifactId>
20-
<type>pom</type>
21-
<version>1.0-SNAPSHOT</version>
22-
</dependency>
2316
<dependency>
2417
<groupId>org.springframework.boot</groupId>
2518
<artifactId>spring-boot-starter-webflux</artifactId>
@@ -52,12 +45,10 @@
5245
<dependency>
5346
<groupId>org.lowcoder</groupId>
5447
<artifactId>lowcoder-sdk</artifactId>
55-
<version>1.0-SNAPSHOT</version>
5648
</dependency>
5749
<dependency>
5850
<groupId>org.lowcoder</groupId>
5951
<artifactId>lowcoder-infra</artifactId>
60-
<version>1.0-SNAPSHOT</version>
6152
</dependency>
6253

6354
<dependency>

server/api-service/lowcoder-ee/pom.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

server/api-service/lowcoder-infra/pom.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>lowcoder-root</artifactId>
77
<groupId>org.lowcoder</groupId>
8-
<version>1.0-SNAPSHOT</version>
8+
<version>${revision}</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

@@ -15,13 +15,6 @@
1515
<dependency>
1616
<groupId>org.lowcoder</groupId>
1717
<artifactId>lowcoder-sdk</artifactId>
18-
<version>1.0-SNAPSHOT</version>
19-
</dependency>
20-
<dependency>
21-
<groupId>org.lowcoder</groupId>
22-
<artifactId>lowcoder-ee</artifactId>
23-
<type>pom</type>
24-
<version>1.0-SNAPSHOT</version>
2518
</dependency>
2619

2720
<dependency>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugin.id=clickHouse-plugin
22
plugin.class=org.lowcoder.plugin.clickhouse.ClickHousePlugin
3-
plugin.version=1.0-SNAPSHOT
3+
plugin.version=2.0.1-SNAPSHOT
44
plugin.provider=service@lowcoder.org
5-
plugin.dependencies=
5+
plugin.dependencies=

server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.lowcoder</groupId>
77
<artifactId>lowcoder-plugins</artifactId>
8-
<version>1.0-SNAPSHOT</version>
8+
<version>${revision}</version>
99
</parent>
1010

1111
<modelVersion>4.0.0</modelVersion>
@@ -19,7 +19,7 @@
1919
<maven.compiler.target>${java.version}</maven.compiler.target>
2020
<plugin.id>clickHouse-plugin</plugin.id>
2121
<plugin.class>org.lowcoder.plugin.clickhouse.ClickHousePlugin</plugin.class>
22-
<plugin.version>1.0-SNAPSHOT</plugin.version>
22+
<plugin.version>${revision}</plugin.version>
2323
<plugin.provider>service@lowcoder.org</plugin.provider>
2424
<plugin.dependencies/>
2525
</properties>
@@ -109,6 +109,9 @@
109109
</execution>
110110
</executions>
111111
</plugin>
112+
<plugin>
113+
<artifactId>maven-antrun-plugin</artifactId>
114+
</plugin>
112115
</plugins>
113116
</build>
114117

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugin.id=es-plugin
22
plugin.class=org.lowcoder.plugin.es.EsPlugin
3-
plugin.version=1.0-SNAPSHOT
3+
plugin.version=2.0.1-SNAPSHOT
44
plugin.provider=service@lowcoder.org
5-
plugin.dependencies=
5+
plugin.dependencies=

server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
<parent>
66
<groupId>org.lowcoder</groupId>
77
<artifactId>lowcoder-plugins</artifactId>
8-
<version>1.0-SNAPSHOT</version>
8+
<version>${revision}</version>
99
</parent>
1010

1111
<modelVersion>4.0.0</modelVersion>
1212
<artifactId>elasticSearchPlugin</artifactId>
13-
<version>1.0-SNAPSHOT</version>
1413

1514
<name>elasticSearchPlugin</name>
1615

@@ -21,7 +20,7 @@
2120
<maven.compiler.target>${java.version}</maven.compiler.target>
2221
<plugin.id>es-plugin</plugin.id>
2322
<plugin.class>org.lowcoder.plugin.es.EsPlugin</plugin.class>
24-
<plugin.version>1.0-SNAPSHOT</plugin.version>
23+
<plugin.version>${revision}</plugin.version>
2524
<plugin.provider>service@lowcoder.org</plugin.provider>
2625
<plugin.dependencies/>
2726
</properties>
@@ -103,6 +102,9 @@
103102
</execution>
104103
</executions>
105104
</plugin>
105+
<plugin>
106+
<artifactId>maven-antrun-plugin</artifactId>
107+
</plugin>
106108
</plugins>
107109
</build>
108110

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugin.id=googleSheets-plugin
22
plugin.class=org.lowcoder.plugin.googlesheets.GoogleSheetsPlugin
3-
plugin.version=1.0-SNAPSHOT
3+
plugin.version=2.0.1-SNAPSHOT
44
plugin.provider=service@lowcoder.org
55
plugin.dependencies=

0 commit comments

Comments
 (0)