修复任务跳转脚本参数,task运行脚本支持更多参数

This commit is contained in:
whyour
2021-12-21 00:23:20 +08:00
parent 3f12d9cbd5
commit 5bfa10bfe7
4 changed files with 49 additions and 9 deletions
+5 -1
View File
@@ -335,8 +335,12 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
const [tableScrollHeight, setTableScrollHeight] = useState<number>();
const goToScriptManager = (record: any) => {
const cmd = record.command.split(' ');
const cmd = record.command.split(' ') as string[];
if (cmd[0] === 'task') {
if (cmd[1].startsWith('/ql/scripts')) {
cmd[1] = cmd[1].replace('/ql/scripts/', '');
}
let [p, s] = cmd[1].split('/');
if (!s) {
s = p;