mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-12 19:30:48 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a266425348 | ||
|
|
6dbe02e321 | ||
|
|
39979879c9 | ||
|
|
ba3f604a5c | ||
|
|
9572582401 | ||
|
|
2bcef0ba75 | ||
|
|
31cd7c4007 | ||
|
|
1c4c1799b0 | ||
|
|
2d558df15e | ||
|
|
7b769da4e2 |
+1
-1
@@ -43,7 +43,7 @@ export default (app: Router) => {
|
|||||||
children.push({
|
children.push({
|
||||||
title: childFile,
|
title: childFile,
|
||||||
value: childFile,
|
value: childFile,
|
||||||
key: childFile,
|
key: `${fileOrDir}-${childFile}`,
|
||||||
mtime: statObj.mtimeMs,
|
mtime: statObj.mtimeMs,
|
||||||
parent: fileOrDir,
|
parent: fileOrDir,
|
||||||
});
|
});
|
||||||
|
|||||||
+5
-2
@@ -44,8 +44,11 @@ const run = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
app
|
app
|
||||||
.listen(config.cronPort, () => {
|
.listen(config.cronPort, async () => {
|
||||||
run();
|
await require('./loaders/sentry').default({ expressApp: app });
|
||||||
|
await require('./loaders/db').default();
|
||||||
|
|
||||||
|
await run();
|
||||||
Logger.info(`
|
Logger.info(`
|
||||||
################################################
|
################################################
|
||||||
🛡️ Schedule listening on port: ${config.cronPort} 🛡️
|
🛡️ Schedule listening on port: ${config.cronPort} 🛡️
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ cp -f "$repo_path/jbot/requirements.txt" "$dir_root"
|
|||||||
cd $dir_root
|
cd $dir_root
|
||||||
cat requirements.txt | while read LREAD
|
cat requirements.txt | while read LREAD
|
||||||
do
|
do
|
||||||
if test ! -z "$(pip3 show "${LREAD%%=*}" 1>/dev/null)"; then
|
if [[ ! $(pip3 show "${LREAD%%=*}" 2>/dev/null) ]]; then
|
||||||
pip3 --default-timeout=100 install ${LREAD}
|
pip3 --default-timeout=100 install ${LREAD}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ dir_repo=$dir_root/repo
|
|||||||
dir_raw=$dir_root/raw
|
dir_raw=$dir_root/raw
|
||||||
dir_log=$dir_root/log
|
dir_log=$dir_root/log
|
||||||
dir_db=$dir_root/db
|
dir_db=$dir_root/db
|
||||||
|
dir_dep=$dir_root/deps
|
||||||
dir_list_tmp=$dir_log/.tmp
|
dir_list_tmp=$dir_log/.tmp
|
||||||
dir_code=$dir_log/code
|
dir_code=$dir_log/code
|
||||||
dir_update_log=$dir_log/update
|
dir_update_log=$dir_log/update
|
||||||
@@ -154,6 +155,7 @@ fix_config() {
|
|||||||
make_dir $dir_repo
|
make_dir $dir_repo
|
||||||
make_dir $dir_raw
|
make_dir $dir_raw
|
||||||
make_dir $dir_update_log
|
make_dir $dir_update_log
|
||||||
|
make_dir $dir_dep
|
||||||
|
|
||||||
if [[ ! -s $file_config_user ]]; then
|
if [[ ! -s $file_config_user ]]; then
|
||||||
echo -e "复制一份 $file_config_sample 为 $file_config_user,随后请按注释编辑你的配置文件:$file_config_user\n"
|
echo -e "复制一份 $file_config_sample 为 $file_config_user,随后请按注释编辑你的配置文件:$file_config_user\n"
|
||||||
|
|||||||
+3
-3
@@ -106,7 +106,7 @@ run_normal() {
|
|||||||
|
|
||||||
cd $dir_scripts
|
cd $dir_scripts
|
||||||
local relative_path="${first_param%/*}"
|
local relative_path="${first_param%/*}"
|
||||||
if [[ ! -z ${relative_path} ]]; then
|
if [[ ! -z ${relative_path} ]] && [[ ${first_param} =~ "/" ]]; then
|
||||||
cd ${relative_path}
|
cd ${relative_path}
|
||||||
first_param=${first_param/$relative_path\//}
|
first_param=${first_param/$relative_path\//}
|
||||||
fi
|
fi
|
||||||
@@ -174,7 +174,7 @@ run_concurrent() {
|
|||||||
|
|
||||||
cd $dir_scripts
|
cd $dir_scripts
|
||||||
local relative_path="${first_param%/*}"
|
local relative_path="${first_param%/*}"
|
||||||
if [[ ! -z ${relative_path} ]]; then
|
if [[ ! -z ${relative_path} ]] && [[ ${first_param} =~ "/" ]]; then
|
||||||
cd ${relative_path}
|
cd ${relative_path}
|
||||||
first_param=${first_param/$relative_path\//}
|
first_param=${first_param/$relative_path\//}
|
||||||
fi
|
fi
|
||||||
@@ -248,7 +248,7 @@ run_designated() {
|
|||||||
|
|
||||||
cd $dir_scripts
|
cd $dir_scripts
|
||||||
local relative_path="${file_param%/*}"
|
local relative_path="${file_param%/*}"
|
||||||
if [[ ! -z ${relative_path} ]]; then
|
if [[ ! -z ${relative_path} ]] && [[ ${file_param} =~ "/" ]]; then
|
||||||
cd ${relative_path}
|
cd ${relative_path}
|
||||||
file_param=${file_param/$relative_path\//}
|
file_param=${file_param/$relative_path\//}
|
||||||
fi
|
fi
|
||||||
|
|||||||
+9
-9
@@ -391,16 +391,11 @@ gen_list_repo() {
|
|||||||
if [[ $blackword ]]; then
|
if [[ $blackword ]]; then
|
||||||
files=$(echo "$files" | egrep -v $blackword)
|
files=$(echo "$files" | egrep -v $blackword)
|
||||||
fi
|
fi
|
||||||
if [[ $dependence ]]; then
|
|
||||||
cd ${dir_scripts}
|
|
||||||
depInScripts=$(eval $cmd | sed 's/^..//' | egrep -v $uniq_path | egrep $dependence)
|
|
||||||
for dep in ${depInScripts}; do
|
|
||||||
file_path=$(dirname $dep)
|
|
||||||
[[ ! $file_path =~ "/" ]] && file_path=""
|
|
||||||
make_dir "${dir_scripts}/${uniq_path}/${file_path#*/}"
|
|
||||||
cp -f $dep "${dir_scripts}/${uniq_path}/${file_path#*/}"
|
|
||||||
done
|
|
||||||
|
|
||||||
|
cp -f $file_notify_js "${dir_scripts}/${uniq_path}"
|
||||||
|
cp -f $file_notify_py "${dir_scripts}/${uniq_path}"
|
||||||
|
|
||||||
|
if [[ $dependence ]]; then
|
||||||
cd ${repo_path}
|
cd ${repo_path}
|
||||||
results=$(eval $cmd | sed 's/^..//' | egrep $dependence)
|
results=$(eval $cmd | sed 's/^..//' | egrep $dependence)
|
||||||
for _file in ${results}; do
|
for _file in ${results}; do
|
||||||
@@ -409,6 +404,11 @@ gen_list_repo() {
|
|||||||
cp -f $_file "${dir_scripts}/${uniq_path}/${file_path}"
|
cp -f $_file "${dir_scripts}/${uniq_path}/${file_path}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -d $dir_dep ]]; then
|
||||||
|
cp $dir_dep/* "${dir_scripts}/${uniq_path}" &>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
for file in ${files}; do
|
for file in ${files}; do
|
||||||
filename=$(basename $file)
|
filename=$(basename $file)
|
||||||
cp -f $file "$dir_scripts/${uniq_path}/${filename}"
|
cp -f $file "$dir_scripts/${uniq_path}/${filename}"
|
||||||
|
|||||||
Vendored
+14
-6
@@ -118,13 +118,17 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
dataIndex: 'value',
|
dataIndex: 'value',
|
||||||
key: 'value',
|
key: 'value',
|
||||||
align: 'center' as const,
|
align: 'center' as const,
|
||||||
width: '44%',
|
width: '35%',
|
||||||
ellipsis: {
|
ellipsis: {
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
},
|
},
|
||||||
render: (text: string, record: any) => {
|
render: (text: string, record: any) => {
|
||||||
return (
|
return (
|
||||||
<Tooltip placement="topLeft" title={text}>
|
<Tooltip
|
||||||
|
placement="topLeft"
|
||||||
|
title={text}
|
||||||
|
trigger={['hover', 'click']}
|
||||||
|
>
|
||||||
<span>{text}</span>
|
<span>{text}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
@@ -141,7 +145,7 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
dataIndex: 'timestamp',
|
dataIndex: 'timestamp',
|
||||||
key: 'timestamp',
|
key: 'timestamp',
|
||||||
align: 'center' as const,
|
align: 'center' as const,
|
||||||
width: 164,
|
width: 165,
|
||||||
ellipsis: {
|
ellipsis: {
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
},
|
},
|
||||||
@@ -151,9 +155,13 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
.toLocaleString(language, {
|
.toLocaleString(language, {
|
||||||
hour12: false,
|
hour12: false,
|
||||||
})
|
})
|
||||||
.replace(' 24:', ' 00:')
|
.replace(' 24:', ' 00:');
|
||||||
return (
|
return (
|
||||||
<Tooltip placement="topLeft" title={date}>
|
<Tooltip
|
||||||
|
placement="topLeft"
|
||||||
|
title={date}
|
||||||
|
trigger={['hover', 'click']}
|
||||||
|
>
|
||||||
<span>{date}</span>
|
<span>{date}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
@@ -528,7 +536,7 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
dataSource={value}
|
dataSource={value}
|
||||||
rowKey="_id"
|
rowKey="_id"
|
||||||
size="middle"
|
size="middle"
|
||||||
scroll={{ x: 768, y: tableScrollHeight }}
|
scroll={{ x: 1000, y: tableScrollHeight }}
|
||||||
components={components}
|
components={components}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onRow={(record: any, index: number) => {
|
onRow={(record: any, index: number) => {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ function getFilterData(keyword: string, data: any) {
|
|||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
if (item.title.toLocaleLowerCase().includes(keyword)) {
|
if (item.title.toLocaleLowerCase().includes(keyword)) {
|
||||||
tree.push(item);
|
tree.push(item);
|
||||||
expandedKeys.push(...item.children.map((x: any) => x.key));
|
|
||||||
} else {
|
} else {
|
||||||
const children: any[] = [];
|
const children: any[] = [];
|
||||||
(item.children || []).forEach((subItem: any) => {
|
(item.children || []).forEach((subItem: any) => {
|
||||||
@@ -29,7 +28,7 @@ function getFilterData(keyword: string, data: any) {
|
|||||||
...item,
|
...item,
|
||||||
children,
|
children,
|
||||||
});
|
});
|
||||||
expandedKeys.push(...children.map((x) => x.key));
|
expandedKeys.push(item.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -47,6 +46,7 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [height, setHeight] = useState<number>();
|
const [height, setHeight] = useState<number>();
|
||||||
const treeDom = useRef<any>();
|
const treeDom = useRef<any>();
|
||||||
|
const [expandedKeys, setExpandedKeys] = useState<string[]>([]);
|
||||||
|
|
||||||
const getLogs = () => {
|
const getLogs = () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@@ -100,8 +100,12 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
const onSearch = useCallback(
|
const onSearch = useCallback(
|
||||||
(e) => {
|
(e) => {
|
||||||
const keyword = e.target.value;
|
const keyword = e.target.value;
|
||||||
const { tree } = getFilterData(keyword.toLocaleLowerCase(), data);
|
const { tree, expandedKeys } = getFilterData(
|
||||||
|
keyword.toLocaleLowerCase(),
|
||||||
|
data,
|
||||||
|
);
|
||||||
setFilterData(tree);
|
setFilterData(tree);
|
||||||
|
setExpandedKeys(expandedKeys);
|
||||||
},
|
},
|
||||||
[data, setFilterData],
|
[data, setFilterData],
|
||||||
);
|
);
|
||||||
@@ -127,7 +131,6 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
treeData={data}
|
treeData={data}
|
||||||
placeholder="请选择日志文件"
|
placeholder="请选择日志文件"
|
||||||
showSearch
|
showSearch
|
||||||
key="value"
|
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
/>,
|
/>,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -35,16 +35,31 @@ import EditScriptNameModal from './editNameModal';
|
|||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
function getFilterData(keyword: string, data: any) {
|
function getFilterData(keyword: string, data: any) {
|
||||||
|
const expandedKeys: string[] = [];
|
||||||
if (keyword) {
|
if (keyword) {
|
||||||
const tree: any = [];
|
const tree: any = [];
|
||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
if (item.title.toLocaleLowerCase().includes(keyword)) {
|
if (item.title.toLocaleLowerCase().includes(keyword)) {
|
||||||
tree.push(item);
|
tree.push(item);
|
||||||
|
} else {
|
||||||
|
const children: any[] = [];
|
||||||
|
(item.children || []).forEach((subItem: any) => {
|
||||||
|
if (subItem.title.toLocaleLowerCase().includes(keyword)) {
|
||||||
|
children.push(subItem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return { tree };
|
if (children.length > 0) {
|
||||||
|
tree.push({
|
||||||
|
...item,
|
||||||
|
children,
|
||||||
|
});
|
||||||
|
expandedKeys.push(item.key);
|
||||||
}
|
}
|
||||||
return { tree: data };
|
}
|
||||||
|
});
|
||||||
|
return { tree, expandedKeys };
|
||||||
|
}
|
||||||
|
return { tree: data, expandedKeys };
|
||||||
}
|
}
|
||||||
|
|
||||||
const LangMap: any = {
|
const LangMap: any = {
|
||||||
@@ -70,6 +85,7 @@ const Script = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
const editorRef = useRef<any>(null);
|
const editorRef = useRef<any>(null);
|
||||||
const [isAddFileModalVisible, setIsAddFileModalVisible] = useState(false);
|
const [isAddFileModalVisible, setIsAddFileModalVisible] = useState(false);
|
||||||
const [currentNode, setCurrentNode] = useState<any>();
|
const [currentNode, setCurrentNode] = useState<any>();
|
||||||
|
const [expandedKeys, setExpandedKeys] = useState<string[]>([]);
|
||||||
|
|
||||||
const getScripts = () => {
|
const getScripts = () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@@ -132,7 +148,11 @@ const Script = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
(e) => {
|
(e) => {
|
||||||
const keyword = e.target.value;
|
const keyword = e.target.value;
|
||||||
setSearchValue(keyword);
|
setSearchValue(keyword);
|
||||||
const { tree } = getFilterData(keyword.toLocaleLowerCase(), data);
|
const { tree, expandedKeys } = getFilterData(
|
||||||
|
keyword.toLocaleLowerCase(),
|
||||||
|
data,
|
||||||
|
);
|
||||||
|
setExpandedKeys(expandedKeys);
|
||||||
setFilterData(tree);
|
setFilterData(tree);
|
||||||
},
|
},
|
||||||
[data, setFilterData],
|
[data, setFilterData],
|
||||||
@@ -323,7 +343,6 @@ const Script = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
treeData={data}
|
treeData={data}
|
||||||
placeholder="请选择脚本文件"
|
placeholder="请选择脚本文件"
|
||||||
showSearch
|
showSearch
|
||||||
key="value"
|
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
/>,
|
/>,
|
||||||
<Dropdown overlay={menu} trigger={['click']}>
|
<Dropdown overlay={menu} trigger={['click']}>
|
||||||
|
|||||||
+9
-8
@@ -1,9 +1,10 @@
|
|||||||
export const version = '2.10.6';
|
export const version = '2.10.7';
|
||||||
export const changeLogLink = 'https://t.me/jiao_long/225';
|
export const changeLogLink = 'https://t.me/jiao_long/226';
|
||||||
export const changeLog = `2.10.6 版本说明
|
export const changeLog = `2.10.7 版本说明
|
||||||
1. 增加各版本自动打包workflow,感谢 https://github.com/fzls PR
|
1. repo命令默认给仓库添加sendNotify依赖
|
||||||
2. 环境变量添加更新时间,感谢 https://github.com/miniers PR
|
2. 增加 /ql/deps 目录,此目录下的依赖文件会覆盖系统默认和仓库内的依赖文件
|
||||||
3. 修复脚本管理结构
|
3. 修复脚本管理列表及搜索
|
||||||
4. 修复定时匹配规则
|
4. 修复环境变量手机端列表样式
|
||||||
5. 修复检查更新
|
5. 修复秒级定时任务服务
|
||||||
|
6. 修复bot启动命令
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user