diff --git a/internal/pkg/helper/exec/ztf.go b/internal/pkg/helper/exec/ztf.go index 0fb7820f686bbd0b0215a27851319cfdf08505d4..3c89bef5535bb2e6541839a5695c35393424e108 100644 --- a/internal/pkg/helper/exec/ztf.go +++ b/internal/pkg/helper/exec/ztf.go @@ -26,12 +26,12 @@ import ( ) func ExecCases(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) (report commDomain.ZtfReport, pathMaxWidth int, err error) { - if testSet.Cmd != "" { - err = execCmd(testSet.Cmd, testSet.WorkspacePath) - if err != nil { - return - } - } + // if testSet.Cmd != "" { + // err = execCmd(testSet.Cmd, testSet.WorkspacePath) + // if err != nil { + // return + // } + // } return RunZtf(ch, testSet.WorkspacePath, 0, 0, commConsts.Case, testSet.Cases, msg) } diff --git a/internal/pkg/helper/script/parser.go b/internal/pkg/helper/script/parser.go index 44c89560e159b0b677355ea71f68b1e4759a986a..d6de3e9f785530b6edc56e5a9a119fd3651e083a 100644 --- a/internal/pkg/helper/script/parser.go +++ b/internal/pkg/helper/script/parser.go @@ -400,6 +400,9 @@ func ScriptToExpectName(file string) string { } func getScriptComments(content, lang string) (ret string) { + if lang == "" { + return + } reg := fmt.Sprintf(`(?smU)%s((?U:.*))%s`, commConsts.LangCommentsRegxMap[lang][0], commConsts.LangCommentsRegxMap[lang][1]) arr := regexp.MustCompile(reg).FindStringSubmatch(content) if len(arr) < 2 { // wrong format diff --git a/internal/server/modules/v1/service/job.go b/internal/server/modules/v1/service/job.go index 0cb7632c922aa65717b90cc7158ed530c0f3edb2..d8772cc1752ea98810b72634f0e64bb8c56794f5 100644 --- a/internal/server/modules/v1/service/job.go +++ b/internal/server/modules/v1/service/job.go @@ -64,7 +64,7 @@ func (s *JobService) Start(po *model.Job) { s.JobRepo.UpdateStatus(po, commConsts.JobInprogress, true, false) if po.Cmd != "" { - shellUtils.ExeShellWithOutput(po.Cmd) + shellUtils.ExeShellWithOutputInDir(po.Cmd, po.Workspace) } err := execHelper.Exec(nil, req, nil) diff --git a/ui/src/locales/en-US.ts b/ui/src/locales/en-US.ts index 483af434653d097ff791dd03d6c04258da4d0ee2..b8d28ecc6b2d9d812231c597e1c311c220fdae3e 100644 --- a/ui/src/locales/en-US.ts +++ b/ui/src/locales/en-US.ts @@ -18,6 +18,7 @@ export default { 'name': 'Name', 'path': 'Path', 'type': 'Type', + 'file': 'File', 'create_time': 'Create Time', 'created_by': 'Created By', 'start_time': 'Start Time', diff --git a/ui/src/locales/zh-CN.ts b/ui/src/locales/zh-CN.ts index 2767af14f0a9848e0ab98c4d4210903d5768c2cd..c8cc42363001870665521ecd7f24a3238026628f 100644 --- a/ui/src/locales/zh-CN.ts +++ b/ui/src/locales/zh-CN.ts @@ -19,6 +19,7 @@ export default { 'name': '名称', 'path': '路径', 'type': '类型', + 'file': '文件', 'create_time': '创建时间', 'created_by': '创建者', 'start_time': '开始时间', diff --git a/ui/src/views/script/FormSyncFromZentao.vue b/ui/src/views/script/FormSyncFromZentao.vue index 8b3ae629af35475bbf2fbbe7290facc47ce828e5..9967a6cf3492b939dd2a0b4065285c66f61c5677 100644 --- a/ui/src/views/script/FormSyncFromZentao.vue +++ b/ui/src/views/script/FormSyncFromZentao.vue @@ -162,7 +162,7 @@ const submit = () => { } okTitle.value = t('syncing'); disabled.value = true; - console.log("syncFromZentaoSubmit", console.log(selectedCases.value)); + console.log("syncFromZentaoSubmit", selectedCases.value); if (validate()) { emit("submit", {caseIds:selectedCases.value, ...modelRef.value}); } @@ -191,6 +191,7 @@ const fetchCases = () => { ...modelRef.value, }).then((res) => { tableNotice.value = t('empty_data'); + selectedCases.value = []; res.data.forEach((item, index) => { res.data[index].checked = true; selectedCases.value.push(item.Id); diff --git a/ui/src/views/script/WorkDir.vue b/ui/src/views/script/WorkDir.vue index 9a9bb1a59c06d85d9cf15ae07542cb2836e2ecb9..4dfbf9c0eec6d6c52689d6ffeda7fcf9718c3711 100644 --- a/ui/src/views/script/WorkDir.vue +++ b/ui/src/views/script/WorkDir.vue @@ -504,7 +504,7 @@ const menuClick = (menuKey: string, targetId: number) => { Modal.confirm({ title: t("confirm_delete", { name: contextNodeData.title, - typ: t("node"), + typ: t(contextNodeData.type), }), okText: t("confirm"), cancelText: t("cancel"),