mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 12:22:10 +08:00
Merge branch 'dev-v2' of fit2cloud.github.com:dataease/dataease into dev-v2
This commit is contained in:
@@ -14,6 +14,8 @@ import java.nio.file.Paths;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -29,6 +31,9 @@ public class CK extends DatasourceConfiguration {
|
||||
private String sslCert;
|
||||
private String sslKey;
|
||||
|
||||
private List<String> ILLEGAL_PARAMETERS = Arrays.asList("jndi:", "rmi:", "ldap:", "ldaps:", "dns:", "nis:", "corba:",
|
||||
"java.naming.factory.initial", "java.naming.provider.url");
|
||||
|
||||
public String getJdbc() {
|
||||
String jdbcUrl;
|
||||
if (StringUtils.isNotEmpty(getUrlType()) && !getUrlType().equalsIgnoreCase("hostName")) {
|
||||
@@ -69,6 +74,7 @@ public class CK extends DatasourceConfiguration {
|
||||
jdbcUrl = appendCertParam(jdbcUrl, "sslCert", sslCert, "cert");
|
||||
jdbcUrl = appendCertParam(jdbcUrl, "sslKey", sslKey, "key");
|
||||
}
|
||||
checkIllegalParameters(jdbcUrl);
|
||||
return jdbcUrl;
|
||||
}
|
||||
|
||||
@@ -127,4 +133,14 @@ public class CK extends DatasourceConfiguration {
|
||||
private boolean containsParam(String jdbcUrl, String paramName) {
|
||||
return Pattern.compile("(?i)([?&])" + Pattern.quote(paramName) + "=").matcher(jdbcUrl).find();
|
||||
}
|
||||
|
||||
private void checkIllegalParameters(String jdbcUrl) {
|
||||
String lowerUrl = jdbcUrl.toLowerCase();
|
||||
for (String illegalParam : ILLEGAL_PARAMETERS) {
|
||||
if (lowerUrl.contains(illegalParam.toLowerCase())) {
|
||||
throw new SecurityException("Illegal parameter detected in JDBC URL: " + illegalParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ import java.util.regex.Pattern;
|
||||
public class Sqlserver extends DatasourceConfiguration {
|
||||
private String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
||||
private String extraParams = "";
|
||||
private List<String> illegalParameters = Arrays.asList("autoDeserialize", "queryInterceptors", "statementInterceptors", "detectCustomCollations");
|
||||
private List<String> illegalParameters = Arrays.asList("autoDeserialize", "queryInterceptors", "statementInterceptors", "detectCustomCollations", "jndi:", "rmi:", "ldap:", "ldaps:", "java.naming.factory.initial");
|
||||
private List<String> showTableSqls = Arrays.asList("show tables");
|
||||
|
||||
public String getJdbc() {
|
||||
if(StringUtils.isNoneEmpty(getUrlType()) && !getUrlType().equalsIgnoreCase("hostName")){
|
||||
if (StringUtils.isNoneEmpty(getUrlType()) && !getUrlType().equalsIgnoreCase("hostName")) {
|
||||
if (!getJdbcUrl().startsWith("jdbc:sqlserver")) {
|
||||
DEException.throwException("Illegal jdbcUrl: " + getJdbcUrl());
|
||||
}
|
||||
@@ -28,12 +28,12 @@ public class Sqlserver extends DatasourceConfiguration {
|
||||
}
|
||||
String jdbcUrl = "";
|
||||
if (StringUtils.isEmpty(extraParams.trim())) {
|
||||
jdbcUrl = "jdbc:sqlserver://HOSTNAME:PORT;DatabaseName=DATABASE"
|
||||
jdbcUrl = "jdbc:sqlserver://HOSTNAME:PORT;DatabaseName=DATABASE"
|
||||
.replace("HOSTNAME", getLHost().trim())
|
||||
.replace("PORT", getLPort().toString().trim())
|
||||
.replace("DATABASE", getDataBase().trim());
|
||||
} else {
|
||||
jdbcUrl = "jdbc:sqlserver://HOSTNAME:PORT;DatabaseName=DATABASE;EXTRA_PARAMS"
|
||||
jdbcUrl = "jdbc:sqlserver://HOSTNAME:PORT;DatabaseName=DATABASE;EXTRA_PARAMS"
|
||||
.replace("HOSTNAME", getLHost().trim())
|
||||
.replace("PORT", getLPort().toString().trim())
|
||||
.replace("DATABASE", getDataBase().trim())
|
||||
@@ -53,4 +53,5 @@ public class Sqlserver extends DatasourceConfiguration {
|
||||
protected Pattern getDatabasePattern() {
|
||||
return DB_NAME_PATTERN;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g2plot": "^2.4.29",
|
||||
"@antv/l7": "^2.22.0",
|
||||
"@antv/l7plot": "^0.5.5",
|
||||
"@antv/l7": "2.23.1",
|
||||
"@antv/l7plot": "0.5.11",
|
||||
"@antv/s2": "^1.49.0",
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@codemirror/lang-sql": "^6.4.0",
|
||||
|
||||
@@ -146,6 +146,10 @@ watch(
|
||||
)
|
||||
|
||||
const handleValueChange = () => {
|
||||
if (selectValue.value === null) {
|
||||
selectValue.value = multiple.value ? [] : undefined
|
||||
}
|
||||
|
||||
selectValue.value = Array.isArray(selectValue.value)
|
||||
? selectValue.value.map(ele => ele && dayjs(ele).format('YYYY/MM/DD HH:mm:ss'))
|
||||
: selectValue.value && dayjs(selectValue.value).format('YYYY/MM/DD HH:mm:ss')
|
||||
|
||||
@@ -234,10 +234,10 @@ const changeColorOption = (option?) => {
|
||||
}
|
||||
}
|
||||
const resetCustomColor = () => {
|
||||
const { type } = props.chart
|
||||
const type = props.chart?.type
|
||||
const { basicStyleForm } = state.value
|
||||
|
||||
if (type.includes('map')) {
|
||||
if (type?.includes('map')) {
|
||||
changeColorOption()
|
||||
} else {
|
||||
basicStyleForm[seriesColorName.value] = []
|
||||
|
||||
@@ -422,13 +422,15 @@ export class Map extends L7PlotChartView<ChoroplethOptions, Choropleth> {
|
||||
value = Number.isNaN(tmp) || tmp === 'NaN' ? 'NaN' : parseFloat(tmp).toFixed(0)
|
||||
}
|
||||
}
|
||||
const substituteObj = { ...item, value }
|
||||
if (value && value !== '') {
|
||||
const substituteObj = { ...item, value }
|
||||
|
||||
const domStr = substitute(ITEM_TPL, substituteObj)
|
||||
const itemDom = createDom(domStr)
|
||||
// 给 legend 形状用的
|
||||
itemDom.style.setProperty('--bgColor', item.color)
|
||||
listDom.appendChild(itemDom)
|
||||
const domStr = substitute(ITEM_TPL, substituteObj)
|
||||
const itemDom = createDom(domStr)
|
||||
// 给 legend 形状用的
|
||||
itemDom.style.setProperty('--bgColor', item.color)
|
||||
listDom.appendChild(itemDom)
|
||||
}
|
||||
})
|
||||
return listDom
|
||||
}
|
||||
|
||||
2
de-xpack
2
de-xpack
Submodule de-xpack updated: 9e5779488a...5cde86ad03
23
installer/dataease/docker-compose-playwright.yml
Normal file
23
installer/dataease/docker-compose-playwright.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
api:
|
||||
image: registry.cn-qingdao.aliyuncs.com/dataease/de-playwright-api:v1.58.2-noble
|
||||
container_name: de-playwright-api
|
||||
privileged: true
|
||||
environment:
|
||||
- CONCURRENCY=${DE_PLAYWRIGHT_CONCURRENCY}
|
||||
volumes:
|
||||
- ${DE_BASE}/dataease2.0/logs:/opt/app/logs
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
ipc: host
|
||||
shm_size: ${DE_PLAYWRIGHT_SHM_SIZE}
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
networks:
|
||||
- dataease-network
|
||||
@@ -1,19 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
de-selenium:
|
||||
image: registry.cn-qingdao.aliyuncs.com/dataease/standalone-chromium:123.0
|
||||
container_name: de-selenium
|
||||
shm_size: 2gb
|
||||
privileged: true
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${DE_SELENIUM_CPU_LIMIT}
|
||||
memory: ${DE_SELENIUM_MEM_LIMIT}
|
||||
environment:
|
||||
- SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=true
|
||||
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
|
||||
- SE_NODE_MAX_SESSIONS=5
|
||||
- TZ=Asia/Shanghai
|
||||
networks:
|
||||
- dataease-network
|
||||
@@ -23,8 +23,8 @@ dataease:
|
||||
limit: ${DE_EXPORT_DATASET_LIMIT}
|
||||
origin-list: ${DE_ORIGIN_LIST}
|
||||
login_timeout: ${DE_LOGIN_TIMEOUT}
|
||||
selenium-server: ${DE_SELENIUM_SERVER}
|
||||
dataease-servers: ${DE_SERVERS}
|
||||
playwright-server: ${DE_PLAYWRIGHT_SERVER}
|
||||
task:
|
||||
executor:
|
||||
address: http://sync-task-actuator:9001
|
||||
|
||||
@@ -58,8 +58,8 @@ function _generate_compose_file_args() {
|
||||
compose_files="${compose_files} -f docker-compose-task.yml"
|
||||
fi
|
||||
|
||||
if [[ -f $DE_RUNNING_BASE/docker-compose-selenium.yml ]] && [[ "$DE_EXTERNAL_SELENIUM" != "true" ]];then
|
||||
compose_files="${compose_files} -f docker-compose-selenium.yml"
|
||||
if [[ -f $DE_RUNNING_BASE/docker-compose-playwright.yml ]] && [[ "$DE_EXTERNAL_PLAYWRIGHT" != "true" ]];then
|
||||
compose_files="${compose_files} -f docker-compose-playwright.yml"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -27,14 +27,11 @@ DE_MYSQL_PASSWORD=Password123@mysql
|
||||
DE_MYSQL_PARAMS="autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true"
|
||||
|
||||
# 定时报告镜像配置
|
||||
## 是否使用外部 Selenium,若使用外部 Selenium,则限制参数无效
|
||||
DE_EXTERNAL_SELENIUM=false
|
||||
## Selenium 服务地址
|
||||
DE_SELENIUM_SERVER=http://de-selenium:4444/wd/hub
|
||||
## selenium 镜像 CPU 限制
|
||||
DE_SELENIUM_CPU_LIMIT='1'
|
||||
## selenium 镜像 内存 限制
|
||||
DE_SELENIUM_MEM_LIMIT=2g
|
||||
## 是否使用外部 Playwright,若使用外部 Playwright,则限制参数无效
|
||||
DE_EXTERNAL_PLAYWRIGHT=false
|
||||
DE_PLAYWRIGHT_SERVER=http://de-playwright-api:3000/screenshot
|
||||
DE_PLAYWRIGHT_CONCURRENCY=4
|
||||
DE_PLAYWRIGHT_SHM_SIZE=2gb
|
||||
|
||||
# APISIX配置
|
||||
## 是否使用外部 APISIX
|
||||
|
||||
@@ -4,12 +4,13 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
public class TableSysVariable {
|
||||
public class TableSysVariable implements Serializable {
|
||||
|
||||
private Long tableId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user