diff --git a/README-en.md b/README-en.md
index 67c2acaf..fc8dace7 100644
--- a/README-en.md
+++ b/README-en.md
@@ -61,7 +61,12 @@ npm i @whyour/qinglong
# curl -sSL get.docker.com | sh
docker run -dit \
-v $PWD/ql/data:/ql/data \
+ # The 5700 after the colon is the default port, if QlPort is set, it needs to be the same as QlPort.
-p 5700:5700 \
+ # Deployment paths are not required and begin and end with a slash, e.g. /test/.
+ -e QlBaseUrl="/" \
+ # Deployment port is not required, when using host mode, you can set the port after service startup, default 5700
+ -e QlPort="5700" \
--name qinglong \
--hostname qinglong \
--restart unless-stopped \
@@ -88,7 +93,12 @@ docker-compose down
podman run -dit \
--network bridge \
-v $PWD/ql/data:/ql/data \
+ # The 5700 after the colon is the default port, if QlPort is set, it needs to be the same as QlPort.
-p 5700:5700 \
+ # Deployment paths are not required and begin and end with a slash, e.g. /test/.
+ -e QlBaseUrl="/" \
+ # Deployment port is not required, when using host mode, you can set the port after service startup, default 5700
+ -e QlPort="5700" \
--name qinglong \
--hostname qinglong \
docker.io/whyour/qinglong:latest
diff --git a/README.md b/README.md
index 48252498..697ae4e0 100644
--- a/README.md
+++ b/README.md
@@ -63,9 +63,12 @@ npm i @whyour/qinglong
# curl -sSL get.docker.com | sh
docker run -dit \
-v $PWD/ql/data:/ql/data \
+ # 冒号后面的 5700 为默认端口,如果设置了 QlPort, 需要跟 QlPort 保持一致
-p 5700:5700 \
# 部署路径非必须,以斜杠开头和结尾,比如 /test/
-e QlBaseUrl="/" \
+ # 部署端口非必须,当使用 host 模式时,可以设置服务启动后的端口,默认 5700
+ -e QlPort="5700" \
--name qinglong \
--hostname qinglong \
--restart unless-stopped \
@@ -92,9 +95,12 @@ docker-compose down
podman run -dit \
--network bridge \
-v $PWD/ql/data:/ql/data \
+ # 冒号后面的 5700 为默认端口,如果设置了 QlPort, 需要跟 QlPort 保持一致
-p 5700:5700 \
# 部署路径非必须,以斜杠开头和结尾,比如 /test/
-e QlBaseUrl="/" \
+ # 部署端口非必须,当使用 host 模式时,可以设置服务启动后的端口,默认 5700
+ -e QlPort="5700" \
--name qinglong \
--hostname qinglong \
docker.io/whyour/qinglong:latest
diff --git a/docker/front.conf b/docker/front.conf
index b528beb8..a467ccb5 100644
--- a/docker/front.conf
+++ b/docker/front.conf
@@ -12,7 +12,7 @@ map $http_upgrade $connection_upgrade {
}
server {
- listen 5700;
+ IPV4_CONFIG
IPV6_CONFIG
ssl_session_timeout 5m;
diff --git a/shell/share.sh b/shell/share.sh
index 22e9d9d7..c879dd81 100755
--- a/shell/share.sh
+++ b/shell/share.sh
@@ -69,6 +69,7 @@ import_config() {
[[ -f $file_env ]] && . $file_env
ql_base_url=${QlBaseUrl:-"/"}
+ ql_port=${QlPort:-"5700"}
command_timeout_time=${CommandTimeoutTime:-""}
proxy_url=${ProxyUrl:-""}
file_extensions=${RepoFileExtensions:-"js py"}
@@ -416,12 +417,15 @@ init_nginx() {
sed -i "s,QL_BASE_URL_LOCATION,${location_url},g" /etc/nginx/conf.d/front.conf
sed -i "s,QL_BASE_URL,${ql_base_url},g" /etc/nginx/conf.d/front.conf
- ipv6=$(ip a | grep inet6)
- ipv6Str=""
+ local ipv6=$(ip a | grep inet6)
+ local ipv6Str=""
if [[ $ipv6 ]]; then
- ipv6Str="listen [::]:5700 ipv6only=on;"
+ ipv6Str="listen [::]:${ql_port} ipv6only=on;"
fi
+
+ local ipv4Str="listen ${ql_port};"
sed -i "s,IPV6_CONFIG,${ipv6Str},g" /etc/nginx/conf.d/front.conf
+ sed -i "s,IPV4_CONFIG,${ipv4Str},g" /etc/nginx/conf.d/front.conf
}
handle_task_before() {
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index e2ffe6c8..dfef43dc 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -452,5 +452,6 @@
"系统日志": "System Logs",
"主题": "Theme",
"语言": "Language",
- "中...": "ing..."
+ "中...": "ing...",
+ "请选择操作符": "Please select operator"
}
diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json
index 44bd65a6..fe0330e9 100644
--- a/src/locales/zh-CN.json
+++ b/src/locales/zh-CN.json
@@ -452,5 +452,6 @@
"系统日志": "系统日志",
"主题": "主题",
"语言": "语言",
- "中...": "中..."
+ "中...": "中...",
+ "请选择操作符": "请选择操作符"
}
diff --git a/src/pages/crontab/viewCreateModal.tsx b/src/pages/crontab/viewCreateModal.tsx
index d5d4687d..e12f427d 100644
--- a/src/pages/crontab/viewCreateModal.tsx
+++ b/src/pages/crontab/viewCreateModal.tsx
@@ -107,20 +107,25 @@ const ViewCreateModal = ({
}
form.setFieldsValue(
view || {
- filters: [{ property: 'command', operation: 'Reg' }],
+ filters: [{ property: 'command' }],
},
);
}, [view, visible]);
- const operationElement = (
-
- );
+ const OperationElement = ({ name }: { name: number }) => {
+ const property = form.getFieldValue(['filters', name, 'property']);
+ return (
+
+ );
+ };
const propertyElement = (props: any, style: React.CSSProperties = {}) => {
return (
@@ -135,7 +140,7 @@ const ViewCreateModal = ({
};
const typeElement = (
-