Skip to content

Commit 05dec1e

Browse files
authored
Merge branch 'main' into Icons-Expansion
2 parents fd9c3cc + eaab1d4 commit 05dec1e

File tree

16 files changed

+119
-49
lines changed

16 files changed

+119
-49
lines changed

client/packages/lowcoder-design/src/components/customSelect.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,29 @@ const SelectWrapper = styled.div<{ border?: boolean }>`
7171
}
7272
`;
7373

74-
export type CustomSelectProps = {
74+
export interface CustomSelectProps extends AntdSelectProps {
7575
children?: JSX.Element | React.ReactNode;
76-
innerRef?: React.Ref<HTMLDivElement> | undefined;
7776
border?: boolean;
7877
};
7978

80-
function CustomSelect(props: CustomSelectProps & AntdSelectProps) {
79+
interface CustomSelectInterface extends React.ForwardRefExoticComponent<
80+
CustomSelectProps & React.RefAttributes<HTMLDivElement>
81+
> {
82+
Option: any;
83+
}
84+
const CustomSelect = React.forwardRef<HTMLDivElement, CustomSelectProps>((
85+
props,
86+
ref,
87+
) => {
8188
const {
8289
children,
83-
innerRef,
8490
className,
8591
border,
8692
popupClassName = "custom-ant-select-dropdown",
8793
...restProps
8894
} = props;
8995
return (
90-
<SelectWrapper className={className} ref={innerRef} border={border}>
96+
<SelectWrapper className={className} ref={ref} border={border}>
9197
<AntdSelect
9298
popupClassName={popupClassName}
9399
popupMatchSelectWidth={false}
@@ -96,9 +102,10 @@ function CustomSelect(props: CustomSelectProps & AntdSelectProps) {
96102
>
97103
{children}
98104
</AntdSelect>
105+
<div></div>
99106
</SelectWrapper>
100107
);
101-
}
108+
}) as CustomSelectInterface;
102109

103110
CustomSelect.Option = AntdSelect.Option;
104111
export { CustomSelect };

client/packages/lowcoder/src/components/PermissionDialog/Permission.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const PermissionSelector = (props: {
328328
<PermissionSelectWrapper>
329329
<AddPermissionsSelect
330330
open
331-
innerRef={selectRef}
331+
ref={selectRef}
332332
placeholder={trans("home.addPermissionPlaceholder")}
333333
mode="multiple"
334334
getPopupContainer={() => document.getElementById("add-app-user-permission-dropdown")!}

client/packages/lowcoder/src/pages/setting/theme/themeConstant.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export const themeTemplateList = [
3030
borderRadius: "4px",
3131
chart: JSON.stringify(ChartTheme, null, 2),
3232
gridColumns: "24", //Added By Aqib Mirza
33+
margin: "3px",
34+
padding: "3px",
3335
},
3436
},
3537
{
@@ -45,6 +47,8 @@ export const themeTemplateList = [
4547
borderRadius: "4px",
4648
chart: JSON.stringify(ChartYellowTheme, null, 2),
4749
gridColumns: "24", //Added By Aqib Mirza
50+
margin: "3px",
51+
padding: "3px",
4852
},
4953
},
5054
{
@@ -60,6 +64,8 @@ export const themeTemplateList = [
6064
borderRadius: "4px",
6165
chart: JSON.stringify(ChartGreenTheme, null, 2),
6266
gridColumns: "24", //Added By Aqib Mirza
67+
margin: "3px",
68+
padding: "3px",
6369
},
6470
},
6571
];

deploy/docker/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Image can be configured by setting environment variables.
3737
| `ENCRYPTION_SALT` | Salt used for encrypting password | `lowcoder.org` |
3838
| `CORS_ALLOWED_DOMAINS` | CORS allowed domains | `*` |
3939
| `LOWCODER_MAX_REQUEST_SIZE` | Lowcoder max request size | `20m` |
40+
| `LOWCODER_MAX_QUERY_TIMEOUT` | Lowcoder max query timeout (in seconds) | `120` |
4041
| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
4142
| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
4243
| `DEFAULT_ORGS_PER_USER` | Default maximum organizations per user | `100` |
@@ -77,6 +78,8 @@ Image can be configured by setting environment variables.
7778
| `DEFAULT_ORG_GROUP_COUNT` | Default maximum groups per organization | `100` |
7879
| `DEFAULT_ORG_APP_COUNT` | Default maximum applications per organization | `1000` |
7980
| `DEFAULT_DEVELOPER_COUNT` | Default maximum developers | `100` |
81+
| `LOWCODER_MAX_QUERY_TIMEOUT` | Lowcoder max query timeout (in seconds) | `120` |
82+
| `LOWCODER_MAX_REQUEST_SIZE` | Lowcoder max request size | `20m` |
8083

8184

8285

@@ -122,6 +125,7 @@ Image can be configured by setting environment variables.
122125
| --------------------------------| --------------------------------------------------------------------| ------------------------------------------------------- |
123126
| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
124127
| `PGID` | ID of group of the user running services. | `9001` |
128+
| `LOWCODER_MAX_QUERY_TIMEOUT` | Lowcoder max query timeout (in seconds) | `120` |
125129
| `LOWCODER_MAX_REQUEST_SIZE` | Lowcoder max request size | `20m` |
126130
| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
127131
| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |

deploy/docker/docker-compose-multi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ services:
3636
MONGODB_URL: "mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
3737
REDIS_URL: "redis://redis:6379"
3838
LOWCODER_NODE_SERVICE_URL: "http://lowcoder-node-service:6060"
39+
LOWCODER_MAX_QUERY_TIMEOUT: 120
3940
ENABLE_USER_SIGN_UP: "true"
4041
ENCRYPTION_PASSWORD: "lowcoder.org"
4142
ENCRYPTION_SALT: "lowcoder.org"
@@ -76,6 +77,7 @@ services:
7677
PUID: "9001"
7778
PGID: "9001"
7879
LOWCODER_MAX_REQUEST_SIZE: 20m
80+
LOWCODER_MAX_QUERY_TIMEOUT: 120
7981
LOWCODER_API_SERVICE_URL: "http://lowcoder-api-service:8080"
8082
LOWCODER_NODE_SERVICE_URL: "http://lowcoder-node-service:6060"
8183
restart: unless-stopped

deploy/docker/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ services:
3838
LOWCODER_NODE_SERVICE_URL: "http://localhost:6060"
3939
# frontend parameters
4040
LOWCODER_MAX_REQUEST_SIZE: 20m
41+
LOWCODER_MAX_QUERY_TIMEOUT: 120
4142
volumes:
4243
- ./lowcoder-stacks:/lowcoder-stacks
4344
restart: unless-stopped

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ else
1818
ln -s /etc/nginx/nginx-http.conf /etc/nginx/nginx.conf
1919
fi;
2020

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

deploy/docker/frontend/nginx-http.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ http {
3535
listen 3000 default_server;
3636
root /lowcoder/client;
3737

38+
proxy_connect_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
39+
proxy_send_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
40+
proxy_read_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
3841

3942
location / {
4043
try_files $uri /index.html;

deploy/docker/frontend/nginx-https.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ http {
3838
include /etc/nginx/ssl-certificate.conf;
3939
include /etc/nginx/ssl-params.conf;
4040

41+
proxy_connect_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
42+
proxy_send_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
43+
proxy_read_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
44+
4145
location / {
4246
try_files $uri /index.html;
4347

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/query/service/QueryExecutionService.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import org.lowcoder.domain.plugin.client.DatasourcePluginClient;
1717
import org.lowcoder.domain.plugin.service.DatasourceMetaInfoService;
1818
import org.lowcoder.domain.query.util.QueryTimeoutUtils;
19+
import org.lowcoder.sdk.config.CommonConfig;
1920
import org.lowcoder.sdk.exception.BizException;
2021
import org.lowcoder.sdk.exception.PluginException;
2122
import org.lowcoder.sdk.models.QueryExecutionResult;
@@ -40,10 +41,14 @@ public class QueryExecutionService {
4041
@Autowired
4142
private DatasourcePluginClient datasourcePluginClient;
4243

44+
@Autowired
45+
private CommonConfig common;
46+
4347
public Mono<QueryExecutionResult> executeQuery(Datasource datasource, Map<String, Object> queryConfig, Map<String, Object> requestParams,
4448
String timeoutStr, QueryVisitorContext queryVisitorContext) {
4549

46-
int timeoutMs = QueryTimeoutUtils.parseQueryTimeoutMs(timeoutStr, requestParams);
50+
int timeoutMs = QueryTimeoutUtils.parseQueryTimeoutMs(timeoutStr, requestParams, common.getMaxQueryTimeout());
51+
queryConfig.putIfAbsent("timeoutMs", timeoutMs);
4752

4853
return Mono.defer(() -> {
4954
if (datasourceMetaInfoService.isJsDatasourcePlugin(datasource.getType())) {

0 commit comments

Comments
 (0)