mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 07:16:08 +08:00
修复定时任务搜索api
This commit is contained in:
parent
7516acbc41
commit
b9253c8191
|
@ -57,7 +57,7 @@ https://podman.io/getting-started/installation
|
||||||
```bash
|
```bash
|
||||||
podman run -dit \
|
podman run -dit \
|
||||||
--network bridge \
|
--network bridge \
|
||||||
-v $PWD/ql:/ql/data \
|
-v $PWD/ql/data:/ql/data \
|
||||||
-p 5700:5700 \
|
-p 5700:5700 \
|
||||||
--name qinglong \
|
--name qinglong \
|
||||||
--hostname qinglong \
|
--hostname qinglong \
|
||||||
|
@ -96,7 +96,7 @@ systemctl restart docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -dit \
|
docker run -dit \
|
||||||
-v $PWD/ql:/ql/data \
|
-v $PWD/ql/data:/ql/data \
|
||||||
-p 5700:5700 \
|
-p 5700:5700 \
|
||||||
--name qinglong \
|
--name qinglong \
|
||||||
--hostname qinglong \
|
--hostname qinglong \
|
||||||
|
@ -124,6 +124,10 @@ docker-compose up -d
|
||||||
docker-compose down
|
docker-compose down
|
||||||
```
|
```
|
||||||
|
|
||||||
|
3. access
|
||||||
|
|
||||||
|
Open your browser and visit http://{ip}:5700
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
|
|
||||||
1. built-in commands
|
1. built-in commands
|
||||||
|
|
|
@ -57,7 +57,7 @@ https://podman.io/getting-started/installation
|
||||||
```bash
|
```bash
|
||||||
podman run -dit \
|
podman run -dit \
|
||||||
--network bridge \
|
--network bridge \
|
||||||
-v $PWD/ql:/ql/data \
|
-v $PWD/ql/data:/ql/data \
|
||||||
-p 5700:5700 \
|
-p 5700:5700 \
|
||||||
--name qinglong \
|
--name qinglong \
|
||||||
--hostname qinglong \
|
--hostname qinglong \
|
||||||
|
@ -97,7 +97,7 @@ systemctl restart docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -dit \
|
docker run -dit \
|
||||||
-v $PWD/ql:/ql/data \
|
-v $PWD/ql/data:/ql/data \
|
||||||
-p 5700:5700 \
|
-p 5700:5700 \
|
||||||
--name qinglong \
|
--name qinglong \
|
||||||
--hostname qinglong \
|
--hostname qinglong \
|
||||||
|
@ -125,6 +125,10 @@ docker-compose up -d
|
||||||
docker-compose down
|
docker-compose down
|
||||||
```
|
```
|
||||||
|
|
||||||
|
3. 访问
|
||||||
|
|
||||||
|
打开你的浏览器,访问 http://{ip}:5700
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
1. 内置命令
|
1. 内置命令
|
||||||
|
|
|
@ -100,19 +100,7 @@ export default (app: Router) => {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
route.get(
|
route.get('/', async (req: Request, res: Response, next: NextFunction) => {
|
||||||
'/',
|
|
||||||
celebrate({
|
|
||||||
query: Joi.object({
|
|
||||||
searchText: Joi.string().required().allow(''),
|
|
||||||
page: Joi.string().required(),
|
|
||||||
size: Joi.string().required(),
|
|
||||||
sortField: Joi.string().optional(),
|
|
||||||
sortType: Joi.string().optional(),
|
|
||||||
t: Joi.string().required(),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
async (req: Request, res: Response, next: NextFunction) => {
|
|
||||||
const logger: Logger = Container.get('logger');
|
const logger: Logger = Container.get('logger');
|
||||||
try {
|
try {
|
||||||
const cronService = Container.get(CronService);
|
const cronService = Container.get(CronService);
|
||||||
|
@ -122,8 +110,7 @@ export default (app: Router) => {
|
||||||
logger.error('🔥 error: %o', e);
|
logger.error('🔥 error: %o', e);
|
||||||
return next(e);
|
return next(e);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
|
|
||||||
route.post(
|
route.post(
|
||||||
'/',
|
'/',
|
||||||
|
|
|
@ -114,13 +114,13 @@ export default class CronService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async crontabs(params?: {
|
public async crontabs(params?: {
|
||||||
searchText: string;
|
searchValue: string;
|
||||||
page: string;
|
page: string;
|
||||||
size: string;
|
size: string;
|
||||||
sortField: string;
|
sortField: string;
|
||||||
sortType: string;
|
sortType: string;
|
||||||
}): Promise<{ data: Crontab[]; total: number }> {
|
}): Promise<{ data: Crontab[]; total: number }> {
|
||||||
const searchText = params?.searchText;
|
const searchText = params?.searchValue;
|
||||||
const page = Number(params?.page || '0');
|
const page = Number(params?.page || '0');
|
||||||
const size = Number(params?.size || '0');
|
const size = Number(params?.size || '0');
|
||||||
const sortField = params?.sortField || '';
|
const sortField = params?.sortField || '';
|
||||||
|
|
|
@ -8,7 +8,7 @@ echo -e "======================1. 检测配置文件========================\n"
|
||||||
make_dir /etc/nginx/conf.d
|
make_dir /etc/nginx/conf.d
|
||||||
make_dir /run/nginx
|
make_dir /run/nginx
|
||||||
cp -fv $nginx_conf /etc/nginx/nginx.conf
|
cp -fv $nginx_conf /etc/nginx/nginx.conf
|
||||||
cp -fv $nginx_app_conf /etc/nginx/conf.d/front.conf
|
envsubst '${qlBaseUrl}' < $nginx_app_conf > /etc/nginx/conf.d/front.conf
|
||||||
pm2 l &>/dev/null
|
pm2 l &>/dev/null
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
upstream api {
|
upstream baseApi {
|
||||||
server 0.0.0.0:5600;
|
server 0.0.0.0:5600;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream public {
|
upstream publicApi {
|
||||||
server 0.0.0.0:5400;
|
server 0.0.0.0:5400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,28 +16,28 @@ server {
|
||||||
root /ql/static/dist;
|
root /ql/static/dist;
|
||||||
ssl_session_timeout 5m;
|
ssl_session_timeout 5m;
|
||||||
|
|
||||||
location /api/public {
|
location ${ql_base_url}api/public {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://public;
|
proxy_pass http://publicApi/api/public/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api {
|
location ${ql_base_url}api {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://api;
|
proxy_pass http://baseApi/api/;
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /open {
|
location ${ql_base_url}open {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://api;
|
proxy_pass http://baseApi/open/;
|
||||||
}
|
}
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
|
@ -49,9 +49,9 @@ server {
|
||||||
gzip_buffers 16 8k;
|
gzip_buffers 16 8k;
|
||||||
gzip_http_version 1.0;
|
gzip_http_version 1.0;
|
||||||
|
|
||||||
location / {
|
location ${ql_base_url} {
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ ${ql_base_url}index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ .*\.(html)$ {
|
location ~ .*\.(html)$ {
|
||||||
|
|
|
@ -30,7 +30,7 @@ copy_dep() {
|
||||||
|
|
||||||
echo -e "---> 2. 复制nginx配置文件\n"
|
echo -e "---> 2. 复制nginx配置文件\n"
|
||||||
cp -fv $nginx_conf /etc/nginx/nginx.conf
|
cp -fv $nginx_conf /etc/nginx/nginx.conf
|
||||||
cp -fv $nginx_app_conf /etc/nginx/conf.d/front.conf
|
envsubst '${qlBaseUrl}' < $nginx_app_conf > /etc/nginx/conf.d/front.conf
|
||||||
echo -e "---> 配置文件复制完成\n"
|
echo -e "---> 配置文件复制完成\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ import_config() {
|
||||||
[[ -f $file_config_user ]] && . $file_config_user
|
[[ -f $file_config_user ]] && . $file_config_user
|
||||||
[[ -f $file_env ]] && . $file_env
|
[[ -f $file_env ]] && . $file_env
|
||||||
|
|
||||||
|
ql_base_url=${QlBaseUrl:-"/"}
|
||||||
command_timeout_time=${CommandTimeoutTime:-"1h"}
|
command_timeout_time=${CommandTimeoutTime:-"1h"}
|
||||||
proxy_url=${ProxyUrl:-""}
|
proxy_url=${ProxyUrl:-""}
|
||||||
file_extensions=${RepoFileExtensions:-"js py"}
|
file_extensions=${RepoFileExtensions:-"js py"}
|
||||||
|
|
|
@ -327,7 +327,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-layout-sider {
|
.ant-layout-sider {
|
||||||
border-right: 1px solid rgba(0, 0, 0, 0.06);
|
border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-pro-sider-logo {
|
.ant-pro-sider-logo {
|
||||||
|
|
|
@ -108,7 +108,6 @@ const CronDetailModal = ({
|
||||||
wordWrap: 'on',
|
wordWrap: 'on',
|
||||||
}}
|
}}
|
||||||
onMount={(editor, monaco) => {
|
onMount={(editor, monaco) => {
|
||||||
console.log(monaco);
|
|
||||||
editorRef.current = editor;
|
editorRef.current = editor;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -390,7 +390,7 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => {
|
||||||
const getCrons = () => {
|
const getCrons = () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const { page, size, sorter } = pageConf;
|
const { page, size, sorter } = pageConf;
|
||||||
let url = `${config.apiPrefix}crons?searchText=${searchText}&page=${page}&size=${size}`;
|
let url = `${config.apiPrefix}crons?searchValue=${searchText}&page=${page}&size=${size}`;
|
||||||
if (sorter && sorter.field) {
|
if (sorter && sorter.field) {
|
||||||
url += `&sortField=${sorter.field}&sortType=${
|
url += `&sortField=${sorter.field}&sortType=${
|
||||||
sorter.order === 'ascend' ? 'ASC' : 'DESC'
|
sorter.order === 'ascend' ? 'ASC' : 'DESC'
|
||||||
|
|
|
@ -186,7 +186,7 @@ const ViewManageModal = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCronViews();
|
// getCronViews();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user