mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复脚本管理和日志管理树字段
This commit is contained in:
parent
15678b029c
commit
be76ff4675
|
@ -63,10 +63,10 @@
|
|||
"nodemailer": "^6.7.2",
|
||||
"p-queue": "7.2.0",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"sequelize": "^6.17.0",
|
||||
"sequelize": "^6.20.1",
|
||||
"serve-handler": "^6.1.3",
|
||||
"sockjs": "^0.3.24",
|
||||
"sqlite3": "npm:@louislam/sqlite3@^15.0.3",
|
||||
"sqlite3": "npm:@louislam/sqlite3@^15.0.6",
|
||||
"toad-scheduler": "^1.6.0",
|
||||
"typedi": "^0.10.0",
|
||||
"uuid": "^8.3.2",
|
||||
|
|
|
@ -60,7 +60,7 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
|
|||
|
||||
const getLog = (node: any) => {
|
||||
request
|
||||
.get(`${config.apiPrefix}logs/${node.value}?path=${node.parent || ''}`)
|
||||
.get(`${config.apiPrefix}logs/${node.title}?path=${node.parent || ''}`)
|
||||
.then((data) => {
|
||||
setValue(data.data);
|
||||
});
|
||||
|
@ -113,6 +113,7 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
|
|||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
treeData={data}
|
||||
placeholder="请选择日志"
|
||||
fieldNames={{ value: 'key', label: 'title' }}
|
||||
showSearch
|
||||
onSelect={onSelect}
|
||||
/>,
|
||||
|
|
|
@ -66,7 +66,7 @@ const EditModal = ({
|
|||
|
||||
const getDetail = (node: any) => {
|
||||
request
|
||||
.get(`${config.apiPrefix}scripts/${node.value}?path=${node.parent || ''}`)
|
||||
.get(`${config.apiPrefix}scripts/${node.title}?path=${node.parent || ''}`)
|
||||
.then((data) => {
|
||||
setValue(data.data);
|
||||
});
|
||||
|
@ -77,7 +77,7 @@ const EditModal = ({
|
|||
request
|
||||
.put(`${config.apiPrefix}scripts/run`, {
|
||||
data: {
|
||||
filename: cNode.value,
|
||||
filename: cNode.title,
|
||||
path: cNode.parent || '',
|
||||
},
|
||||
})
|
||||
|
@ -87,13 +87,13 @@ const EditModal = ({
|
|||
};
|
||||
|
||||
const stop = () => {
|
||||
if (!cNode || !cNode.value) {
|
||||
if (!cNode || !cNode.title) {
|
||||
return;
|
||||
}
|
||||
request
|
||||
.put(`${config.apiPrefix}scripts/stop`, {
|
||||
data: {
|
||||
filename: cNode.value,
|
||||
filename: cNode.title,
|
||||
path: cNode.parent || '',
|
||||
},
|
||||
})
|
||||
|
@ -146,6 +146,7 @@ const EditModal = ({
|
|||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
treeData={treeData}
|
||||
placeholder="请选择脚本文件"
|
||||
fieldNames={{ value: 'key', label: 'title' }}
|
||||
showSearch
|
||||
onSelect={onSelect}
|
||||
/>
|
||||
|
@ -243,7 +244,7 @@ const EditModal = ({
|
|||
content:
|
||||
editorRef.current &&
|
||||
editorRef.current.getValue().replace(/\r\n/g, '\n'),
|
||||
filename: cNode?.value,
|
||||
filename: cNode?.title,
|
||||
}}
|
||||
/>
|
||||
<SettingModal
|
||||
|
|
|
@ -451,6 +451,7 @@ const Script = ({ headerStyle, isPhone, theme, socketMessage }: any) => {
|
|||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
treeData={data}
|
||||
placeholder="请选择脚本"
|
||||
fieldNames={{ value: 'key', label: 'title' }}
|
||||
showSearch
|
||||
onSelect={onSelect}
|
||||
/>,
|
||||
|
|
Loading…
Reference in New Issue
Block a user